/* ============================================================
   AFRICARRIÈRES — Main Stylesheet
   ============================================================ */

/* --- Accessibilité --- */
.afc-skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--afc-accent);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top .15s;
}
.afc-skip-link:focus { top: 0; }

/* Card avec lien couvrant (évite button-in-a) */
.afc-opp-card--linked { cursor: pointer; }
.afc-opp-card__cover-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.afc-opp-card--linked:hover { box-shadow: var(--afc-shadow-md); }

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--afc-bg);
  color: var(--afc-text);
  font-family: var(--afc-font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* --- Layout --- */
.afc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* --- Typography --- */
.afc-display {
  font-family: var(--afc-font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

/* --- Animations --- */
@keyframes afcPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(0.82); }
}
@keyframes afcFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HEADER
   ============================================================ */
.afc-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid #e8e2d8;
}

.afc-header__top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

/* Logos dual light/dark */
.afc-logo { display: block; object-fit: contain; }
.afc-logo--light { width: var(--afc-logo-light-w, 160px); height: var(--afc-logo-light-h, 40px); }
.afc-logo--dark  { display: none; width: var(--afc-logo-dark-w, 160px); height: var(--afc-logo-dark-h, 40px); }
.afc-logo-text   { font-family: var(--afc-font-display); font-weight: 800; font-size: 22px; color: var(--afc-accent); }

.afc-header__logo-btn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.afc-header__logo {
  height: clamp(28px, 5vw, 34px);
  width: auto;
}

.afc-header__nav-main {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.afc-header__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.afc-header__sub-nav {
  border-top: 1px solid #ede7dd;
}

.afc-header__sub-nav .afc-container {
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 0;
  padding-bottom: 0;
}

.afc-header__sub-nav .afc-container::-webkit-scrollbar { display: none; }

/* Nav buttons */
.afc-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--afc-text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.afc-nav-btn:hover,
.afc-nav-btn.is-active {
  background: #efe9df;
  color: var(--afc-text);
}
.afc-nav-btn--active {
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
}

.afc-sub-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--afc-text-muted);
  padding: 11px 14px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.afc-sub-nav-btn:hover,
.afc-sub-nav-btn.is-active {
  color: var(--afc-accent);
  border-bottom-color: var(--afc-accent);
}

/* ── Sélecteur d'apparence (Clair / Sombre / Système) ── */
.afc-theme-selector {
  display: flex;
  align-items: center;
  background: var(--afc-surface-2);
  border: 1px solid var(--afc-border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.afc-theme-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  border-radius: 7px;
  width: 30px; height: 30px;
  cursor: pointer;
  color: var(--afc-text-muted);
  transition: background .14s, color .14s;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  flex-shrink: 0;
}
.afc-theme-opt svg { flex-shrink: 0; pointer-events: none; }
.afc-theme-opt:hover { color: var(--afc-text); background: var(--afc-border); }
.afc-theme-opt.is-active {
  background: var(--afc-surface);
  color: var(--afc-text);
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.afc-theme-opt:focus-visible {
  outline: 2px solid var(--afc-accent);
  outline-offset: 1px;
}

/* Version mobile (avec labels) */
.afc-theme-selector--full {
  width: 100%;
  background: var(--afc-surface-2);
  border-radius: 12px;
  padding: 4px;
  gap: 3px;
}
.afc-theme-selector--full .afc-theme-opt {
  flex: 1;
  width: auto;
  height: auto;
  padding: 8px 6px;
  font-size: 12px;
  gap: 5px;
  flex-direction: row;
}
.afc-theme-selector--full .afc-theme-opt.is-active {
  background: var(--afc-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* Rétrocompat : ancien bouton toggle */
.afc-darkmode-btn {
  display: none;
}

/* Favs button */
.afc-btn-favs {
  position: relative;
  background: none;
  border: 1px solid var(--afc-border-strong);
  cursor: pointer;
  padding: 8px 11px;
  border-radius: var(--afc-radius-sm);
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  color: var(--afc-text);
  transition: border-color .15s;
  white-space: nowrap;
}
.afc-btn-favs:hover { border-color: var(--afc-accent); }

/* Accès à l'espace candidat (barre supérieure et tiroir mobile) */
.afc-btn-espace {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--afc-border-strong);
  border-radius: var(--afc-radius-sm);
  font-size: 13.5px; font-weight: 600;
  color: var(--afc-text);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s;
}
.afc-btn-espace:hover { border-color: var(--afc-accent); color: var(--afc-accent); }
.afc-btn-espace svg { flex: none; }

/* Sous 1100px la barre supérieure est déjà chargée : on garde l'icône,
   le libellé complet reste dans le tiroir mobile. */
@media (max-width: 1100px) {
  .afc-btn-espace span { display: none; }
  .afc-btn-espace { padding: 8px 10px; }
}

.afc-drawer__espace {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: var(--afc-radius-sm);
  background: var(--afc-accent);
  color: #fff;
  font-size: 14.5px; font-weight: 650;
  text-decoration: none;
}
.afc-drawer__espace:hover { filter: brightness(1.06); }

/* Lien « Sans pub » (barre supérieure et tiroir mobile) */
.afc-btn-sanspub {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--afc-border-strong);
  border-radius: var(--afc-radius-sm);
  font-size: 13.5px; font-weight: 600;
  color: var(--afc-text);
  text-decoration: none;
  white-space: nowrap;
}
.afc-btn-sanspub:hover { border-color: var(--afc-accent); color: var(--afc-accent); }
.afc-btn-sanspub svg { flex: none; }
@media (max-width: 1100px) {
  .afc-btn-sanspub span { display: none; }
  .afc-btn-sanspub { padding: 8px 10px; }
}

.afc-drawer__sanspub {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--afc-border-strong);
  border-radius: var(--afc-radius-sm);
  color: var(--afc-text);
  font-size: 14.5px; font-weight: 650;
  text-decoration: none;
}
.afc-drawer__sanspub:hover { border-color: var(--afc-accent); color: var(--afc-accent); }

/* Alert button */
.afc-btn-alert {
  background: var(--afc-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 9px 15px;
  border-radius: var(--afc-radius-sm);
  font-size: 13.5px; font-weight: 600;
  transition: filter .15s;
  white-space: nowrap;
}
.afc-btn-alert:hover { filter: brightness(1.06); }

/* Hamburger — 3 barres */
.afc-hamburger {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--afc-border-strong);
  background: var(--afc-surface);
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  color: var(--afc-text);
  transition: border-color .15s, background .15s;
  padding: 0;
}
.afc-hamburger:hover { border-color: var(--afc-accent); }
.afc-hamburger__bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--afc-text);
  border-radius: 2px;
  transition: transform .22s, opacity .22s, background .2s;
}
/* En dark mode, les barres doivent être visibles sur fond sombre */
#page.theme-dark .afc-hamburger {
  background: var(--afc-surface-2);
  border-color: var(--afc-border-strong);
}
#page.theme-dark .afc-hamburger__bar { background: var(--afc-header-text); }

/* Overlay du drawer — voir bloc ci-dessous */

/* Overlay du drawer */
.afc-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(30,22,14,.50);
  z-index: 998;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.afc-drawer-overlay.is-visible { display: block; }
/* Overlay dark — ciblé sur html car position:fixed */
html.afc-dark-init .afc-drawer-overlay { background: rgba(0,0,0,0.68); }

/* ── DRAWER SLIDE-IN ──
   IMPORTANT : position:fixed sort du containing block de #page.
   Les CSS custom properties de #page.theme-dark ne s'héritent PAS
   automatiquement sur les éléments fixed. On utilise html.afc-dark-init
   (posé par le JS sur <html>) pour cibler le dark mode de façon fiable. */
.afc-drawer {
  position: fixed;
  top: 0; left: 0;
  width: min(320px, 90vw);
  height: 100dvh;
  background: #ffffff;          /* fond opaque solide — mode clair */
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 6px 0 40px rgba(30,22,14,.18);
}
.afc-drawer.is-open { transform: translateX(0); }

/* ── Dark mode drawer (via html.afc-dark-init) ── */
html.afc-dark-init .afc-drawer { background: #1e1c18; box-shadow: 6px 0 40px rgba(0,0,0,.45); }
html.afc-dark-init .afc-drawer__head { background: #1e1c18; border-color: #2e2b26; }
html.afc-dark-init .afc-drawer__close { background: #252320; border-color: #3d3830; color: #a89f92; }
html.afc-dark-init .afc-drawer__section { border-color: #2e2b26; }
html.afc-dark-init .afc-drawer__nav li a,
html.afc-dark-init .afc-mobile-menu__item { color: #ede7dc; border-color: #2e2b26; }
html.afc-dark-init .afc-drawer__label { color: #6b6459; }
html.afc-dark-init .afc-drawer__cat { background: #252320; border-color: #2e2b26; color: #ede7dc; }
html.afc-dark-init .afc-drawer__cat:hover { background: #2e1f16; border-color: var(--afc-accent); color: var(--afc-accent); }
html.afc-dark-init .afc-drawer__cat-icon { color: #a89f92; }
html.afc-dark-init .afc-drawer__cat:hover .afc-drawer__cat-icon { color: var(--afc-accent); }
html.afc-dark-init .afc-drawer__foot { background: #131210; border-color: #2e2b26; }
html.afc-dark-init .afc-drawer__appearance .afc-drawer__label { color: #6b6459; }
html.afc-dark-init .afc-theme-selector { background: #252320; border-color: #2e2b26; }
html.afc-dark-init .afc-theme-opt { color: #a89f92; }
html.afc-dark-init .afc-theme-opt:hover { background: #3d3830; color: #ede7dc; }
html.afc-dark-init .afc-theme-opt.is-active { background: #1e1c18; color: #ede7dc; }
/* Back-to-top fixed — même problème */
html.afc-dark-init .afc-back-to-top { background: #1e1c18; border-color: #3d3830; color: #a89f92; }
html.afc-dark-init .afc-back-to-top:hover { background: var(--afc-accent); border-color: var(--afc-accent); color: #fff; }

/* ── Header du drawer ── */
.afc-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--afc-drawer-bg);
  border-bottom: 1px solid var(--afc-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.afc-drawer__logo { text-decoration: none; }
.afc-drawer__close {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--afc-border-strong);
  background: var(--afc-surface-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--afc-text-muted);
  transition: background .15s, color .15s;
}
.afc-drawer__close:hover { background: var(--afc-accent-soft); color: var(--afc-accent); }

/* ── Sections ── */
.afc-drawer__section {
  padding: 12px 18px;
  border-bottom: 1px solid var(--afc-border);
}

/* ── Nav links ── */
.afc-drawer__nav {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.afc-drawer__nav li a {
  display: flex;
  align-items: center;
  font-size: 15px; font-weight: 600;
  color: var(--afc-text);
  padding: 12px 2px;
  border-bottom: 1px solid var(--afc-border);
  text-decoration: none;
  transition: color .15s;
}
.afc-drawer__nav li a:hover  { color: var(--afc-accent); }
.afc-drawer__nav li:last-child a { border-bottom: none; }
.afc-mobile-menu__item {
  display: block;
  font-size: 15px; font-weight: 600;
  color: var(--afc-text);
  padding: 12px 2px;
  border-bottom: 1px solid var(--afc-border);
  width: 100%; text-align: left;
  background: none; border-left: none; border-right: none; border-top: none;
  cursor: pointer;
}

/* ── Label section ── */
.afc-drawer__label {
  font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--afc-text-faint);
  margin-bottom: 10px;
  display: block;
}

/* ── Grille catégories (icônes SVG monochromes) ── */
.afc-drawer__cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.afc-drawer__cat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--afc-surface-2);
  border: 1.5px solid var(--afc-border);
  font-size: 12.5px; font-weight: 700;
  color: var(--afc-text);
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
  line-height: 1.25;
}
.afc-drawer__cat:hover {
  border-color: var(--afc-accent);
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
}
.afc-drawer__cat-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--afc-text-muted);
  display: flex; align-items: center; justify-content: center;
}
.afc-drawer__cat-icon svg { width: 18px; height: 18px; }
.afc-drawer__cat:hover .afc-drawer__cat-icon { color: var(--afc-accent); }

/* ── Pied du drawer ── */
.afc-drawer__foot {
  padding: 16px 18px 20px;
  margin-top: auto;
  border-top: 1px solid var(--afc-border);
  background: var(--afc-surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.afc-drawer__foot .afc-btn-alert {
  border-radius: 12px;
  font-size: 14px;
  width: 100%; padding: 13px;
}
.afc-drawer__appearance {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Ancien darkrow — conservé pour rétrocompat, masqué */
.afc-drawer__darkrow { display: none; }

/* Dark mode overrides for drawer */
/* Drawer dark — voir bloc consolidé en bas */

/* ============================================================
   HERO SECTION
   ============================================================ */
.afc-hero {
  padding: clamp(40px, 6vw, 84px) 0 30px;
}

.afc-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 100px;
}
.afc-hero__badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--afc-accent);
  animation: afcPulse 2s infinite;
}

.afc-hero__title {
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: clamp(32px, 5.5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 20px 0 0;
  max-width: 16ch;
  text-wrap: balance;
}
.afc-hero__title em {
  font-style: normal;
  color: var(--afc-accent);
}

.afc-hero__sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--afc-text-muted);
  max-width: 58ch;
  margin: 16px 0 0;
  line-height: 1.6;
}

/* Alignement centré */
.afc-hero--center { text-align: center; }
.afc-hero--center .afc-hero__title,
.afc-hero--center .afc-hero__sub   { max-width: none; }
.afc-hero--center .afc-search-bar  { margin-left: auto; margin-right: auto; }
.afc-hero--center .afc-hero__stats { justify-content: center; }
.afc-hero--center .afc-hero__badge { display: inline-flex; }

/* ── Search bar (unified pill) ── */
.afc-search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 30px;
  max-width: 820px;
  background: var(--afc-surface);
  border: 1.5px solid #e4ddd1;
  border-radius: 16px;
  padding: 6px 6px 6px 18px;
  box-shadow: 0 2px 16px rgba(60,40,20,.07);
}
.afc-search-bar__input-wrap {
  /* Le champ texte absorbe tout l'espace restant : c'est le contrôle
     principal. Les listes gardent une largeur fixe (plus bas) — sans
     quoi elles grandissaient au même rythme, mais avec 140px d'avance :
     le champ se retrouvait deux fois plus étroit qu'elles. */
  flex: 1 1 0;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
  min-width: 0;
}
/* Séparateurs entre champs */
.afc-search-bar__sep {
  width: 1px;
  height: 28px;
  background: #e4ddd1;
  flex-shrink: 0;
  margin: 0 6px;
}
.afc-search-bar__input {
  flex: 1; min-width: 0;
  border: none; outline: none;
  background: none;
  font-size: 15.5px;
  padding: 11px 0;
  color: var(--afc-text);
  font-family: inherit;
}
.afc-search-bar__input::placeholder { color: #9a9085; }
.afc-search-bar__input:focus { outline: none; }
.afc-search-bar__select:focus { outline: 2px solid var(--afc-accent); outline-offset: 2px; border-radius: 4px; }
.afc-search-bar__btn {
  background: var(--afc-accent);
  color: #fff;
  border: none; cursor: pointer;
  padding: 13px 22px;
  border-radius: 11px;
  font-size: 15px; font-weight: 700;
  transition: filter .15s, box-shadow .15s;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
  display: flex; align-items: center; gap: 7px;
}
.afc-search-bar__btn:hover { filter: brightness(1.08); }
.afc-search-bar__btn:focus-visible { outline: 3px solid var(--afc-focus-ring); outline-offset: 2px; }

.afc-search-bar__select {
  /* Largeur fixe : « Catégorie » et « Domaine » sont des libellés courts,
     rien ne justifie qu'ils s'étirent. Elles rétrécissent jusqu'à 108px
     si la barre est contrainte, mais ne s'élargissent jamais. */
  flex: 0 1 160px;
  min-width: 108px;
  text-overflow: ellipsis;
  border: none;
  background: transparent;
  padding: 10px 28px 10px 8px;
  font-size: 14px; font-weight: 600;
  color: var(--afc-text);
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9085' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  outline: none;
}

/* Stats */
.afc-hero__stats {
  display: flex;
  gap: 30px;
  margin-top: 34px;
  flex-wrap: wrap;
  align-items: center;
}
.afc-hero__stat-num {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 28px;
}
.afc-hero__stat-label {
  font-size: 13px;
  color: var(--afc-text-faint);
  font-weight: 500;
}
.afc-hero__stat-sep {
  width: 1px;
  height: 32px;
  background: #e4ddd1;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.afc-section-title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.afc-section-sub {
  color: var(--afc-text-faint);
  margin: 0 0 22px;
  font-size: 15px;
}

/* ============================================================
   URGENT STRIP
   ============================================================ */
.afc-urgent { padding: 20px 0 10px; }

.afc-urgent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.afc-urgent__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 20px;
  display: flex; align-items: center; gap: 9px;
  color: var(--afc-text);
}
.afc-pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #c0392b;
  animation: afcPulse 1.6s infinite;
  display: inline-block;
  flex-shrink: 0;
}
.afc-btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--afc-accent);
  font-weight: 600; font-size: 14px;
  padding: 0;
  transition: opacity .15s;
  text-decoration: none;
}
.afc-btn-link:hover { opacity: .75; }

/* Scroll horizontal avec snap */
.afc-urgent__scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--afc-border) transparent;
}
.afc-urgent__scroll::-webkit-scrollbar { height: 4px; }
.afc-urgent__scroll::-webkit-scrollbar-track { background: transparent; }
.afc-urgent__scroll::-webkit-scrollbar-thumb { background: var(--afc-border); border-radius: 4px; }

.afc-opp-card-mini {
  flex: 0 0 220px;
  /* Sans cela, la ligne méta (nowrap) impose sa longueur comme largeur
     minimale : une organisation au nom long élargissait la carte. */
  min-width: 0;
  scroll-snap-align: start;
  text-align: left;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 16px 18px 14px;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .15s;
  display: block;
  text-decoration: none;
}
.afc-opp-card-mini:hover {
  border-color: var(--afc-accent);
  box-shadow: 0 4px 20px rgba(60,40,20,.08);
  transform: translateY(-2px);
}
.afc-opp-card-mini__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
/* Le compte à rebours ne se coupe jamais (« J- / 5 ») : c'est l'étiquette
   de type, plus longue, qui passe sur deux lignes si la place manque. */
.afc-opp-card-mini__top .afc-badge--urg {
  flex-shrink: 0;
  white-space: nowrap;
}
.afc-opp-card-mini__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--afc-text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.afc-opp-card-mini__meta {
  font-size: 12.5px;
  color: var(--afc-text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   OPPORTUNITY CARDS
   ============================================================ */
.afc-opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 14px;
}

.afc-opp-card {
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 15px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 188px;
  transition: border-color .15s, box-shadow .15s;
  text-decoration: none;
  color: inherit;
}
.afc-opp-card:hover {
  border-color: var(--afc-accent);
  box-shadow: var(--afc-shadow-md);
}

.afc-opp-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.afc-opp-card__top-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.afc-opp-card__title {
  font-family: var(--afc-font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 11px 0 7px;
}
.afc-opp-card__summary {
  color: #7a7268;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 12px;
  flex: 1;
}
.afc-opp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0ebe2;
  padding-top: 11px;
}
.afc-opp-card__country {
  font-size: 12px;
  color: var(--afc-text-faint);
  font-weight: 600;
}
.afc-opp-card__funding {
  font-size: 12px;
  font-weight: 700;
  color: #4a443c;
}

/* Organisation sous le titre */
.afc-opp-card__org {
  font-size: 12.5px;
  color: var(--afc-text-faint);
  font-weight: 600;
  margin-bottom: 6px;
}

/* ── Variante HORIZONTALE ── */
.afc-opp-card--horizontal {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-height: auto;
  padding: 14px;
}
.afc-opp-card--horizontal .afc-opp-card__body { flex: 1; min-width: 0; }
.afc-opp-card--horizontal .afc-opp-card__title { font-size: 15px; margin: 6px 0 4px; }
.afc-opp-card__thumb {
  flex: 0 0 72px; height: 72px;
  border-radius: 10px;
  background-size: cover; background-position: center;
}
.afc-opp-card__thumb-placeholder {
  flex: 0 0 72px; height: 72px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--afc-font-display); font-weight: 800; font-size: 18px;
}

/* ── Variante COMPACTE ── */
.afc-opp-card--compact {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  min-height: auto;
  padding: 12px;
  border-radius: 12px;
}
.afc-opp-card--compact__icon {
  flex: 0 0 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--afc-font-display); font-weight: 800; font-size: 12px;
  text-align: center; line-height: 1.2;
}

/* ── Variante FEATURED ── */
.afc-opp-card--featured {
  min-height: auto;
  padding: 0;
  overflow: hidden;
  border-radius: var(--afc-radius-lg);
}
.afc-opp-card--featured__img {
  height: 160px;
  background-size: cover; background-position: center;
  background-color: var(--afc-accent-soft);
  display: flex; align-items: flex-end; padding: 14px;
}
.afc-opp-card--featured__body { padding: 18px; flex: 1; display: flex; flex-direction: column; }

/* Fav button */
.afc-btn-fav {
  background: none; border: none; cursor: pointer;
  padding: 3px; line-height: 0;
  color: var(--afc-accent);
  transition: transform .15s;
}
.afc-btn-fav:hover { transform: scale(1.2); }

/* Type badge */
.afc-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  display: inline-block;
}
.afc-badge--urg {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  display: inline-block;
}

/* ============================================================
   CARTE PARTENAIRE
   ============================================================ */
.afc-card-partenaire {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.afc-card-partenaire:hover {
  border-color: var(--afc-accent);
  box-shadow: var(--afc-shadow-md);
}
.afc-card-partenaire__logo {
  flex: 0 0 60px; height: 60px;
  border-radius: 12px;
  border: 1px solid var(--afc-border);
  background: var(--afc-bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.afc-card-partenaire__logo img { width: 44px; height: 44px; object-fit: contain; }
.afc-card-partenaire__body { flex: 1; min-width: 0; }
.afc-card-partenaire__nom { font-family: var(--afc-font-display); font-weight: 700; font-size: 16px; color: var(--afc-text); }
.afc-card-partenaire__desc { font-size: 13px; color: var(--afc-text-muted); margin-top: 4px; line-height: 1.4; }
.afc-card-partenaire__arrow { color: var(--afc-text-faint); flex-shrink: 0; }

/* ============================================================
   CARTE STATISTIQUE
   ============================================================ */
.afc-card-stat {
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.afc-card-stat__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.afc-card-stat__num {
  font-family: var(--afc-font-display);
  font-weight: 800; font-size: 36px;
  letter-spacing: -0.03em; line-height: 1;
}
.afc-card-stat__label { font-size: 14px; color: var(--afc-text-faint); font-weight: 500; }
.afc-card-stat__trend { font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.afc-card-stat__trend.is-up  { color: #2d7a4f; }
.afc-card-stat__trend.is-down { color: #c0392b; }

/* ============================================================
   CARTE TÉMOIGNAGE
   ============================================================ */
.afc-card-temoignage {
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.afc-card-temoignage__quote-icon { color: var(--afc-accent-soft); }
.afc-card-temoignage__stars { display: flex; gap: 2px; }
.afc-card-temoignage__text {
  font-size: 15px; line-height: 1.65;
  color: #4a443c;
  font-style: italic;
  flex: 1;
}
.afc-card-temoignage__opp {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700;
  color: var(--afc-accent);
  background: var(--afc-accent-soft);
  padding: 6px 10px; border-radius: 7px;
  width: fit-content;
}
.afc-card-temoignage__author { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.afc-card-temoignage__avatar {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.afc-card-temoignage__avatar-placeholder {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--afc-accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--afc-font-display); font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.afc-card-temoignage__nom { font-weight: 700; font-size: 14px; color: var(--afc-text); }
.afc-card-temoignage__pays { font-size: 12.5px; color: var(--afc-text-faint); }

/* ============================================================
   FEATURED SECTION (À la une)
   ============================================================ */
.afc-featured { padding: 34px 0 10px; }

.afc-featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  align-items: stretch;
}

/* Big featured card */
.afc-feat-card {
  text-align: left;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius-lg);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
}
.afc-feat-card:hover {
  border-color: var(--afc-accent);
  box-shadow: var(--afc-shadow-lg);
}
.afc-feat-card__img {
  height: 200px;
  background: var(--afc-accent-soft);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  overflow: hidden;
}
/* Image de couverture */
.afc-feat-card__img img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Dégradé sombre en bas pour lisibilité du label */
.afc-feat-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,12,4,.55) 0%, transparent 55%);
  pointer-events: none;
}
/* Placeholder hachuré quand pas d'image */
.afc-feat-card__img--no-thumb {
  background: repeating-linear-gradient(
    135deg,
    var(--afc-accent-soft),
    var(--afc-accent-soft) 11px,
    var(--afc-surface) 11px,
    var(--afc-surface) 22px
  );
}
.afc-feat-card__img-label {
  position: relative;
  z-index: 2;
  font-family: var(--afc-font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--afc-accent);
  background: rgba(255,253,250,.92);
  padding: 5px 9px;
  border-radius: 6px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.afc-feat-card__body {
  padding: 20px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.afc-feat-card__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}
.afc-feat-card__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.afc-feat-card__summary {
  color: var(--afc-text-muted);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.afc-feat-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.afc-feat-card__org {
  font-size: 13px;
  color: var(--afc-text-faint);
  font-weight: 500;
}
.afc-feat-card__funding {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--afc-accent);
}

/* Side featured cards */
.afc-feat-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.afc-feat-side-card {
  text-align: left;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius);
  padding: 16px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color .15s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
}
.afc-feat-side-card:hover {
  border-color: var(--afc-accent);
  box-shadow: var(--afc-shadow-md);
}
.afc-feat-side-card__icon {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: 13px;
}
.afc-feat-side-card__body { flex: 1; min-width: 0; }
.afc-feat-side-card__type { font-size: 11.5px; font-weight: 700; }
.afc-feat-side-card__title {
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.25;
  margin: 5px 0;
  color: var(--afc-text);
}
.afc-feat-side-card__meta { font-size: 12.5px; color: var(--afc-text-faint); }

/* ============================================================
   CATEGORIES GRID
   ============================================================ */
.afc-cats { padding: 40px 0 10px; }

.afc-cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.afc-cat-card {
  text-align: left;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 15px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 128px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  text-decoration: none;
  color: inherit;
}
.afc-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(60,45,30,0.07);
  border-color: var(--color, var(--afc-accent));
}
/* Icône monochrome SVG — fond neutre, icône en couleur thème */
.afc-cat-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--afc-surface-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--afc-text-muted);
  transition: background .15s, color .15s;
}
.afc-cat-card__icon svg { width: 22px; height: 22px; }
.afc-cat-card:hover .afc-cat-card__icon {
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
}
.afc-cat-card__icon-inner { display: none; }
.afc-cat-card__name {
  font-family: var(--afc-font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: var(--afc-text);
}
.afc-cat-card__count { font-size: 12.5px; color: var(--afc-text-muted); margin-top: 4px; }

/* ============================================================
   CATEGORY SECTIONS (accueil)
   ============================================================ */
.afc-cat-section { margin-top: 34px; }
.afc-cat-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e2d8;
}
.afc-cat-section__title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Icône de section — monochrome SVG, même style que cat-card */
.afc-cat-section__icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--afc-surface-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--afc-accent);
}
.afc-cat-section__icon svg { width: 22px; height: 22px; }
.afc-cat-section__icon-inner { display: none; }
.afc-cat-section__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: clamp(21px, 2.6vw, 28px);
  letter-spacing: -0.02em;
}
.afc-cat-section__intro { font-size: 13px; color: #9a9085; margin-top: 2px; }

.afc-btn-outline {
  background: none;
  border: 1px solid var(--afc-border-strong);
  cursor: pointer;
  color: #4a443c;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 15px;
  border-radius: var(--afc-radius-sm);
  transition: border-color .15s, color .15s;
  text-decoration: none;
  display: inline-block;
}
.afc-btn-outline:hover {
  border-color: var(--afc-accent);
  color: var(--afc-accent);
}

/* ============================================================
   AD PLACEHOLDER
   ============================================================ */
.afc-ad {
  border: 1.5px dashed #d8cfc0;
  border-radius: 16px;
  background: repeating-linear-gradient(
    135deg,
    #f3eee4, #f3eee4 14px,
    #f7f4ef 14px, #f7f4ef 28px
  );
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
.afc-ad__code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: #a89f92;
  letter-spacing: 0.05em;
}
.afc-ad__label { font-size: 13px; color: #9a9085; }

/* ============================================================
   ALERTS BAND
   ============================================================ */
/* Les variables --afc-alerts-* sont écrites en ligne par afc_alerts_band_css()
   quand une couleur est choisie dans Personnaliser → Bande Alertes.
   Sans elles, les valeurs de repli reproduisent le rendu d'origine. */
.afc-alerts-band {
  background-color: var(--afc-alerts-bg, var(--afc-accent));
  background-image: var(--afc-alerts-grad, none);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 52px);
  color: var(--afc-alerts-fg, #fff);
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  margin: 30px 0;
}
.afc-alerts-band::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--afc-alerts-deco, rgba(255,255,255,0.08));
}
.afc-alerts-band::after {
  content: '';
  position: absolute;
  right: 80px; bottom: -60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--afc-alerts-deco-2, rgba(255,255,255,0.05));
}
.afc-alerts-band__content { flex: 1 1 320px; position: relative; z-index: 1; }
.afc-alerts-band__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 32px);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.afc-alerts-band__sub {
  font-size: 15px;
  opacity: 0.88;
  line-height: 1.5;
}
.afc-alerts-band__form {
  flex: 1 1 320px;
  position: relative;
  z-index: 1;
}
.afc-alerts-band__input-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.afc-alerts-band__input {
  width: 100%;
  border: none;
  background: var(--afc-alerts-field, rgba(255,255,255,0.15));
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--afc-alerts-fg, #fff);
  font-family: inherit;
  outline: none;
}
.afc-alerts-band__input::placeholder { color: var(--afc-alerts-hint, rgba(255,255,255,.65)); }
.afc-alerts-band__input:focus {
  background: var(--afc-alerts-field, rgba(255,255,255,.15));
  box-shadow: 0 0 0 2px var(--afc-alerts-fg, #fff);
}
.afc-alerts-band__btn {
  background: var(--afc-alerts-btn-bg, #fff);
  color: var(--afc-alerts-btn-fg, var(--afc-accent));
  border: none; cursor: pointer;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 15px; font-weight: 700;
  transition: filter .15s;
  font-family: inherit;
  width: 100%;
}
.afc-alerts-band__btn:hover { filter: brightness(0.97); }

/* ============================================================
   LISTING PAGE
   ============================================================ */
/* ============================================================
   LISTING — LAYOUT 2 COLONNES
   ============================================================ */
.afc-listing { padding: 32px 0 60px; }

/* En-tête */
.afc-listing__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.afc-listing__page-title {
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.03em;
  color: var(--afc-text);
  margin: 0 0 4px;
}
.afc-listing__count {
  font-size: 14px;
  color: var(--afc-text-faint);
  font-weight: 600;
}
.afc-listing__sort {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.afc-listing__sort-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--afc-text-muted);
  white-space: nowrap;
}
.afc-sort-select {
  appearance: none;
  background: var(--afc-surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239a9085' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1.5px solid var(--afc-border);
  border-radius: 10px;
  padding: 9px 34px 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--afc-text);
  cursor: pointer;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.afc-sort-select:focus { border-color: var(--afc-accent); }

/* Layout 2 colonnes */
.afc-listing__layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── SIDEBAR FILTRES ── */
.afc-listing__sidebar {
  position: sticky;
  top: 84px;
  background: var(--afc-surface);
  border: 1.5px solid var(--afc-border);
  border-radius: 18px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.afc-filter-group { display: flex; flex-direction: column; gap: 8px; }
.afc-filter-group__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--afc-text-faint);
}

/* Champ de recherche dans sidebar */
.afc-filter-group__search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--afc-bg);
  border: 1.5px solid var(--afc-border);
  border-radius: 10px;
  padding: 9px 12px;
}
.afc-filter-search-input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--afc-text);
  font-family: inherit;
  width: 100%;
}
.afc-filter-search-input::placeholder { color: var(--afc-text-faint); }

/* Dropdowns pays / domaine */
.afc-filter-select-wrap {
  position: relative;
}
.afc-filter-dropdown {
  appearance: none;
  width: 100%;
  background: var(--afc-bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239a9085' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  border: 1.5px solid var(--afc-border);
  border-radius: 10px;
  padding: 9px 32px 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--afc-text);
  cursor: pointer;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.afc-filter-dropdown:focus { border-color: var(--afc-accent); }

/* Checkbox favoris */
.afc-filter-favs-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--afc-text-muted);
  cursor: pointer;
  padding: 2px 0;
  transition: color .15s;
}
.afc-filter-favs-label:hover { color: var(--afc-text); }
.afc-filter-favs-check { display: none; }
.afc-filter-favs-box {
  width: 20px; height: 20px;
  border: 2px solid var(--afc-border);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--afc-bg);
  transition: background .14s, border-color .14s;
}
.afc-filter-favs-box svg { display: none; color: #fff; }
.afc-filter-favs-check:checked + .afc-filter-favs-box {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
}
.afc-filter-favs-check:checked + .afc-filter-favs-box svg { display: block; }

/* Lien réinitialiser */
.afc-reset-filters {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--afc-text-faint);
  text-decoration: none;
  padding: 6px 0;
  transition: color .15s;
  display: inline-block;
  border-top: 1px solid var(--afc-border);
  padding-top: 14px;
}
.afc-reset-filters:hover { color: var(--afc-accent); }

/* ── GRILLE RÉSULTATS ── */
.afc-listing__results { min-width: 0; }

.afc-listing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

/* Slot pub dans la grille — cellule simple comme une carte */
.afc-listing__ad {
  display: flex;
  align-items: stretch;
}
.afc-listing__ad .afc-ad-slot,
.afc-listing__ad .afc-ad--placeholder {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  margin: 0 auto;
}

/* État vide */
.afc-listing__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--afc-text-muted);
}
.afc-listing__empty-icon { font-size: 48px; margin-bottom: 16px; }
.afc-listing__empty h3 {
  font-family: var(--afc-font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--afc-text);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .afc-listing__layout { grid-template-columns: 210px 1fr; gap: 20px; }
}
@media (max-width: 768px) {
  .afc-listing__layout { grid-template-columns: 1fr; }
  .afc-listing__sidebar {
    position: static;
    border-radius: 14px;
  }
  .afc-listing__grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 480px) {
  .afc-listing__head { gap: 12px; }
  .afc-listing__grid { grid-template-columns: 1fr; }
}

/* Dark mode listing — voir bloc consolidé en bas */

/* Pagination */
.afc-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.afc-page-btn {
  min-width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--afc-border-strong);
  background: var(--afc-surface);
  cursor: pointer;
  font-size: 14px; font-weight: 600;
  color: var(--afc-text-muted);
  padding: 0 12px;
  transition: border-color .15s, color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.afc-page-btn:hover { border-color: var(--afc-accent); color: var(--afc-accent); }
.afc-page-btn.is-active {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}

/* Pagination générée par paginate_links() / the_posts_pagination() :
   WordPress produit une <ul class="page-numbers"> — sans ce bloc, elle
   s'affichait en liste à puces non stylée. */
.afc-pagination .nav-links,
.afc-pagination ul.page-numbers {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.afc-pagination ul.page-numbers li { list-style: none; margin: 0; }
.afc-pagination .page-numbers {
  min-width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--afc-border-strong);
  background: var(--afc-surface);
  font-size: 14px; font-weight: 600;
  color: var(--afc-text-muted);
  padding: 0 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s;
}
.afc-pagination ul.page-numbers { /* la <ul> ne doit pas hériter du style des puces */
  min-width: 0; height: auto; border: none; background: none; padding: 0;
}
.afc-pagination a.page-numbers:hover { border-color: var(--afc-accent); color: var(--afc-accent); }
.afc-pagination .page-numbers.current {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}
.afc-pagination .page-numbers.dots {
  border: none;
  background: none;
  pointer-events: none;
}
.afc-pagination .screen-reader-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }

/* Date de publication sur les cartes */
.afc-card-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--afc-text-faint);
  white-space: nowrap;
}
.afc-card-date__icon { width: 13px; height: 13px; flex-shrink: 0; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.afc-detail { padding: 28px 0 60px; }

.afc-detail__layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

.afc-detail__breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--afc-text-faint);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.afc-detail__breadcrumb a { color: var(--afc-text-faint); transition: color .15s; }
.afc-detail__breadcrumb a:hover { color: var(--afc-accent); }
.afc-detail__breadcrumb-sep { color: #c2b9ab; }

.afc-detail__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.afc-detail__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 46px);
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin-bottom: 18px;
}
.afc-detail__meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--afc-border);
}
.afc-detail__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #5a544c;
  font-weight: 600;
}
.afc-detail__meta-item svg { color: var(--afc-text-faint); }

/* Article content */
.afc-detail__content h2 {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  scroll-margin-top: 130px;
}
.afc-detail__content p {
  font-size: 16px;
  line-height: 1.65;
  color: #4a443c;
  margin: 0 0 18px;
}
.afc-detail__content ul, .afc-detail__content ol { margin: 0 0 18px 24px; }
.afc-detail__content li { font-size: 16px; line-height: 1.6; color: #4a443c; margin-bottom: 6px; }

/* Table des matières — automatique (inc/sommaire.php) ou bloc Rank Math
   des anciens contenus : même encadré pour les deux. La numérotation est
   reprise ici car la feuille Rank Math n'est chargée qu'avec son bloc. */
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) {
  margin: 8px 0 28px;
  padding: 18px 22px 16px;
  /* --afc-surface-2 n'existe qu'en mode sombre : repli sur --afc-bg-alt. */
  background: var(--afc-surface-2, var(--afc-bg-alt));
  border: 1px solid var(--afc-border);
  border-left: 4px solid var(--afc-accent);
  border-radius: var(--afc-r-md);
}
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) > h2 {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--afc-accent);
}
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) nav ol li {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.45;
  border-top: 1px dashed var(--afc-border);
}
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) nav ol li:first-child { border-top: 0; }
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) nav ol li::before {
  content: counter(item);
  counter-increment: item;
  flex: 0 0 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) nav a {
  color: var(--afc-text);
  text-decoration: none;
  transition: color .15s;
}
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) nav a:hover,
.afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) nav a:focus-visible {
  color: var(--afc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 600px) {
  .afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) { padding: 14px 16px 12px; }
}

/* Eligibility checklist */
.afc-checklist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.afc-checklist-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.afc-checklist-icon {
  flex: 0 0 22px; height: 22px;
  border-radius: 50%;
  background: var(--afc-accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* Steps */
.afc-steps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 28px; }
.afc-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f0ebe2;
}
.afc-step__num {
  flex: 0 0 28px; height: 28px;
  border-radius: 9px;
  background: var(--afc-text);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--afc-font-display);
  font-weight: 700; font-size: 14px;
}
.afc-step__text {
  font-size: 15px;
  line-height: 1.5;
  color: #4a443c;
  padding-top: 3px;
}

/* Tags */
.afc-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.afc-tag {
  font-size: 12.5px; font-weight: 600;
  color: #6a6258;
  background: #f0ebe2;
  padding: 6px 12px;
  border-radius: 100px;
}

/* CTA box */
.afc-detail__cta-box {
  padding: 24px;
  background: var(--afc-accent-soft);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  margin-top: 30px;
}
.afc-detail__cta-title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.afc-detail__cta-sub {
  font-size: 14px;
  color: var(--afc-text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}
.afc-detail__cta-btns {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
}
.afc-btn-primary {
  background: var(--afc-accent-2);
  color: #fff;
  border: none; cursor: pointer;
  padding: 13px 24px;
  border-radius: 11px;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  transition: filter .15s;
  text-decoration: none;
  font-family: inherit;
}
.afc-btn-primary:hover { filter: brightness(1.07); }
.afc-btn-secondary {
  background: var(--afc-surface);
  color: var(--afc-text);
  border: 1px solid var(--afc-border-strong);
  cursor: pointer;
  padding: 13px 24px;
  border-radius: 11px;
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  transition: border-color .15s, color .15s;
  text-decoration: none;
  font-family: inherit;
}
.afc-btn-secondary:hover {
  border-color: var(--afc-accent-2);
  color: var(--afc-accent-2);
}

/* Sidebar */
.afc-detail__sidebar { position: sticky; top: 90px; }

.afc-detail__sticky-box {
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.afc-detail__sticky-header {
  height: 140px;
  background: repeating-linear-gradient(
    135deg,
    var(--afc-accent-soft), var(--afc-accent-soft) 10px,
    #fffdfa 10px, #fffdfa 20px
  );
  display: flex; align-items: center; justify-content: center;
}
.afc-detail__sticky-body { padding: 20px; }

.afc-deadline-box {
  background: linear-gradient(135deg, #fef3cd 0%, #fde8a8 100%);
  border: 1px solid #f5c842;
  border-radius: 12px;
  padding: 15px 18px;
  margin-bottom: 18px;
}
.afc-deadline-box__label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #8a6400; margin-bottom: 6px;
}
.afc-deadline-box__date {
  font-family: var(--afc-font-display);
  font-weight: 700; font-size: 20px; color: #6a4a00;
}
.afc-deadline-box__countdown {
  font-size: 12.5px; font-weight: 600;
  color: #c0392b; margin-top: 4px;
}

.afc-detail__info-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.afc-detail__info-item {
  display: flex; align-items: flex-start; gap: 12px;
}
.afc-detail__info-icon {
  flex: 0 0 32px; height: 32px;
  border-radius: 9px;
  background: var(--afc-accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--afc-accent);
}
.afc-detail__info-label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--afc-text-faint);
  margin-bottom: 2px;
}
.afc-detail__info-val {
  font-size: 14.5px; font-weight: 600; color: var(--afc-text);
}

/* TOC */
.afc-toc {
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius-lg);
  padding: 18px 20px;
}
.afc-toc__title {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #3a352f; margin-bottom: 12px;
}
.afc-toc__list { list-style: none; display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.afc-toc__item a {
  display: flex; align-items: baseline; gap: 10px;
  text-decoration: none;
  padding: 7px 0;
  color: #4a443c; font-size: 15px; font-weight: 600;
  transition: color .15s;
  border-top: 1px solid #f3eee5;
}
.afc-toc__item:first-child a { border-top: none; }
.afc-toc__item a:hover { color: var(--afc-accent-2); }
.afc-toc__num {
  color: var(--afc-accent-2);
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}

/* ============================================================
   FAVORITES PAGE
   ============================================================ */
.afc-favs { padding: 40px 0 60px; }
.afc-favs__empty {
  text-align: center;
  padding: 80px 20px;
}
.afc-favs__empty-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--afc-accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--afc-accent);
}
.afc-favs__empty-title {
  font-family: var(--afc-font-display);
  font-weight: 700; font-size: 22px;
  margin-bottom: 8px;
}
.afc-favs__empty-sub { color: var(--afc-text-faint); font-size: 15px; margin-bottom: 24px; }

/* ============================================================
   ALERT MODAL
   ============================================================ */
.afc-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30, 25, 20, 0.6);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: afcFadeIn .2s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.afc-modal {
  background: var(--afc-surface);
  border-radius: 22px;
  max-width: 500px; width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  /* Jamais plus haute que l'écran : le contenu scrolle à l'intérieur */
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
/* La liste des centres d'intérêt scrolle seule au-delà de ~5 rangées :
   le bouton « S'abonner » reste toujours visible */
.afc-modal__cats {
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
@media (max-width: 560px) {
  .afc-modal-overlay { padding: 10px; }
  .afc-modal {
    padding: 22px 18px;
    border-radius: 16px;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  .afc-modal__title { font-size: 20px; }
  .afc-modal__sub   { font-size: 14px; margin-bottom: 16px; }
  .afc-modal__cats  { max-height: 190px; }
  .afc-modal__cat-toggle { padding: 7px 11px; font-size: 12.5px; }
}
.afc-modal__close {
  position: absolute; top: 16px; right: 16px;
  background: #f3eee5; border: none;
  border-radius: 50%; width: 34px; height: 34px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--afc-text-muted); transition: background .15s;
}
.afc-modal__close:hover { background: #ece5da; }
.afc-modal__icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--afc-accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--afc-accent);
  margin-bottom: 18px;
}
.afc-modal__title {
  font-family: var(--afc-font-display);
  font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.afc-modal__sub {
  color: var(--afc-text-muted); font-size: 15px; line-height: 1.5;
  margin-bottom: 24px;
}
.afc-modal__form { display: flex; flex-direction: column; gap: 12px; }
.afc-modal__input {
  width: 100%;
  border: 1.5px solid var(--afc-border);
  border-radius: 11px;
  padding: 13px 16px;
  font-size: 15px; font-family: inherit;
  color: var(--afc-text);
  background: var(--afc-bg);
  transition: border-color .15s;
  outline: none;
}
.afc-modal__input:focus { border-color: var(--afc-accent); }
.afc-modal__cats-label {
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--afc-text-faint);
  margin-bottom: 8px;
}
.afc-modal__cats {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.afc-modal__cat-toggle {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--afc-border);
  background: none; cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: var(--afc-text-muted);
  transition: border-color .15s, color .15s, background .15s;
  font-family: inherit;
}
.afc-modal__cat-toggle.is-active,
.afc-modal__cat-toggle:hover {
  border-color: var(--afc-accent);
  color: var(--afc-accent);
  background: var(--afc-accent-soft);
}

/* ============================================================
   FOOTER
   ============================================================ */
/* !important pour résister aux surcharges CSS custom */
#page .afc-footer,
.afc-footer {
  background-color: #2a2521 !important;
  color: rgba(255,255,255,.7) !important;
  padding: 50px 0 28px;
  margin-top: 60px;
}
.afc-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.afc-footer__brand {}
.afc-footer__brand-logo { height: 32px; margin-bottom: 14px; }
.afc-footer__brand-desc {
  font-size: 14px; line-height: 1.6;
  max-width: 28ch;
  margin-bottom: 20px;
}
/* Social footer — défini une seule fois (bloc principal ci-dessous) */
.afc-footer__col-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255,255,255,.4); margin-bottom: 16px;
}
.afc-footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.afc-footer__link {
  font-size: 14px; color: rgba(255,255,255,.65);
  text-decoration: none; transition: color .15s;
}
.afc-footer__link:hover { color: #fff; }
.afc-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.afc-footer__copy { font-size: 13px; color: rgba(255,255,255,.4); }
.afc-footer__bottom-links {
  display: flex; gap: 20px;
}
.afc-footer__bottom-link {
  font-size: 13px;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .15s;
}
.afc-footer__bottom-link:hover { color: rgba(255,255,255,.7); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Desktop ── */
@media (min-width: 769px) {
  .afc-hamburger        { display: none !important; }
  .afc-drawer           { display: none !important; }
  .afc-drawer-overlay   { display: none !important; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  /* Header : logo à gauche, hamburger tout à droite */
  .afc-header__top {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
  }
  .afc-header__logo-btn  { grid-column: 1; }
  .afc-header__nav-main  { display: none; }
  .afc-header__actions   { display: none; }
  .afc-hamburger {
    grid-column: 2;
    display: flex;
    margin-left: auto;
  }

  /* Sidebar repasse en colonne */
  .afc-detail__layout    { grid-template-columns: 1fr; }
  .afc-detail__sidebar   { position: static; }

  /* Footer */
  .afc-footer__grid      { grid-template-columns: 1fr 1fr; }

  /* Grille cartes */
  .afc-opp-grid          { grid-template-columns: 1fr; }

  /* ── Search bar mobile : carte compacte style Airbnb ── */
  .afc-search-bar {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    background: var(--afc-surface) !important;
    border: 1.5px solid var(--afc-border) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 20px rgba(60,40,20,.09) !important;
    overflow: hidden !important;
    margin-top: 20px !important;
  }
  /* Champ texte — première ligne */
  .afc-search-bar__input-wrap {
    background: none !important;
    border: none !important;
    border-bottom: 1px solid var(--afc-border) !important;
    border-radius: 0 !important;
    padding: 0 18px !important;
    height: 52px !important;
    min-height: unset !important;
    box-shadow: none !important;
  }
  /* Séparateurs verticaux → désactivés sur mobile */
  .afc-search-bar__sep { display: none !important; }
  /* Selects — hauteur fixe 48px, sans min-height */
  .afc-search-bar__select {
    width: 100% !important;
    height: 48px !important;
    min-height: 0 !important;
    max-height: 48px !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239a9085' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    border: none !important;
    border-bottom: 1px solid var(--afc-border) !important;
    border-radius: 0 !important;
    padding: 0 44px 0 18px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    line-height: 48px !important;
  }
  /* 16px minimum : en dessous, Safari iOS zoome sur le champ dès la mise
     au point et laisse la page décalée, sans retour évident. */
  .afc-search-bar__input,
  .afc-search-bar__select { font-size: 16px !important; }

  /* Bouton Explorer — pleine largeur, bien visible */
  .afc-search-bar__btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0 20px !important;
    height: 52px !important;
    min-height: unset !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    border-top: none !important;
  }

  /* CTA alertes band : empile proprement */
  .afc-alerts-band {
    flex-direction: column;
    padding: 28px 20px;
    border-radius: 16px;
    gap: 20px;
  }
  .afc-alerts-band__content,
  .afc-alerts-band__form  { flex: none; width: 100%; }
  .afc-alerts-band__title { font-size: 22px; }
}

/* ============================================================
   SEARCH BAR — TABLETTE (768px–1024px)
   2 colonnes : [champ texte | catégorie] + [domaine + bouton]
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .afc-search-bar {
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    background: var(--afc-surface);
    border: 1.5px solid var(--afc-border);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(60,40,20,.07);
    overflow: hidden;
    margin-top: 24px;
  }
  /* Champ texte prend 55% */
  .afc-search-bar__input-wrap {
    flex: 1 1 55%;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0 18px;
    height: 52px;
    box-shadow: none;
    border-bottom: 1px solid var(--afc-border);
    border-right: 1px solid var(--afc-border);
  }
  /* Séparateur vertical original → caché, les borders font le travail */
  .afc-search-bar__sep { display: none; }
  /* Catégorie prend 45% sur ligne 1 */
  .afc-search-bar__select:first-of-type {
    flex: 1 1 45%;
    height: 52px;
    background: none;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--afc-border);
    padding: 0 40px 0 18px;
    font-size: 15px;
    font-weight: 500;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239a9085' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    min-height: unset;
  }
  /* Domaine prend toute la largeur sur ligne 2, moins le bouton */
  .afc-search-bar__select:last-of-type {
    flex: 1 1 60%;
    height: 52px;
    background: none;
    border: none;
    border-radius: 0;
    border-right: 1px solid var(--afc-border);
    padding: 0 40px 0 18px;
    font-size: 15px;
    font-weight: 500;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239a9085' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    min-height: unset;
  }
  /* Même garde-fou que sur mobile : la plage couvre les iPad. */
  .afc-search-bar__input { font-size: 16px; }

  /* Bouton Explorer : 40% de la ligne 2, bien visible */
  .afc-search-bar__btn {
    flex: 0 0 auto;
    min-width: 140px;
    height: 52px;
    padding: 0 24px;
    border-radius: 0;
    font-size: 15px;
    justify-content: center;
  }
}

/* ============================================================
   SEARCH BAR — DARK MODE overrides (mobile + tablette)
   ============================================================ */
html.afc-dark-init .afc-search-bar {
  background: var(--afc-surface);
  border-color: var(--afc-border);
}
html.afc-dark-init .afc-search-bar__input-wrap,
html.afc-dark-init .afc-search-bar__select {
  border-color: var(--afc-border);
  color: var(--afc-text);
}
html.afc-dark-init .afc-search-bar__select option {
  background: var(--afc-surface-2);
  color: var(--afc-text);
}

@media (max-width: 480px) {
  .afc-footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DARK MODE — toutes les couleurs via variables CSS
   ============================================================ */

/* ── Fond global ── */
#page.theme-dark,
#page.theme-dark body { background: var(--afc-bg); color: var(--afc-text); }

/* ── Header ── */
#page.theme-dark .afc-header {
  background: var(--afc-header-bg);
  border-bottom-color: var(--afc-border);
}
#page.theme-dark .afc-header__nav-main { background: transparent; }
#page.theme-dark .afc-header__nav-main a { color: var(--afc-header-text); }
#page.theme-dark .afc-header__nav-main a:hover { color: var(--afc-accent); }
/* État actif : le fond beige clair du mode clair est remplacé par une
   surface sombre + texte accent (sinon texte clair sur pastille claire) */
#page.theme-dark .afc-nav-btn.is-active,
#page.theme-dark .afc-nav-btn:hover {
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
}
#page.theme-dark .afc-darkmode-btn {
  border-color: var(--afc-border-strong);
  background: var(--afc-surface-2);
  color: var(--afc-text);
}
#page.theme-dark .afc-btn-favs { color: var(--afc-header-text); }
#page.theme-dark .afc-btn-sanspub { color: var(--afc-header-text); }
#page.theme-dark .afc-btn-sanspub:hover { color: var(--afc-accent); }
#page.theme-dark .afc-hamburger__bar { background: var(--afc-header-text); }

/* ── Logos ── */
.afc-logo--light { display: block; }
.afc-logo--dark  { display: none; }
#page.theme-dark .afc-logo--light { display: none; }
#page.theme-dark .afc-logo--dark  { display: block; }

/* ── Cards ── */
#page.theme-dark .afc-opp-card,
#page.theme-dark .afc-card-partenaire,
#page.theme-dark .afc-card-stat,
#page.theme-dark .afc-card-temoignage,
#page.theme-dark .afc-opp-card-mini {
  background: var(--afc-surface);
  border-color: var(--afc-border);
}
#page.theme-dark .afc-opp-card:hover,
#page.theme-dark .afc-opp-card-mini:hover {
  border-color: var(--afc-border-strong);
  box-shadow: var(--afc-shadow-md);
}
#page.theme-dark .afc-opp-card__meta,
#page.theme-dark .afc-opp-card__org { color: var(--afc-text-muted); }
#page.theme-dark .afc-opp-card__title { color: var(--afc-text); }

/* ── Sections ── */
#page.theme-dark .afc-section--bg,
#page.theme-dark .afc-hero,
#page.theme-dark .afc-urgent { background: var(--afc-surface); }
#page.theme-dark .afc-hero { border-bottom-color: var(--afc-border); }

/* ── Barre de recherche ── */
#page.theme-dark .afc-search-bar {
  background: var(--afc-surface);
  border-color: var(--afc-border);
  box-shadow: var(--afc-shadow-md);
}
#page.theme-dark .afc-search-bar__sep { background: var(--afc-border); }
#page.theme-dark .afc-search-bar__input {
  color: var(--afc-text);
  background: transparent;
}
#page.theme-dark .afc-search-bar__input::placeholder { color: var(--afc-text-faint); }
#page.theme-dark .afc-search-bar__select {
  color: var(--afc-text);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6459' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  /* Sans ces deux lignes, la règle générique #page.theme-dark select
     (background en raccourci, plus bas dans la cascade) réinitialise
     repeat/position à leurs valeurs par défaut malgré sa spécificité
     inférieure sur background-image : elle l'emporte quand même sur
     repeat/position puisque cette règle-ci ne les redéfinissait pas.
     Résultat observé : la flèche se répétait en mosaïque en mode sombre. */
  background-repeat: no-repeat;
  background-position: right 6px center;
}
#page.theme-dark .afc-search-bar__select option { background: var(--afc-surface); color: var(--afc-text); }

/* ── Formulaires & inputs ── */
#page.theme-dark input,
#page.theme-dark textarea,
#page.theme-dark select {
  background: var(--afc-input-bg);
  color: var(--afc-text);
  border-color: var(--afc-border);
}
#page.theme-dark input::placeholder,
#page.theme-dark textarea::placeholder { color: var(--afc-text-faint); }
#page.theme-dark input:focus,
#page.theme-dark textarea:focus,
#page.theme-dark select:focus {
  border-color: var(--afc-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--afc-focus-ring);
}

/* ── Boutons ── */
#page.theme-dark .afc-btn-primary {
  background: var(--afc-accent);
  color: #fff;
}
#page.theme-dark .afc-btn-primary:hover { filter: brightness(1.1); }
#page.theme-dark .afc-btn-secondary {
  background: var(--afc-surface-2);
  border-color: var(--afc-border-strong);
  color: var(--afc-text);
}
#page.theme-dark .afc-btn-alert {
  background: var(--afc-accent);
  color: #fff;
}

/* Drawer mobile — géré via html.afc-dark-init (position:fixed hors flux) */

/* ── Page listing ── */
#page.theme-dark .afc-listing__sidebar {
  background: var(--afc-surface);
  border-color: var(--afc-border);
}
#page.theme-dark .afc-filter-group__search,
#page.theme-dark .afc-filter-dropdown,
#page.theme-dark .afc-sort-select {
  background: var(--afc-input-bg);
  border-color: var(--afc-border);
  color: var(--afc-text);
}
#page.theme-dark .afc-listing__head { border-color: var(--afc-border); }
#page.theme-dark .afc-listing__page-title { color: var(--afc-text); }
#page.theme-dark .afc-listing__count { color: var(--afc-text-muted); }

/* ── Page article ── */
#page.theme-dark .afc-detail__sticky-box { background: var(--afc-surface); border-color: var(--afc-border); }
#page.theme-dark .afc-detail__meta { color: var(--afc-text-muted); }
#page.theme-dark .afc-detail__label { color: var(--afc-text-faint); }
#page.theme-dark .afc-detail__value { color: var(--afc-text); }
#page.theme-dark .afc-detail__content { color: var(--afc-text); }
#page.theme-dark .afc-detail__content h2,
#page.theme-dark .afc-detail__content h3 { color: var(--afc-text); }
#page.theme-dark .afc-detail__content :is(.afc-sommaire, .wp-block-rank-math-toc-block) > h2 { color: var(--afc-accent); }

/* ── Partage ── */
#page.theme-dark .afc-share { border-color: var(--afc-border); }
#page.theme-dark .afc-share__label { color: var(--afc-text-faint); }

/* ── Pagination ── */
#page.theme-dark .afc-page-btn {
  background: var(--afc-surface);
  border-color: var(--afc-border);
  color: var(--afc-text);
}
#page.theme-dark .afc-page-btn:hover { background: var(--afc-surface-2); }
#page.theme-dark .afc-page-btn--active {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}

/* ── Footer ── */
#page.theme-dark .afc-footer,
.afc-footer {
  background-color: #0d0c0a !important;
}
#page.theme-dark .afc-footer__brand-desc,
#page.theme-dark .afc-footer__link,
#page.theme-dark .afc-footer__copy { color: rgba(237,231,220,.55); }
#page.theme-dark .afc-footer__link:hover { color: var(--afc-accent); }
#page.theme-dark .afc-footer__col-title { color: rgba(237,231,220,.85); }
#page.theme-dark .afc-footer__social-btn {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.22);
  color: rgba(237,231,220,.9);
}
#page.theme-dark .afc-footer__social-btn:hover {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}

/* ── Modal ── */
#page.theme-dark .afc-modal {
  background: var(--afc-surface);
  border-color: var(--afc-border);
}
#page.theme-dark .afc-modal__overlay { background: var(--afc-overlay); }
#page.theme-dark .afc-modal__close {
  background: var(--afc-modal-close-bg);
  color: var(--afc-text);
  border-color: var(--afc-border);
}
#page.theme-dark .afc-modal__title { color: var(--afc-text); }
#page.theme-dark .afc-modal__desc { color: var(--afc-text-muted); }

/* ── Section "À la une" ── */
#page.theme-dark .afc-featured__head { border-color: var(--afc-border); }
#page.theme-dark .afc-featured__title { color: var(--afc-text); }

/* ── Publicité placeholder (dark) ── */
#page.theme-dark .afc-ad--placeholder {
  border-color: var(--afc-border-strong);
  background: repeating-linear-gradient(
    135deg, var(--afc-surface-2), var(--afc-surface-2) 13px, var(--afc-surface) 13px, var(--afc-surface) 26px
  );
}

/* ── Scrollbar ── */
#page.theme-dark { scrollbar-color: var(--afc-scrollbar) var(--afc-bg); }
#page.theme-dark ::-webkit-scrollbar-track { background: var(--afc-bg); }
#page.theme-dark ::-webkit-scrollbar-thumb { background: var(--afc-scrollbar); border-radius: 4px; }

/* ── Badges urgence / type ── */
#page.theme-dark .afc-badge { opacity: .92; }

/* ── Related posts ── */
#page.theme-dark .afc-related { background: var(--afc-surface); border-color: var(--afc-border); }
#page.theme-dark .afc-related-card { background: var(--afc-bg); border-color: var(--afc-border); }
#page.theme-dark .afc-related-card:hover { border-color: var(--afc-accent); }

/* ── Cartes catégories dark mode ── */
#page.theme-dark .afc-cat-card { background: var(--afc-surface); border-color: var(--afc-border); }
#page.theme-dark .afc-cat-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.3); }
#page.theme-dark .afc-cat-card__icon { background: var(--afc-surface-2); color: var(--afc-text-muted); }
#page.theme-dark .afc-cat-card:hover .afc-cat-card__icon { background: var(--afc-accent-soft); color: var(--afc-accent); }
#page.theme-dark .afc-cat-card__name { color: var(--afc-text); }
#page.theme-dark .afc-cat-card__count { color: var(--afc-text-faint); }
#page.theme-dark .afc-cat-section__header { border-color: var(--afc-border); }
#page.theme-dark .afc-cat-section__icon { background: var(--afc-surface-2); color: var(--afc-accent); }

/* ============================================================
   BOUTON RETOUR VERS LE HAUT
   ============================================================ */
.afc-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 90;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--afc-border-strong);
  background: var(--afc-surface);
  color: var(--afc-text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--afc-shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, background .15s, border-color .15s;
  pointer-events: none;
}
.afc-back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.afc-back-to-top:hover {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}
.afc-back-to-top:focus-visible {
  outline: 2px solid var(--afc-accent);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .afc-back-to-top { bottom: 16px; right: 14px; }
}

/* Sélecteur thème dark overrides */
#page.theme-dark .afc-theme-selector {
  background: var(--afc-surface-2);
  border-color: var(--afc-border);
}
#page.theme-dark .afc-theme-opt {
  color: var(--afc-text-muted);
}
#page.theme-dark .afc-theme-opt:hover {
  color: var(--afc-text);
  background: var(--afc-border-strong);
}
#page.theme-dark .afc-theme-opt.is-active {
  background: var(--afc-surface);
  color: var(--afc-text);
}

/* Back-to-top dark mode */
#page.theme-dark .afc-back-to-top {
  background: var(--afc-surface);
  border-color: var(--afc-border-strong);
  color: var(--afc-text-muted);
}
#page.theme-dark .afc-back-to-top:hover {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}

/* ============================================================
   PUBLICITÉS — emplacements
   ============================================================ */
.afc-ad-slot {
  width: 100%;
  overflow: hidden;
  text-align: center;
}

/* Espace vertical autour de chaque pub */
.afc-ad-slot--home_banner,
.afc-ad-slot--home_mid,
.afc-ad-slot--listing_top { margin: 28px 0; }

.afc-ad-slot--article_top,
.afc-ad-slot--article_mid,
.afc-ad-slot--article_bottom { margin: 24px 0; }

.afc-ad-slot--sidebar_top { margin-bottom: 20px; }
.afc-ad-slot--sidebar_sticky { margin-top: 20px; }

/* Centrage AdSense ins */
.afc-ad-slot ins.adsbygoogle { display: block; margin: 0 auto; }

/* Hauteur réservée — évite que la pub, injectée après coup, ne pousse le
   contenu (CLS). .afc-pub-ok est posée dans le <head> quand le consentement
   est déjà acquis : l'emplacement encore [hidden] occupe alors sa place. */
.afc-pub-ok .afc-ad-slot[data-afc-ad][hidden] { display: block; }
.afc-ad-slot--home_banner,
.afc-ad-slot--home_mid,
.afc-ad-slot--listing_top,
.afc-ad-slot--article_top,
.afc-ad-slot--article_bottom,
.afc-ad-slot--sidebar_top,
.afc-ad-slot--sidebar_sticky { min-height: 250px; }
.afc-ad-slot--article_mid { min-height: 120px; }
@media (min-width: 769px) {
  .afc-ad-slot--home_banner,
  .afc-ad-slot--home_mid,
  .afc-ad-slot--listing_top { min-height: 120px; }
}
/* Annonce non servie par AdSense : on rend toute la place — emplacement,
   marges et accroche « Sans pub ». Masquer une annonce *non servie* est
   la pratique recommandée par AdSense ; une annonce servie n'est jamais
   touchée. Vaut aussi pour les annonces automatiques (Auto ads). */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.afc-ad-slot:has(ins[data-ad-status="unfilled"]) { min-height: 0; margin: 0; }
.afc-ad-slot:has(ins[data-ad-status="unfilled"]) + .afc-ad-cta,
.google-auto-placed:has(> ins[data-ad-status="unfilled"]) { display: none; }
.afc-sans-pub .afc-ad-slot { min-height: 0; }

/* Dark mode search & header — voir bloc consolidé */

/* Accroche « Sans pub » sous un emplacement réellement affiché */
.afc-ad-cta {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--afc-text-muted);
  text-align: center;
}
.afc-ad-cta a {
  color: var(--afc-accent);
  font-weight: 600;
  text-decoration: none;
}
.afc-ad-cta a:hover { text-decoration: underline; }

/* ── Placeholder visible uniquement pour les admins ── */
.afc-ad--placeholder {
  border: 2px dashed #d8cfc0;
  border-radius: 12px;
  background: repeating-linear-gradient(
    135deg, #f3eee4, #f3eee4 13px, #f7f4ef 13px, #f7f4ef 26px
  );
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  margin: 20px 0;
}
.afc-ad__code {
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  color: #a89f92;
  letter-spacing: 0.05em;
}
.afc-ad__configure {
  font-size: 12px;
  font-weight: 700;
  color: var(--afc-accent);
  background: var(--afc-accent-soft);
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: filter .15s;
}
.afc-ad__configure:hover { filter: brightness(.95); }

/* ============================================================
   WORDPRESS SPECIFIC
   ============================================================ */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }

/* Screen reader text */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* ============================================================
   PARTAGE RÉSEAUX SOCIAUX (sidebar article)
   ============================================================ */
.afc-share {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--afc-border);
}
.afc-share__label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--afc-text-faint);
  margin-bottom: 10px;
}
.afc-share__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.afc-share__btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--share-color, #555);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: filter .15s, transform .15s;
  flex-shrink: 0;
}
.afc-share__btn:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}
.afc-share__btn--twitter { background: #000; }
.afc-share__btn.js-copy-link { background: var(--afc-surface-2, #e8e2d8); color: var(--afc-text-muted); }
.afc-share__btn.js-copy-link.is-copied { background: #22c55e; color: #fff; }

/* ============================================================
   FOOTER SOCIAL ICONS
   Spécificité renforcée pour écraser le CSS additionnel WP
   ============================================================ */
.afc-footer .afc-footer__social,
#page .afc-footer__social {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 16px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  text-decoration: none !important;
}
.afc-footer .afc-footer__social-btn,
#page .afc-footer__social-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
  line-height: 0 !important;
  box-sizing: border-box !important;
  transition: border-color .18s, background .18s;
}
.afc-footer .afc-footer__social-btn:hover,
#page .afc-footer__social-btn:hover {
  border-color: rgba(255,255,255,.7) !important;
  background: rgba(255,255,255,.2) !important;
  color: #fff !important;
}
.afc-footer .afc-footer__social-btn svg,
#page .afc-footer__social-btn svg {
  display: block !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
  fill: currentColor;
}

/* ============================================================
   SECTION "À DÉCOUVRIR ÉGALEMENT" (single article)
   ============================================================ */
.afc-related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--afc-border);
}

.afc-related__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.afc-related__title {
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: -0.02em;
  color: var(--afc-text);
  margin: 0 0 4px;
}
.afc-related__sub {
  font-size: 14px;
  color: var(--afc-text-faint);
  margin: 0;
}

/* ── Liste des lignes ── */
.afc-related__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afc-related-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.afc-related-row:hover {
  border-color: var(--afc-accent);
  box-shadow: 0 4px 20px rgba(60,40,20,.07);
  transform: translateY(-1px);
}

/* Badge J-XX */
.afc-related-row__badge {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
  letter-spacing: -.02em;
}

/* Contenu principal */
.afc-related-row__body {
  flex: 1;
  min-width: 0;
}
.afc-related-row__type {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: block;
  margin-bottom: 4px;
}
.afc-related-row__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--afc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.afc-related-row__meta {
  font-size: 12.5px;
  color: var(--afc-text-faint);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Droite */
.afc-related-row__right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.afc-related-row__info {
  font-size: 13px;
  font-weight: 600;
  color: var(--afc-text-muted);
  white-space: nowrap;
}
.afc-related-row__arrow {
  color: var(--afc-text-faint);
  flex-shrink: 0;
  transition: transform .18s;
}
.afc-related-row:hover .afc-related-row__arrow {
  transform: translateX(3px);
  color: var(--afc-accent);
}

/* Mobile */
@media (max-width: 600px) {
  .afc-related-row {
    flex-wrap: wrap;
    padding: 14px 16px;
    gap: 12px;
  }
  .afc-related-row__right  { display: none; }
  .afc-related-row__title  { white-space: normal; font-size: 15px; }
  .afc-related-row__badge  { width: 46px; height: 46px; font-size: 11px; }
}

/* Dark mode */
#page.theme-dark .afc-related-row {
  background: var(--afc-surface);
  border-color: var(--afc-border);
}
#page.theme-dark .afc-related-row:hover {
  border-color: var(--afc-accent);
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

/* search bar mobile — régi uniquement par le bloc @media (max-width: 768px) principal ci-dessus */

/* ============================================================
   BOTTOM NAVIGATION MOBILE
   Visible uniquement ≤ 899px — style LinkedIn / Airbnb / Instagram
   ============================================================ */

/* Masquée sur desktop */
.afc-bottom-nav { display: none; }

@media (max-width: 899px) {

  /* ── Décale le contenu pour éviter le chevauchement ── */
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  /* ── La barre elle-même ── */
  .afc-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 110;
    /* Fond translucide + blur — style Airbnb/Instagram */
    background: rgba(255, 253, 250, 0.90);
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    border-top: 1px solid rgba(60, 40, 20, .08);
    box-shadow: 0 -2px 20px rgba(60, 40, 20, .07);
    border-radius: 14px 14px 0 0;
    /* Safe area iOS (encoche / Dynamic Island) */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(66px + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }

  /* ── Chaque onglet ── */
  .afc-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 66px;
    min-width: 44px;   /* WCAG — zone tactile minimale */
    padding: 10px 2px 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--afc-text-muted);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    transition: color .18s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
  }

  /* Focus clavier visible */
  .afc-bottom-nav__item:focus-visible {
    outline: 2px solid var(--afc-accent);
    outline-offset: -3px;
    border-radius: 10px;
  }

  /* ── Onglet actif ── */
  .afc-bottom-nav__item.is-active {
    color: var(--afc-accent);
  }

  /* Indicateur trait en haut */
  .afc-bottom-nav__item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--afc-accent);
    border-radius: 0 0 4px 4px;
    animation: afc-bn-slide-in .2s ease;
  }

  @keyframes afc-bn-slide-in {
    from { width: 0; opacity: 0; }
    to   { width: 28px; opacity: 1; }
  }

  /* ── Icône ── */
  .afc-bottom-nav__icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    transition: transform .15s ease;
  }
  .afc-bottom-nav__item.is-active .afc-bottom-nav__icon {
    transform: translateY(-1px);
  }

  /* ── Libellé ── */
  .afc-bottom-nav__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1;
    white-space: nowrap;
    transition: font-weight .15s;
  }

  /* ── Badge favoris ── */
  .afc-bottom-nav__badge {
    position: absolute;
    top: -5px;
    right: -9px;
    background: var(--afc-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid rgba(255, 253, 250, 0.9);
    box-sizing: border-box;
  }

  /* ── Bouton Menu : toggle icônes hamburger ↔ croix ── */
  .afc-bn-icon-close { display: none; }
  #afc-bn-menu.is-active .afc-bn-icon-open  { display: none; }
  #afc-bn-menu.is-active .afc-bn-icon-close { display: block; }

  /* ── Dark mode (html.afc-dark-init — position:fixed sort du #page) ── */
  html.afc-dark-init .afc-bottom-nav {
    background: rgba(19, 18, 16, 0.92);
    border-top-color: rgba(255, 255, 255, .08);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, .35);
  }
  html.afc-dark-init .afc-bottom-nav__badge {
    border-color: #131210;
  }
  html.afc-dark-init .afc-bottom-nav__item {
    color: var(--afc-text-muted);
  }
  html.afc-dark-init .afc-bottom-nav__item.is-active {
    color: var(--afc-accent);
  }
}

/* ── Ajustement : back-to-top remonte au-dessus de la bottom nav ── */
@media (max-width: 899px) {
  .afc-back-to-top {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================
   PAGES ÉDITORIALES
   ============================================================ */

/* ── Hero band ── */
.afc-editorial-hero {
  background: var(--afc-surface-2);
  border-bottom: 1px solid var(--afc-border);
  padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 64px);
}
.afc-editorial-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--afc-accent);
  margin-bottom: 14px;
}
.afc-editorial-hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--afc-accent);
  flex-shrink: 0;
}
.afc-editorial-hero__title {
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: clamp(28px, 4.5vw, 52px);
  letter-spacing: -.025em;
  color: var(--afc-text);
  margin: 0 0 16px;
  max-width: 720px;
  line-height: 1.12;
}
.afc-editorial-hero__sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--afc-text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
}

/* ── Corps de page ── */
.afc-editorial-page { background: var(--afc-bg); }
.afc-editorial-body { padding: clamp(32px, 5vw, 64px) 0 80px; }
.afc-editorial-h2 {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: -.02em;
  color: var(--afc-text);
  margin: 0 0 20px;
}

/* ── À propos — mission + stats ── */
.afc-about-mission {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.afc-about-mission__text {
  flex: 1 1 360px;
}
.afc-about-mission__text h2 { margin-top: 0; }
.afc-about-mission__text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--afc-text-muted);
  margin: 0 0 14px;
}
.afc-about-stats {
  flex: 0 0 260px;
  min-width: 220px;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.afc-about-stats__item { display: flex; align-items: baseline; gap: 14px; }
.afc-about-stats__num {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--afc-accent);
  min-width: 80px;
}
.afc-about-stats__label { font-size: 13.5px; color: var(--afc-text-muted); line-height: 1.4; }

/* ── Piliers ── */
.afc-about-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.afc-about-pillar {
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 22px;
}
.afc-about-pillar__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.afc-about-pillar__title {
  font-family: var(--afc-font-display);
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 7px;
  color: var(--afc-text);
}
.afc-about-pillar__body { font-size: 13.5px; color: var(--afc-text-muted); line-height: 1.55; margin: 0; }

/* ── Ressources ── */
.afc-resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}
.afc-resource-card {
  text-decoration: none;
  color: inherit;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.afc-resource-card:hover { box-shadow: var(--afc-shadow-md); transform: translateY(-2px); }
.afc-resource-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.afc-resource-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.afc-resource-card__tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 7px;
}
.afc-resource-card__title {
  font-family: var(--afc-font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0 0 8px;
  color: var(--afc-text);
}
.afc-resource-card__body {
  font-size: 13.5px;
  color: var(--afc-text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}
.afc-resource-card__cta { font-size: 13px; font-weight: 600; color: var(--afc-accent); }

/* ── FAQ ── */
.afc-faq { max-width: 760px; margin: 0 auto; }
.afc-faq__item { border-bottom: 1px solid var(--afc-border); }
.afc-faq__btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 4px;
  text-align: left;
  font-family: var(--afc-font-body);
}
.afc-faq__question {
  font-family: var(--afc-font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--afc-text);
}
.afc-faq__icon {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--afc-surface-2);
  color: var(--afc-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, color .18s, transform .2s;
}
.afc-faq__btn.is-open .afc-faq__icon {
  background: var(--afc-accent);
  color: #fff;
  transform: rotate(45deg);
}
.afc-faq__answer {
  font-size: 15px;
  line-height: 1.7;
  color: var(--afc-text-muted);
  padding: 0 4px 22px;
  margin: 0;
}
.afc-faq__answer p { margin: 0; }

/* ── FAQ — blocs wp:details stylés en accordéon ── */
.afc-faq details.wp-block-details,
.afc-faq .wp-block-details {
  border-bottom: 1px solid var(--afc-border);
  margin: 0;
}
.afc-faq details.wp-block-details > summary,
.afc-faq .wp-block-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 4px;
  font-family: var(--afc-font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--afc-text);
  cursor: pointer;
  list-style: none;
}
.afc-faq details.wp-block-details > summary::-webkit-details-marker,
.afc-faq .wp-block-details > summary::-webkit-details-marker { display: none; }
.afc-faq details.wp-block-details > summary::after,
.afc-faq .wp-block-details > summary::after {
  content: '';
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--afc-surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236a6258' stroke-width='2.4'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: background-color .18s, transform .2s;
}
.afc-faq details.wp-block-details[open] > summary::after,
.afc-faq .wp-block-details[open] > summary::after {
  background-color: var(--afc-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  transform: rotate(45deg);
}
.afc-faq details.wp-block-details > p,
.afc-faq details.wp-block-details > .wp-block-paragraph,
.afc-faq .wp-block-details > p,
.afc-faq .wp-block-details > .wp-block-paragraph {
  font-size: 15px;
  line-height: 1.7;
  color: var(--afc-text-muted);
  padding: 0 4px 22px;
  margin: 0;
}

/* ── Légal — numérotation auto des H2 via CSS counter ── */
.afc-legal-content { counter-reset: legal-section; }
.afc-legal-content h2 {
  counter-increment: legal-section;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--afc-font-display);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--afc-text);
  margin: 40px 0 14px;
  scroll-margin-top: 90px;
}
.afc-legal-content h2::before {
  content: counter(legal-section, decimal-leading-zero);
  font-size: 13px;
  font-weight: 700;
  color: var(--afc-accent);
  flex-shrink: 0;
}
.afc-legal-content p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--afc-text-muted);
  margin: 0 0 12px;
}

/* ── À propos — statistiques pleine largeur ── */
.afc-about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius);
  padding: 28px 32px;
  margin-bottom: 36px;
}
.afc-about-content .afc-about-pillars { margin-top: 8px; }

/* ── Contact ── */
.afc-contact-wrap {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.afc-contact-form-card {
  flex: 1 1 380px;
  min-width: 280px;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 32px);
}
.afc-contact-form-card__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
  margin: 0 0 4px;
  color: var(--afc-text);
}
.afc-contact-form-card__sub { font-size: 13.5px; color: var(--afc-text-muted); margin: 0 0 22px; }
.afc-contact-form { display: flex; flex-direction: column; gap: 14px; }
.afc-contact-form__row { display: flex; gap: 14px; flex-wrap: wrap; }
.afc-contact-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--afc-text-muted);
  flex: 1 1 140px;
}
.afc-contact-input {
  width: 100%;
  border: 1px solid var(--afc-border);
  background: var(--afc-input-bg);
  border-radius: 11px;
  padding: 12px 14px;
  font-family: var(--afc-font-body);
  font-size: 15px;
  color: var(--afc-text);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.afc-contact-input:focus {
  border-color: var(--afc-accent);
  box-shadow: 0 0 0 3px var(--afc-focus-ring);
}
select.afc-contact-input { cursor: pointer; font-weight: 500; }
textarea.afc-contact-input { resize: vertical; }
.afc-btn--full { width: 100%; justify-content: center; }
.afc-contact-error {
  padding: 12px 16px;
  background: #fce4e7;
  color: #a12;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 6px;
}
.afc-contact-success {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: #e4efe9;
  color: #2a5c3f;
  border-radius: 14px;
}
.afc-contact-success strong { display: block; font-size: 16px; margin-bottom: 4px; }
.afc-contact-success p { font-size: 13.5px; margin: 0; }
.afc-contact-aside {
  flex: 1 1 260px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.afc-contact-info-card {
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.afc-contact-info-card__icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.afc-contact-info-card__title {
  font-family: var(--afc-font-display);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 3px;
  color: var(--afc-text);
}
.afc-contact-info-card__body { font-size: 13px; color: var(--afc-text-muted); line-height: 1.5; }

/* ── Pages légales ── */
.afc-legal-wrap {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.afc-legal-toc {
  flex: 0 0 240px;
  position: sticky;
  top: 84px;
  align-self: flex-start;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 18px 16px;
}
.afc-legal-toc__heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--afc-text-faint);
  margin-bottom: 12px;
}
.afc-legal-toc__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.afc-legal-toc__link {
  display: block;
  text-decoration: none;
  font-size: 13.5px;
  color: var(--afc-text-muted);
  padding: 7px 9px;
  border-radius: 8px;
  line-height: 1.35;
  transition: background .15s, color .15s;
}
.afc-legal-toc__link:hover { background: var(--afc-surface-2); color: var(--afc-text); }
.afc-legal-toc__date {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--afc-border);
  font-size: 11.5px;
  color: var(--afc-text-faint);
  line-height: 1.5;
}
.afc-legal-toc__date strong { color: var(--afc-text-muted); }
.afc-legal-content {
  flex: 1 1 460px;
  min-width: 280px;
  max-width: 720px;
}
.afc-legal-section { scroll-margin-top: 96px; margin-bottom: 36px; }
.afc-legal-section__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -.015em;
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--afc-text);
}
.afc-legal-section__num { font-size: 13px; color: var(--afc-accent); font-weight: 700; }
.afc-legal-section p {
  font-size: 15px;
  line-height: 1.72;
  color: var(--afc-text-muted);
  margin: 0 0 14px;
}
.afc-legal-contact-note {
  margin-top: 12px;
  padding: 20px 22px;
  background: var(--afc-accent-soft);
  border-radius: 16px;
}
.afc-legal-contact-note p { font-size: 14px; color: var(--afc-text-muted); margin: 0; line-height: 1.6; }
.afc-legal-contact-note a { color: var(--afc-accent); font-weight: 600; text-decoration: none; }

/* ── Responsive — pages éditoriales ── */
@media (max-width: 768px) {
  .afc-about-mission { flex-direction: column; }
  .afc-about-stats { flex: none; width: 100%; }
  .afc-legal-toc { display: none; }
  .afc-contact-wrap { flex-direction: column; }
  .afc-contact-aside { width: 100%; }
}

/* ============================================================
   DARK MODE — couleurs personnalisables via Customizer
   (surcharge les variables de #page.theme-dark)
   ============================================================ */
/* Les variables sont injectées inline via afc_customizer_css() */

/* ============================================================
   VUES & TENDANCE — Système de comptage (v1.9.0)
   ============================================================ */

/* ── Compteur de vues générique ── */
.afc-view-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--afc-text-faint);
  white-space: nowrap;
  line-height: 1;
}
.afc-view-count__icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: .75;
}
.afc-view-count__label {
  color: var(--afc-text-faint);
  font-weight: 500;
}

/* ── Variante page détail ── */
.afc-view-count--detail {
  font-size: 13.5px;
  color: var(--afc-text-muted);
}
.afc-view-count--detail .afc-view-count__icon {
  width: 14px;
  height: 14px;
  opacity: 1;
}

/* ── Ligne date • vues sur la page détail ── */
.afc-detail__view-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 20px;
  font-size: 13.5px;
  color: var(--afc-text-muted);
  flex-wrap: wrap;
}
.afc-detail__pub-date { font-weight: 500; }
.afc-detail__view-sep { color: var(--afc-border-strong); font-weight: 300; }

/* ── Badge tendance 🔥 ── */
.afc-badge-trending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff3e0;
  color: #e65100;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid #ffe0b2;
  vertical-align: middle;
  white-space: nowrap;
}
.afc-badge-trending--sm {
  padding: 2px 6px;
  font-size: 11px;
}

/* ── Widget opportunités populaires ── */
.afc-popular-widget {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.afc-popular-widget__item {
  border-bottom: 1px solid var(--afc-divider);
}
.afc-popular-widget__item:last-child { border-bottom: none; }
.afc-popular-widget__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  transition: opacity .15s;
}
.afc-popular-widget__link:hover { opacity: .78; }
.afc-popular-widget__body { flex: 1; min-width: 0; }
.afc-popular-widget__type {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.afc-popular-widget__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--afc-text);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.afc-popular-widget__meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--afc-text-faint);
}
.afc-popular-widget .afc-view-count svg {
  width: 11px;
  height: 11px;
}

/* ── Adaptations dark mode ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-override]) .afc-badge-trending {
    background: rgba(230, 81, 0, .15);
    border-color: rgba(230, 81, 0, .3);
    color: #ffb74d;
  }
}
#page.theme-dark .afc-badge-trending {
  background: rgba(230, 81, 0, .15);
  border-color: rgba(230, 81, 0, .3);
  color: #ffb74d;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .afc-detail__view-row { gap: 6px; font-size: 12.5px; }
  .afc-view-count--detail { font-size: 12.5px; }
}

/* ============================================================
   PROTECTION DU CONTENU (v1.9.0)
   ============================================================ */

/* ── Désactivation sélection de texte (appliquée via JS .afc-no-select) ── */
.afc-no-select {
  -webkit-user-select: none;
  -moz-user-select:    none;
  -ms-user-select:     none;
  user-select:         none;
}
/* Toujours autoriser la sélection dans les formulaires */
.afc-no-select input,
.afc-no-select textarea,
.afc-no-select select,
.afc-no-select [contenteditable] {
  -webkit-user-select: text;
  -moz-user-select:    text;
  -ms-user-select:     text;
  user-select:         text;
}

/* ── Toast de protection — notification discrète ── */
.afc-protect-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 99999;
  background: rgba(30, 25, 20, .88);
  color: #ede7dc;
  font-family: var(--afc-font-body, system-ui, sans-serif);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  padding: 11px 20px;
  border-radius: 40px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  max-width: min(420px, calc(100vw - 32px));
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.afc-protect-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-override]) .afc-protect-toast {
    background: rgba(240, 235, 228, .92);
    color: #2a2521;
  }
}
#page.theme-dark .afc-protect-toast {
  background: rgba(240, 235, 228, .92);
  color: #2a2521;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .afc-protect-toast {
    bottom: 16px;
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* ============================================================
   CLAUSE DE NON-RESPONSABILITÉ — Accordéon (v1.9.0)
   ============================================================ */

.afc-disclaimer {
  margin: 32px 0;
  border: 1px solid var(--afc-border);
  border-radius: var(--afc-radius, 14px);
  background: var(--afc-surface);
  overflow: hidden;
}

/* ── Bouton toggle ── */
.afc-disclaimer__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--afc-font-body, system-ui, sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--afc-text-muted);
  text-align: left;
  transition: color .18s ease, background .18s ease;
}
.afc-disclaimer__toggle:hover,
.afc-disclaimer__toggle:focus-visible {
  color: var(--afc-accent);
  background: var(--afc-accent-soft);
  outline: none;
}
.afc-disclaimer__toggle:focus-visible {
  box-shadow: inset 0 0 0 2px var(--afc-accent);
}
.afc-disclaimer__toggle-label {
  flex: 1;
}

/* ── Chevron animé ── */
.afc-disclaimer__chevron {
  flex-shrink: 0;
  color: var(--afc-text-faint);
  transition: transform .3s ease, color .18s ease;
}
.afc-disclaimer__toggle--open .afc-disclaimer__chevron,
.afc-disclaimer__toggle[aria-expanded="true"] .afc-disclaimer__chevron {
  transform: rotate(180deg);
  color: var(--afc-accent);
}

/* ── Corps accordéon ── */
.afc-disclaimer__body {
  overflow: hidden;
  max-height: none;
  transition: max-height .35s ease;
}
/* État caché : on écrase [hidden] pour préserver le DOM
   et permettre au JS de mesurer scrollHeight */
.afc-disclaimer__body[hidden] {
  display: block !important;
  max-height: 0;
  visibility: hidden;
  pointer-events: none;
}

.afc-disclaimer__inner {
  padding: 0 20px 20px;
  border-top: 1px solid var(--afc-divider);
}

/* ── Texte ── */
.afc-disclaimer__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--afc-text-muted);
  margin: 16px 0 10px;
}
.afc-disclaimer__source {
  font-size: 13px;
  font-weight: 600;
  color: var(--afc-accent);
  margin: 0;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-override]) .afc-disclaimer {
    border-color: var(--afc-border);
    background: var(--afc-surface);
  }
}
#page.theme-dark .afc-disclaimer {
  border-color: var(--afc-border);
  background: var(--afc-surface);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .afc-disclaimer__toggle { padding: 14px 16px; font-size: 13.5px; }
  .afc-disclaimer__inner  { padding: 0 16px 16px; }
  .afc-disclaimer__text   { font-size: 13.5px; }
}

/* =============================================================
   SYSTÈME DE RECOMMANDATIONS — Afri-Carrières
   Bloc in-content (.afc-reco-block) + Bloc footer (.afc-reco-footer)
   + Carte commune (.afc-reco-card)
   ============================================================= */

/* ── Bloc générique (in-content et footer) ── */
.afc-reco-block {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--afc-bg-alt, #f8f9fa);
  border-left: 3px solid var(--afc-accent, #e85d04);
  border-radius: var(--afc-radius, 8px);
  font-family: var(--afc-font, inherit);
}

.afc-reco-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.afc-reco-block__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--afc-text-muted, #6b7280);
}

.afc-reco-block__see-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--afc-accent, #e85d04);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.afc-reco-block__see-all:hover { text-decoration: underline; }

.afc-reco-block__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

/* ── Carte recommandation ── */
.afc-reco-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border, #e5e7eb);
  border-radius: calc(var(--afc-radius, 8px) - 2px);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.afc-reco-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Miniature */
.afc-reco-card__thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: calc(var(--afc-radius, 8px) - 4px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.afc-reco-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.afc-reco-card__thumb--placeholder {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Corps de la carte */
.afc-reco-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.afc-reco-card__type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.afc-reco-card__title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--afc-text, #111827);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.afc-reco-card__org {
  font-size: 0.72rem;
  color: var(--afc-text-muted, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afc-reco-card__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.afc-reco-card__deadline {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.6;
}

/* Badge financement */
.afc-reco-card__funding {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--afc-text-muted, #6b7280);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.afc-reco-card__funding--full {
  color: #15803d;
  font-weight: 700;
}

/* Carte en mode footer (légèrement plus grande) */
.afc-reco-card--footer .afc-reco-card__thumb {
  width: 72px;
  height: 72px;
}
.afc-reco-card--footer .afc-reco-card__title {
  font-size: 0.87rem;
}

/* ── Section footer "À découvrir" ── */
.afc-reco-footer {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--afc-border, #e5e7eb);
}

.afc-reco-footer__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.afc-reco-footer__title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 800;
  color: var(--afc-text, #111827);
  margin: 0 0 0.25rem;
  line-height: 1.2;
}

.afc-reco-footer__sub {
  font-size: 0.88rem;
  color: var(--afc-text-muted, #6b7280);
  margin: 0;
}

.afc-reco-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-override]) .afc-reco-block {
    background: var(--afc-surface, #1f2937);
  }
  :root:not([data-theme-override]) .afc-reco-card {
    background: var(--afc-bg-alt, #111827);
    border-color: var(--afc-border, #374151);
  }
}
#page.theme-dark .afc-reco-block { background: var(--afc-surface); }
#page.theme-dark .afc-reco-card  { background: var(--afc-bg-alt); border-color: var(--afc-border); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .afc-reco-block { padding: 1rem; }
  .afc-reco-block__grid { grid-template-columns: 1fr; }
  .afc-reco-footer__grid { grid-template-columns: 1fr; }
  .afc-reco-footer__head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .afc-reco-card__thumb { width: 48px; height: 48px; }
  .afc-reco-card--footer .afc-reco-card__thumb { width: 56px; height: 56px; }
}

/* =============================================================
   APPLICATION MOBILE PROMO — Afri-Carrières v2.1.0
   Composant 1 : Bloc footer  (.afc-app-footer)
   Composant 2 : Widget sidebar (.afc-app-widget)
   Composant 3 : Bannière mobile (.afc-app-banner)
   ============================================================= */

/* ── 1. BLOC FOOTER ── */
.afc-app-footer {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.afc-app-footer__img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.afc-app-footer__body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.afc-app-footer__title {
  font-size: .8rem;
  font-weight: 700;
  color: rgba(255,255,255,.95);
  margin: 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.afc-app-footer__desc {
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  margin: 0;
  line-height: 1.45;
}

.afc-app-badge {
  display: inline-block;
  margin-top: .4rem;
  transition: opacity .18s ease, transform .18s ease;
  border-radius: 7px;
  overflow: hidden;
  line-height: 0;
}
.afc-app-badge:hover  { opacity: .85; transform: translateY(-1px); }
.afc-app-badge:focus-visible {
  outline: 2px solid var(--afc-accent, #e85d04);
  outline-offset: 2px;
}
.afc-app-badge img,
.afc-app-badge svg { display: block; }

/* ── 2. WIDGET SIDEBAR ── */
.afc-app-widget {
  padding: 1.1rem 1.25rem;
  background: var(--afc-bg-alt, #f8f9fa);
  border-left: 3px solid var(--afc-accent, #e85d04);
  border-radius: var(--afc-radius, 8px);
  margin-bottom: 1.5rem;
}

.afc-app-widget__title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--afc-text, #111827);
  margin: 0 0 .5rem;
  line-height: 1.3;
}

.afc-app-widget__desc {
  font-size: .82rem;
  color: var(--afc-text-muted, #6b7280);
  margin: 0 0 .875rem;
  line-height: 1.5;
}

.afc-app-widget__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--afc-accent, #e85d04);
  text-decoration: none;
  padding: .5rem .875rem;
  border: 1.5px solid var(--afc-accent, #e85d04);
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.afc-app-widget__cta:hover {
  background: var(--afc-accent, #e85d04);
  color: #fff;
}
.afc-app-widget__cta:focus-visible {
  outline: 2px solid var(--afc-accent, #e85d04);
  outline-offset: 3px;
}

/* ── Dark mode widget ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-override]) .afc-app-widget {
    background: var(--afc-surface, #1f2937);
  }
}
#page.theme-dark .afc-app-widget { background: var(--afc-surface); }

/* ── 3. BANNIÈRE MOBILE ── */
.afc-app-banner {
  /* Position : fixed bottom, au-dessus de afc-bottom-nav (hauteur ~62px) */
  position: fixed;
  bottom: 62px;          /* hauteur afc-bottom-nav */
  left: 0;
  right: 0;
  z-index: 1200;

  /* Animation : glisse depuis le bas */
  transform: translateY(calc(100% + 62px));
  transition: transform .32s cubic-bezier(.4,0,.2,1);

  /* Desktop : masqué */
  display: none;
}

/* Visible uniquement sur mobile */
@media (max-width: 900px) {
  .afc-app-banner { display: block; }
}

/* État visible (classe ajoutée par JS) */
.afc-app-banner--visible {
  transform: translateY(0);
}

.afc-app-banner__inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--afc-surface, #fff);
  border-top: 1px solid var(--afc-border, #e5e7eb);
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
}

.afc-app-banner__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--afc-accent, #e85d04);
  color: #fff;
  border-radius: 8px;
}

.afc-app-banner__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.afc-app-banner__title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--afc-text, #111827);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.afc-app-banner__desc {
  font-size: .72rem;
  color: var(--afc-text-muted, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.afc-app-banner__cta {
  flex-shrink: 0;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: var(--afc-accent, #e85d04);
  padding: .45rem .875rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .18s ease;
}
.afc-app-banner__cta:hover        { opacity: .88; }
.afc-app-banner__cta:focus-visible {
  outline: 2px solid var(--afc-accent, #e85d04);
  outline-offset: 3px;
}

.afc-app-banner__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--afc-text-muted, #6b7280);
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
.afc-app-banner__close:hover {
  background: var(--afc-bg-alt, #f3f4f6);
  color: var(--afc-text, #111827);
}

/* ── Dark mode bannière ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-override]) .afc-app-banner__inner {
    background: var(--afc-surface, #1f2937);
    border-top-color: var(--afc-border, #374151);
    box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  }
}
#page.theme-dark .afc-app-banner__inner {
  background: var(--afc-surface);
  border-top-color: var(--afc-border);
}

/* ── Très petit écran : version compacte ── */
@media (max-width: 380px) {
  .afc-app-banner__desc { display: none; }
  .afc-app-banner__cta  { font-size: .73rem; padding: .4rem .7rem; }
}

/* =============================================================
   CORRECTIFS — Badges favoris + image mise en avant
   ============================================================= */

/* Bouton favori sur mobile : reste aligné sur la même ligne que les badges */
@media (max-width: 640px) {
  .afc-detail__badges .afc-btn-fav {
    margin-left: 0 !important;
    margin-top: 0;
  }
  /* Sur très petit écran, le bouton fav passe en dessous à gauche — jamais seul à droite */
  .afc-detail__badges {
    row-gap: 6px;
  }
}

/* ============================================================
   ROBUSTESSE MOBILE — anti-débordement horizontal
   ------------------------------------------------------------
   Un seul élément trop large fait défiler toute la page de côté.
   Les éléments en position:fixed (barre du bas, bannière app) se
   positionnent alors par rapport au viewport initial et semblent
   « décalés ». On coupe donc tout débordement à la racine.
   overflow-x:clip préserve position:sticky (contrairement à hidden),
   la déclaration hidden servant de repli pour les navigateurs anciens.
   ============================================================ */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
#page { max-width: 100%; }

/* Aucun mot long (URL, titre) ne doit élargir la page */
.afc-opp-card__title,
.afc-listing__page-title,
.afc-detail__title,
.afc-footer__link,
.afc-footer__col-title,
.afc-footer__bottom-link { overflow-wrap: anywhere; }

@media (max-width: 899px) {

  /* ── Barre de navigation du bas : les 4 onglets toujours visibles ── */
  .afc-bottom-nav { width: 100%; max-width: 100%; }
  .afc-bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;          /* autorise la réduction sous la largeur du texte */
    padding-left: 2px;
    padding-right: 2px;
  }
  .afc-bottom-nav__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
  }

  /* ── Bannière « Télécharger l'application » ── */
  /* Alignée sur la hauteur réelle de la barre du bas (66px + encoche) */
  .afc-app-banner {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    transform: translateY(calc(100% + 66px + env(safe-area-inset-bottom, 0px)));
  }
  .afc-app-banner--visible { transform: translateY(0); }

  .afc-app-banner__inner {
    padding: .6rem .75rem;
    gap: .6rem;
    max-width: 100%;
  }
  .afc-app-banner__text { min-width: 0; flex: 1 1 auto; }
  .afc-app-banner__title,
  .afc-app-banner__desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .afc-app-banner__cta,
  .afc-app-banner__close,
  .afc-app-banner__icon { flex-shrink: 0; }
}

/* Écrans étroits : on privilégie le bouton d'action */
@media (max-width: 420px) {
  .afc-app-banner__desc  { display: none; }
  .afc-app-banner__icon  { display: none; }
  .afc-app-banner__cta   { font-size: .78rem; padding: .45rem .8rem; }
  .afc-bottom-nav__label { font-size: 10px; }
}

/* ============================================================
   EN-TÊTE DESKTOP — menu principal à nombre d'entrées variable
   ------------------------------------------------------------
   Sans min-width:0, un conteneur flex:1 refuse de descendre sous la
   largeur de son contenu : le menu poussait alors le logo et les
   actions (thème, favoris, alertes) hors de l'écran, provoquant un
   défilement horizontal de toute la page. Le menu défile désormais
   dans sa propre zone ; logo et actions restent toujours visibles.
   ============================================================ */
@media (min-width: 900px) {
  .afc-header__nav-main {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    scroll-behavior: smooth;
    /* Barre de défilement masquée — le menu reste glissable */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* « safe center » : centré quand ça tient, aligné à gauche sinon
       (sans lui, le début du menu devient inatteignable) */
    justify-content: center;
    justify-content: safe center;
  }
  .afc-header__nav-main::-webkit-scrollbar { display: none; }

  .afc-nav-btn { flex: 0 0 auto; }

  /* Jamais compressés ni repoussés */
  .afc-header__logo-btn,
  .afc-header__actions { flex-shrink: 0; }
}

/* ============================================================
   BANDEAU DE CONSENTEMENT AUX COOKIES (RGPD)
   ============================================================ */
.afc-consent {
  position: fixed;
  z-index: 1300;              /* au-dessus de la bannière app (1200) */
  left: 0; right: 0; bottom: 0;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  transform: translateY(110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.afc-consent.is-visible { transform: translateY(0); }
.afc-consent[hidden]    { display: none; }

.afc-consent__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 40px);
  background: var(--afc-surface, #fff);
  border-top: 1px solid var(--afc-border, #e5e7eb);
  box-shadow: 0 -6px 28px rgba(40, 28, 16, .12);
}

.afc-consent__body  { flex: 1 1 auto; min-width: 0; }
.afc-consent__title {
  font-family: var(--afc-font-display);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--afc-text);
}
.afc-consent__text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--afc-text-muted);
  margin: 0;
}
.afc-consent__links { font-size: 12.5px; margin: 6px 0 0; }
.afc-consent__links a {
  color: var(--afc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.afc-consent__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.afc-consent__btn {
  padding: 11px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.afc-consent__btn--accept {
  background: var(--afc-accent);
  border: 1px solid var(--afc-accent);
  color: #fff;
}
.afc-consent__btn--accept:hover { opacity: .9; }
.afc-consent__btn--refuse {
  background: none;
  border: 1px solid var(--afc-border-strong);
  color: var(--afc-text-muted);
}
.afc-consent__btn--refuse:hover {
  border-color: var(--afc-accent);
  color: var(--afc-accent);
}
.afc-consent__btn:focus-visible {
  outline: 2px solid var(--afc-accent);
  outline-offset: 2px;
}

/* Variante « carte flottante » */
.afc-consent--card {
  left: 16px; right: auto;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 32px));
}
.afc-consent--card .afc-consent__inner {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  border: 1px solid var(--afc-border, #e5e7eb);
  border-radius: 16px;
}
.afc-consent--card .afc-consent__actions .afc-consent__btn { flex: 1; }

/* Mode sombre — le bandeau est en position:fixed, hors de #page :
   on cible html.afc-dark-init, posé sur <html> par le JS de thème. */
html.afc-dark-init .afc-consent__inner {
  background: #1e1c18;
  border-color: #2e2b26;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, .45);
}
html.afc-dark-init .afc-consent__title { color: #ede7dc; }
html.afc-dark-init .afc-consent__text  { color: #a89f92; }
html.afc-dark-init .afc-consent__btn--refuse {
  border-color: #3d3830;
  color: #a89f92;
}

/* Mobile : au-dessus de la barre de navigation du bas */
@media (max-width: 899px) {
  .afc-consent {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 0;
  }
  .afc-consent--card { left: 10px; right: 10px; max-width: none; }
  .afc-consent__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .afc-consent__actions .afc-consent__btn { flex: 1; }
  .afc-consent__title { font-size: 14.5px; }
  .afc-consent__text  { font-size: 13px; }
}

/* ============================================================
   CORE WEB VITALS
   ------------------------------------------------------------
   CLS : un emplacement publicitaire qui se remplit après coup
   pousse le contenu vers le bas. On réserve donc sa hauteur dès
   le premier rendu (uniquement quand un code pub est réellement
   présent — afc_ad() n'émet rien sinon).
   ============================================================ */
.afc-ad-slot { min-height: 100px; }
.afc-ad-slot--home_banner    { min-height: 90px; }
.afc-ad-slot--home_mid       { min-height: 120px; }
.afc-ad-slot--listing_top    { min-height: 250px; }
.afc-ad-slot--sidebar_top,
.afc-ad-slot--sidebar_sticky { min-height: 250px; }
.afc-ad-slot--article_top,
.afc-ad-slot--article_bottom { min-height: 280px; }
.afc-ad-slot--article_mid    { min-height: 120px; }

@media (max-width: 767px) {
  /* Formats responsives : hauteurs plus modestes sur mobile */
  .afc-ad-slot,
  .afc-ad-slot--home_banner,
  .afc-ad-slot--home_mid,
  .afc-ad-slot--article_mid    { min-height: 100px; }
  .afc-ad-slot--article_top,
  .afc-ad-slot--article_bottom,
  .afc-ad-slot--listing_top    { min-height: 250px; }
}

/* Média des cartes d'article : ratio figé = aucun décalage
   pendant le chargement de l'image */
.afc-card-media {
  aspect-ratio: 600 / 380;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 14px;
  background: var(--afc-surface-2, #f3eee5);
}
.afc-card-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* En-tête : l'ombre au défilement passe par une classe (voir main.js)
   plutôt que par une écriture de style à chaque événement scroll. */
.afc-header.is-scrolled { box-shadow: 0 4px 20px rgba(60, 45, 30, .08); }

/* ============================================================
   BARRE SUPÉRIEURE (top header)
   ============================================================ */
.afc-topbar {
  background: var(--afc-surface-2, #f3eee5);
  border-bottom: 1px solid var(--afc-border, #ede7dd);
  font-size: 13px;
}
.afc-topbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 36px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.afc-topbar__text {
  color: var(--afc-text-muted);
  flex-shrink: 0;
}
.afc-topbar__nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.afc-topbar__nav::-webkit-scrollbar { display: none; }
.afc-topbar__link {
  color: var(--afc-text-muted);
  text-decoration: none;
  font-weight: 600;
  flex: 0 0 auto;
  transition: color .15s;
}
.afc-topbar__link:hover { color: var(--afc-accent); }

.afc-topbar__social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.afc-topbar__social-link {
  color: var(--afc-text-faint);
  display: inline-flex;
  transition: color .15s;
}
.afc-topbar__social-link:hover { color: var(--afc-accent); }

html.afc-dark-init .afc-topbar,
#page.theme-dark .afc-topbar {
  background: #1a1815;
  border-bottom-color: #2e2b26;
}

@media (max-width: 767px) {
  /* Sur mobile on ne garde que le menu : message et réseaux prennent trop de place */
  .afc-topbar__text,
  .afc-topbar__social { display: none; }
  .afc-topbar__inner  { min-height: 32px; }
  .afc-topbar         { font-size: 12.5px; }
}

/* ============================================================
   BARRE DE NAVIGATION MOBILE — compacte
   ------------------------------------------------------------
   Les 4 onglets doivent tenir sur les écrans les plus étroits
   (320 px) sans jamais nécessiter de défilement.
   ============================================================ */
@media (max-width: 899px) {
  .afc-bottom-nav {
    width: 100%;
    max-width: 100%;
    overflow: hidden;          /* aucun onglet ne peut sortir de la barre */
    justify-content: space-between;
  }
  .afc-bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;              /* prime sur l'ancien min-width: 44px */
    gap: 3px;
    padding: 8px 0 6px;
  }
  .afc-bottom-nav__icon svg { width: 21px; height: 21px; }
  .afc-bottom-nav__label {
    font-size: 10px;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 1px;
  }
}

@media (max-width: 360px) {
  .afc-bottom-nav__label    { font-size: 9.5px; }
  .afc-bottom-nav__icon svg { width: 20px; height: 20px; }
}

/* Icône de date : taille imposée quel que soit le contexte
   (un SVG sans dimensions s'affiche sinon en 300×150 px) */
.afc-card-date__icon,
svg.afc-card-date__icon { width: 13px; height: 13px; flex-shrink: 0; }

/* Pied de carte : les métas s'alignent et passent à la ligne proprement */
.afc-opp-card__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

/* ============================================================
   BARRE SUPÉRIEURE — accueille les actions (thème, favoris, alertes)
   ============================================================ */
.afc-topbar__inner { min-height: 44px; }

/* Poussées à droite ; si les réseaux sociaux sont présents, elles
   se placent simplement à leur suite. */
.afc-topbar__inner .afc-header__actions { margin-left: auto; }
.afc-topbar__social ~ .afc-header__actions { margin-left: 14px; }

/* Version compacte : la barre supérieure est plus fine que l'en-tête */
.afc-topbar .afc-btn-alert {
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: 8px;
}
.afc-topbar .afc-btn-favs {
  padding: 6px 10px;
  border-radius: 8px;
}
.afc-topbar .afc-theme-selector { transform: scale(.94); transform-origin: right center; }

/* Sur mobile, les actions vivent dans le menu latéral : la barre
   supérieure ne subsiste que si un menu « top » lui est assigné. */
@media (max-width: 899px) {
  .afc-topbar:not(.afc-topbar--has-nav) { display: none; }
  .afc-topbar__inner { min-height: 32px; }
}

/* ============================================================
   DATE DE CARTE — strictement alignée sur le compteur de vues
   ------------------------------------------------------------
   Mêmes dimensions d'icône (12px), même opacité, même graisse :
   les deux métas doivent se lire comme une paire.
   ============================================================ */
.afc-card-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--afc-text-faint);
  white-space: nowrap;
  line-height: 1;
}
.afc-card-date__icon,
svg.afc-card-date__icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: .75;
}

/* Pied de carte : métas alignées à gauche, vues repoussées à droite.
   (Sans cela, le space-between hérité écartait les éléments et la date
   se retrouvait au centre.) */
.afc-opp-card__footer,
.afc-feat-card__footer {
  justify-content: flex-start;
  gap: 6px 12px;
}
.afc-opp-card__footer .afc-view-count,
.afc-feat-card__footer .afc-view-count { margin-left: auto; }

/* Page éditoriale sans sommaire (moins de 2 sections) :
   le contenu est centré au lieu de rester collé à gauche. */
.afc-legal-wrap--full { justify-content: center; }
.afc-legal-wrap--full .afc-legal-content { margin-inline: auto; }

/* ============================================================
   MENU PRINCIPAL — SOUS-MENUS DÉROULANTS
   ------------------------------------------------------------
   Le menu est désormais une vraie liste imbriquée : un élément
   placé sous un autre dans Apparence → Menus s'ouvre au survol,
   sous son parent, au lieu de s'afficher à côté de lui.
   ============================================================ */
.afc-nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.afc-nav-item {
  position: relative;      /* ancre du sous-menu */
  list-style: none;
  flex: 0 0 auto;
}
.afc-nav-item > .afc-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.afc-nav-caret {
  flex-shrink: 0;
  opacity: .55;
  transition: transform .18s ease;
}
.afc-nav-item.has-children:hover > .afc-nav-btn .afc-nav-caret,
.afc-nav-item.has-children:focus-within > .afc-nav-btn .afc-nav-caret {
  transform: rotate(180deg);
}

.afc-submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 216px;
  max-width: 300px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border, #ede7dd);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(50, 35, 20, .13);
  z-index: 130;
  /* Masqué sans display:none, pour conserver la transition */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
/* Pont invisible : évite que le survol se rompe dans l'espace
   entre le parent et le menu déroulant */
.afc-nav-item.has-children::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
}
.afc-nav-item:hover > .afc-submenu,
.afc-nav-item:focus-within > .afc-submenu {   /* :focus-within = accessible au clavier */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.afc-submenu__link {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--afc-text-muted);
  text-decoration: none;
  line-height: 1.35;
  transition: background .14s, color .14s;
}
.afc-submenu__link:hover,
.afc-submenu__link.is-active {
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
}

/* Le dernier élément du menu ouvre son sous-menu vers la gauche
   pour ne pas déborder de l'écran */
.afc-nav-item:last-child > .afc-submenu { left: auto; right: 0; }

/* Mode sombre — le menu vit dans #page, la variable suffit */
#page.theme-dark .afc-submenu {
  background: var(--afc-surface);
  border-color: var(--afc-border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .45);
}

/* ── Menu mobile : hiérarchie dépliée, sans survol ── */
.afc-drawer__subnav {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--afc-border, #ede7dd);
  margin-left: 8px;
}
.afc-mobile-menu__item--child {
  font-size: 14px;
  font-weight: 600;
  opacity: .85;
  padding-top: 10px;
  padding-bottom: 10px;
}
html.afc-dark-init .afc-drawer__subnav { border-left-color: #2e2b26; }

/* Un conteneur en overflow:auto rogne tout élément positionné en dehors :
   le défilement horizontal du menu masquait donc les sous-menus. Les actions
   ayant migré vers la barre supérieure, la place ne manque plus dans l'en-tête :
   on rétablit un débordement visible et on laisse le menu passer à la ligne. */
@media (min-width: 900px) {
  .afc-header__nav-main {
    overflow: visible;
    flex-wrap: wrap;
  }
  .afc-nav-list {
    flex-wrap: wrap;
    row-gap: 2px;
    justify-content: center;
  }
}

/* ============================================================
   PAGE ANNONCES / PUBLICITÉ (page-annonces.php)
   Construite sur les jetons du thème : couleurs, polices et
   bordures suivent le Personnaliseur et le mode sombre.
   ============================================================ */
.afc-ads__section { padding: 56px 0; }
.afc-ads__section--alt { background: var(--afc-surface-2, #f3eee5); }
.afc-ads__narrow { max-width: 760px; }

.afc-ads__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--afc-accent);
  margin-bottom: 10px;
}
.afc-ads__eyebrow--center { display: block; text-align: center; }

.afc-ads__h2 {
  font-family: var(--afc-font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--afc-text);
}
.afc-ads__h2--center { text-align: center; }
.afc-ads__sub {
  text-align: center;
  color: var(--afc-text-muted);
  font-size: 15.5px;
  max-width: 60ch;
  margin: 0 auto 34px;
}
.afc-ads__text { color: var(--afc-text-muted); font-size: 16px; line-height: 1.65; }
.afc-ads__note-center {
  text-align: center;
  font-size: 13px;
  color: var(--afc-text-faint);
  margin: 26px 0 0;
}

/* Hero */
.afc-ads__hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--afc-accent-soft) 0%, transparent 100%);
  text-align: center;
}
.afc-ads__badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--afc-accent);
  margin-bottom: 18px;
}
.afc-ads__title {
  font-family: var(--afc-font-display);
  font-size: clamp(30px, 5.2vw, 54px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.03em;
  margin: 0 auto 18px;
  max-width: 18ch;
  text-wrap: balance;
  color: var(--afc-text);
}
.afc-ads__lead {
  font-size: clamp(15px, 1.9vw, 18px);
  color: var(--afc-text-muted);
  max-width: 60ch;
  margin: 0 auto 26px;
  line-height: 1.6;
}
.afc-ads__cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.afc-ads__hero .afc-ads__cta-row,
.afc-ads__cta-row--center { justify-content: center; }

.afc-ads__hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 38px;
}
.afc-ads__hero-stat { text-align: center; }
.afc-ads__hero-stat strong {
  display: block;
  font-family: var(--afc-font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--afc-accent);
  line-height: 1;
}
.afc-ads__hero-stat span { font-size: 13px; color: var(--afc-text-muted); }

/* Puces thematiques */
.afc-ads__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.afc-ads__chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  font-size: 13px;
  font-weight: 600;
}

/* Chiffres audience */
.afc-ads__stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.afc-ads__stat-card {
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
}
.afc-ads__stat-card strong {
  display: block;
  font-family: var(--afc-font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--afc-text);
  line-height: 1;
  margin-bottom: 6px;
}
.afc-ads__stat-card span { font-size: 13px; color: var(--afc-text-muted); }

/* Thematiques acceptees */
.afc-ads__accepted {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.afc-ads__accepted-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--afc-text);
}
.afc-ads__accepted-item svg { color: var(--afc-accent); flex-shrink: 0; }

/* Tarifs */
.afc-ads__pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.afc-ads__price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 24px 20px 20px;
  transition: border-color .18s, transform .18s;
}
.afc-ads__price-card:hover { border-color: var(--afc-accent); transform: translateY(-2px); }
.afc-ads__price-card.is-featured { border-color: var(--afc-accent); border-width: 2px; }
.afc-ads__price-flag {
  position: absolute;
  top: -11px; left: 20px;
  background: var(--afc-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 11px;
  border-radius: 999px;
}
.afc-ads__price-name {
  font-family: var(--afc-font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 3px;
  color: var(--afc-text);
}
.afc-ads__price-tag { font-size: 12.5px; color: var(--afc-text-faint); margin: 0 0 16px; }
.afc-ads__price { margin: 0 0 16px; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.afc-ads__price-prefix { font-size: 12px; color: var(--afc-text-faint); width: 100%; }
.afc-ads__price-amount {
  font-family: var(--afc-font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--afc-accent);
  line-height: 1;
}
.afc-ads__price-cur { font-size: 13px; font-weight: 700; color: var(--afc-accent); }
.afc-ads__price-specs {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  flex: 1;
  font-size: 13.5px;
  color: var(--afc-text-muted);
  line-height: 1.5;
}
.afc-ads__price-specs li { padding: 5px 0; border-bottom: 1px solid var(--afc-border); }
.afc-ads__price-specs li:last-child { border-bottom: none; }
.afc-ads__price-btn {
  display: block;
  text-align: center;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid var(--afc-border-strong);
  color: var(--afc-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, color .15s, border-color .15s;
}
.afc-ads__price-btn:hover,
.afc-ads__price-card.is-featured .afc-ads__price-btn {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}

/* Calculateur de tarifs */
.afc-calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.afc-calc__form,
.afc-calc__summary {
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  padding: 24px 22px;
}
.afc-calc__field { margin-bottom: 16px; }
.afc-calc__field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--afc-text-muted);
  margin-bottom: 6px;
}
.afc-calc__select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--afc-border-strong);
  background: var(--afc-surface, #fff);
  color: var(--afc-text);
  font: inherit;
  font-size: 15px;
}
.afc-calc__select:focus-visible { outline: 2px solid var(--afc-accent); outline-offset: 2px; }
.afc-calc__preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--afc-accent-soft);
}
.afc-calc__preview-label { font-size: 12px; color: var(--afc-text-muted); }
.afc-calc__preview-price {
  font-family: var(--afc-font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--afc-accent);
  line-height: 1.1;
}
.afc-calc__preview-detail { font-size: 12.5px; color: var(--afc-text-muted); min-height: 1em; }
.afc-calc__add { width: 100%; justify-content: center; cursor: pointer; }

.afc-calc__title {
  font-family: var(--afc-font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--afc-text);
}
.afc-calc__lines,
.afc-calc__bonuses { list-style: none; margin: 0; padding: 0; }
.afc-calc__empty { font-size: 13.5px; color: var(--afc-text-faint); padding: 10px 0 14px; }
.afc-calc__line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--afc-border);
}
.afc-calc__line strong { display: block; font-size: 14px; color: var(--afc-text); }
.afc-calc__line span { font-size: 12.5px; color: var(--afc-text-muted); }
.afc-calc__line .afc-calc__line-price { font-size: 14px; font-weight: 700; color: var(--afc-text); white-space: nowrap; }
.afc-calc__remove {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid var(--afc-border-strong);
  background: transparent;
  color: var(--afc-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.afc-calc__remove:hover { color: #fff; background: var(--afc-accent); border-color: var(--afc-accent); }
.afc-calc__bonuses { margin-top: 12px; }
.afc-calc__bonuses li { font-size: 13px; font-weight: 600; color: var(--afc-accent); padding: 2px 0; }
.afc-calc__saving { margin: 10px 0 0; font-size: 13px; color: var(--afc-text-muted); }
.afc-calc__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 2px solid var(--afc-border-strong);
}
.afc-calc__total span { font-weight: 700; color: var(--afc-text); }
.afc-calc__total strong {
  font-family: var(--afc-font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--afc-accent);
}
.afc-calc__quote {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: var(--afc-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
}
.afc-calc__quote:hover { opacity: .9; }
.afc-calc__reset {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: 0;
  color: var(--afc-text-muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
@media (max-width: 760px) {
  .afc-calc { grid-template-columns: minmax(0, 1fr); }
}

/* Etapes */
.afc-ads__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.afc-ads__step {
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 14px;
  padding: 22px 20px;
}
.afc-ads__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
}
.afc-ads__step-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: var(--afc-text); }
.afc-ads__step-text { font-size: 14px; color: var(--afc-text-muted); margin: 0; line-height: 1.55; }

/* Paiements */
.afc-ads__payments { text-align: center; margin-top: 34px; }
.afc-ads__payments-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--afc-text-faint);
  margin-bottom: 12px;
}
.afc-ads__payments-list { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.afc-ads__payment {
  padding: 9px 18px;
  border-radius: 10px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--afc-text);
}

/* Regles */
.afc-ads__rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.afc-ads__rule {
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-left: 3px solid var(--afc-accent);
  border-radius: 12px;
  padding: 18px 20px;
}
.afc-ads__rule-title { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; color: var(--afc-text); }
.afc-ads__rule-text { font-size: 14px; color: var(--afc-text-muted); margin: 0; line-height: 1.55; }
.afc-ads__rules-note {
  margin: 24px auto 0;
  max-width: 78ch;
  font-size: 13.5px;
  color: var(--afc-text-muted);
  line-height: 1.6;
  text-align: center;
  font-style: italic;
}

/* Avantages */
.afc-ads__benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.afc-ads__benefit {
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 14px;
  padding: 22px 20px;
}
.afc-ads__benefit-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--afc-accent); }
.afc-ads__benefit-text { font-size: 14px; color: var(--afc-text-muted); margin: 0; line-height: 1.6; }

/* Contact */
.afc-ads__contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 28px auto 0;
}
.afc-ads__contact-card {
  display: block;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.afc-ads__contact-card:hover { border-color: var(--afc-accent); transform: translateY(-2px); }
.afc-ads__contact-card strong { display: block; font-size: 15px; color: var(--afc-text); margin-bottom: 8px; }
.afc-ads__contact-value {
  display: block;
  font-family: var(--afc-font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--afc-accent);
  margin-bottom: 4px;
  word-break: break-word;
}
.afc-ads__contact-note { font-size: 12.5px; color: var(--afc-text-faint); }

/* Appel final */
.afc-ads__final { padding: 60px 0 70px; text-align: center; background: var(--afc-accent-soft); }
.afc-ads__final-title {
  font-family: var(--afc-font-display);
  font-size: clamp(23px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 10px;
  color: var(--afc-text);
}
.afc-ads__final-text { color: var(--afc-text-muted); max-width: 56ch; margin: 0 auto 24px; font-size: 15.5px; }

/* Mobile */
@media (max-width: 640px) {
  .afc-ads__section { padding: 40px 0; }
  .afc-ads__hero { padding: 44px 0 40px; }
  .afc-ads__hero-stats { gap: 28px; }
  .afc-ads__cta-row .afc-btn-primary,
  .afc-ads__cta-row .afc-btn-secondary { flex: 1 1 100%; justify-content: center; text-align: center; }
}

/* ============================================================
   CONTENU IMPORTÉ — ANTI-DÉBORDEMENT (pages de détail)
   ------------------------------------------------------------
   Symptôme : sur mobile, le titre et les boutons apparaissaient
   coupés à droite.

   Cause : un élément de grille (comme un élément flex) refuse par
   défaut de descendre sous la largeur MINIMALE de son contenu.
   Les rangées de boutons héritées de l'ancien site élargissaient
   donc la colonne entière au-delà de l'écran ; comme le débordement
   horizontal est volontairement coupé au niveau de la page, le
   surplus était rogné au lieu de défiler.

   Correctif : autoriser les colonnes à se réduire (min-width: 0),
   puis contraindre les éléments de contenu à rester dans la largeur.
   ============================================================ */
.afc-detail__layout > * { min-width: 0; }

.afc-detail__content,
.afc-legal-content,
.entry-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Médias : jamais plus larges que la colonne */
.afc-detail__content img,
.afc-detail__content iframe,
.afc-detail__content video,
.afc-detail__content embed,
.afc-legal-content img,
.entry-content img,
.entry-content iframe,
.entry-content video {
  max-width: 100%;
  height: auto;
}

/* Rangées de boutons (blocs Gutenberg de l'ancien site) :
   elles doivent passer à la ligne au lieu de s'aligner de force */
.afc-detail__content .wp-block-buttons,
.entry-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}
.afc-detail__content .wp-block-button,
.entry-content .wp-block-button { max-width: 100%; }

/* Le libellé d'un bouton doit pouvoir se couper : « REJOINDRE LA
   CHAINE TELEGRAM » dépasse la largeur d'un écran de 360 px */
.afc-detail__content .wp-block-button__link,
.entry-content .wp-block-button__link,
.afc-detail__content a[class*="button"],
.entry-content a[class*="button"] {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* Liens nus et longues URL collées dans le texte */
.afc-detail__content a,
.afc-legal-content a,
.entry-content a { overflow-wrap: break-word; }

/* Tableaux et code : défilement DANS leur propre cadre, pas dans la page */
.afc-detail__content table,
.afc-legal-content table,
.entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
.afc-detail__content pre,
.entry-content pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Le titre doit pouvoir se couper plutôt qu'être rogné */
.afc-detail__title { overflow-wrap: break-word; hyphens: auto; }

@media (max-width: 640px) {
  /* Sur écran étroit, un bouton pleine largeur est plus lisible
     et supprime tout risque de dépassement */
  .afc-detail__content .wp-block-button,
  .entry-content .wp-block-button { flex: 1 1 100%; }
  .afc-detail__content .wp-block-button__link,
  .entry-content .wp-block-button__link {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Filet supplémentaire — boutons importés en HTML brut.
   L'ancien site produisait des liens stylés par attribut style=""
   (fond coloré, remplissage, parfois white-space:nowrap). Aucune
   classe ne permet de les cibler : on s'appuie donc sur la présence
   de l'attribut style, ce qui ne concerne que du contenu importé. */
.afc-detail__content a[style],
.afc-legal-content a[style],
.entry-content a[style] {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* Conteneurs directs du contenu : jamais plus larges que la colonne */
.afc-detail__content > *,
.afc-legal-content > *,
.entry-content > * { max-width: 100%; }

/* Une rangée de boutons en flex sans retour à la ligne déborde
   systématiquement sous 400 px */
.afc-detail__content div[style*="flex"],
.entry-content div[style*="flex"] { flex-wrap: wrap !important; }

@media (max-width: 640px) {
  /* Les libellés longs (« REJOINDRE LA CHAINE TELEGRAM ») dépassent
     à eux seuls la largeur d'un téléphone : on les laisse respirer. */
  .afc-detail__content a[style],
  .entry-content a[style] {
    display: inline-block;
    word-break: break-word;
  }
}

/* ============================================================
   BOUTONS GUTENBERG DANS LE CONTENU — CORRECTIF DÉFINITIF
   ------------------------------------------------------------
   Balisage réel constaté sur les opportunités importées :
     <div class="wp-block-buttons is-layout-flex">
       <div class="wp-block-button">
         <a class="wp-block-button__link" style="background:…">
           <strong>REJOINDRE LA CHAINE TELEGRAM</strong>

   Le cœur n'injecte pour ces blocs qu'une règle de centrage
   (justify-content). Sans retour à la ligne garanti, une rangée de
   deux boutons dépasse la largeur d'un téléphone.

   Point clé : « overflow-wrap: break-word » ne suffit PAS ici. Cette
   propriété coupe un mot qui déborde, mais ne réduit pas la largeur
   MINIMALE du bloc — or c'est cette largeur minimale qui empêchait la
   colonne de se réduire, et donc rognait le titre. Il faut
   « overflow-wrap: anywhere », qui, lui, agit sur le calcul de la
   largeur minimale.
   ============================================================ */
.afc-detail__content .wp-block-buttons,
.afc-legal-content .wp-block-buttons,
.entry-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap !important;   /* prime sur la mise en page du cœur */
  gap: 10px;
  max-width: 100%;
}

.afc-detail__content .wp-block-button,
.afc-legal-content .wp-block-button,
.entry-content .wp-block-button {
  max-width: 100%;
  min-width: 0;                 /* sans cela, le bouton impose sa largeur */
}

.afc-detail__content .wp-block-button__link,
.afc-legal-content .wp-block-button__link,
.entry-content .wp-block-button__link {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;      /* réduit réellement la largeur minimale */
  box-sizing: border-box;
  line-height: 1.35;
}

/* Téléphones : un bouton par ligne, pleine largeur.
   Plus lisible qu'un libellé coupé, et supprime tout dépassement. */
@media (max-width: 640px) {
  .afc-detail__content .wp-block-button,
  .afc-legal-content .wp-block-button,
  .entry-content .wp-block-button { flex: 1 1 100%; }

  .afc-detail__content .wp-block-button__link,
  .afc-legal-content .wp-block-button__link,
  .entry-content .wp-block-button__link {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   .afc-prose — MISE EN FORME DU CONTENU ÉDITORIAL
   ------------------------------------------------------------
   Appliqué à toute page utilisant le modèle standard. Objectif :
   qu'un contenu collé sans aucune classe — y compris du HTML brut
   importé de l'ancien site — respecte l'identité du thème.
   ============================================================ */

/* ── Titres ── */
.afc-prose h2 {
  font-family: var(--afc-font-display);
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 44px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--afc-border);
  color: var(--afc-text);
  scroll-margin-top: 90px;   /* le sommaire ne masque plus la cible */
}
.afc-prose h2:first-child { margin-top: 0; }
.afc-prose h3 {
  font-family: var(--afc-font-display);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  margin: 32px 0 10px;
  color: var(--afc-text);
  scroll-margin-top: 90px;
}
.afc-prose h4 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 26px 0 8px;
  color: var(--afc-text);
}

/* ── Texte courant ── */
.afc-prose p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--afc-text-muted);
  margin: 0 0 18px;
}
.afc-prose strong { color: var(--afc-text); font-weight: 700; }
.afc-prose a:not([class]) {
  color: var(--afc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.afc-prose a:not([class]):hover { text-decoration-thickness: 2px; }

/* ── Listes ── */
.afc-prose ul,
.afc-prose ol { margin: 0 0 20px; padding-left: 1.3em; }
.afc-prose li {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--afc-text-muted);
  margin-bottom: 8px;
}
.afc-prose li::marker { color: var(--afc-accent); }
.afc-prose li > ul,
.afc-prose li > ol { margin-top: 8px; margin-bottom: 0; }

/* ── Citations ── */
.afc-prose blockquote {
  margin: 26px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--afc-accent);
  background: var(--afc-surface-2, #f7f4ef);
  border-radius: 0 10px 10px 0;
}
.afc-prose blockquote p { margin-bottom: 0; font-style: italic; }

/* ── Médias ── */
.afc-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.afc-prose figure { margin: 26px 0; }
.afc-prose figcaption {
  font-size: 13px;
  color: var(--afc-text-faint);
  text-align: center;
  margin-top: 8px;
}
.afc-prose iframe,
.afc-prose video {
  max-width: 100%;
  border-radius: 12px;
  display: block;
  margin: 26px 0;
}

/* ── Tableaux ── */
.afc-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 26px 0;
}
.afc-prose thead th {
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--afc-text-faint);
  border-bottom: 2px solid var(--afc-border-strong);
  padding: 10px 12px;
}
.afc-prose td,
.afc-prose tbody th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--afc-border);
  color: var(--afc-text-muted);
  vertical-align: top;
}

/* ── Séparateur & code ── */
.afc-prose hr {
  border: none;
  border-top: 1px solid var(--afc-border);
  margin: 38px 0;
}
.afc-prose code {
  background: var(--afc-surface-2, #f3eee5);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: .92em;
}
.afc-prose pre {
  background: var(--afc-surface-2, #f3eee5);
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 24px 0;
}
.afc-prose pre code { background: none; padding: 0; }

/* ============================================================
   FORMULAIRES DANS LE CONTENU
   ------------------------------------------------------------
   Les pages comme « Publier une opportunité » contiennent des
   champs en HTML brut, sans aucune classe. Sans ces règles, ils
   s'affichent avec le style par défaut du navigateur — c'est ce
   qui rendait la page visuellement étrangère au reste du site.
   ============================================================ */
.afc-prose label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--afc-text);
  margin-bottom: 6px;
}
.afc-prose input[type="text"],
.afc-prose input[type="email"],
.afc-prose input[type="url"],
.afc-prose input[type="tel"],
.afc-prose input[type="number"],
.afc-prose input[type="date"],
.afc-prose input[type="search"],
.afc-prose input[type="password"],
.afc-prose select,
.afc-prose textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--afc-text);
  background: var(--afc-input-bg, #fff);
  border: 1.5px solid var(--afc-border);
  border-radius: 10px;
  transition: border-color .15s;
  outline: none;
}
.afc-prose input:focus,
.afc-prose select:focus,
.afc-prose textarea:focus { border-color: var(--afc-accent); }
.afc-prose textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.afc-prose select { appearance: none; cursor: pointer; }

/* Cases à cocher et boutons radio : alignés avec leur libellé */
.afc-prose input[type="checkbox"],
.afc-prose input[type="radio"] {
  width: auto;
  margin: 0 8px 0 0;
  accent-color: var(--afc-accent);
  vertical-align: middle;
}
.afc-prose input[type="checkbox"] + label,
.afc-prose input[type="radio"] + label { display: inline; font-weight: 500; }

.afc-prose input[type="file"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  border: 1.5px dashed var(--afc-border-strong);
  border-radius: 10px;
  background: var(--afc-surface-2, #f7f4ef);
  font-size: 14px;
  box-sizing: border-box;
}

.afc-prose button[type="submit"],
.afc-prose input[type="submit"] {
  display: inline-block;
  padding: 13px 26px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--afc-accent);
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: opacity .15s;
}
.afc-prose button[type="submit"]:hover,
.afc-prose input[type="submit"]:hover { opacity: .9; }

/* ── Image de couverture ── */
.afc-page-cover { margin: 0 0 34px; }
.afc-page-cover img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

/* ── Encart d'appel à l'action de fin de page ── */
.afc-page-cta {
  margin-top: 56px;
  padding: 46px 0 52px;
  background: var(--afc-accent-soft);
  text-align: center;
}
.afc-page-cta__title {
  font-family: var(--afc-font-display);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: var(--afc-text);
}
.afc-page-cta__text {
  color: var(--afc-text-muted);
  max-width: 54ch;
  margin: 0 auto 22px;
  font-size: 15.5px;
}
.afc-page-cta__btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .afc-prose p,
  .afc-prose li { font-size: 15.5px; }
  .afc-prose h2 { margin-top: 34px; }
  .afc-page-cta { padding: 36px 0 40px; }
  .afc-page-cta__btns .afc-btn-primary,
  .afc-page-cta__btns .afc-btn-secondary { flex: 1 1 100%; justify-content: center; }
}

/* ==========================================================================
   BLOC « SUIVI DE CANDIDATURE » (page opportunite)
   Reprend les boutons publics existants : rien de nouveau ici hormis
   le conteneur.
   ========================================================================== */

.afc-suivi {
  padding: 16px;
  margin-bottom: 18px;
  background: var(--afc-surface, #fffdfa);
  border: 1px solid var(--afc-border-card, #ece5da);
  border-radius: var(--afc-r-lg, 16px);
}

.afc-suivi__entete {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.afc-suivi__icone { color: var(--afc-accent, #d4243b); line-height: 0; }
.afc-suivi__titre {
  font-family: var(--afc-font-display, sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--afc-text, #2a2521);
}

.afc-suivi__texte {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--afc-text-muted, #6a6258);
}

.afc-suivi__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.afc-suivi__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  text-align: center;
}

.afc-suivi__note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--afc-text-soft, #8a8178);
}

/* ==========================================================================
   PAGE DE L'OFFRE PREMIUM
   Reutilise .afc-container, .afc-btn-primary et .afc-prose du theme.
   ========================================================================== */

.afc-offre { padding: 40px 0 72px; }

.afc-offre__entete {
  max-width: 62ch;
  margin: 0 auto 34px;
  text-align: center;
}
.afc-offre__titre {
  margin: 0 0 10px;
  font-family: var(--afc-font-display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--afc-text);
}
.afc-offre__sous {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--afc-text-muted);
}
.afc-offre__statut {
  margin: 16px 0 0;
  padding: 10px 16px;
  display: inline-block;
  border-radius: 100px;
  background: var(--afc-accent-soft);
  color: var(--afc-text);
  font-size: 14px;
}

/* --- Formules --- */

.afc-offre__formules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 40px;
}

.afc-offre__formule {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 22px;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border-card);
  border-radius: 16px;
  text-align: center;
}
/* La formule annuelle porte l'argument economique : elle se detache,
   sans pour autant ecraser l'autre. */
.afc-offre__formule.est-phare {
  border-color: var(--afc-accent);
  box-shadow: 0 8px 26px rgba(60, 45, 30, .08);
}

.afc-offre__economie {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 13px;
  border-radius: 100px;
  background: var(--afc-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.afc-offre__formule-titre {
  margin: 0 0 10px;
  font-family: var(--afc-font-display);
  font-size: 17px;
  font-weight: 700;
}

.afc-offre__prix { margin: 0 0 6px; }
.afc-offre__prix span {
  font-family: var(--afc-font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--afc-text);
}
.afc-offre__prix small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--afc-text-soft);
}

.afc-offre__note {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--afc-text-muted);
}

.afc-offre__action {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}
.afc-offre__indispo {
  margin-top: auto;
  font-size: 13px;
  color: var(--afc-text-soft);
}

/* --- Comparatif --- */

/* Le tableau defile dans son propre conteneur : sur mobile la page ne
   doit jamais partir en travers. */
.afc-offre__tableau-enveloppe {
  max-width: 760px;
  margin: 0 auto 32px;
  overflow-x: auto;
  border: 1px solid var(--afc-border-card);
  border-radius: 16px;
  background: var(--afc-surface);
}

.afc-offre__tableau {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.afc-offre__tableau th,
.afc-offre__tableau td {
  padding: 13px 16px;
  text-align: center;
  border-bottom: 1px solid var(--afc-border-light);
}
.afc-offre__tableau thead th {
  font-family: var(--afc-font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--afc-text);
  background: var(--afc-bg-alt);
}
.afc-offre__tableau tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--afc-text-2);
}
.afc-offre__tableau tbody tr:last-child th,
.afc-offre__tableau tbody tr:last-child td { border-bottom: 0; }

.afc-offre__oui { color: #3a7350; font-weight: 700; font-size: 16px; }
.afc-offre__non { color: var(--afc-text-soft); }

.afc-offre__contenu { max-width: 700px; margin: 0 auto 28px; }

.afc-offre__mentions {
  max-width: 60ch;
  margin: 0 auto;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
  color: var(--afc-text-soft);
}

@media (max-width: 600px) {
  .afc-offre { padding: 26px 0 52px; }
  .afc-offre__formules { gap: 22px; }
}

/* ============================================================
   HERO — ARRIÈRE-PLAN PERSONNALISÉ
   Personnaliser → Section Hero : couleur, dégradé et image.
   Les variables --afc-hero-* sont écrites en ligne dans le <head>
   par afc_hero_bg_css(). Les valeurs de repli ci-dessous ne servent
   qu'au cas où ce style ne serait pas chargé.
   ============================================================ */
.afc-hero--bg {
  color: var(--afc-hero-fg, #fff);
  background-color: var(--afc-hero-bg, #0d3b2c);
  /* Trois calques, du plus proche au plus lointain :
     voile coloré → image → dégradé de base. */
  background-image:
    var(--afc-hero-veil,  none),
    var(--afc-hero-image, none),
    var(--afc-hero-grad,  none);
  background-size:     auto, cover, auto;
  background-position: 0 0, var(--afc-hero-pos, center center), 0 0;
  background-repeat:   no-repeat, no-repeat, no-repeat;
  padding-bottom: clamp(36px, 5vw, 60px);
}

/* Panneau arrondi détaché des bords (rendu par défaut) */
.afc-hero--panel {
  margin: clamp(10px, 1.6vw, 20px) clamp(12px, 3vw, 26px) 0;
  border-radius: clamp(18px, 2.4vw, 30px);
  overflow: hidden;
  padding-top: clamp(38px, 5.4vw, 72px);
}

/* Bandeau pleine largeur */
.afc-hero--full {
  padding-top: clamp(40px, 6vw, 84px);
  border-bottom: none;
}

/* ── Lisibilité du contenu sur le fond ── */
.afc-hero--bg .afc-hero__title       { color: var(--afc-hero-fg, #fff); }
.afc-hero--bg .afc-hero__title em    { color: var(--afc-hero-em, var(--afc-accent)); }
.afc-hero--bg .afc-hero__sub,
.afc-hero--bg .afc-hero__stat-label  { color: var(--afc-hero-fg-muted, rgba(255,255,255,.78)); }
.afc-hero--bg .afc-hero__stat-num    { color: var(--afc-hero-fg, #fff); }
.afc-hero--bg .afc-hero__stat-sep    { background: var(--afc-hero-line, rgba(255,255,255,.24)); }

.afc-hero--bg .afc-hero__badge {
  background: var(--afc-hero-badge-bg, rgba(255,255,255,.13));
  color: var(--afc-hero-fg, #fff);
  border: 1px solid var(--afc-hero-line, rgba(255,255,255,.24));
}
.afc-hero--bg .afc-hero__badge-dot { background: currentColor; }

/* La barre de recherche reste une pastille claire : c'est le point
   d'appui visuel de la section, il doit trancher sur le fond. */
.afc-hero--bg .afc-search-bar { box-shadow: 0 10px 30px rgba(0,0,0,.18); }

/* Mode sombre : la règle générale #page.theme-dark .afc-hero repeint le
   fond en surface sombre ; on rétablit ici le fond choisi. */
#page.theme-dark .afc-hero--bg {
  background-color: var(--afc-hero-bg, #0d3b2c);
  background-image:
    var(--afc-hero-veil,  none),
    var(--afc-hero-image, none),
    var(--afc-hero-grad,  none);
  border-bottom-color: transparent;
}

@media (max-width: 600px) {
  .afc-hero--panel {
    margin: 8px 10px 0;
    border-radius: 18px;
    padding-top: 32px;
  }
  /* Sur mobile le texte occupe toute la largeur : on recentre le sujet
     de l'image plutôt que de le laisser hors champ. */
  .afc-hero--bg { background-position: 0 0, center center, 0 0; }
}

/* ============================================================
   PAGE GUIDES  (modèle « Page — Guides »)
   Couleurs réglables dans Personnaliser → Page Guides ;
   les variables --afc-guides-* sont écrites en ligne dans le <head>.
   ============================================================ */

/* ── En-tête ── */
.afc-guides-hero {
  position: relative;
  overflow: hidden;
  background: var(--afc-guides-hero, #141414);
  color: #fff;
  padding: clamp(44px, 7vw, 90px) 0;
}
/* La forme oblique : un simple bloc penché, ancré à droite.
   Masquée aux lecteurs d'écran, elle n'a qu'un rôle décoratif. */
.afc-guides-hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -6%;
  width: clamp(160px, 26vw, 340px);
  height: 140%;
  background: var(--afc-guides-shape, #c8283f);
  transform: skewX(-18deg);
  pointer-events: none;
}
.afc-guides-hero .afc-container { position: relative; z-index: 1; }

.afc-guides-hero__title {
  font-family: var(--afc-font-display);
  font-weight: 800;
  font-size: clamp(30px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.afc-guides-hero__sub {
  margin: 18px 0 0;
  max-width: 52ch;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.6;
  color: rgba(255,255,255,.72);
}

/* ── Filtres ── */
.afc-guides-tabs {
  background: var(--afc-surface);
  border-bottom: 1px solid var(--afc-border);
  z-index: 20;
}
/* Collante juste sous l'en-tête. --afc-header-h est mesurée au chargement
   par main.js : la hauteur dépend du logo et de la sous-navigation, une
   valeur figée laisserait défiler du contenu entre les deux barres. */
@media (min-width: 900px) {
  .afc-guides-tabs {
    position: sticky;
    top: calc(var(--afc-header-h, 84px) - 1px); /* -1px : chevauche la bordure de l'en-tête */
  }
}
.afc-guides-tabs__inner {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}
.afc-guides-tabs__inner::-webkit-scrollbar { display: none; }

.afc-guides-tab {
  flex: 0 0 auto;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 15px 0;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--afc-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.afc-guides-tab:hover { color: var(--afc-text); }
.afc-guides-tab.is-active {
  color: var(--afc-text);
  border-bottom-color: var(--afc-accent);
}
.afc-guides-tab:focus-visible {
  outline: 3px solid var(--afc-focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Groupes ── */
.afc-guides-list { padding: clamp(28px, 4vw, 46px) 0 clamp(36px, 5vw, 60px); }

.afc-guides-group[hidden] { display: none; }
/* L'écart ne doit séparer que deux groupes réellement affichés : sinon,
   filtrer sur une catégorie laisserait une marge orpheline en haut. */
.afc-guides-group:not([hidden]) + .afc-guides-group:not([hidden]) {
  margin-top: clamp(30px, 4vw, 48px);
}

.afc-guides-group__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 27px);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.afc-guides-group__count {
  font-family: var(--afc-font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--afc-text-faint);
}

.afc-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Carte ── */
.afc-guide-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--afc-surface);
  border: 1px solid var(--afc-border);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.afc-guide-card:hover {
  border-color: var(--afc-guide-tint, var(--afc-accent));
  box-shadow: 0 6px 20px rgba(60,40,20,.09);
  transform: translateY(-2px);
}
.afc-guide-card:focus-visible {
  outline: 3px solid var(--afc-focus-ring);
  outline-offset: 2px;
}

.afc-guide-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.afc-guide-card__icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 19px;
  line-height: 1;
  background: var(--afc-guide-tint, var(--afc-accent));
}
.afc-guide-card__heading { min-width: 0; }

.afc-guide-card__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
  /* Les titres de guides sont longs : sans cela, un mot composé
     élargirait la colonne au-delà de sa part de grille. */
  overflow-wrap: anywhere;
}
.afc-guide-card__time {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--afc-text-faint);
}

.afc-guide-card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--afc-text-muted);
  overflow-wrap: anywhere;
}

.afc-guide-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
  flex-wrap: wrap;
}
.afc-guide-card__tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--afc-accent-soft);
  color: var(--afc-text-muted);
}
.afc-guide-card__more {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--afc-accent);
  white-space: nowrap;
}
.afc-guide-card:hover .afc-guide-card__more { text-decoration: underline; }

/* Fiche sans destination : visible, mais ni cliquable ni survolable. */
.afc-guide-card--vide { cursor: default; }
.afc-guide-card--vide:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--afc-border);
}
.afc-guide-card__more--vide {
  color: var(--afc-text-faint);
  font-weight: 500;
  font-style: italic;
}

/* ── États vides ── */
.afc-guides-empty {
  padding: 50px 0;
  text-align: center;
  color: var(--afc-text-muted);
}
.afc-guides-empty--admin {
  padding-top: 0;
  font-size: 14px;
  color: var(--afc-text-faint);
}
.afc-guides-none {
  padding: 40px 0;
  text-align: center;
  color: var(--afc-text-muted);
}

.afc-guides-intro { margin: 0 auto clamp(30px, 4vw, 50px); }

/* ── Bandeau final ── */
.afc-guides-cta {
  position: relative;
  overflow: hidden;
  background: var(--afc-guides-cta-bg, var(--afc-accent));
  color: var(--afc-guides-cta-fg, #fff);
  padding: clamp(32px, 4.5vw, 58px) 0;
}
.afc-guides-cta::before {
  content: '';
  position: absolute;
  top: -30%; left: -4%;
  width: clamp(90px, 14vw, 190px);
  height: 160%;
  background: var(--afc-guides-cta-deco, rgba(255,255,255,.08));
  transform: skewX(-18deg);
  pointer-events: none;
}
.afc-guides-cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}
.afc-guides-cta__text { flex: 1 1 340px; min-width: 0; }
.afc-guides-cta__title {
  font-family: var(--afc-font-display);
  font-weight: 700;
  font-size: clamp(21px, 2.8vw, 30px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.afc-guides-cta__sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  opacity: .9;
  max-width: 56ch;
}
.afc-guides-cta__btn {
  flex: 0 0 auto;
  background: var(--afc-guides-cta-btn-bg, #fff);
  color: var(--afc-guides-cta-btn-fg, var(--afc-accent));
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 10px;
  transition: filter .15s;
}
.afc-guides-cta__btn:hover { filter: brightness(.96); }
.afc-guides-cta__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.afc-guides-cta__btn--vide {
  background: transparent;
  border: 1px dashed currentColor;
  color: inherit;
  opacity: .75;
  font-weight: 600;
}

/* Le bandeau final touche le pied de page : l'écart de 60px que le footer
   s'accorde partout ailleurs laisserait une bande claire entre deux aplats. */
.page-template-guides .afc-footer { margin-top: 0; }

/* ── Mode sombre ── */
#page.theme-dark .afc-guides-tabs { background: var(--afc-surface); border-bottom-color: var(--afc-border); }
#page.theme-dark .afc-guide-card  { background: var(--afc-surface); border-color: var(--afc-border); }
#page.theme-dark .afc-guide-card:hover { box-shadow: var(--afc-shadow-md); }
#page.theme-dark .afc-guide-card__tag  { background: var(--afc-accent-soft); color: var(--afc-text-muted); }

/* ── Petits écrans ── */
@media (max-width: 600px) {
  .afc-guides-hero { padding: 36px 0 32px; }
  .afc-guides-hero::after { right: -22%; opacity: .9; }
  .afc-guides-hero__title { max-width: none; }
  .afc-guides-grid { grid-template-columns: 1fr; }
  .afc-guides-tabs__inner { gap: 18px; }
  .afc-guides-cta__btn { width: 100%; text-align: center; }
}

/* ============================================================
   CONTENUS COMMERCIAUX — mention et bandeau de transparence
   Voir includes/commercial.php dans le plugin.
   ============================================================ */

/* Badge sur les cartes. Volontairement plus sobre que les badges de
   type : il informe, il ne vend pas. Mais assez contrasté pour être
   lu — une mention qu'on ne voit pas ne remplit pas son office. */
.afc-badge--com {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: #f0ebe1;
  color: #6a6258;
  border: 1px solid #e0d9cd;
  white-space: nowrap;
}

/* Bandeau sous le titre d'un contenu. */
.afc-mention {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 20px;
  padding: 12px 14px;
  border-radius: var(--afc-r-md, 11px);
  background: var(--afc-surface-2, #f3eee4);
  border-left: 3px solid var(--afc-text-faint, #8a8178);
}

.afc-mention__etiquette {
  flex: none;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--afc-text, #2a2521);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.afc-mention__texte {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--afc-text-muted, #6a6258);
}

/* Publicité : le cas où la rédaction n'a rien vérifié. Signalé plus
   nettement que les autres — c'est celui qui engage le moins le site. */
.afc-mention--publicite { border-left-color: var(--afc-accent, #d4243b); }
.afc-mention--publicite .afc-mention__etiquette { background: var(--afc-accent, #d4243b); }

.afc-mention--invite { border-left-color: var(--afc-accent-3, #5abecf); }
.afc-mention--invite .afc-mention__etiquette { background: #2f6a78; }

@media (max-width: 600px) {
  .afc-mention { flex-direction: column; gap: 8px; }
}

/* Mode sombre */
#page.theme-dark .afc-badge--com {
  background: var(--afc-surface-2);
  color: var(--afc-text-muted);
  border-color: var(--afc-border);
}
#page.theme-dark .afc-mention { background: var(--afc-surface-2); }
#page.theme-dark .afc-mention__etiquette { background: var(--afc-text); color: var(--afc-bg); }


/* ============================================================
   PAGE D'ÉTAT DES ALERTES
   Retour après clic sur un lien reçu par email : confirmation,
   désinscription, ou lien périmé. Voir afc_alert_afficher_etat().
   ============================================================ */

.afc-etat { padding: 72px 0 88px; }

.afc-etat__carte {
  max-width: 560px;
  margin: 0 auto;
  padding: 44px 40px 36px;
  text-align: center;
  background: var(--afc-surface, #fffdf8);
  border: 1px solid var(--afc-border-card, #e4ddd1);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(60,40,20,.07);
}

/* Pastille du pictogramme. La couleur porte le sens : on doit savoir
   si l'opération a réussi avant même d'avoir lu le titre. */
.afc-etat__icone {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.afc-etat__carte--confirme   .afc-etat__icone { background: #e6f2ea; color: #2f6b47; }
.afc-etat__carte--desinscrit .afc-etat__icone { background: var(--afc-surface-2, #f3eee4); color: var(--afc-text-muted, #6a6258); }
.afc-etat__carte--invalide   .afc-etat__icone { background: #fbe9ec; color: var(--afc-accent, #d4243b); }

.afc-etat__titre {
  font-family: var(--afc-font-display);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--afc-text, #2a2521);
}

.afc-etat__lead {
  font-size: 16.5px;
  line-height: 1.55;
  margin: 0 0 14px;
  color: var(--afc-text, #2a2521);
}

.afc-etat__texte {
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 28px;
  color: var(--afc-text-muted, #6a6258);
}

.afc-etat__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.afc-etat__actions .afc-btn-primary,
.afc-etat__actions .afc-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Séparée du reste : c'est une précision, pas un message. */
.afc-etat__note {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--afc-border-light, #ece5d9);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--afc-text-faint, #8a8178);
}

@media (max-width: 600px) {
  .afc-etat { padding: 44px 0 56px; }
  .afc-etat__carte { padding: 34px 22px 28px; border-radius: 16px; }
  .afc-etat__titre { font-size: 23px; }
  .afc-etat__lead  { font-size: 15.5px; }

  /* Boutons pleine largeur : sur un écran étroit, deux boutons côte à
     côte deviennent deux cibles trop petites. */
  .afc-etat__actions { flex-direction: column; }
  .afc-etat__actions .afc-btn-primary,
  .afc-etat__actions .afc-btn-outline { width: 100%; }
}

/* Mode sombre */
#page.theme-dark .afc-etat__carte {
  background: var(--afc-surface);
  border-color: var(--afc-border);
  box-shadow: none;
}
#page.theme-dark .afc-etat__carte--confirme   .afc-etat__icone { background: rgba(47,107,71,.18);  color: #6fbf8e; }
#page.theme-dark .afc-etat__carte--invalide   .afc-etat__icone { background: rgba(212,36,59,.16); color: #f0899a; }
#page.theme-dark .afc-etat__carte--desinscrit .afc-etat__icone { background: var(--afc-surface-2); color: var(--afc-text-muted); }
