/* =============================================================
   LES AILES DU COURAGE — Design system
   Registre : affiche de course sportive. Le rouge porte l'identité.
   Couleurs en OKLCH · Tokens obligatoires · Thème clair unique délibéré.
   ============================================================= */

/* ---------- Fonts (self-host, variable, latin) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Design tokens ---------- */
:root {
  /* Couleur — le rouge est l'identité (hue 27, hors bande crème bannie 40-100) */
  --blanc:          oklch(99.2% 0 0);
  --surface:        oklch(96.5% 0.008 27);   /* teinte discrète vers le rouge, jamais crème */
  --surface-2:      oklch(94% 0.012 27);
  --encre:          oklch(19% 0.021 27);      /* near-black, sous-ton rouge */
  --encre-2:        oklch(40% 0.016 27);      /* texte secondaire, ≥7:1 sur blanc */
  --rouge:          oklch(53% 0.203 27);      /* CTA, sections drenched, le fil */
  --rouge-vif:      oklch(58% 0.216 29);
  --rouge-profond:  oklch(43% 0.172 27);      /* texte rouge sur blanc, hovers */
  --flamme:        oklch(70% 0.17 52);        /* micro-accent live/progression, ≤2% */
  --ligne:          oklch(89% 0.012 27);      /* hairlines */
  --ligne-forte:    oklch(80% 0.02 27);

  /* Couleurs sur fond rouge */
  --sur-rouge:            oklch(99% 0.01 40);
  --sur-rouge-attenue:    color-mix(in oklch, var(--sur-rouge) 78%, transparent);

  /* Typo */
  --font-display: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  --fs-900: clamp(2.9rem, 1.7rem + 5.1vw, 5.5rem);
  --fs-800: clamp(2.2rem, 1.55rem + 2.9vw, 3.9rem);
  --fs-700: clamp(1.7rem, 1.35rem + 1.6vw, 2.65rem);
  --fs-600: clamp(1.35rem, 1.18rem + 0.8vw, 1.8rem);
  --fs-500: clamp(1.12rem, 1.04rem + 0.4vw, 1.32rem);
  --fs-400: 1.0625rem;
  --fs-300: 0.9375rem;
  --fs-200: 0.8125rem;

  --lh-tight: 1.02;
  --lh-snug: 1.15;
  --lh-body: 1.62;

  /* Espacement (échelle variée pour le rythme) */
  --sp-1: 0.375rem;
  --sp-2: 0.625rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2.25rem;
  --sp-6: 3.5rem;
  --sp-7: 5.5rem;
  --sp-8: 8rem;
  --section-y: clamp(4rem, 3rem + 6vw, 8rem);
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);
  --maxw: 1200px;
  --maxw-prose: 68ch;

  /* Rayons */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Ombres (portées basses, pas de glow décoratif) */
  --sh-1: 0 1px 2px oklch(19% 0.02 27 / 0.06), 0 2px 8px oklch(19% 0.02 27 / 0.05);
  --sh-2: 0 4px 12px oklch(19% 0.02 27 / 0.08), 0 12px 32px oklch(19% 0.02 27 / 0.09);
  --sh-rouge: 0 6px 20px oklch(53% 0.20 27 / 0.30);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 0.18s;
  --dur-2: 0.4s;
  --dur-3: 0.7s;

  /* z-index sémantique */
  --z-base: 1;
  --z-sticky: 100;
  --z-header: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--encre);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible {
  outline: 3px solid var(--rouge);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Typographie ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--encre);
}
h1 { font-size: var(--fs-900); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-800); font-weight: 800; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-700); font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: var(--fs-600); font-weight: 700; }
p { text-wrap: pretty; }
strong { font-weight: 700; }

.prose { max-width: var(--maxw-prose); }
.prose p + p { margin-top: var(--sp-3); }
.lead {
  font-size: var(--fs-500);
  line-height: 1.5;
  color: var(--encre-2);
}

/* Étiquette de section — PAS l'eyebrow uppercase-tracké générique.
   Ici : un marqueur "dossard" numéroté-lettré, grammaire de course assumée. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-300);
  color: var(--rouge-profond);
  letter-spacing: 0.01em;
}
.kicker::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--rouge);
  display: inline-block;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-wide { max-width: 1360px; }
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section--ink { background: var(--encre); color: var(--sur-rouge); }
.section--ink h2, .section--ink h3 { color: var(--blanc); }

.stack > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-5); }

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -100px;
  z-index: var(--z-toast);
  background: var(--encre);
  color: var(--blanc);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);
  transition: top var(--dur-1) var(--ease-out);
}
.skip-link:focus { top: var(--sp-3); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.85em 1.6em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-300);
  letter-spacing: 0.01em;
  border-radius: var(--r-pill);
  transition: transform var(--dur-1) var(--ease-out),
              background-color var(--dur-1) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              color var(--dur-1) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--don {
  background: var(--rouge);
  color: var(--sur-rouge);
  box-shadow: var(--sh-rouge);
}
.btn--don:hover { background: var(--rouge-vif); transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--encre);
  border: 2px solid var(--ligne-forte);
}
.btn--ghost:hover { border-color: var(--encre); transform: translateY(-2px); }
.btn--sur-rouge {
  background: var(--sur-rouge);
  color: var(--rouge-profond);
}
.btn--sur-rouge:hover { background: var(--blanc); transform: translateY(-2px); }
.btn--ghost-clair {
  background: transparent;
  color: var(--sur-rouge);
  border: 2px solid var(--sur-rouge-attenue);
}
.btn--ghost-clair:hover { border-color: var(--sur-rouge); transform: translateY(-2px); }
.btn .ico { width: 1.15em; height: 1.15em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in oklch, var(--blanc) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease-out),
              background-color var(--dur-2) var(--ease-out);
}
.site-header[data-scrolled="true"] {
  border-bottom-color: var(--ligne);
  background: color-mix(in oklch, var(--blanc) 94%, transparent);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 68px;
  padding-block: var(--sp-2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--encre);
}
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span { line-height: 1.05; }
.brand small { display: block; font-size: 0.68em; font-weight: 600; color: var(--rouge-profond); letter-spacing: 0.02em; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.2rem + 1vw, 1.75rem);
}
.nav-links a:not(.btn) {
  font-weight: 600;
  font-size: var(--fs-300);
  color: var(--encre-2);
  padding: 0.4rem 0.2rem;
  position: relative;
  transition: color var(--dur-1) var(--ease-out);
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn)[aria-current="page"] { color: var(--encre); }
.nav-links a:not(.btn)[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.2rem; right: 0.2rem; bottom: -2px;
  height: 2px;
  background: var(--rouge);
}
.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }
.nav-toggle { display: none; }

/* Burger mobile */
.burger {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  border-radius: var(--r-sm);
}
.burger span, .burger span::before, .burger span::after {
  content: "";
  display: block;
  width: 24px; height: 2.5px;
  background: var(--encre);
  border-radius: 2px;
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) var(--ease-out);
}
.burger span::before { transform: translateY(-7px); }
.burger span::after { transform: translateY(5px); }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: rotate(-45deg) translateY(-1.7px); }

@media (max-width: 860px) {
  .burger { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--blanc);
    border-bottom: 1px solid var(--ligne);
    padding: var(--sp-3) var(--gutter) var(--sp-5);
    box-shadow: var(--sh-2);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out), visibility var(--dur-2);
  }
  .nav-links[data-open="true"] { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a:not(.btn) { padding: var(--sp-3) 0; border-bottom: 1px solid var(--ligne); font-size: var(--fs-500); }
  .nav-links a:not(.btn)[aria-current="page"]::after { display: none; }
  .nav-desktop-don { margin-top: var(--sp-3); }
  .nav-desktop-don a { border-bottom: none; padding: 0; }
  .nav-desktop-don .btn--don { width: 100%; font-size: var(--fs-400); }
}

/* ---------- Bandeau live (course) ---------- */
.live-bar {
  background: var(--encre);
  color: var(--sur-rouge);
  font-size: var(--fs-300);
  text-align: center;
}
.live-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.6rem var(--gutter);
  font-weight: 600;
}
.live-bar a:hover { text-decoration: underline; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rouge-vif);
  box-shadow: 0 0 0 0 oklch(58% 0.22 29 / 0.7);
  animation: pulse 2s var(--ease-out) infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px oklch(58% 0.22 29 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(58% 0.22 29 / 0); }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: var(--encre);
  color: var(--sur-rouge);
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.42;
  filter: grayscale(0.2) contrast(1.05);
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, oklch(19% 0.02 27 / 0.55) 0%, oklch(19% 0.02 27 / 0.35) 40%, oklch(19% 0.02 27 / 0.9) 100%),
    radial-gradient(120% 80% at 15% 20%, oklch(53% 0.20 27 / 0.28), transparent 55%);
}
.hero__inner {
  min-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: clamp(6rem, 5rem + 8vw, 9rem) var(--sp-7);
  gap: var(--sp-4);
}
.hero h1 {
  color: var(--blanc);
  max-width: 16ch;
}
.hero h1 .accent { color: var(--rouge-vif); }
.hero__lead {
  font-size: var(--fs-500);
  max-width: 46ch;
  color: var(--sur-rouge-attenue);
  line-height: 1.5;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--sur-rouge-attenue);
}
.hero__meta div { line-height: 1.1; }
.hero__meta dt { font-size: var(--fs-200); color: var(--sur-rouge-attenue); font-weight: 600; }
.hero__meta dd {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-600);
  color: var(--blanc);
  margin-top: 0.2rem;
}

/* ---------- Le fil rouge (signature) ---------- */
.fil {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: var(--blanc);
}
.fil svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fil__path {
  fill: none;
  stroke: var(--rouge);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 1400);
  stroke-dashoffset: var(--len, 1400);
  transition: stroke-dashoffset 0.1s linear;
}
.fil__dot { fill: var(--rouge); }

/* ---------- Sections communes ---------- */
.section-head {
  display: grid;
  gap: var(--sp-3);
  max-width: 54ch;
  margin-bottom: var(--sp-6);
}
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* Association — split asymétrique */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1.05fr 0.95fr; }
  .split--flip > :first-child { order: 2; }
}
.split__media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  box-shadow: var(--sh-2);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  background: linear-gradient(0deg, oklch(19% 0.02 27 / 0.85), transparent);
  color: var(--blanc);
  font-size: var(--fs-300);
  font-weight: 600;
}

/* Valeurs — pas de grille de cartes identiques : liste marquée */
.valeurs {
  display: grid;
  gap: var(--sp-4);
  counter-reset: v;
  margin-top: var(--sp-5);
}
@media (min-width: 720px) { .valeurs { grid-template-columns: repeat(3, 1fr); } }
.valeur {
  padding-top: var(--sp-3);
  border-top: 2px solid var(--rouge);
}
.valeur h3 { font-size: var(--fs-600); margin-bottom: var(--sp-1); }
.valeur p { font-size: var(--fs-300); color: var(--encre-2); }

/* ---------- Jauge de collecte = segment de route (fil rouge) ---------- */
.collecte {
  --pct: 0;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  box-shadow: var(--sh-1);
}
.collecte__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.collecte__titre { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-600); }
.collecte__montant {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-800);
  color: var(--rouge-profond);
  line-height: 1;
}
.collecte__montant small { font-size: 0.42em; color: var(--encre-2); font-weight: 600; }
.route {
  position: relative;
  height: 46px;
  margin: var(--sp-4) 0 var(--sp-3);
}
.route__track {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 8px;
  transform: translateY(-50%);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.route__fill {
  position: absolute; inset: 0;
  width: 100%;
  transform: scaleX(calc(var(--pct) / 100));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--rouge-profond), var(--rouge));
  border-radius: var(--r-pill);
  transition: transform var(--dur-3) var(--ease-expo);
}
.route__marker {
  position: absolute;
  top: 50%;
  left: calc(var(--pct) * 1%);
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--rouge);
  color: var(--sur-rouge);
  border-radius: 50%;
  box-shadow: var(--sh-rouge);
  transition: left var(--dur-3) var(--ease-expo);
}
.route__marker svg { width: 20px; height: 20px; }
.route__ends {
  position: absolute;
  top: calc(50% + 14px);
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--encre-2);
}
.collecte__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.collecte__reste { font-size: var(--fs-300); color: var(--encre-2); }
.collecte__reste strong { color: var(--encre); }
.reste-depasse { display: none; color: var(--rouge-profond); font-weight: 700; }
.collecte.is-depasse .reste-normal { display: none; }
.collecte.is-depasse .reste-depasse { display: inline; }

/* ---------- Bloc Marathon (accueil) ---------- */
.marathon-teaser {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: center;
}
@media (min-width: 920px) { .marathon-teaser { grid-template-columns: 1fr 1fr; } }
.parcours-mini {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--encre);
  padding: var(--sp-5);
  color: var(--sur-rouge);
}
.parcours-mini svg { width: 100%; height: auto; }

/* ---------- Projets (composition asymétrique) ---------- */
.projets-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 620px) {
  .projets-grid { grid-template-columns: repeat(2, 1fr); }
  .projet--phare { grid-column: 1 / -1; }
}
@media (min-width: 940px) {
  .projets-grid { grid-template-columns: repeat(3, 1fr); }
}
.projet {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.projet:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.projet__media { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.projet__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease-out); }
.projet:hover .projet__media img { transform: scale(1.04); }
.projet__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.projet__body h3 { font-size: var(--fs-600); }
.projet__desc { font-size: var(--fs-300); color: var(--encre-2); flex: 1; }
.projet--phare { display: grid; }
@media (min-width: 780px) {
  .projet--phare { grid-template-columns: 1.1fr 0.9fr; align-items: stretch; }
  .projet--phare .projet__media { aspect-ratio: auto; height: 100%; min-height: 320px; }
  .projet--phare .projet__body { padding: clamp(1.75rem, 1rem + 3vw, 3rem); justify-content: center; }
  .projet--phare h3 { font-size: var(--fs-700); }
}

.tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-200);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.35em 0.8em;
  border-radius: var(--r-pill);
}
.tag--en-cours { background: var(--rouge); color: var(--sur-rouge); }
.tag--a-venir { background: var(--surface-2); color: var(--rouge-profond); }
.tag--realise { background: var(--encre); color: var(--sur-rouge); }

.mini-route { --pct: 0; margin-top: var(--sp-2); }
.mini-route__track {
  height: 6px; border-radius: var(--r-pill);
  background: var(--surface-2); overflow: hidden;
}
.mini-route__fill {
  height: 100%;
  width: 100%;
  transform: scaleX(calc(var(--pct) / 100));
  transform-origin: left center;
  background: var(--rouge);
  border-radius: var(--r-pill);
  transition: transform var(--dur-3) var(--ease-expo);
}
.mini-route__label {
  display: flex; justify-content: space-between;
  margin-top: var(--sp-1);
  font-size: var(--fs-200); font-weight: 600; color: var(--encre-2);
}
.mini-route__label strong { color: var(--rouge-profond); }

/* ---------- Section don (drenched rouge) ---------- */
.don {
  background: var(--rouge);
  color: var(--sur-rouge);
  position: relative;
  overflow: hidden;
}
.don h2 { color: var(--blanc); }
.don__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: center;
}
@media (min-width: 880px) { .don__grid { grid-template-columns: 1.1fr 0.9fr; } }
.don__points { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
.don__point {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--sur-rouge-attenue);
}
.don__point svg { flex: none; width: 26px; height: 26px; color: var(--blanc); margin-top: 2px; }
.don__point p { color: var(--sur-rouge); font-size: var(--fs-300); }
.don__point strong { color: var(--blanc); }
.don__card {
  background: var(--blanc);
  color: var(--encre);
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 1rem + 3vw, 2.75rem);
  box-shadow: var(--sh-2);
  text-align: center;
}
.don__card .btn--don { width: 100%; margin-top: var(--sp-3); }
.don__secure {
  display: flex; align-items: center; justify-content: center; gap: 0.5em;
  margin-top: var(--sp-3);
  font-size: var(--fs-200); color: var(--encre-2);
}
.don__secure svg { width: 16px; height: 16px; }
.don__montants { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-2); }
.don__montant {
  min-width: 66px;
  padding: 0.6em 0.9em;
  border: 2px solid var(--ligne-forte);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.don__montant:hover { border-color: var(--rouge); color: var(--rouge-profond); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; } }
.field { display: grid; gap: var(--sp-1); margin-bottom: var(--sp-3); }
.field label { font-weight: 600; font-size: var(--fs-300); }
.field .req { color: var(--rouge-profond); }
.field input, .field textarea {
  width: 100%;
  padding: 0.85em 1em;
  background: var(--blanc);
  border: 1.5px solid var(--ligne-forte);
  border-radius: var(--r-md);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--rouge);
  box-shadow: 0 0 0 3px oklch(53% 0.20 27 / 0.15);
}
.field textarea { min-height: 140px; resize: vertical; }
.field-error { color: var(--rouge-profond); font-size: var(--fs-200); font-weight: 600; }
.form-status { margin-top: var(--sp-3); font-weight: 600; }
.form-status[data-state="ok"] { color: var(--rouge-profond); }
.form-status[data-state="err"] { color: var(--rouge-profond); }
.form-note { font-size: var(--fs-200); color: var(--encre-2); margin-top: var(--sp-2); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--encre);
  color: var(--sur-rouge-attenue);
  padding-block: var(--sp-6) var(--sp-5);
}
.footer-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { color: var(--blanc); }
.site-footer .brand small { color: var(--rouge-vif); }
.footer-blurb { margin-top: var(--sp-3); font-size: var(--fs-300); max-width: 40ch; }
.footer-col h4 { color: var(--blanc); font-size: var(--fs-300); font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-3); }
.footer-col a { display: block; padding: 0.35rem 0; color: var(--sur-rouge-attenue); font-size: var(--fs-300); transition: color var(--dur-1) var(--ease-out); }
.footer-col a:hover { color: var(--blanc); }
.footer-social { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.footer-social a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--sur-rouge-attenue);
  border-radius: 50%;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.footer-social a:hover { background: var(--rouge); border-color: var(--rouge); }
.footer-social svg { width: 20px; height: 20px; color: var(--sur-rouge); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  align-items: center; justify-content: space-between;
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--sur-rouge-attenue);
  font-size: var(--fs-200);
}
.footer-bottom a:hover { color: var(--blanc); text-decoration: underline; }

/* ---------- Mouvement réduit : on coupe les animations infinies ---------- */
@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .etape-statut[data-s="en-cours"]::before,
  .axel-marker__pulse {
    animation: none !important;
  }
  .live-dot { box-shadow: 0 0 0 2px oklch(58% 0.22 29 / 0.35); }
  .route__fill, .mini-route__fill, .route__marker { transition: none !important; }
}

/* ---------- Reveal (contenu visible par défaut, animation en +) ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  }
  .js .reveal-stagger.is-in > * { opacity: 1; transform: none; }
  .js .reveal-stagger.is-in > *:nth-child(2) { transition-delay: 0.08s; }
  .js .reveal-stagger.is-in > *:nth-child(3) { transition-delay: 0.16s; }
  .js .reveal-stagger.is-in > *:nth-child(4) { transition-delay: 0.24s; }
}

/* ============================================================
   PAGE MARATHON — carte + stats + étapes
   ============================================================ */
.marathon-hero {
  background: var(--encre);
  color: var(--sur-rouge);
  padding-block: clamp(5rem, 4rem + 6vw, 8rem) var(--sp-6);
}
.marathon-hero h1 { color: var(--blanc); max-width: 20ch; }
.marathon-hero .lead { color: var(--sur-rouge-attenue); max-width: 52ch; margin-top: var(--sp-3); }
.marathon-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-5);
  max-width: 520px;
}
@media (min-width: 620px) { .marathon-hero__stats { grid-template-columns: repeat(4, 1fr); } }
.mstat dt { font-size: var(--fs-200); color: var(--sur-rouge-attenue); font-weight: 600; }
.mstat dd { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-700); color: var(--blanc); line-height: 1; margin-top: 0.25rem; }
.mstat dd .u { font-size: 0.5em; color: var(--sur-rouge-attenue); }

.suivi { padding-block: var(--section-y); }
.suivi__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
}
.suivi__badge {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-300);
  padding: 0.35em 0.9em; border-radius: var(--r-pill);
  background: var(--encre); color: var(--sur-rouge);
}
.suivi__badge[data-live="true"] { background: var(--rouge); }
.suivi__status p { font-size: var(--fs-300); color: var(--encre-2); }
.suivi__maj { margin-left: auto; font-size: var(--fs-200); color: var(--encre-2); }

.live-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ligne);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
@media (min-width: 680px) { .live-stats { grid-template-columns: repeat(4, 1fr); } }
.live-stat { background: var(--blanc); padding: var(--sp-4); }
.live-stat dt { font-size: var(--fs-200); color: var(--encre-2); font-weight: 600; }
.live-stat dd { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-700); line-height: 1; margin-top: 0.3rem; }
.live-stat dd .u { font-size: 0.44em; color: var(--encre-2); font-weight: 600; }
.live-stat--accent dd { color: var(--rouge-profond); }

#map {
  height: clamp(420px, 55vh, 640px);
  border-radius: var(--r-lg);
  border: 1px solid var(--ligne);
  background: var(--surface-2);
  z-index: var(--z-base);
}
@media (min-width: 900px) { #map { height: 70vh; max-height: 720px; } }
.map-wrap { position: relative; }
.map-legend {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-3);
  font-size: var(--fs-200); font-weight: 600; color: var(--encre-2);
}
.map-legend span { display: inline-flex; align-items: center; gap: 0.45em; }
.map-legend i { width: 20px; height: 4px; border-radius: 2px; display: inline-block; }
.map-legend i.done { background: var(--rouge); }
.map-legend i.todo { background: var(--ligne-forte); }
.map-legend i.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rouge); }

/* Marqueur Axel */
.axel-marker { position: relative; }
.axel-marker__core {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--rouge); border: 3px solid var(--blanc);
  box-shadow: var(--sh-rouge);
}
@media (prefers-reduced-motion: no-preference) {
  .axel-marker__pulse {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: var(--rouge);
    animation: ping 2.2s var(--ease-out) infinite;
  }
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.55; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

/* Tableau des étapes */
.etapes { margin-top: var(--sp-6); }
.etapes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-300);
}
.etapes-table caption { text-align: left; margin-bottom: var(--sp-3); color: var(--encre-2); }
.etapes-table th, .etapes-table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-3);
  border-bottom: 1px solid var(--ligne);
  vertical-align: middle;
}
.etapes-table thead th {
  font-family: var(--font-display);
  font-size: var(--fs-200);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--encre-2);
}
.etapes-table td.num { font-family: var(--font-display); font-weight: 800; color: var(--rouge-profond); width: 3ch; }
.etapes-table tr[data-statut="en-cours"] { background: var(--surface); }
.etape-statut { display: inline-flex; align-items: center; gap: 0.45em; font-weight: 600; font-size: var(--fs-200); }
.etape-statut::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ligne-forte); }
.etape-statut[data-s="franchie"]::before { background: var(--rouge); }
.etape-statut[data-s="en-cours"]::before { background: var(--flamme); animation: pulse 2s infinite; }
@media (max-width: 620px) {
  .etapes-table thead { display: none; }
  .etapes-table tr { display: grid; grid-template-columns: 3ch 1fr auto; gap: 0.2rem var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--ligne); }
  .etapes-table td { border: none; padding: 0; }
  .etapes-table td.trajet { grid-column: 2; }
  .etapes-table td.km { grid-column: 2; color: var(--encre-2); font-size: var(--fs-200); }
  .etapes-table td.statut-cell { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .etapes-table td.date-cell { grid-column: 2; color: var(--encre-2); font-size: var(--fs-200); }
}

/* Leaflet overrides — cibles ≥44px, focus */
.leaflet-bar a {
  width: 44px !important; height: 44px !important;
  line-height: 44px !important;
  font-size: 20px !important;
  color: var(--encre) !important;
}
.leaflet-bar a:focus-visible { outline: 3px solid var(--rouge); outline-offset: -3px; }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); }
.leaflet-popup-content { font-size: var(--fs-300); }

/* ---------- Pages légales ---------- */
.legal { padding-block: clamp(5rem, 4rem + 5vw, 7rem) var(--section-y); }
.legal h1 { margin-bottom: var(--sp-5); }
.legal h2 { font-size: var(--fs-600); margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.legal p, .legal li { color: var(--encre-2); max-width: var(--maxw-prose); }
.legal ul { padding-left: 1.2em; margin-top: var(--sp-2); }
.legal li { margin-bottom: var(--sp-1); }
.todo {
  background: var(--surface);
  border: 1px dashed var(--rouge-profond);
  color: var(--rouge-profond);
  font-weight: 600;
  padding: 0.1em 0.4em;
  border-radius: var(--r-sm);
}

/* ---------- Partenaires (preuve sociale) ---------- */
.partenaires { text-align: center; }
.partenaires .section-head { margin-inline: auto; }
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-300);
  color: var(--encre);
  text-align: center;
  line-height: 1.15;
  transition: border-color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.partner:hover { border-color: var(--rouge); transform: translateY(-2px); }
.partner img { max-height: 56px; width: auto; }
.partenaires__note { margin-top: var(--sp-4); font-size: var(--fs-200); color: var(--encre-2); }
.partenaires__cta { margin-top: var(--sp-5); }

/* Honeypot anti-spam (invisible, hors flux) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Utilitaires ---------- */
.center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.text-rouge { color: var(--rouge-profond); }
.noscript-banner {
  background: var(--flamme); color: var(--encre);
  text-align: center; padding: var(--sp-2) var(--gutter); font-weight: 600; font-size: var(--fs-300);
}
