/* SIB Mauritanie — styles des modules marketing (WhatsApp, réseaux sociaux, parrainage, veille). */
/* Chaîne WhatsApp */
.wa-follow { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 16px; background: #e9f9ef; border: 1px solid #bfe9cf; color: #0b3d22; }
.wa-follow-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #25d366; color: #fff; }
.wa-follow-text { flex: 1; min-width: 0; }
.wa-follow-text strong { display: block; font-size: 1.02rem; }
.wa-follow-text span { font-size: .9rem; color: #2f5a42; }
.wa-follow .btn-wa { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px;
  background: #25d366; color: #fff; font-weight: 700; text-decoration: none; }
.wa-follow .btn-wa:hover, .wa-follow .btn-wa:focus-visible { background: #1da851; color: #fff; }
.wa-follow-strip { margin-block: 0 1.2rem; padding: .7rem 1rem; }
.wa-follow-strip .wa-follow-icon { width: 36px; height: 36px; }
@media (max-width: 560px) { .wa-follow { flex-wrap: wrap; } .wa-follow .btn-wa { width: 100%; justify-content: center; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-follow { background: #12301f; border-color: #1f5236; color: #e3f6ea; }
  :root:not([data-theme="light"]) .wa-follow-text span { color: #b9dcc6; } }
:root[data-theme="dark"] .wa-follow { background: #12301f; border-color: #1f5236; color: #e3f6ea; }
:root[data-theme="dark"] .wa-follow-text span { color: #b9dcc6; }

/* Encart « Suivez SIB Mauritanie » */
.soc-follow { padding: 1.1rem 1.25rem; border-radius: 16px; background: var(--paper, #fff); border: 1px solid var(--line, #e3e9e6); }
.soc-follow h2 { font-size: 1.05rem; margin: 0 0 .25rem; }
.soc-follow p { margin: 0 0 .8rem; color: var(--muted, #5d6d66); font-size: .93rem; }
.soc-follow-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.soc-follow-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .45rem .95rem; border-radius: 999px;
  color: #fff; font-weight: 600; text-decoration: none; }
.soc-follow-btn:hover, .soc-follow-btn:focus-visible { filter: brightness(.92); color: #fff; }
.soc-follow-btn.sf-whatsapp { background: #1da851; } .soc-follow-btn.sf-facebook { background: #1877f2; } .soc-follow-btn.sf-linkedin { background: #0a66c2; }
.soc-follow-btn.sf-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); } .soc-follow-btn.sf-telegram { background: #1f8fc9; }
.soc-follow-btn.sf-youtube { background: #e00000; } .soc-follow-btn.sf-x { background: #111; }

/* Bannière du parrainage */
.ref-banner { position: relative; overflow: hidden; isolation: isolate; border-radius: 20px; padding: clamp(1.2rem, 1rem + 1.5vw, 2rem);
  margin-block-end: 1.4rem; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #0b6b3f 0%, #053b23 60%); box-shadow: 0 18px 40px -22px rgba(0,0,0,.6); }
.ref-banner::after { content: ""; position: absolute; z-index: -1; width: 320px; height: 320px; inset-inline-end: -90px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(238,146,35,.55), transparent 70%); }
.ref-top { display: flex; gap: 1rem; align-items: flex-start; }
.ref-gift { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #ee9223; color: #fff; }
.ref-kicker { margin: 0 0 .2rem; color: #ffcf8f; font-weight: 700; font-size: .82rem; letter-spacing: .04em; }
html[lang="fr"] .ref-kicker { text-transform: uppercase; }
.ref-banner h2 { margin: 0 0 .35rem; font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); line-height: 1.25; color: #fff; }
.ref-banner p.ref-lead { margin: 0; color: #d3ebdc; max-width: 62ch; }
.ref-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin-block: 1.2rem 1rem; }
.ref-tier { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: .8rem .9rem; }
.ref-tier strong { display: block; color: #ffcf8f; font-size: 1.05rem; }
.ref-tier span { font-size: .88rem; color: #e6f4ec; }
.ref-tier.ref-done { background: rgba(238,146,35,.22); border-color: rgba(238,146,35,.6); }
.ref-progress { display: flex; align-items: center; gap: .8rem; margin-block-end: 1rem; }
.ref-bar { flex: 1; height: 12px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.ref-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ee9223, #ffcf8f); }
.ref-count { font-weight: 700; white-space: nowrap; }
.ref-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ref-link { flex: 1 1 260px; display: flex; min-width: 0; border-radius: 12px; overflow: hidden; background: #fff; }
.ref-link input { flex: 1; min-width: 0; border: 0; padding: .7rem .9rem; font: inherit; color: #0f1f1a; background: transparent; }
.ref-link button { border: 0; padding: 0 1rem; font: inherit; font-weight: 700; background: #e2f6eb; color: #054a2a; cursor: pointer; }
.ref-wa { display: inline-flex; align-items: center; gap: .45rem; min-height: 46px; padding: .6rem 1.1rem; border-radius: 12px; background: #25d366; color: #fff;
  font-weight: 700; text-decoration: none; }
.ref-wa:hover, .ref-wa:focus-visible { background: #1da851; color: #fff; }
.ref-more { color: #ffcf8f; font-weight: 600; }
.ref-status { margin: .9rem 0 0; font-size: .9rem; color: #d3ebdc; }
@media (max-width: 640px) { .ref-tiers { grid-template-columns: 1fr; } .ref-wa { width: 100%; justify-content: center; } }

/* Veille */
.vei-kind-news { background: #e8f0fe; color: #1a4fa0; border-color: transparent; }
.vei-reclass summary { cursor: pointer; color: var(--muted, #5d6d66); margin-block-start: .3rem; }
.vei-reclass .btn-row { gap: .8rem; margin-block-start: .3rem; }

/* Pied de page et menu mobile */
.footer-social-title { font-size: .95rem; margin: 1.2rem 0 .5rem; color: inherit; }
.nav-social { display: none; }
@media (max-width: 1100px) {
  .nav-social { display: flex; gap: .6rem; padding: .8rem .2rem .2rem; border-top: 1px solid var(--line, #e3e9e6); margin-top: .4rem; }
  .nav-social .soc-badge { width: 40px; height: 40px; }
}

/* Largeur de la barre de progression (les attributs style="" sont bloqués par la politique de sécurité) */
.ref-bar .ref-w-1 { width: 3%; }
.ref-bar .ref-w-10 { width: 10%; }
.ref-bar .ref-w-20 { width: 20%; }
.ref-bar .ref-w-30 { width: 30%; }
.ref-bar .ref-w-40 { width: 40%; }
.ref-bar .ref-w-50 { width: 50%; }
.ref-bar .ref-w-60 { width: 60%; }
.ref-bar .ref-w-70 { width: 70%; }
.ref-bar .ref-w-80 { width: 80%; }
.ref-bar .ref-w-90 { width: 90%; }
.ref-bar .ref-w-100 { width: 100%; }

/* Espacements */
.mk-gap-top { margin-block-start: 1.2rem; }
.mk-gap-bottom { margin-block-end: 1.2rem; }

/* Menu de l'administration en groupes */
.admin-menu { display: grid; gap: .55rem; margin-block-end: 1.6rem; }
.admin-menu-group { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.admin-menu-label { flex: none; min-width: 11rem; font-size: .76rem; font-weight: 700; letter-spacing: .05em; color: var(--muted, #5d6d66); }
html[lang="fr"] .admin-menu-label { text-transform: uppercase; }
.admin-menu .tabs { margin: 0; }
@media (max-width: 760px) { .admin-menu-label { min-width: 0; width: 100%; } }

/* Inscription simplifiée */
.reg-head { margin-block-end: 1rem; }
.reg-head p { margin: .3rem 0 0; }
.pw-wrap { display: flex; gap: .4rem; }
.pw-wrap input { flex: 1; min-width: 0; }
.pw-toggle { flex: none; padding: 0 .9rem; border: 1px solid var(--line, #d7dfdb); border-radius: 10px; background: var(--paper, #fff); color: var(--ink, #0f1f1a); font: inherit; font-size: .9rem; cursor: pointer; }
.reg-submit { min-height: 52px; font-size: 1.05rem; margin-block-start: .5rem; }
.reg-form .account-type .choice small { display: block; }

/* ===== Bandeau d'accueil plus compact ===== */
.hero { padding-block: 2.6rem 2.2rem; }
.hero-title { font-size: clamp(1.8rem, 1.2rem + 2.3vw, 2.85rem); margin-block-end: .35em; }
.hero-lead { font-size: 1.05rem; }
.hero-search { margin-block-start: 1.35rem; }
.hero-stats { margin-block-start: 1.4rem; }
.hero-stats dd { font-size: 1.65rem; }
/* Avec « À la une » : le bandeau se prolonge pour accueillir les cartes à cheval */
.hero.has-featured { padding-block-end: 6.4rem; }

/* ===== À la une ===== */
.featured { position: relative; z-index: 2; margin-block: -4.4rem 2rem; }
.featured-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; margin-block-end: 1rem; color: #fff; }
.featured-head h2 { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.featured-head p { margin: 0; color: var(--hero-text); font-size: .95rem; }
.featured-star { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #3d2400;
  background: linear-gradient(135deg, #ffd27a, var(--gold)); box-shadow: 0 0 0 5px rgba(238, 146, 35, .18); animation: feat-pulse 2.8s ease-in-out infinite; }
@keyframes feat-pulse { 0%, 100% { box-shadow: 0 0 0 5px rgba(238, 146, 35, .18); } 50% { box-shadow: 0 0 0 9px rgba(238, 146, 35, .06); } }

.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.featured-grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.feat-card { position: relative; border-radius: var(--r-m); background: var(--paper); box-shadow: var(--shadow-float);
  border: 1px solid var(--line); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.feat-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--emerald), #36c77e); }
.feat-card.is-tender::before { background: linear-gradient(90deg, var(--gold), #ffc66b); }
.feat-lane { display: flex; flex-direction: column;
  background: linear-gradient(var(--paper), var(--paper)) padding-box, linear-gradient(135deg, #ffd27a, var(--gold) 40%, var(--emerald)) border-box;
  border: 2px solid transparent; }
/* Défilement : les annonces d'une carte sont superposées, une seule visible */
.feat-slides { display: grid; flex: 1; }
.feat-slides > .feat-link { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateX(14px); transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s; }
[dir="rtl"] .feat-slides > .feat-link { transform: translateX(-14px); }
.feat-slides > .feat-link.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .45s ease, visibility 0s; }
/* Barre de progression sur le liseré du haut */
.feat-lane::after { content: ""; position: absolute; inset: 0 auto auto 0; height: 4px; width: 0; background: rgba(255, 255, 255, .55); }
[dir="rtl"] .feat-lane::after { inset: 0 0 auto auto; }
.feat-lane.is-ticking::after { animation: feat-progress 6s linear forwards; }
.feat-lane.is-paused::after { animation-play-state: paused; }
@keyframes feat-progress { from { width: 0; } to { width: 100%; } }
.feat-dots { display: flex; justify-content: center; gap: .3rem; padding: 0 1rem .45rem; margin-block-start: -.3rem; }
.feat-dot { display: inline-grid; place-items: center; width: 26px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.feat-dot span { display: block; width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width .25s ease, background-color .25s ease; }
.feat-dot.is-active span { width: 22px; background: var(--emerald); }
.is-tender .feat-dot.is-active span { background: var(--gold); }
.feat-dot:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 999px; }
.feat-card:hover { transform: translateY(-4px); box-shadow: 0 24px 46px -18px rgba(15, 31, 26, .45); }
.feat-link { display: flex; flex-direction: column; gap: .55rem; height: 100%; padding: 1.1rem 1.3rem 1rem; color: var(--ink); text-decoration: none; }
.feat-link:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-m); }

.feat-top { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.feat-kind { flex: none; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .2rem .65rem; border-radius: 999px;
  background: var(--emerald-tint); color: var(--emerald); }
html[lang="ar"] .feat-kind { letter-spacing: 0; font-size: .8rem; }
.is-tender .feat-kind { background: var(--gold-tint); color: var(--gold-text); }
.feat-ribbon { flex: none; display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 700; color: #6b3d00;
  padding: .2rem .6rem; border-radius: 999px; background: linear-gradient(135deg, #ffe3a8, #ffc66b); }
.feat-ribbon svg { width: 13px; height: 13px; }

.feat-org { flex: 1; display: flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--muted); font-weight: 500; min-width: 0; }
.feat-org > span:last-child { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.feat-verified { color: var(--emerald); font-weight: 700; }
.feat-title { font-size: 1.12rem; line-height: 1.38; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.76em; }
.feat-link:hover .feat-title { color: var(--emerald); }
.feat-meta { flex: 1; display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .83rem; color: var(--muted); min-width: 0; }
.feat-type { font-weight: 600; color: var(--ink); }
.feat-foot { margin-block-start: auto; display: flex; align-items: center; gap: .8rem; padding-block-start: .6rem; border-top: 1px dashed var(--line); }
.feat-deadline { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; font-weight: 600; color: var(--muted); }
.feat-deadline.is-soon { color: var(--red); }
.feat-go { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--emerald); color: #fff; transition: transform .2s ease, background-color .2s ease; }
.is-tender .feat-go { background: var(--gold); color: #0f1f1a; }
.feat-link:hover .feat-go { transform: translateX(3px); }
[dir="rtl"] .feat-go svg { transform: scaleX(-1); }
[dir="rtl"] .feat-link:hover .feat-go { transform: translateX(-3px); }


/* Téléphone : les deux cartes l'une sous l'autre */
@media (max-width: 640px) {
  .hero { padding-block: 2rem 1.8rem; }
  .hero-stats { gap: .4rem 1.4rem; }
  .hero-stats dd { font-size: 1.35rem; }
  .hero-stats dt { font-size: .85rem; }
  .featured-grid { grid-template-columns: 1fr; gap: .8rem; }
  .feat-link { padding: .95rem 1rem .85rem; }
  .feat-title { font-size: 1.02rem; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .featured-star { animation: none; }
  .feat-card, .feat-go, .feat-slides > .feat-link { transition: none; }
  .feat-lane.is-ticking::after { animation: none; }
}

/* Administration « À la une » */
.une-now { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .5rem; }
.une-now li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.une-search { display: flex; gap: .5rem; margin-block-end: 1rem; max-width: 520px; }
.une-search input { flex: 1; }
.une-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.une-actions .btn { min-height: 36px; padding: .35rem .7rem; font-size: .85rem; }
tr.une-on td { background: var(--gold-tint); }

@media (max-width: 640px) {
  .feat-meta { display: none; }
  .feat-ribbon { font-size: 0; gap: 0; padding: .3rem; }
  .feat-foot { justify-content: space-between; }
}
