/*
 * Site vitrine d'Enjoy, aux couleurs de la charte v2.
 * Mise en page : des bandes pleine largeur. Bleu Départ pour l'ouverture (le dossard à remplir),
 * Craie pour expliquer, Nuit pour le symbole, Blanc pour la confiance. Un seul thème, comme la charte.
 */
:root {
  --bleu: #2B46E8;
  --jaune: #E4F24B;
  --nuit: #0D1230;
  --craie: #F4F5FA;
  --bitume: #5A6182;
  --ligne: #DDE0EC;
  --blanc: #FFFFFF;
  --bleu-doux: #E6EAFD;
  --terre: #E9ECF5;
  --parc: #D4EBCB;
  --eau: #C8D8F7;
  --sentier: #8FA4F0;
  --alerte-texte: #A3271C;
  --alerte-doux: #FBE5E3;
  --f-titre: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --f-texte: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* La piste en bas de l'ouverture et de la fin : sa hauteur, et l'espace laissé sous elle (la banderole s'y pose). */
  --track-h: 150px;
  --track-gap: 24px;
  /* La bande libre au-dessus de la piste, où s'affichent les bulles de discussion. */
  --talk-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--craie);
  color: var(--nuit);
  font-family: var(--f-texte);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: 96px; }
.band-bleu { background: var(--bleu); color: var(--blanc); }
.band-nuit { background: var(--nuit); color: var(--blanc); }
.band-blanc { background: var(--blanc); }

/* Titres : Archivo large. Chiffres : Archivo étroit, tabulaires. */
.T {
  font-family: var(--f-titre);
  font-stretch: 112%;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
.N {
  font-family: var(--f-titre);
  font-stretch: 75%;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 0.24em; text-decoration: none; line-height: 1; white-space: nowrap; }
.logo .mark { width: 1.18em; height: 1.18em; flex: none; display: block; }
.wm { font-family: var(--f-titre); font-stretch: 112%; font-weight: 800; letter-spacing: -0.035em; }
.logo-bleu .mk-main, .logo-nuit .mk-main { stroke: var(--blanc); }
.logo-bleu .mk-accent, .logo-nuit .mk-accent { stroke: var(--jaune); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  border: 0;
  border-radius: 0.85em;
  padding: 0.85em 1.3em;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-blanc { background: var(--blanc); color: var(--nuit); box-shadow: 0 0.6em 1.4em -0.8em rgba(5, 8, 30, 0.7); }
.btn-blanc:hover { box-shadow: 0 0.8em 1.6em -0.7em rgba(5, 8, 30, 0.8); }
.btn-big { font-size: 1.1rem; padding: 1em 1.6em; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.link {
  background: none;
  border: 0;
  padding: 6px 2px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  justify-self: start;
}
.link:hover { color: var(--blanc); }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
.band-blanc :focus-visible, .band:not(.band-bleu):not(.band-nuit) :focus-visible { outline-color: var(--bleu); }

/* ---------- Ouverture ---------- */
.hero { position: relative; padding-block: 24px calc(var(--track-gap) + var(--track-h) + var(--talk-h) + 96px); overflow: hidden; }
.hero > .wrap, .final > .wrap { position: relative; z-index: 1; }
/* Coureurs, piste et vent : une toile derrière le contenu. */
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.top .logo { font-size: 30px; }
.top-cta {
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
  transition: background 0.15s;
}
.top-cta:hover { background: rgba(255, 255, 255, 0.12); }

.hero-main { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; padding-top: 64px; }
/* Aligné en haut : le dossard grandit d'une étape à l'autre sans faire bouger le titre. */
@media (min-width: 960px) {
  .hero-main { grid-template-columns: 1.05fr 1fr; gap: 64px; padding-top: 80px; align-items: start; }
  .hero-text { padding-top: 36px; }
}
.hero-text { min-width: 0; }
.pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 99px;
  background: rgba(13, 18, 48, 0.22);
}
.hero h1 { font-size: clamp(48px, 7.4vw, 88px); margin-top: 22px; }
/* Les mots du titre arrivent lancés, penchés par la vitesse, puis se redressent. */
.hl { display: inline-block; animation: dash-in 0.75s cubic-bezier(0.2, 0.9, 0.25, 1) var(--d, 0s) both; }
@keyframes dash-in {
  from { opacity: 0; transform: translateX(56px) skewX(-16deg); }
  55% { opacity: 1; transform: translateX(-5px) skewX(4deg); }
  to { opacity: 1; transform: none; }
}
.hero h1 em { font-style: normal; color: var(--jaune); }
.lede { margin-top: 26px; max-width: 34ch; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: rgba(255, 255, 255, 0.92); }
.lede-small { margin-top: 14px; max-width: 44ch; font-size: 16px; color: rgba(255, 255, 255, 0.75); }

/* ---------- Le dossard à remplir ---------- */
.stage {
  --pad: clamp(18px, 3vw, 32px);
  position: relative;
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 28px var(--pad) 30px;
  border-radius: 28px;
  background: rgba(13, 18, 48, 0.2);
  scroll-margin-top: 24px;
  isolation: isolate;
}
/* Les couloirs de la piste passent derrière le dossard, d'un bord à l'autre du cadre. */
.track { position: relative; display: grid; padding: 10px var(--pad); margin-inline: calc(var(--pad) * -1); }
.lane { position: absolute; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, 0.08); z-index: -1; }
.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jaune); }
.stage-q { font-size: clamp(26px, 3vw, 32px); margin-top: -10px; outline: none; }

.bib {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 360px;
  container-type: inline-size;
  display: grid;
  gap: 8px;
  padding: 16px 22px;
  border-radius: 14px;
  background: var(--jaune);
  color: var(--nuit);
  box-shadow: 0 18px 30px -16px rgba(5, 8, 30, 0.75);
  transform: rotate(-2deg);
  animation: pin 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both, flutter 3s ease-in-out 0.7s infinite;
}
/* Pendant qu'on écrit dessus, le dossard arrête de flotter. */
.bib:focus-within { animation-play-state: running, paused; }
/* Le dossard tombe et s'accroche de travers, comme épinglé sur un maillot. */
@keyframes pin {
  from { opacity: 0; transform: translateY(-28px) rotate(-9deg); }
  to { opacity: 1; transform: rotate(-2deg); }
}
/* Puis il flotte dans le vent de la course. */
@keyframes flutter {
  0%, 100% { transform: rotate(-2deg); }
  30% { transform: rotate(-1.1deg) skewY(-0.8deg) translateY(-2px); }
  65% { transform: rotate(-2.7deg) skewY(0.5deg) translateY(1px); }
}
.hole { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--bleu); }
.bib-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.bib-brand { font-family: var(--f-titre); font-stretch: 125%; font-weight: 900; font-size: 13px; letter-spacing: 0.18em; }
.bib-cat { flex: 1; min-width: 0; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bib-num { font-family: var(--f-titre); font-stretch: 75%; font-weight: 700; font-size: 18px; color: rgba(13, 18, 48, 0.35); white-space: nowrap; }
.bib-num.stamped {
  color: var(--bleu);
  border: 2px solid var(--bleu);
  border-radius: 6px;
  padding: 1px 7px;
  transform: rotate(-6deg);
  animation: stamp 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
/* Le numéro arrive d'un coup de tampon. */
@keyframes stamp {
  from { opacity: 0; transform: scale(2.4) rotate(-6deg); }
  to { opacity: 1; transform: scale(1) rotate(-6deg); }
}
.bib-name {
  width: 100%;
  min-height: 60px;
  padding: 4px 0;
  border: 0;
  border-bottom: 2px solid rgba(13, 18, 48, 0.18);
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-family: var(--f-titre);
  font-stretch: 112%;
  font-weight: 900;
  /* 40 px au plus, moins sur un dossard étroit ; le script rapetisse encore les noms longs (--name-scale). */
  font-size: calc(var(--name-scale, 1) * min(40px, 12.5cqi));
  letter-spacing: -0.02em;
  color: var(--nuit);
  caret-color: var(--bleu);
  outline: none;
}
.bib-name::placeholder { color: rgba(13, 18, 48, 0.28); }
.bib-name:focus { border-bottom-color: var(--bleu); }
.bib-name[readonly] { border-bottom-color: transparent; cursor: default; }
.bib-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(13, 18, 48, 0.1);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(13, 18, 48, 0.45);
  transition: background 0.3s, color 0.3s;
}
.bib-band span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bib-band.filled { background: var(--bleu); color: var(--blanc); }

.steps { display: grid; }
.step { display: grid; gap: 14px; animation: rise 0.28s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hint { font-size: 16px; color: rgba(255, 255, 255, 0.85); }
.hint b { color: var(--blanc); }
.fine { font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.72); }
.error { font-size: 15px; font-weight: 700; padding: 9px 13px; border-radius: 10px; background: var(--alerte-doux); color: var(--alerte-texte); }
.step > .btn { justify-self: start; }

.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.82em 0.95em;
  border: 0;
  border-radius: 0.85em;
  background: var(--blanc);
  color: var(--nuit);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 2px transparent;
  outline: none;
}
.field::placeholder { color: #8A90A8; font-weight: 500; }
.field:focus { box-shadow: inset 0 0 0 2px var(--jaune), 0 0 0 3px rgba(228, 242, 75, 0.35); }
.field-row .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .field-row .btn { flex: 1 1 100%; } }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0;
  border-radius: 99px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  color: var(--blanc);
  cursor: pointer;
  transition: background 0.15s;
}
.chip:hover { background: rgba(255, 255, 255, 0.22); }

.choices { display: grid; gap: 10px; }
.choice {
  display: grid;
  gap: 2px;
  text-align: left;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: var(--blanc);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.choice:hover { background: rgba(255, 255, 255, 0.18); }
.choice b { font-size: 17px; }
.choice span { font-size: 14.5px; color: rgba(255, 255, 255, 0.75); }
.choice.on { background: var(--blanc); color: var(--nuit); }
.choice.on span { color: var(--bitume); }

.done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }

/* ---------- Sections ---------- */
.sec-head { display: grid; gap: 14px; margin-bottom: 48px; max-width: 760px; }
.sec-head h2 { font-size: clamp(32px, 4.6vw, 52px); }
.sec-lede { font-size: 18px; color: var(--bitume); max-width: 56ch; }

/* Comment ça marche : une vraie suite d'étapes, d'où les numéros. */
.how { display: grid; gap: 20px; counter-reset: none; }
@media (min-width: 880px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.how-card { display: grid; grid-template-rows: auto auto auto 1fr; gap: 10px; align-content: start; background: var(--blanc); border-radius: 22px; padding: 14px 14px 26px; min-width: 0; }
.how-visual { height: 200px; border-radius: 14px; overflow: hidden; background: var(--terre); display: grid; place-items: center; margin-bottom: 12px; }
.how-visual-pad { padding: 16px; background: var(--craie); }
.how-card > .how-n, .how-card > h3, .how-card > p { padding-inline: 10px; }
.how-n { font-size: 44px; color: var(--bleu); }
.how-card h3 { font-size: 22px; }
.how-card p { color: var(--bitume); font-size: 16px; }

.map { display: block; width: 100%; height: 100%; }
.m-terre { fill: var(--terre); }
.m-eau { fill: var(--eau); }
.m-parc { fill: var(--parc); }
.m-rue path { fill: none; stroke: var(--blanc); stroke-width: 9; stroke-linecap: round; }
.m-sentier { fill: none; stroke: var(--sentier); stroke-width: 2; stroke-dasharray: 4 5; stroke-linecap: round; }
.m-trace { fill: none; stroke: var(--bleu); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.m-fleche path { fill: none; stroke: var(--blanc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.m-depart { fill: var(--bleu); stroke: var(--blanc); stroke-width: 3; }
.m-point { fill: var(--blanc); }
.m-etiquette { fill: var(--nuit); }
.m-texte { fill: var(--blanc); font-family: var(--f-texte); font-size: 12.5px; font-weight: 700; }

/* Carte de course, comme dans l'app. */
.rc { width: 100%; max-width: 300px; background: var(--blanc); border-radius: 18px; padding: 15px 16px; display: grid; gap: 7px; box-shadow: 0 1px 0 rgba(13, 18, 48, 0.05), 0 12px 22px -16px rgba(13, 18, 48, 0.4); min-width: 0; font-size: 15px; }
.rc-top { display: flex; align-items: baseline; gap: 8px; }
.rc-time { font-size: 25px; }
.rc-date { font-size: 13px; font-weight: 700; color: var(--bitume); }
.rc-far { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--bitume); white-space: nowrap; }
.rc-title { font-size: 18px; line-height: 1.15; }
.rc-route { font-size: 13px; color: var(--bitume); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-d, .dot-a { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.dot-d { background: var(--bleu); }
.dot-a { background: var(--nuit); box-shadow: inset 0 0 0 2.4px var(--jaune); }
.to { margin: 0 6px; color: #A3A8BC; }
.rc-foot { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 2px; }
.rc-stats { font-weight: 800; }
.avs { display: inline-flex; margin-left: auto; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--blanc); box-shadow: 0 0 0 2px var(--blanc); flex: none; }
.avs .av + .av { margin-left: -8px; }
.av1 { background: var(--bleu); }
.av2 { background: var(--nuit); }
.av3 { background: var(--bitume); }
.av-more { background: #E4E6EE; color: var(--nuit); }

.chat { width: 100%; max-width: 300px; display: grid; gap: 10px; }
.msg { display: flex; align-items: flex-end; gap: 8px; }
.bubble { background: var(--blanc); border-radius: 16px 16px 16px 4px; padding: 9px 13px; font-size: 14.5px; line-height: 1.4; box-shadow: 0 8px 18px -14px rgba(13, 18, 48, 0.5); }
.msg-moi { justify-content: flex-end; }
.msg-moi .bubble { background: var(--bleu); color: var(--blanc); border-radius: 16px 16px 4px 16px; }
.badge { justify-self: start; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: var(--bleu-doux); color: var(--bleu); }

/* Le symbole */
.idee { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .idee { grid-template-columns: 1fr 1fr; gap: 64px; } }
.diagram { min-width: 0; }
.diagram svg { display: block; width: 100%; height: auto; }
.arm-l, .stem { stroke: var(--blanc); }
.arm-r { stroke: var(--jaune); }
.rdv { fill: var(--bleu); stroke: var(--jaune); stroke-width: 3.5; transform-box: fill-box; transform-origin: center; }
.d-ligne path { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.3; }
.d-texte text { fill: var(--blanc); font-family: var(--f-texte); font-size: 15px; font-weight: 700; }
.d-texte .d-jaune { fill: var(--jaune); }
/* Le tracé se dessine quand le symbole arrive à l'écran ; sans script, il est simplement là. */
.diagram.armed .arm-l, .diagram.armed .arm-r, .diagram.armed .stem { stroke-dasharray: 1 2; stroke-dashoffset: 1; }
.diagram.armed .rdv { transform: scale(0); }
.diagram.in .arm-l, .diagram.in .arm-r { animation: trace 0.8s cubic-bezier(0.6, 0, 0.2, 1) forwards; }
.diagram.in .arm-r { animation-delay: 0.15s; }
.diagram.in .stem { animation: trace 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.85s forwards; }
.diagram.in .rdv { animation: pop 0.3s ease-out 0.8s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
.idee-text { display: grid; gap: 20px; min-width: 0; }
.idee-text h2 { font-size: clamp(32px, 4.4vw, 50px); }
.idee-text > p { font-size: 18px; color: rgba(255, 255, 255, 0.82); max-width: 46ch; }
.nums { display: grid; gap: 16px; margin-top: 12px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.nums li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: baseline; font-size: 16px; color: rgba(255, 255, 255, 0.82); }
.nums .N { font-size: 32px; color: var(--jaune); white-space: nowrap; }
@media (max-width: 420px) { .nums li { grid-template-columns: 1fr; gap: 4px; } }

/* La confiance */
.trust { display: grid; gap: 16px; }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trust li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--craie); border-radius: 20px; padding: 22px; }
.trust svg { width: 48px; height: 48px; padding: 11px; border-radius: 14px; background: var(--bleu-doux); fill: none; stroke: var(--bleu); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.trust h3 { font-size: 18px; font-weight: 800; line-height: 1.25; }
.trust p { margin-top: 4px; color: var(--bitume); font-size: 16px; }

/* Fin */
.final { --track-gap: 0px; position: relative; overflow: hidden; padding-block: 80px calc(var(--track-h) + var(--talk-h) + 56px); }
.final-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px; }
.final h2 { font-size: clamp(32px, 4.6vw, 52px); }
.final p { margin-top: 12px; font-size: 18px; color: rgba(255, 255, 255, 0.85); max-width: 48ch; }

.foot { padding-block: 48px; }
.foot-in { display: grid; gap: 14px; }
@media (min-width: 880px) { .foot-in { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 40px; } }
.foot .logo { font-size: 26px; }
.foot p { font-size: 14.5px; color: rgba(255, 255, 255, 0.72); max-width: 62ch; }
.contact { color: var(--blanc); font-weight: 700; user-select: all; overflow-wrap: anywhere; }
.copy { overflow-wrap: anywhere; }
.copy a { color: var(--blanc); }

@media (max-width: 560px) {
  :root { --track-h: 124px; }
  .band { padding-block: 72px; }
  .hero { padding-block: 18px calc(var(--track-gap) + var(--track-h) + var(--talk-h) + 190px); }
  .hero-main { padding-top: 40px; }
  .top-cta { padding: 8px 12px; font-size: 14px; }
  .top .logo { font-size: 26px; }
}

/* ---------- Le loader : le symbole se trace, puis part en courant ---------- */
.loader { display: none; }
.js .loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bleu);
  color: var(--blanc);
}
.loader-in { display: flex; align-items: center; gap: 0.24em; font-size: clamp(46px, 9vw, 84px); line-height: 1; }
.loader-mark { width: 1.18em; height: 1.18em; flex: none; overflow: visible; }
.loader-mark path, .mini-mark path { stroke-dasharray: 1 2; stroke-dashoffset: 1; }
.ld-l, .ld-s { stroke: var(--blanc); }
.ld-r { stroke: var(--jaune); }
.loader .ld-l { animation: trace 0.5s cubic-bezier(0.6, 0, 0.2, 1) 0.1s forwards; }
.loader .ld-r { animation: trace 0.5s cubic-bezier(0.6, 0, 0.2, 1) 0.2s forwards; }
.loader .ld-s { animation: trace 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.62s forwards; }
.loader-wm { opacity: 0; animation: dash-in 0.5s cubic-bezier(0.2, 0.9, 0.25, 1) 0.72s forwards; }
.ld-wind { position: absolute; right: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)); opacity: 0; }
/* Prêt : le logo file vers la droite, une rafale passe, l'écran s'efface. */
.ready .loader { pointer-events: none; animation: loader-out 0.4s ease-in 0.28s forwards; }
.ready .loader-in { animation: dash-off 0.45s cubic-bezier(0.6, 0, 0.9, 0.4) forwards; }
.ready .ld-wind { animation: gust 0.55s ease-out forwards; }
.ready .ld-wind:nth-child(2) { animation-delay: 0.06s; }
.ready .ld-wind:nth-child(3) { animation-delay: 0.12s; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
@keyframes dash-off { to { opacity: 0; transform: translateX(55vw) skewX(-20deg); } }
@keyframes gust { from { opacity: 1; transform: translateX(30vw); } to { opacity: 0; transform: translateX(-110vw); } }
/* Tant que le loader est là, l'ouverture attend pour faire son entrée. */
.js:not(.ready) .hl, .js:not(.ready) .bib { animation-play-state: paused; }

/* Le même symbole, en petit, dans le bouton pendant l'envoi. */
.mini-mark { display: none; width: 1.25em; height: 1.25em; flex: none; }
.mini-mark .ld-l, .mini-mark .ld-s { stroke: var(--bleu); }
.mini-mark .ld-r { stroke: var(--nuit); }
.loading .mini-mark { display: block; }
.loading .mini-mark .ld-l { animation: trace-loop 1.1s cubic-bezier(0.6, 0, 0.2, 1) infinite; }
.loading .mini-mark .ld-r { animation: trace-loop 1.1s cubic-bezier(0.6, 0, 0.2, 1) 0.08s infinite; }
.loading .mini-mark .ld-s { animation: trace-loop-stem 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes trace-loop { 0% { stroke-dashoffset: 1; } 45%, 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes trace-loop-stem { 0%, 40% { stroke-dashoffset: 1; } 62%, 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* ---------- L'allure du groupe, et le bouton pause ---------- */
/* Plus précis que « .hero > .wrap » : ce bandeau reste posé juste au-dessus de la piste. */
.hero > .hud {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: calc(var(--track-gap) + var(--track-h) + var(--talk-h) + 12px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.pace { display: grid; gap: 3px; font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.pace-l { font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jaune); }
.pace-v { font-weight: 700; }
.pace-v .N { font-size: 30px; color: var(--blanc); }
.pace-hint { font-size: 12.5px; color: rgba(255, 255, 255, 0.65); }
.motion-toggle {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 99px;
  padding: 7px 12px 7px 9px;
  background: rgba(13, 18, 48, 0.25);
  color: var(--blanc);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.motion-toggle:hover { background: rgba(13, 18, 48, 0.4); }
/* Le temps d'attente imposé : le bouton se remplit, et ne répond qu'une fois plein. */
.motion-toggle[aria-disabled="true"] { cursor: progress; color: rgba(255, 255, 255, 0.75); }
.motion-toggle[aria-disabled="true"]:hover { background: rgba(13, 18, 48, 0.25); }
.motion-toggle.waiting::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform-origin: left;
  animation: wait var(--wait, 4s) linear both;
}
@keyframes wait { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.motion-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle .ic-play { display: none; fill: currentColor; stroke-width: 1.5; }
.hud-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
/* Le haut-parleur : barré tant que le son est coupé, avec ses ondes une fois activé. */
#sound-toggle .ic-speaker { fill: currentColor; stroke-width: 1.5; }
#sound-toggle .ic-waves { display: none; }
#sound-toggle[aria-pressed="true"] { background: var(--blanc); color: var(--nuit); }
#sound-toggle[aria-pressed="true"] .ic-waves { display: block; }
#sound-toggle[aria-pressed="true"] .ic-mute { display: none; }
/* Sur téléphone, l'allure au-dessus, les boutons du son et du ravito en ligne dessous. */
@media (max-width: 560px) {
  .hero > .hud { flex-direction: column; align-items: stretch; gap: 10px; }
  .hud-buttons { justify-content: flex-start; }
}
.still .motion-toggle .ic-play, .ravito .motion-toggle .ic-play { display: block; }
.still .motion-toggle .ic-pause, .ravito .motion-toggle .ic-pause { display: none; }

/* ---------- La banderole des courses, comme un jour de course ---------- */
.ticker-zone { position: relative; z-index: 3; overflow: hidden; margin-block: calc(-40px - var(--track-gap)) -40px; padding-block: 40px; pointer-events: none; }
.ticker {
  width: 110%;
  margin-left: -5%;
  transform: rotate(-2deg);
  background: var(--nuit);
  color: var(--blanc);
  padding-block: 14px;
  overflow: hidden;
  box-shadow: 0 18px 30px -20px rgba(5, 8, 30, 0.6);
}
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker-group { display: flex; align-items: center; gap: 26px; padding-right: 26px; }
.tk { font-family: var(--f-titre); font-stretch: 75%; font-weight: 700; font-size: 22px; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.tk-mark { width: 20px; height: 20px; flex: none; }
.tk-mark .mk-main { stroke: var(--blanc); }
.tk-mark .mk-accent { stroke: var(--jaune); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- La carte : le tracé avance, et toi tu le cours ---------- */
.m-flux { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 0.1 12; animation: flux 0.9s linear infinite; }
@keyframes flux { to { stroke-dashoffset: -12.1; } }
.m-moi { fill: var(--jaune); stroke: var(--nuit); stroke-width: 2.5; }
.m-halo { fill: var(--jaune); transform-box: fill-box; transform-origin: center; animation: halo 1.3s ease-out infinite; }
@keyframes halo { from { opacity: 0.6; transform: scale(0.6); } to { opacity: 0; transform: scale(2.1); } }

/* ---------- La discussion s'écrit, un coureur de plus s'inscrit ---------- */
.msg-moi { display: grid; justify-items: end; }
.msg-moi > * { grid-area: 1 / 1; }
.typing { display: none; gap: 4px; align-self: end; padding: 12px 14px; border-radius: 16px 16px 4px 16px; background: var(--bleu); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--blanc); animation: typing-dot 0.9s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot { 0%, 60%, 100% { opacity: 0.5; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }
.how-card.in .msg:first-child { animation: bubble 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both; }
.how-card.in .typing { display: inline-flex; animation: typing-life 1.1s 0.9s both; }
.how-card.in .msg-moi .bubble { animation: bubble 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 2s both; }
.how-card.in .chat .badge { animation: bubble 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 2.5s both; }
.how-card.in .avs .av { animation: bubble 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.how-card.in .avs .av:nth-child(1) { animation-delay: 0.5s; }
.how-card.in .avs .av:nth-child(2) { animation-delay: 0.62s; }
.how-card.in .avs .av:nth-child(3) { animation-delay: 0.74s; }
.how-card.in .avs .av:nth-child(4) { animation-delay: 0.86s; }
.av.bump { animation: bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both !important; }
@keyframes typing-life { 0% { opacity: 0; } 12%, 88% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes bubble { from { opacity: 0; transform: translateY(8px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- Les entrées en scène : on arrive en courant ---------- */
.armed:not(.diagram) { opacity: 0; }
.armed.in:not(.diagram) { animation: dash-in 0.7s cubic-bezier(0.2, 0.9, 0.25, 1) var(--d, 0s) both; }

/* ---------- Animation pas encore lancée (« réduire les animations ») : rien ne bouge en continu ---------- */
.still .bib { animation-play-state: running, paused; }
.still .ticker-track, .still .m-flux, .still .m-halo, .still .typing i { animation-play-state: paused; }
/* Au ravito, le coureur de la carte s'arrête aussi. */
.ravito .m-flux, .ravito .m-halo { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js.ready .loader { display: none; }
  .loader-mark path { stroke-dashoffset: 0; }
  .loader-wm { opacity: 1; }
  .diagram.armed .arm-l, .diagram.armed .arm-r, .diagram.armed .stem { stroke-dashoffset: 0; }
  .diagram.armed .rdv { transform: none; }
  .loading .mini-mark { display: none; }
}
