/* =============================================================
   Agora Race — feuille de style
   Noir, blanc et gris cassé ; le rouge Agora #FF002F n’apparaît
   qu’en rappel (noms des courses, tampon « Sold out », tracé de la
   course, tranches du « V5 »).
   Titres en Anton, texte en Inter.
   ============================================================= */

:root {
  color-scheme: light;

  /* Surfaces */
  --white: #ffffff;
  --paper: #f1f1ef;          /* gris cassé */
  --ink: #0d0d0e;            /* noir */
  --ink-2: #1c1c1e;

  /* Rouge Agora, en rappel seulement */
  --accent: #ff002f;

  /* Texte */
  --text: #0d0d0e;
  --stone: #5f5f63;
  --mute: #8d8d91;
  --on-ink: #f4f4f2;
  --on-ink-2: #a5a5a9;

  /* Filets */
  --line: #dadad6;
  --line-dark: #303033;

  /* Divers */
  --selection: rgba(13, 13, 14, 0.14);
  --nav-bg: #ffffff;
  --nav-dark-bg: #0d0d0e;
  --veil: rgba(13, 13, 14, 0.42);
  --bar-muted: #cfcfcb;

  /* Typographie */
  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-text: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Mise en page */
  --gutter: clamp(18px, 4vw, 40px);
  --content: 1200px;
  --bleed: max(var(--gutter), calc((100vw - var(--content)) / 2));
  --section: clamp(80px, 10vw, 140px);
  --gap: 20px;
  --radius: 10px;
  --radius-btn: 4px;
  --nav-h: 56px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.page { overflow-x: clip; }
img, canvas, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
p, h1, h2, h3, dl, dd, figure { margin: 0; }
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
section[id], main[id] { scroll-margin-top: var(--nav-h); }

/* Billetterie V5 : contenus « avant » et « après » l’ouverture (classe posée par main.js) */
html:not(.ticketing-open) [data-when="after"], html.ticketing-open [data-when="before"] { display: none !important; }
/* Billetterie du séminaire Alan Cao : même principe, classe .sem-open (jeudi 5 novembre 2026 à 20h00) */
html:not(.sem-open) [data-sem="after"], html.sem-open [data-sem="before"] { display: none !important; }

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: fixed; left: 12px; top: -64px; z-index: 100;
  padding: 10px 18px; border-radius: var(--radius-btn);
  background: var(--ink); color: var(--on-ink);
  font-size: 14px; font-weight: 700;
  transition: top 0.3s var(--ease);
}
.skip:focus { top: 10px; }

/* ---------- Logo Agora (masque SVG : prend la couleur du texte) ---------- */
.logo-agora {
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
.logo-agora { --logo: url("../img/agora-wordmark.svg"); aspect-ratio: 2.772; height: 1em; }

/* ---------- Typographie ---------- */
/* Tout ce qui est écrit en Anton : lissage forcé. Sous Windows, cette police peut s’afficher
   en « escalier » aux grandes tailles ; l’ombre invisible et le rendu géométrique l’évitent. */
.display, .h2, .h3, .cal__name, .cal__day, .station__name, .station__qty, .station__km,
.course__km, .course__unit, .bars__num, .bars__legend b, .count__num, .stamp,
.nav__links a, .footer__links a, .video__label b, .legal__title {
  text-rendering: geometricPrecision;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.01);
}
.display, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.display { font-size: clamp(56px, 10vw, 148px); line-height: 0.92; }
.h2 { font-size: clamp(42px, 6.4vw, 92px); line-height: 0.95; }
.h3 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1; }
/* Les accents des capitales (À, É) dépassent au-dessus de la ligne : on leur laisse la place */
.eyebrow + .display, .eyebrow + .h2 { margin-top: 0.16em; }
.eyebrow {
  margin-bottom: 14px;
  font-size: 12px; line-height: 1.3; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--stone);
}
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--stone); }
.tag {
  display: inline-flex; align-items: center;
  padding: 6px 10px;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-btn);
  font-size: 11px; line-height: 1.2; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.tag--solid { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.stamp {
  display: inline-block;
  padding: 4px 14px 2px;
  border: 3px solid currentColor;
  border-radius: 6px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.04em;
  transform: rotate(-6deg);
}

/* Découpage en mots (animations) */
.word { display: inline-block; }
.word__in { display: inline-block; }
/* Masque des titres : de la marge en haut pour les accents des capitales */
[data-split="mask"] .word {
  overflow: hidden;
  vertical-align: top;
  padding: 0.24em 0.05em 0.1em;
  margin: -0.24em -0.05em -0.1em;
}

/* ---------- Boutons et liens ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 24px;
  border-radius: var(--radius-btn);
  background: var(--ink); color: var(--on-ink);
  font-size: 13px; line-height: 1.2; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn::after {
  content: "→";
  font-weight: 400; letter-spacing: 0;
  transition: transform 0.35s var(--ease-out);
}
.btn:hover { background: var(--ink-2); }
.btn:hover::after { transform: translateX(4px); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--paper); }

.link {
  display: inline-flex; align-items: center; gap: 8px;
  padding-bottom: 3px;
  border-bottom: 2px solid currentColor;
  font-size: 13px; line-height: 1.3; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: opacity 0.3s var(--ease);
}
.link::after { content: "→"; font-weight: 400; transition: transform 0.35s var(--ease-out); }
.link:hover { opacity: 0.7; }
.link:hover::after { transform: translateX(4px); }
.link--light { color: var(--on-ink); }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }

/* ---------- Bandeau : billetterie V5 (sobre, deux lignes) ---------- */
.announce {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 10px var(--gutter);
  background: var(--paper); color: var(--text);
  font-size: 13px; line-height: 1.35; text-align: center;
}
.announce__title { font-weight: 700; }
.announce__date { color: var(--stone); }
.announce:hover .announce__title { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Bandeau rouge : nouvelles places V4, la première chose qu'on voit ---------- */
.announce--hot {
  flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  padding: 11px var(--gutter);
  background: var(--accent); color: var(--white);
}
.announce--hot .announce__title {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 21px; font-weight: 400; line-height: 1.05;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.announce--hot .announce__date { color: rgba(255, 255, 255, 0.88); font-weight: 600; }
.announce--hot:hover .announce__title { text-decoration: none; }
.announce__dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--white);
  animation: announce-pulse 1.8s var(--ease) infinite;
}
@keyframes announce-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
}
.announce__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--radius-btn);
  background: var(--white); color: var(--accent);
  font-size: 12px; line-height: 1.2; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
}
.announce__cta::after { content: "→"; font-weight: 400; letter-spacing: 0; transition: transform 0.35s var(--ease-out); }
.announce--hot:hover .announce__cta::after { transform: translateX(4px); }
.tag--hot { background: var(--accent); border-color: var(--accent); color: var(--white); }
@media (prefers-reduced-motion: reduce) { .announce__dot { animation: none; } }

/* ---------- Navigation : le logo et deux liens ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  transition: color 0.4s var(--ease);
}
.nav::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--nav-bg);
  box-shadow: inset 0 -1px 0 var(--line);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav__brand { display: inline-flex; align-items: center; flex: none; }
.nav__brand .logo-agora { height: 24px; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.nav__links a {
  position: relative;
  padding-block: 8px;
  font-family: var(--font-display); font-size: 20px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
}
.nav__links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 2px;
  height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.4s var(--ease-out);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__progress {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%;
}
.nav.is-dark { color: var(--on-ink); }
.nav.is-dark::before { background: var(--nav-dark-bg); box-shadow: inset 0 -1px 0 var(--line-dark); }

/* ---------- Ouverture : les deux dates ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 112px); background: var(--white); }
.js .hero [data-intro] { opacity: 0; }
.is-ready .hero [data-intro] { opacity: 1; }
.cal { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.cal__row { border-bottom: 1px solid var(--line); }
.cal__link {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 44px;
  align-items: center; gap: 24px;
  padding: 22px 14px;
}
.cal__link::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--paper);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.6s var(--ease-out);
}
.cal__link:hover::before, .cal__link:focus-visible::before { transform: scaleX(1); }
.cal__date { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cal__day { font-family: var(--font-display); font-size: 40px; line-height: 1; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.cal__month { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.cal__name { display: block; color: var(--accent); font-family: var(--font-display); font-size: clamp(32px, 4.2vw, 58px); line-height: 1; text-transform: uppercase; transition: transform 0.55s var(--ease-out); }
/* Lettres des titres (main.js) : elles montent à l’ouverture, puis une lumière douce les parcourt de temps en temps */
.cal__name .ch { display: inline-block; }
.cal__name .ch-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-top: 0.08em; margin-top: -0.08em; }
.cal__type { display: block; margin-top: 6px; font-size: 14px; color: var(--stone); transition: transform 0.55s var(--ease-out) 0.04s; }
.cal__link:hover .cal__name, .cal__link:hover .cal__type { transform: translateX(10px); }
.cal__arrow {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-btn);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.55s var(--ease-out);
}
.cal__link:hover .cal__arrow { background: var(--ink); color: var(--on-ink); transform: translateX(4px); }

/* ---------- Agora Race V4 ---------- */
.race { position: relative; overflow: hidden; padding-block: var(--section); background: var(--paper); }
.race > .wrap { position: relative; z-index: 1; }
/* Petits logos Agora éparpillés en fond (la colonne et le mot AGORA), qui glissent doucement au scroll */
.scatter { position: absolute; inset: 0; pointer-events: none; color: var(--ink); }
.scatter__logo { position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * var(--k, 1)); opacity: 0.08; }
.scatter__logo::before {
  content: ""; display: block; width: 100%; height: 100%;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
  transform: rotate(var(--r));
}
.scatter__logo--col { --logo: url("../img/agora-column.svg"); aspect-ratio: 988 / 933; }
.scatter__logo--word { --logo: url("../img/agora-wordmark.svg"); aspect-ratio: 2.772; }
.race__head { position: relative; }
.race__title { max-width: 9em; }
.race__stamp { position: absolute; right: var(--gutter); top: 0; }
.race__story { max-width: 46ch; margin-top: 28px; color: var(--text); }
/* Chiffres du titre qui défilent comme un compteur : main.js réserve leur largeur finale,
   alignée à droite, pour que le reste du titre ne bouge pas pendant le comptage */
.tally { display: inline-block; text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- Agora Race V5 : courte, sur fond gris ---------- */
.v5 { padding-block: clamp(56px, 7vw, 96px); background: var(--paper); }
.v5__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center; gap: clamp(24px, 4vw, 64px);
}
.v5__stage { position: relative; height: clamp(280px, 30vw, 420px); }
.v5__stage .stage { position: absolute; inset: 0; width: 100%; height: 100%; }
.v5__title { margin-bottom: 28px; }
.ticketing__label { margin-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }
.v5__opening { margin: -2px 0 18px; font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 48px); line-height: 1; text-transform: uppercase; color: var(--accent); }
.v5 .ctas { margin-top: 28px; }

/* Compte à rebours */
.count { display: flex; gap: 8px; }
.count__unit {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 0; max-width: 112px;
  padding: 14px 6px 10px;
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.count__num { display: inline-block; font-family: var(--font-display); font-size: clamp(34px, 4vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; }
.count__num.tick { animation: tick 0.45s var(--ease-out); }
@keyframes tick { from { transform: translateY(-0.16em); opacity: 0.35; } }
.count__label { margin-top: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }

/* Repli sans 3D : le logo à plat, ou « V5 » en grand */
.stage-fallback { display: none; }
.no-3d .stage { visibility: hidden; }
.no-3d .stage-fallback {
  display: block;
  position: absolute; left: 50%; top: 54%;
  width: min(46%, 300px); height: auto; aspect-ratio: 1;
  object-fit: contain;
  transform: translate(-50%, -50%);
}
.no-3d .stage-fallback--v5 {
  width: auto; aspect-ratio: auto;
  font-family: var(--font-display); font-size: clamp(120px, 18vw, 240px); line-height: 1; color: var(--ink);
}

/* ---------- Pack photo de la V4 ---------- */
.pack { padding-block: var(--section); background: var(--ink); color: var(--on-ink); }
.pack .eyebrow { color: var(--on-ink-2); }
.pack__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.pack__lead { max-width: 34ch; margin-top: 24px; color: var(--on-ink-2); }
.pack__photo { aspect-ratio: 4 / 5; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.pack__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Les éditions de l’Agora Race ---------- */
.editions { background: var(--white); padding-block: var(--section); }
.editions__title { max-width: 11em; }
.editions__lead { max-width: 36ch; margin-top: 20px; }
.bars {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end;
  gap: clamp(12px, 3vw, 40px);
  height: clamp(300px, 34vw, 460px);
  margin-top: clamp(48px, 6vw, 80px);
  border-bottom: 2px solid var(--ink);
}
.bars__bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars__num {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 60px); line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bars__badge { margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.bars__fill {
  display: block;
  width: 100%; max-width: 180px;
  height: calc(var(--h, 1) * (100% - 110px));
  border-radius: 6px 6px 0 0;
  background: var(--bar-muted);
  transform-origin: 50% 100%;
  transition: background-color 0.4s var(--ease);
}
.bars__bar--record .bars__fill, .bars__bar:hover .bars__fill { background: var(--ink); }
.bars__legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 3vw, 40px); margin-top: 14px; text-align: center; }
.bars__legend p { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.bars__legend b { font-family: var(--font-display); font-size: 22px; font-weight: 400; line-height: 1.1; }
.bars__legend span { color: var(--stone); }

/* Revivez nos éditions : le film de la V2 en portrait, les deux journées de la V3 à côté */
.media {
  display: grid; grid-template-columns: minmax(0, 0.62fr) minmax(0, 0.654fr) minmax(0, 1fr);
  align-items: stretch; gap: var(--gap);
  margin-top: clamp(72px, 9vw, 120px);
}
.media__intro { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 6px; }
.media__text { max-width: 26ch; margin-top: 14px; color: var(--stone); }
.media__stack { display: grid; gap: var(--gap); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.video--portrait { aspect-ratio: auto; }
.video__media { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.video__play {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: clamp(16px, 2.4vw, 28px);
  background: var(--veil);
  color: var(--on-ink);
  text-align: left;
  transition: background-color 0.5s var(--ease), opacity 0.4s var(--ease);
}
.video__icon {
  position: absolute; left: 50%; top: 50%;
  display: grid; place-items: center;
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: var(--white); color: var(--ink);
  transition: transform 0.5s var(--ease-out);
}
.video__icon svg { margin-left: 4px; }
.video__label { display: flex; flex-direction: column; gap: 2px; }
.video__label b { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); font-weight: 400; line-height: 1; text-transform: uppercase; }
.video__label span { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-2); }
.video:hover .video__media { transform: scale(1.04); }
.video:hover .video__play { background: rgba(13, 13, 14, 0.3); }
.video:hover .video__icon { transform: scale(1.12); }
.video.is-playing .video__play { opacity: 0; pointer-events: none; }
.video.is-playing .video__media { transform: none; }

.gallery { padding-block: clamp(56px, 7vw, 96px); background: var(--white); }
.photos { display: grid; gap: 14px; overflow: hidden; }
.photos__row { display: flex; gap: 14px; width: max-content; padding-inline: var(--bleed); will-change: transform; }
.photos__item {
  flex: none;
  width: clamp(240px, 30vw, 440px); aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bar-muted);
}
.photos__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.photos__item:hover img { transform: scale(1.06); }
html:not(.motion) .photos { overflow-x: auto; }

/* ---------- La course : 8 km, une station après chaque kilomètre ---------- */
.course { padding-block: var(--section); background: var(--ink); color: var(--on-ink); }
.course .eyebrow { color: var(--on-ink-2); }
.course__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; gap: clamp(32px, 6vw, 96px); }
.course__head { position: sticky; top: calc(var(--nav-h) + 40px); }
.course__lead { max-width: 28ch; margin-top: 20px; color: var(--on-ink-2); }
.course__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: clamp(28px, 3vw, 40px) 0 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--ink-2);
}
.course__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s var(--ease); }
.course__visual img.is-on { opacity: 1; }
.course__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 13, 14, 0.78), rgba(13, 13, 14, 0) 52%); }
.course__meter {
  position: absolute; left: clamp(16px, 2vw, 24px); bottom: clamp(12px, 1.6vw, 20px); z-index: 1;
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display); line-height: 0.9; text-transform: uppercase;
}
.course__km { font-size: clamp(64px, 6.4vw, 104px); font-variant-numeric: tabular-nums; }
.course__unit { font-size: clamp(24px, 2.4vw, 36px); color: var(--on-ink-2); }

/* Le tracé : un filet gris qui se remplit de rouge au fil du scroll */
.course__route {
  --km-w: 64px; --dot: 14px; --col-gap: 24px;
  --rail-x: calc(var(--km-w) + var(--col-gap) + var(--dot) / 2 - 1px);
  position: relative;
  border-top: 2px solid var(--on-ink);
}
.course__rail { position: absolute; top: 0; bottom: 0; left: var(--rail-x); width: 2px; background: var(--line-dark); }
.course__fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: 50% 0; }
.course__list { position: relative; margin: 0; padding: 0; list-style: none; }
.station {
  position: relative;
  display: grid; grid-template-columns: var(--km-w) var(--dot) minmax(0, 1fr) auto;
  align-items: center; column-gap: var(--col-gap);
  padding: 22px 0;
  border-bottom: 1px solid var(--line-dark);
}
/* le tracé s’arrête à la huitième station */
.station:last-child::after { content: ""; position: absolute; left: calc(var(--rail-x) - 2px); top: 50%; bottom: 0; width: 6px; background: var(--ink); }
.station__km { font-family: var(--font-display); font-size: 22px; line-height: 1; text-align: right; text-transform: uppercase; white-space: nowrap; color: var(--on-ink-2); transition: color 0.4s var(--ease); }
.station__dot {
  position: relative; z-index: 1;
  width: var(--dot); height: var(--dot);
  border-radius: 50%;
  background: var(--on-ink);
  box-shadow: 0 0 0 5px var(--ink);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.5s var(--ease-out);
}
.station__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.station__label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-ink-2); }
.station__name { font-family: var(--font-display); font-size: clamp(30px, 3.2vw, 46px); line-height: 1; text-transform: uppercase; }
.station__load { font-size: 14px; color: var(--on-ink-2); }
.station__qty { font-family: var(--font-display); font-size: clamp(26px, 2.8vw, 40px); line-height: 1; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Avec les animations, chaque station s’allume quand le tracé rouge l’atteint */
.motion .station__dot { background: var(--ink); box-shadow: 0 0 0 5px var(--ink), inset 0 0 0 2px var(--on-ink-2); }
.motion .station__name, .motion .station__qty { opacity: 0.38; transition: opacity 0.5s var(--ease); }
.motion .station.is-on .station__name, .motion .station.is-on .station__qty { opacity: 1; }
.motion .station.is-on .station__km { color: var(--on-ink); }
.motion .station.is-on .station__dot { background: var(--accent); box-shadow: 0 0 0 5px var(--ink); transform: scale(1.15); }

/* ---------- Shop : les t-shirts, sur agorashop.fr ---------- */
.shop { padding-block: clamp(64px, 8vw, 112px); background: var(--white); }
.shop__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; }
.shop__lead { max-width: 34ch; margin-top: 20px; }

/* ---------- Infos pratiques ---------- */
.faq { padding-block: var(--section); background: var(--white); }
.faq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; gap: clamp(32px, 6vw, 96px); }
.faq__head { position: sticky; top: calc(var(--nav-h) + 40px); }
.faq__photo { max-width: 360px; aspect-ratio: 4 / 5; margin: clamp(24px, 3vw, 40px) 0 0; border-radius: var(--radius); overflow: hidden; background: var(--bar-muted); }
.faq__photo img { width: 100%; height: 100%; object-fit: cover; }
.qa { border-bottom: 1px solid var(--line); }
.qa:first-child { border-top: 2px solid var(--ink); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0;
  list-style: none; cursor: pointer;
  font-size: clamp(18px, 1.7vw, 21px); line-height: 1.3; font-weight: 700;
}
.qa summary::-webkit-details-marker { display: none; }
.qa__icon {
  position: relative; flex: none;
  width: 34px; height: 34px;
  border-radius: var(--radius-btn);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transition: transform 0.5s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.qa__icon::before, .qa__icon::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 12px; height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.qa__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa summary:hover .qa__icon { background: var(--ink); color: var(--on-ink); }
.qa[open] .qa__icon { transform: rotate(135deg); }
.qa.is-closing .qa__icon { transform: none; }
.qa__a { overflow: hidden; }
.qa__a p { max-width: 60ch; padding: 0 48px 24px 0; color: var(--stone); }
.qa__a strong { color: var(--text); }
.qa__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 48px 24px 0; list-style: none; }

/* ---------- Merci aux bénévoles de la V3 ---------- */
.thanks { padding-block: var(--section); background: var(--paper); }
/* « BÉNÉVOLES » passe sous « MERCI À » : un peu d'interligne pour que l'accent du É ne touche pas le I */
.thanks .h2 { line-height: 1.18; }
.thanks__photo { margin: clamp(28px, 3.5vw, 48px) 0 0; }
.thanks__photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--bar-muted); }

/* ---------- Mentions légales ---------- */
.legal { padding-block: clamp(40px, 6vw, 80px) var(--section); background: var(--white); }
.legal__title { margin: 40px 0 10px; font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1.1; text-transform: uppercase; }
.legal p { max-width: 64ch; margin-bottom: 12px; color: var(--stone); }
.legal strong { color: var(--text); }
.legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Photos en grand écran ---------- */
[data-zoom] img { cursor: zoom-in; }
html.is-zoomed { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #08080a; color: var(--on-ink);
  overscroll-behavior: contain;
}
.lightbox[open] { display: grid; place-items: center; animation: lightbox-in 0.3s var(--ease-out); }
.lightbox::backdrop { background: transparent; }
@keyframes lightbox-in { from { opacity: 0; } }
.lightbox__frame {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  margin: 0; padding: 72px max(80px, 6vw);
}
.lightbox__img {
  display: block; min-height: 0;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  user-select: none; -webkit-user-drag: none;
}
.lightbox__count { position: absolute; top: 16px; left: 20px; margin: 0; font-size: 14px; line-height: 48px; font-variant-numeric: tabular-nums; color: var(--on-ink-2); }
.lightbox__btn {
  position: absolute; z-index: 1;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: var(--on-ink);
  transition: background-color 0.3s var(--ease);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__btn:focus-visible { outline-color: var(--on-ink); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev, .lightbox__next { top: 50%; margin-top: -24px; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

/* ---------- Pied de page ---------- */
.footer { padding-block: 28px; background: var(--ink); color: var(--on-ink-2); font-size: 13px; line-height: 1.5; }
.footer__links { display: flex; gap: 28px; margin: 0; padding: 0 0 24px; list-style: none; border-bottom: 1px solid var(--line-dark); }
.footer__links a { font-family: var(--font-display); font-size: 24px; line-height: 1; text-transform: uppercase; color: var(--on-ink); transition: opacity 0.3s var(--ease); }
.footer__links a:hover { opacity: 0.7; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer__legal ul { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.footer__legal a:hover { color: var(--on-ink); }

/* =============================================================
   Tablette et mobile
   ============================================================= */
@media (max-width: 900px) {
  .faq__grid, .v5__grid, .course__grid, .pack__grid { grid-template-columns: minmax(0, 1fr); }
  .pack__photo { max-width: 420px; }
  .faq__head, .course__head { position: static; }
  .course__visual, .faq__photo { display: none; }
  .v5__stage { height: clamp(220px, 60vw, 320px); }
  .race__stamp { position: static; margin-top: 20px; }
  .cal__link { grid-template-columns: 120px minmax(0, 1fr) auto 44px; gap: 18px; }
  .media { grid-template-columns: minmax(0, 0.654fr) minmax(0, 1fr); }
  .media__intro { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .nav__brand .logo-agora { height: 21px; }
  .nav__links a { font-size: 19px; }

  .bars { gap: 8px; height: 320px; }
  .bars__fill { height: calc(var(--h, 1) * (100% - 92px)); border-radius: 4px 4px 0 0; }
  .bars__badge { font-size: 10px; letter-spacing: 0.06em; white-space: normal; text-align: center; }
  .bars__legend { gap: 8px; }
  .bars__legend p { font-size: 11px; }
  .bars__legend b { font-size: 18px; }
  .media { grid-template-columns: minmax(0, 1fr); }
  .video--portrait { aspect-ratio: 9 / 16; width: min(100%, 400px); justify-self: center; }
  .scatter { --k: 0.7; }
  /* sur téléphone, seulement les logos des marges du haut et du bas : aucun ne passe derrière le texte */
  .scatter__logo:not(:nth-child(7), :nth-child(9), :nth-child(10), :nth-child(11), :nth-child(12), :nth-child(14)) { display: none; }
  .video__icon { width: 60px; height: 60px; margin: -30px 0 0 -30px; }


  .cal__link {
    grid-template-columns: minmax(0, 1fr) 40px;
    grid-template-areas: "date arrow" "main arrow" "status arrow";
    column-gap: 14px; row-gap: 6px;
    padding: 18px 4px;
  }
  .cal__date { grid-area: date; flex-direction: row; align-items: baseline; gap: 6px; }
  .cal__day { font-size: 18px; }
  .cal__main { grid-area: main; }
  .cal__name { font-size: 34px; }
  .cal__status { grid-area: status; justify-self: start; margin-top: 4px; }
  .cal__arrow { grid-area: arrow; width: 40px; height: 40px; }
  .cal__link:hover .cal__name, .cal__link:hover .cal__type { transform: none; }

  .qa__a p, .qa__tags { padding-right: 8px; }

  .lightbox__frame { padding: 64px 8px 84px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; margin-top: 0; }


  .course__route { --km-w: 44px; --dot: 12px; --col-gap: 14px; }
  .station { padding: 18px 0; }
  .station__km { font-size: 16px; }
  .station__label { font-size: 11px; }
  .station__name { font-size: 26px; }
  .station__qty { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
