/* =====================================================================
   CNS-JOJ DAKAR 2026 — Feuille de style principale
   Langage de conception : Wise (titres massifs serrés, boutons pilule,
   grandes cartes arrondies, sections inversées, filets fins, pas d'ombres)
   Couleurs : palette officielle JOJ Dakar 2026
   ===================================================================== */

/* Mise en page : colonne de 1200px, sections pleine largeur alternant
   blanc / bleu Dakar inversé / brume, titres d'affiche à gauche. */
:root {
  /* — Palette officielle JOJ Dakar 2026 — */
  --dk-green: #1FA54F;
  --dk-sun: #F9B11E;
  --dk-red: #E72931;
  --dk-blue: #1675BB;
  --dk-lime: #B1CA05;
  --dk-forest: #0E5A45;
  --dk-crimson: #A61731;
  --dk-black: #020406;
  --dk-peach: #F8B99C;
  --dk-yellow: #F8E62D;
  --dk-orange: #E9581A;
  --dk-navy: #243571;
  --dk-mint: #9DCCB7;
  --dk-maroon: #6A1614;
  --dk-amber: #F8AB37;
  --dk-gold: #F5D628;

  /* — Rôles (équivalents Wise) — */
  --ink: var(--dk-navy);          /* Forest Ink → Bleu Dakar */
  --ink-deep: #17224D;            /* bleu Dakar assombri pour les surfaces inversées profondes */
  --accent: var(--dk-lime);       /* Lime Voltage → Vert lime Dakar */
  --accent-hover: #C3DB1A;
  --accent-soft: #EEF4C8;         /* Linen Mist → lime pâle */
  --mint-soft: #E4F2EB;
  --headline: #0B1230;            /* Obsidian, teinté bleu */
  --text: #3D4357;                /* Charcoal, teinté bleu */
  --text-2: #636A7E;              /* Slate */
  --text-3: #8A90A0;              /* Pebble */
  --line: #DCE0E8;
  --fog: #EEF0F4;                 /* Fog */
  --paper: #FFFFFF;
  --on-ink: #FFFFFF;
  --on-ink-2: #C5CCE3;

  /* — Typographie — */
  --font-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;

  --fs-display: clamp(3rem, 6.4vw + 0.6rem, 6.5625rem);  /* 105px */
  --fs-h1: clamp(2.6rem, 5vw + 0.6rem, 5.5625rem);       /* 89px */
  --fs-h2: clamp(2.1rem, 3.2vw + 0.8rem, 3.8125rem);     /* 61px */
  --fs-h3: clamp(1.7rem, 1.8vw + 1rem, 2.8125rem);       /* 45px */
  --fs-h4: clamp(1.4rem, 1vw + 1rem, 2.25rem);           /* 36px */
  --fs-lead: clamp(1.15rem, 0.6vw + 1rem, 1.5625rem);    /* 25px */
  --fs-body: 1.125rem;                                   /* 18px */
  --fs-sm: 1rem;                                         /* 16px */
  --fs-xs: 0.875rem;                                     /* 14px */
  --fs-micro: 0.75rem;                                   /* 12px */

  /* — Formes & espaces (base 4px) — */
  --r-pill: 9999px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-xl: 40px;
  --ring: 0 0 0 1px rgba(11, 18, 48, 0.12);
  --ring-strong: 0 0 0 1px rgba(11, 18, 48, 0.28);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 10px 32px rgba(0, 0, 0, 0.15), 0 40px 40px rgba(0, 0, 0, 0.04);
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 124px);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  letter-spacing: -0.007em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--dk-blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--headline); }

h1, h2, h3, h4, h5 { margin: 0; color: var(--headline); text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--headline); padding: 10px 18px;
  border-radius: var(--r-pill); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Typographie ---------- */
.display, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 90%;
  color: var(--headline);
}
.display { font-size: var(--fs-display); line-height: 0.88; letter-spacing: -0.035em; }
.h1 { font-size: var(--fs-h1); line-height: 0.9; letter-spacing: -0.03em; }
.h2 { font-size: var(--fs-h2); line-height: 0.98; letter-spacing: -0.025em; }
.h3 { font-size: var(--fs-h3); line-height: 1.04; letter-spacing: -0.02em; }
.h4 { font-family: var(--font-body); font-size: var(--fs-h4); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.h5 { font-family: var(--font-body); font-size: var(--fs-lead); font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.lead { font-size: var(--fs-lead); line-height: 1.4; color: var(--text); letter-spacing: -0.012em; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-xs); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mark { background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 92%, transparent 92%); padding-inline: 0.04em; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Mise en page ---------- */
.container { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(780px + 2 * var(--gutter)); }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--fog { background: var(--fog); }
.section--mint { background: var(--mint-soft); }
.section--ink { background: var(--ink); color: var(--on-ink-2); }
.section--ink :is(h1, h2, h3, h4, .display, .h1, .h2, .h3, .h4, .h5) { color: var(--on-ink); }
.section--ink .muted, .section--ink .eyebrow { color: var(--on-ink-2); }
.section--ink .lead { color: var(--on-ink-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head > div:first-child { display: grid; gap: 16px; max-width: 760px; min-width: 0; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Boutons (pilules Wise) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 11px 24px;
  border-radius: var(--r-pill); border: 0;
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--headline); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ink { background: var(--ink); color: var(--on-ink); }
.btn--ink:hover { background: var(--ink-deep); }
.btn--secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--secondary:hover { background: var(--fog); }
.btn--ghost { background: var(--fog); color: var(--ink); }
.btn--ghost:hover { background: var(--line); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--accent-soft); }
.btn--outline-light { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: var(--fs-xs); }
.btn--lg { min-height: 56px; padding: 14px 30px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; border: 0; background: var(--fog); color: var(--ink); cursor: pointer;
  transition: background-color .18s ease;
}
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 20px; height: 20px; }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.link svg { width: 16px; height: 16px; transition: transform .18s ease; }
.link:hover svg { transform: translate(2px, -2px); }
.section--ink .link { color: var(--on-ink); }

/* ---------- Chips, pastilles, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px;
  border-radius: var(--r-pill); border: 0; background: var(--fog); color: var(--ink);
  font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}
.chip:hover { background: var(--line); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); color: var(--on-ink); }
.chip .count { font-weight: 500; opacity: .7; }
.chip-swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: var(--r-pill); font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.02em;
  background: var(--fog); color: var(--ink); white-space: nowrap;
}
.status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status--ok { color: #13803E; }
.status--warn { color: #B26A00; }
.status--alert { color: var(--dk-crimson); }
.status--info { color: var(--dk-blue); }

/* ---------- Bandeau démo ---------- */
.demo-banner {
  background: var(--dk-yellow); color: var(--headline);
  font-size: var(--fs-xs); font-weight: 500; text-align: center; padding: 8px var(--gutter);
}
.demo-banner strong { font-weight: 700; }

/* ---------- Barre institutionnelle ---------- */
.topbar { background: var(--ink-deep); color: var(--on-ink-2); font-size: var(--fs-xs); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar a { color: var(--on-ink); text-decoration: none; font-weight: 500; }
.topbar a:hover { text-decoration: underline; text-underline-offset: 3px; }
.topbar-gov { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-gov .flag { display: inline-flex; width: 21px; height: 14px; border-radius: 2px; overflow: hidden; flex: none; }
.topbar-gov .flag i { flex: 1; }
.topbar-gov span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-links { display: flex; align-items: center; gap: 20px; flex: none; }
.topbar-urgence { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.08); }
.topbar-urgence strong { color: var(--accent); font-weight: 700; }
@media (max-width: 860px) { .topbar-links a:not(.topbar-urgence) { display: none; } }
@media (max-width: 560px) { .topbar-gov span.gov-long { display: none; } }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 90;
  background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { height: 30px; width: auto; }
.brand .brand-sep { width: 1px; height: 34px; background: var(--line); }
.brand .brand-dakar { height: 28px; }
.main-nav { margin-inline: auto; flex: none; }
.main-nav ul { list-style: none; display: flex; gap: 2px; padding: 5px; border-radius: var(--r-pill); background: var(--fog); }
.main-nav a {
  display: block; padding: 9px 12px; border-radius: var(--r-pill);
  font-size: 0.9375rem; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: background-color .18s ease;
}
.main-nav a:hover { background: var(--paper); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.header-actions .btn--primary { padding-inline: 20px; }
.menu-toggle { display: none; }
@media (max-width: 1400px) { .header-inner .brand-sep, .header-inner .brand-dakar { display: none; } }
@media (max-width: 1180px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .brand .brand-sep, .brand .brand-dakar { display: none; }
  .header-actions .btn--primary span { display: none; }
  .header-actions .btn--primary { padding: 0; width: 44px; min-height: 44px; }
  .header-inner { min-height: 64px; }
  .brand img { height: 24px; }
}

/* Menu mobile */
.mobile-menu {
  position: fixed; inset: 0; z-index: 120; background: var(--paper);
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex; flex-direction: column; gap: 24px; overflow-y: auto;
}
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu-head img { height: 26px; width: auto; }
.mobile-menu nav ul { list-style: none; display: grid; gap: 4px; }
.mobile-menu nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: 1.9rem; letter-spacing: -0.02em;
  color: var(--headline); text-decoration: none;
}
.mobile-menu nav a svg { width: 22px; height: 22px; color: var(--text-3); }
.mobile-menu nav a[aria-current="page"] { color: var(--ink); }
.mobile-menu nav a[aria-current="page"]::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.mobile-menu .btn { width: 100%; }

/* ---------- Bandeau flash info ---------- */
.flashbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.flashbar .container { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.vigilance {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; flex: none;
  border-radius: var(--r-pill); background: var(--dk-yellow); color: var(--headline);
  font-size: var(--fs-xs); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.vigilance .pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--headline); }
.vigilance .pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--headline); opacity: 0; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.ticker { position: relative; flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 12px; font-size: var(--fs-xs); white-space: nowrap; color: var(--text); text-decoration: none; }
.ticker-item time { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ticker-item:hover span { text-decoration: underline; text-underline-offset: 3px; }
@keyframes ticker { to { transform: translateX(-50%); } }
.flash-label { font-size: var(--fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--dk-crimson); flex: none; }
@media (max-width: 640px) { .flash-label { display: none; } }

/* ---------- Héro accueil ---------- */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 100px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 28px; min-width: 0; }
.hero-copy .display { max-width: 11ch; }
.hero-copy .lead { max-width: 34ch; }
.hero-media { position: relative; min-width: 0; }
.hero-photo {
  aspect-ratio: 4 / 5; max-width: 100%; border-radius: 999px 999px var(--r-lg) var(--r-lg); overflow: hidden; background: var(--fog);
  position: relative;
}
/* Ciel bleu clair en haut : redessine l'arche quand le ciel de la photo est blanc.
   Le mode « multiply » ne teinte que les zones claires (le ciel), pas les personnes. */
.hero-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(to bottom, #6FA8DC 0%, #A9CDEE 18%, rgba(169, 205, 238, 0) 36%);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-float {
  position: absolute; background: var(--paper); border-radius: var(--r-md); box-shadow: var(--ring), var(--shadow-xl);
  padding: 16px 18px; display: grid; gap: 6px; max-width: 260px;
}
.hero-float--a { left: -28px; bottom: 18%; }
.hero-float--b { right: -12px; top: 10%; background: var(--ink); color: var(--on-ink); }
.hero-float .label { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.hero-float--b .label { color: var(--on-ink-2); }
.hero-float strong { font-size: 1rem; line-height: 1.3; color: var(--headline); }
.hero-float--b strong { color: var(--on-ink); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { aspect-ratio: 5 / 4; border-radius: var(--r-lg); }
  .hero-photo::after { display: none; }
  .hero-float--a { left: 12px; bottom: 12px; }
  .hero-float--b { right: 12px; top: 12px; }
}
@media (max-width: 520px) { .hero-float { display: none; } }

/* Compte à rebours */
.countdown { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.cd-cell { display: grid; justify-items: center; align-content: center; min-width: 76px; padding: 12px 10px; border-radius: var(--r-md); background: var(--fog); }
.cd-cell b { font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: 2.2rem; line-height: 1; color: var(--headline); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cd-cell span { font-size: var(--fs-micro); font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.cd-meta { display: grid; align-content: center; gap: 2px; padding-left: 8px; font-size: var(--fs-xs); color: var(--text-2); }
.cd-meta strong { color: var(--headline); font-size: var(--fs-sm); }
.section--ink .cd-cell { background: rgba(255,255,255,.08); }
.section--ink .cd-cell b { color: var(--on-ink); }
.section--ink .cd-cell span { color: var(--on-ink-2); }

/* ---------- En-tête de page intérieure ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 88px) clamp(40px, 5vw, 64px); }
.page-hero .container { display: grid; gap: 24px; }
.page-hero .h1 { max-width: 14ch; }
.page-hero .lead { max-width: 52ch; }
.page-hero .container.page-hero-split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.page-hero-text { display: grid; gap: 24px; min-width: 0; }
.page-hero-media { width: 100%; max-width: 460px; aspect-ratio: 1 / 1; justify-self: end; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-deep); }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%; }
@media (max-width: 860px) {
  .page-hero .container.page-hero-split { grid-template-columns: minmax(0, 1fr); }
  .page-hero-media { justify-self: start; max-width: 420px; }
}
.page-hero--ink { background: var(--ink); }
.page-hero--ink .h1, .page-hero--ink .display { color: var(--on-ink); }
.page-hero--ink .lead, .page-hero--ink .breadcrumb, .page-hero--ink .breadcrumb a { color: var(--on-ink-2); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--text-2); list-style: none; }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

.subnav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: 6px; list-style: none; overflow-x: auto; padding-block: 12px; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
@media (max-width: 640px) { .subnav { top: calc(env(safe-area-inset-top, 0px) + 64px); } }

/* ---------- Couvertures générées & médias ---------- */
.cover { position: relative; overflow: hidden; background: var(--c1); isolation: isolate; aspect-ratio: 16 / 10; max-width: 100%; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--gen { background: linear-gradient(150deg, var(--c1) 0%, var(--c2) 100%); }
.cover-motif { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.cover-icon { position: absolute; left: 7%; bottom: 10%; width: 22%; max-width: 88px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--c1); }
.cover-icon svg { width: 46%; height: 46%; }
.cover-tag { position: absolute; left: 7%; top: 9%; font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: .95; letter-spacing: -0.02em; color: var(--paper); max-width: 70%; }
.cover--light-text .cover-tag { color: var(--headline); }

/* ---------- Cartes actualités ---------- */
.news-card { display: grid; gap: 16px; align-content: start; text-decoration: none; color: inherit; min-width: 0; }
.news-card .cover { border-radius: var(--r-lg); transition: border-radius .3s ease; }
.news-card:hover .cover { border-radius: var(--r-md); }
.news-card .cover img { transition: transform .5s ease; }
.news-card:hover .cover img { transform: scale(1.04); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-xs); color: var(--text-2); }
.news-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.news-card h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.22; letter-spacing: -0.02em; }
.news-card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.news-card p { font-size: var(--fs-sm); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-badge { background: var(--c-soft, var(--fog)); color: var(--c-ink, var(--ink)); }

.news-card--feature { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 56px); }
.news-card--feature .cover { aspect-ratio: 4 / 3; }
.news-card--feature h3 { font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: var(--fs-h3); line-height: 1; letter-spacing: -0.025em; }
.news-card--feature p { font-size: var(--fs-body); -webkit-line-clamp: 4; }
.news-card--feature .news-body { display: grid; gap: 18px; min-width: 0; }
@media (max-width: 860px) { .news-card--feature { grid-template-columns: minmax(0, 1fr); } }
.une-grid .news-card--feature { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.une-grid .news-card--feature .cover { aspect-ratio: 16 / 10; }
.une-grid .news-card--feature h3 { font-size: clamp(1.9rem, 2.6vw + .6rem, 3rem); }

.news-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; text-decoration: none; color: inherit; padding-block: 16px; border-top: 1px solid var(--line); }
.news-row .cover { aspect-ratio: 1; border-radius: var(--r-md); }
.news-row .cover-tag, .news-row .cover-icon { display: none; }
.news-row h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.news-row:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.news-row > div { display: grid; gap: 6px; min-width: 0; }

/* À la une */
.une-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
.une-side { display: grid; align-content: start; }
.une-side .news-row:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .une-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Chiffres clés ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.2); }
.stat { display: grid; gap: 8px; padding: 28px 24px 8px 0; min-width: 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.2); }
.stat b { font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: clamp(3rem, 5vw, 5.5rem); line-height: .85; letter-spacing: -0.04em; color: var(--on-ink); font-variant-numeric: tabular-nums; }
.stat b small { font-size: .45em; letter-spacing: -0.02em; }
.stat span { font-size: var(--fs-sm); color: var(--on-ink-2); }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.2); }
}

/* ---------- Cartes génériques ---------- */
.card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--ring); padding: clamp(24px, 3vw, 36px); display: grid; gap: 16px; align-content: start; min-width: 0; }
.card--fog { background: var(--fog); box-shadow: none; }
.card--mint { background: var(--mint-soft); box-shadow: none; }
.card--lime { background: var(--accent-soft); box-shadow: none; }
.card--ink { background: var(--ink); color: var(--on-ink-2); box-shadow: none; }
.card--ink :is(h3, h4, .h4, .h5) { color: var(--on-ink); }
.card h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.card p { font-size: var(--fs-sm); }
.card .link { margin-top: 4px; }
a.card { text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease; }
a.card:hover { box-shadow: var(--ring-strong), var(--shadow-lg); }
.icon-circle { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft, var(--accent-soft)); color: var(--c-ink, var(--ink)); flex: none; }
.icon-circle svg { width: 24px; height: 24px; }
.icon-circle--lg { width: 64px; height: 64px; }
.icon-circle--lg svg { width: 28px; height: 28px; }

/* ---------- Urgences ---------- */
.urgences { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.urgence { display: grid; gap: 4px; padding: 22px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--ring); min-width: 0; }
.urgence .num { font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: .9; letter-spacing: -0.03em; color: var(--headline); font-variant-numeric: tabular-nums; user-select: all; }
.urgence .num--long { font-size: clamp(1.9rem, 2.6vw, 2.4rem); line-height: 1.05; }
.urgence .name { font-weight: 600; color: var(--headline); font-size: var(--fs-sm); }
.urgence .desc { font-size: var(--fs-xs); color: var(--text-2); }
.urgence .copy { justify-self: start; margin-top: 8px; }
.urgence--primary { background: var(--dk-crimson); box-shadow: none; }
.urgence--primary :is(.num, .name) { color: var(--paper); }
.urgence--primary .desc { color: #F6D3D9; }
.urgence--primary .copy { background: rgba(255,255,255,.16); color: var(--paper); }
.urgence--primary .copy:hover { background: rgba(255,255,255,.26); }
@media (max-width: 980px) { .urgences { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .urgences { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Sites / zones ---------- */
.zone-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.zone-card { position: relative; display: grid; align-content: space-between; gap: 40px; min-height: 340px; padding: 28px; border-radius: var(--r-lg); color: var(--paper); text-decoration: none; overflow: hidden; isolation: isolate; background: linear-gradient(160deg, var(--c1), var(--c2)); }
.zone-card h3 { font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: clamp(2.4rem, 3.6vw, 3.4rem); line-height: .9; letter-spacing: -0.03em; color: inherit; }
.zone-card p { font-size: var(--fs-sm); opacity: .92; }
.zone-card .zone-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.zone-card .zone-arrow { width: 48px; height: 48px; border-radius: 50%; background: var(--paper); color: var(--headline); display: grid; place-items: center; transition: transform .2s ease; flex: none; }
.zone-card:hover .zone-arrow { transform: rotate(-45deg); }
.zone-card .zone-arrow svg { width: 22px; height: 22px; }
.zone-card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.zone-card li { font-size: var(--fs-micro); font-weight: 600; padding: 5px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); }
.zone-card--dark-text { color: var(--headline); }
.zone-card--dark-text li { background: rgba(255,255,255,.45); }
.zone-card svg.zone-motif { position: absolute; right: -90px; top: -90px; width: 300px; height: 300px; z-index: -1; opacity: .16; }
@media (max-width: 900px) { .zone-cards { grid-template-columns: minmax(0, 1fr); } .zone-card { min-height: 260px; } }

/* ---------- Carte schématique (SVG) ---------- */
.map-wrap { border-radius: var(--r-lg); background: var(--mint-soft); overflow: hidden; }
.map-wrap svg { width: 100%; height: auto; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 16px 24px; font-size: var(--fs-xs); color: var(--text); background: var(--paper); border-top: 1px solid var(--line); }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---------- Onglets ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: var(--r-pill); background: var(--fog); width: fit-content; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 10px 20px; border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.tab:hover { background: var(--paper); }
.section--fog .tabs { background: var(--paper); box-shadow: var(--ring); }
.section--fog .tab:hover { background: var(--fog); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }

/* ---------- Tableau info trafic / venues ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); box-shadow: var(--ring); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--fog); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--headline); font-weight: 600; }

/* ---------- Accordéons ---------- */
.accordion { display: grid; gap: 10px; }
.accordion details { border-radius: var(--r-md); background: var(--paper); box-shadow: var(--ring); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; font-weight: 600; font-size: 1.0625rem; color: var(--headline); line-height: 1.35;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .chev { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fog); flex: none; transition: transform .2s ease, background-color .2s ease; }
.accordion summary .chev svg { width: 18px; height: 18px; }
.accordion details[open] summary .chev { transform: rotate(180deg); background: var(--accent); }
.accordion .acc-body { padding: 0 24px 22px; display: grid; gap: 12px; font-size: var(--fs-sm); max-width: 72ch; }
.accordion .acc-body ul { padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Organigramme ---------- */
.org { display: grid; gap: 14px; justify-items: center; }
.org-level { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; position: relative; }
.org-connector { width: 2px; height: 26px; background: var(--line); }
.org-node {
  display: grid; gap: 6px; text-align: left; min-width: 0; width: min(100%, 340px);
  padding: 20px 22px; border-radius: var(--r-md); border: 0; cursor: pointer;
  background: var(--paper); box-shadow: var(--ring); color: var(--text); transition: box-shadow .2s ease, background-color .2s ease;
}
.org-node:hover { box-shadow: var(--ring-strong), var(--shadow-lg); }
.org-node[aria-expanded="true"] { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--dk-lime); }
.org-node .role { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.org-node strong { font-size: 1.0625rem; line-height: 1.3; color: var(--headline); }
.org-node--top { background: var(--ink); color: var(--on-ink-2); width: min(100%, 420px); }
.org-node--top strong { color: var(--on-ink); }
.org-node--top .role { color: var(--accent); }
.org-node--top[aria-expanded="true"] { background: var(--ink-deep); box-shadow: 0 0 0 2px var(--dk-lime); }
.org-detail { width: 100%; max-width: 900px; border-radius: var(--r-lg); background: var(--fog); padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; }
.org-detail ul { padding-left: 20px; display: grid; gap: 8px; font-size: var(--fs-sm); }
.org-detail .art { font-size: var(--fs-xs); color: var(--text-2); }

/* ---------- Commissions ---------- */
.commission { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding: 24px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--ring); }
.commission .num { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; background: var(--c1); color: var(--c-on, #fff); font-variant-numeric: tabular-nums; }
.commission h3 { font-size: 1.1875rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.commission p { font-size: var(--fs-sm); color: var(--text-2); margin-top: 6px; }

/* ---------- Frise chronologique ---------- */
.timeline { list-style: none; display: grid; gap: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 170px 28px minmax(0, 1fr); gap: 16px; padding-bottom: 32px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(170px + 16px + 13px); top: 14px; bottom: 0; width: 2px; background: rgba(255,255,255,.2); }
.timeline li:last-child::before { display: none; }
.timeline .when { font-weight: 700; color: var(--accent); font-size: var(--fs-sm); padding-top: 2px; font-variant-numeric: tabular-nums; }
.timeline .bullet { width: 28px; height: 28px; border-radius: 50%; background: var(--ink-deep); box-shadow: inset 0 0 0 2px var(--accent); position: relative; z-index: 1; }
.timeline li.is-done .bullet { background: var(--accent); }
.timeline li.is-now .bullet { background: var(--dk-yellow); box-shadow: 0 0 0 6px rgba(248,230,45,.25); }
.timeline .what { display: grid; gap: 4px; }
.timeline .what strong { color: var(--on-ink); font-size: 1.0625rem; }
.timeline .what span { font-size: var(--fs-sm); color: var(--on-ink-2); }
@media (max-width: 640px) {
  .timeline li { grid-template-columns: 28px minmax(0, 1fr); }
  .timeline .when { grid-column: 2; order: -1; }
  .timeline .bullet { grid-row: 1 / span 2; }
  .timeline li::before { left: 13px; }
}

/* ---------- Article ---------- */
.article-head { display: grid; gap: 24px; padding-block: clamp(32px, 5vw, 64px) 32px; }
.article-head .h1 { font-size: clamp(2.3rem, 4.2vw + .6rem, 4.5rem); max-width: 18ch; }
.article-head .lead { max-width: 60ch; }
.article-cover { border-radius: var(--r-lg); aspect-ratio: 21 / 9; }
@media (max-width: 640px) { .article-cover { aspect-ratio: 4 / 3; } }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 80px); padding-block: 48px var(--section); }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); } }
.prose { max-width: 68ch; font-size: 1.1875rem; line-height: 1.65; color: var(--text); display: grid; gap: 22px; min-width: 0; }
.prose h2 { font-family: var(--font-body); font-weight: 700; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; margin-top: 12px; }
.prose h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.prose ul, .prose ol { padding-left: 24px; display: grid; gap: 8px; }
.prose li::marker { color: var(--dk-lime); font-weight: 700; }
.prose a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.prose blockquote { margin: 8px 0; padding: 24px 28px; border-radius: var(--r-lg); background: var(--accent-soft); font-size: 1.3rem; line-height: 1.45; color: var(--headline); font-weight: 500; letter-spacing: -0.015em; }
.prose .callout { padding: 20px 24px; border-radius: var(--r-md); background: var(--fog); font-size: var(--fs-sm); }
.prose .callout strong { color: var(--headline); }
.aside-stack { display: grid; gap: 20px; align-content: start; position: sticky; top: 110px; }
@media (max-width: 960px) { .aside-stack { position: static; } }
.share { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .field .label { font-size: var(--fs-xs); font-weight: 600; color: var(--headline); }
.field .hint { font-size: var(--fs-micro); color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border-radius: var(--r-sm); border: 0; background: var(--paper); color: var(--headline);
  box-shadow: inset 0 0 0 1px var(--text-3); font-size: var(--fs-sm);
  transition: box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1px var(--headline); }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--dk-blue); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23243571' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field.is-invalid :is(.input, .select, .textarea) { box-shadow: inset 0 0 0 2px var(--dk-crimson); }
.field .error { font-size: var(--fs-micro); font-weight: 600; color: var(--dk-crimson); }
.form-alert { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r-sm); background: #FDECEC; color: #9F1D23; font-size: var(--fs-sm); font-weight: 600; line-height: 1.45; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-xs); color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card span { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 16px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); font-weight: 600; color: var(--headline); background: var(--paper); transition: box-shadow .15s ease, background-color .15s ease; }
.radio-card span svg { width: 20px; height: 20px; color: var(--ink); flex: none; }
.radio-card input:hover + span { box-shadow: inset 0 0 0 1px var(--headline); }
.radio-card input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--ink); }
.radio-card input:focus-visible + span { outline: 3px solid var(--dk-blue); outline-offset: 2px; }
.dropzone { display: grid; place-items: center; gap: 8px; text-align: center; padding: 28px; border-radius: var(--r-md); border: 1.5px dashed var(--text-3); background: var(--fog); font-size: var(--fs-xs); color: var(--text-2); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.dropzone.is-over { background: var(--accent-soft); border-color: var(--ink); }
.dropzone svg { width: 28px; height: 28px; color: var(--ink); }
.dropzone strong { color: var(--headline); }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: var(--r-md); background: var(--fog); }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--text-3); position: relative; cursor: pointer; flex: none; transition: background-color .2s ease; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); transition: transform .2s ease; }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(20px); }
.switch .txt { display: grid; gap: 2px; font-size: var(--fs-xs); }
.switch .txt strong { color: var(--headline); font-size: var(--fs-sm); }
.form-success { display: grid; gap: 16px; justify-items: start; padding: clamp(24px, 3vw, 40px); border-radius: var(--r-lg); background: var(--accent-soft); }
.form-success .icon-circle { background: var(--accent); }
.form-success .ref { font-family: var(--font-display); font-weight: 900; font-stretch: 90%; font-size: 2rem; letter-spacing: -0.02em; color: var(--headline); font-variant-numeric: tabular-nums; user-select: all; }
.steps { display: flex; gap: 8px; list-style: none; flex-wrap: wrap; }
.steps li { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); padding: 6px 14px 6px 6px; border-radius: var(--r-pill); background: var(--fog); }
.steps li b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); font-size: var(--fs-micro); }
.steps li.is-current { background: var(--ink); color: var(--on-ink); }
.steps li.is-current b { background: var(--accent); color: var(--headline); }
.steps li.is-done b { background: var(--accent); color: var(--headline); }

/* ---------- Bloc alerte ---------- */
.alert-box { display: flex; gap: 16px; align-items: flex-start; padding: 20px 24px; border-radius: var(--r-md); background: #FDECEE; color: var(--headline); font-size: var(--fs-sm); }
.alert-box svg { width: 24px; height: 24px; color: var(--dk-crimson); flex: none; margin-top: 1px; }
.alert-box strong { color: var(--dk-crimson); }
.info-box { display: flex; gap: 16px; align-items: flex-start; padding: 20px 24px; border-radius: var(--r-md); background: var(--mint-soft); color: var(--headline); font-size: var(--fs-sm); }
.info-box svg { width: 24px; height: 24px; color: var(--dk-forest); flex: none; margin-top: 1px; }

/* ---------- Objets interdits ---------- */
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.item-tile { display: grid; gap: 12px; justify-items: start; padding: 20px; border-radius: var(--r-md); background: var(--paper); box-shadow: var(--ring); font-size: var(--fs-xs); font-weight: 600; color: var(--headline); line-height: 1.3; }
.item-tile .icon-circle { width: 44px; height: 44px; }
.item-tile .icon-circle svg { width: 20px; height: 20px; }
.item-tile--no .icon-circle { background: #FDECEE; color: var(--dk-crimson); }
.item-tile--ok .icon-circle { background: var(--mint-soft); color: var(--dk-forest); }

/* ---------- Médiathèque ---------- */
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .media-grid { grid-template-columns: minmax(0, 1fr); } }
.media-item { position: relative; display: grid; gap: 12px; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; text-decoration: none; min-width: 0; }
.media-item .cover { border-radius: var(--r-lg); aspect-ratio: 4 / 3; }
.media-item .media-type { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); }
.media-item .media-type svg { width: 18px; height: 18px; }
.media-item strong { font-size: var(--fs-sm); font-weight: 600; color: var(--headline); line-height: 1.35; }
.media-item span.muted { font-size: var(--fs-xs); }
.media-item:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(5, 9, 25, .92); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 16px); color: var(--on-ink); }
.lightbox-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lightbox-top .icon-btn { background: rgba(255,255,255,.12); color: var(--on-ink); }
.lightbox-top .icon-btn:hover { background: rgba(255,255,255,.22); }
.lightbox-stage { display: grid; place-items: center; min-height: 0; padding-block: 16px; }
.lightbox-stage img { max-height: 100%; width: auto; max-width: 100%; border-radius: var(--r-md); object-fit: contain; }
.lightbox-cap { text-align: center; font-size: var(--fs-sm); color: var(--on-ink-2); max-width: 70ch; margin-inline: auto; }
.doc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 24px; border-radius: var(--r-md); background: var(--paper); box-shadow: var(--ring); }
.doc-row strong { display: block; color: var(--headline); font-size: var(--fs-sm); line-height: 1.35; }
.doc-row span { font-size: var(--fs-xs); color: var(--text-2); }
@media (max-width: 560px) { .doc-row { grid-template-columns: auto minmax(0, 1fr); } .doc-row .btn { grid-column: 1 / -1; } }

/* ---------- Newsletter & CTA ---------- */
.cta-band { border-radius: var(--r-xl); background: var(--accent); padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.cta-band .h2 { color: var(--headline); }
.cta-band p { color: var(--headline); }
@media (max-width: 860px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }
.inline-form { display: flex; gap: 8px; padding: 6px; border-radius: var(--r-pill); background: var(--paper); box-shadow: var(--ring); }
.inline-form .input { box-shadow: none; min-height: 48px; border-radius: var(--r-pill); background: transparent; min-width: 0; flex: 1; }
.inline-form .input:focus { box-shadow: inset 0 0 0 2px var(--dk-blue); }
@media (max-width: 460px) { .inline-form { flex-direction: column; border-radius: var(--r-lg); } }
.pref-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pref-row label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(255,255,255,.55); font-size: var(--fs-xs); font-weight: 600; color: var(--headline); cursor: pointer; }
.pref-row input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }

/* ---------- Partenaires ---------- */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.partner { display: grid; gap: 4px; padding: 20px 22px; border-radius: var(--r-md); background: var(--fog); min-width: 0; }
.partner strong { color: var(--headline); font-size: var(--fs-sm); line-height: 1.3; }
.partner span { font-size: var(--fs-xs); color: var(--text-2); }

/* ---------- Recherche (overlay) ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 140; background: rgba(11,18,48,.5); display: grid; align-items: start; justify-items: center; padding: calc(env(safe-area-inset-top, 0px) + 72px) var(--gutter) 24px; }
.search-panel { width: min(100%, 760px); background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-xl); overflow: hidden; display: grid; max-height: calc(100dvh - 120px); grid-template-rows: auto minmax(0, 1fr); }
.search-field { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search-field svg { width: 22px; height: 22px; color: var(--ink); flex: none; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1.25rem; font-weight: 500; color: var(--headline); background: transparent; padding: 8px 0; }
.search-results { overflow-y: auto; padding: 8px; display: grid; align-content: start; gap: 2px; }
.search-result { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-sm); text-decoration: none; color: inherit; }
.search-result:hover, .search-result:focus-visible { background: var(--fog); }
.search-result strong { color: var(--headline); font-size: var(--fs-sm); }
.search-result span { font-size: var(--fs-xs); color: var(--text-2); }
.search-empty { padding: 28px 20px; font-size: var(--fs-sm); color: var(--text-2); }
.search-hint { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 16px; }
mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-2); padding-block: clamp(56px, 7vw, 96px) 32px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.15); }
.footer-brand { display: grid; gap: 20px; align-content: start; }
.footer-brand img { height: 46px; width: auto; }
.footer-brand p { font-size: var(--fs-sm); max-width: 36ch; }
.footer-dakar { display: inline-flex; padding: 10px 14px; background: var(--paper); border-radius: var(--r-md); width: fit-content; }
.footer-dakar img { height: 44px; width: auto; }
.footer-col h4 { color: var(--on-ink); font-size: var(--fs-sm); font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: var(--on-ink-2); text-decoration: none; font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--on-ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-col a.btn, .footer-col a.btn:hover { color: var(--headline); text-decoration: none; }
.footer-urg { display: grid; gap: 10px; }
.footer-col { min-width: 0; }
.footer-urg div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: var(--fs-sm); }
.footer-urg b { font-family: var(--font-display); font-weight: 900; font-stretch: 90%; color: var(--accent); font-size: 1.5rem; min-width: 64px; font-variant-numeric: tabular-nums; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: var(--fs-xs); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; }
.footer-bottom a { color: var(--on-ink-2); text-decoration: none; }
.footer-bottom a:hover { color: var(--on-ink); text-decoration: underline; }
@media (max-width: 980px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Mascotte Ayo (accueil) ---------- */
.mascot {
  position: fixed; right: clamp(8px, 2vw, 32px); bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); z-index: 70;
  width: clamp(96px, 10vw, 180px); pointer-events: none;
  transform: translateX(140%) rotate(14deg); transform-origin: 50% 100%;
  transition: transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
.mascot.is-in { transform: none; }
.mascot-lift { position: relative; }
.mascot-body { transform-origin: 50% 96%; will-change: transform; }
.mascot-body img { width: 100%; height: auto; animation: ayo-idle 3.2s ease-in-out infinite; }
.mascot-shadow { position: absolute; left: 18%; right: 18%; bottom: -4px; height: 12px; border-radius: 50%; background: rgba(11, 18, 48, .18); filter: blur(3px); z-index: -1; }
@keyframes ayo-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.mascot-bubble {
  position: absolute; right: 88%; top: 2%; width: max-content; max-width: 230px; margin: 0;
  padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: var(--paper); color: var(--headline);
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.35; box-shadow: var(--ring), var(--shadow-lg);
  opacity: 0; transform: translateY(6px) scale(.92); transform-origin: 100% 100%;
  transition: opacity .25s ease, transform .25s ease; pointer-events: none;
}
.mascot-bubble::after { content: ""; position: absolute; right: -6px; bottom: 10px; width: 12px; height: 12px; background: var(--paper); transform: rotate(45deg); box-shadow: 1px -1px 0 rgba(11, 18, 48, .08); }
.mascot.is-in .mascot-bubble.is-on { opacity: 1; transform: none; transition: opacity .2s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
body[data-page="home"] .to-top { right: auto; left: 16px; }
@media (max-width: 640px) {
  .mascot { width: 78px; right: 6px; }
  .mascot-bubble { right: 0; top: auto; bottom: 100%; margin-bottom: 6px; max-width: min(200px, calc(100vw - 32px)); border-radius: 16px 16px 4px 16px; }
  .mascot-bubble::after { right: 18px; bottom: -6px; }
}

/* ---------- Divers ---------- */
.to-top { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 80; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-lg); }
.to-top svg { width: 22px; height: 22px; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); z-index: 160; background: var(--headline); color: var(--paper); padding: 12px 20px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; box-shadow: var(--shadow-xl); display: inline-flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); }
.toast svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.empty-state { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 56px 24px; border-radius: var(--r-lg); background: var(--fog); }
.empty-state .icon-circle { background: var(--paper); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.split--top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.photo-pill { border-radius: 999px; overflow: hidden; aspect-ratio: 3 / 4; max-width: 100%; }
.photo-pill img, .photo-round img { width: 100%; height: 100%; object-fit: cover; }
.photo-round { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; }
.check-list { list-style: none; display: grid; gap: 12px; }
.check-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: var(--fs-sm); }
.check-list li svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--accent); color: var(--headline); }
.section--ink .check-list li { color: var(--on-ink-2); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 20px; font-size: var(--fs-sm); }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; color: var(--headline); font-weight: 600; }
.load-more { display: flex; justify-content: center; margin-top: 40px; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 28px; font-size: var(--fs-xs); color: var(--text-2); }
.filters { display: grid; gap: 16px; margin-bottom: 40px; }
.filters .chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.filters-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search-inline { position: relative; flex: 1; min-width: 220px; }
.search-inline svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-2); pointer-events: none; }
.search-inline .input { padding-left: 50px; border-radius: var(--r-pill); }
.filters .select { width: auto; border-radius: var(--r-pill); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none; }
  .ticker { overflow-x: auto; }
}
