/* FlotteVision · édition de nuit */
:root {
  --paper: #f2f3ee;
  --panel: #fafaf7;
  --panel-2: #e8eae3;
  --panel-3: #cfd3ca;
  --text: #111a27;
  --text-2: #3d4656;
  --text-3: #5b6474;
  --sand: #8c7644;
  --sand-dim: rgba(140, 118, 68, 0.45);
  --line: rgba(17, 26, 39, 0.1);
  --line-2: rgba(17, 26, 39, 0.18);
  --accent: #ff6a2b;
  --accent-2: #f25a1b;
  --accent-ink: #1c0c03;
  --accent-text: #b7430f;
  --accent-soft: rgba(255, 106, 43, 0.16);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --r-s: 6px;
  --r-m: 14px;
  --r-l: 22px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Overpass", system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--accent-ink); }
input, textarea { caret-color: var(--accent); }
html { scrollbar-color: var(--panel-3) var(--paper); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 10px; border: 2px solid var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 99px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Relief en courbes de niveau, dessiné une fois (canvas fixe) */
.contours { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.55; }
main, .colophon { position: relative; z-index: 1; }

/* ---------- Boutons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; gap: 12px;
  height: var(--h); padding: 0; padding-inline: 24px 8px;
  border-radius: 99px; border: 1px solid transparent;
  font: 700 16px/1 var(--font); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.5s var(--ease-spring), background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-2); }
.btn--ghost { padding-inline: 24px; border-color: var(--line-2); color: var(--text); background: rgba(255, 255, 255, 0.6); }
.btn--ghost:hover { border-color: var(--sand); }
.btn--sm { --h: 42px; padding-inline: 18px; font-size: 14.5px; }
.btn--block { width: 100%; justify-content: space-between; }
.btn__nib {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(28, 12, 3, 0.14); font-size: 18px;
  transition: transform 0.5s var(--ease-spring);
}
.btn:hover .btn__nib { transform: translate(2px, -2px) scale(1.06); }

/* ---------- Cartouche (double cadre de carte) ---------- */
.cartouche {
  padding: 6px;
  border-radius: var(--r-l);
  background: rgba(17, 26, 39, 0.04);
  border: 1px solid var(--line);
}
.cartouche__core {
  border-radius: calc(var(--r-l) - 6px);
  background: rgba(250, 250, 247, 0.93);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 26, 39, 0.06);
  padding: clamp(24px, 3.2vw, 44px);
}

/* ---------- Écussons de route ---------- */
.shield {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 22px; padding: 0 7px; border-radius: 5px;
  font: 800 12px/1 var(--font); letter-spacing: 0.02em;
}
.shield--a { background: #1d4f8f; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 0 0 1px #1d4f8f; }
.shield--n { background: #b3261e; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 0 0 1px #b3261e; }

/* ---------- Légende (navigation) ---------- */
.legend {
  position: fixed; z-index: 40; top: 16px; left: 0; right: 0;
  margin-inline: auto;
  width: min(calc(100% - 24px), 1100px);
  display: flex; align-items: center; gap: 12px;
  padding: 7px; padding-inline-start: 18px;
  border-radius: 99px;
  background: rgba(250, 250, 247, 0.8);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: transform 0.6s var(--ease-spring), opacity 0.4s var(--ease-out);
}
.legend.is-hidden { transform: translateY(-140%); }
.legend__brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; margin-inline-end: auto; }
.legend__brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 1px 2px rgba(17, 26, 39, .18); }
.legend__nav { display: flex; gap: 4px; }
.legend__nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: 99px;
  font-size: 14.5px; font-weight: 600; color: var(--text-2); text-decoration: none; white-space: nowrap;
  transition: color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.legend__nav a:hover, .legend__nav a.is-active { color: var(--text); background: rgba(17, 26, 39, 0.05); }
.legend__sym { width: 18px; height: 8px; flex: none; position: relative; }
.legend__sym--route { background: linear-gradient(var(--accent), var(--accent)) center/100% 2px no-repeat; }
.legend__sym--grid { background: linear-gradient(var(--sand), var(--sand)) center/100% 1px no-repeat, linear-gradient(90deg, var(--sand) 1px, transparent 1px) 0 0/6px 100% ; opacity: 0.8; }
.legend__sym--toll { border: 1px solid var(--sand); border-radius: 2px; height: 10px; width: 14px; }
.legend__sym--dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--sand); }
.legend__burger { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; position: relative; }
.legend__burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform 0.5s var(--ease-spring), top 0.5s var(--ease-spring); }
.legend__burger span:first-child { top: 16px; }
.legend__burger span:last-child { top: 24px; }
.legend__burger[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.legend__burger[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(242, 243, 238, 0.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: grid; align-content: center; padding: 96px var(--gutter) 40px;
}
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 6px; }
.menu a { font-size: clamp(30px, 9vw, 44px); font-weight: 800; letter-spacing: -0.03em; text-decoration: none; padding: 6px 0; opacity: 0; transform: translateY(28px); transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-spring); }
.menu.is-open a { opacity: 1; transform: none; }
.menu.is-open a:nth-child(2) { transition-delay: 0.05s; }
.menu.is-open a:nth-child(3) { transition-delay: 0.1s; }
.menu.is-open a:nth-child(4) { transition-delay: 0.15s; }
.menu.is-open a:nth-child(5) { transition-delay: 0.2s; }
.menu.is-open a:nth-child(6) { transition-delay: 0.25s; }
.menu__cta { color: var(--accent-text); }

@media (max-width: 1100px) {
  .legend__nav, .legend__cta { display: none; }
  .legend__burger { display: block; }
}

/* ---------- 1. Héros ---------- */
.hero { position: relative; min-height: 100dvh; min-height: max(640px, 100dvh); display: flex; overflow: hidden; isolation: isolate; }
.hero__map { position: absolute; inset: 0; z-index: 0; background: var(--paper); }
.hero__map .leaflet-tile-pane { opacity: 0.9; }
.hero__map .leaflet-container, .hero__map.leaflet-container { background: var(--paper); }
.hero__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(242, 243, 238, 0.9) 0%, rgba(242, 243, 238, 0.5) 38%, rgba(242, 243, 238, 0) 65%),
    linear-gradient(0deg, var(--paper) 0%, rgba(242, 243, 238, 0) 22%),
    linear-gradient(180deg, rgba(242, 243, 238, 0.7) 0%, rgba(242, 243, 238, 0) 18%);
}
.hero__inner {
  position: relative; z-index: 2; width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto;
  padding: 120px var(--gutter) 56px;
  display: grid; grid-template-columns: minmax(0, 700px) 1fr; align-items: end; gap: 32px;
  pointer-events: none;
}
.hero__inner > * { pointer-events: auto; }
.hero__cartouche { align-self: center; }
.hero__title { font-size: clamp(40px, 4.3vw, 64px); font-weight: 900; letter-spacing: -0.035em; line-height: 0.98; padding-bottom: 0.06em; }
.hero__title .line-mask { overflow: hidden; display: block; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__lead { margin-top: 22px; font-size: clamp(17px, 1.35vw, 19.5px); color: var(--text-2); max-width: 44ch; }
.hero__actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.scale { margin-top: 34px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 0; row-gap: 6px; font: 500 12px/1 var(--mono); color: var(--text-3); }
.scale__bar { grid-column: 1 / -1; display: flex; width: 168px; height: 6px; border: 1px solid var(--sand-dim); }
.scale__bar i { flex: 1; }
.scale__bar i:nth-child(odd) { background: var(--sand-dim); }
.scale__lbl { width: 84px; }
.scale__lbl:last-child { width: auto; }
.scale__lbl:nth-child(3) { margin-left: -4px; }

.instrument {
  justify-self: end; width: min(100%, 320px);
  padding: 18px 20px 14px;
  border-radius: var(--r-m);
  background: rgba(250, 250, 247, 0.92);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.instrument__head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.instrument__name { margin-inline-end: auto; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 106, 43, 0.6); animation: live 2s var(--ease-out) infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 43, 0.55); } 100% { box-shadow: 0 0 0 12px rgba(255, 106, 43, 0); } }
.instrument__grid { margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.instrument__grid dt { font-size: 12px; color: var(--text-3); font-weight: 600; }
.instrument__grid dd { margin: 4px 0 0; display: flex; align-items: baseline; gap: 6px; }
.instrument__grid small { font: 500 12px var(--mono); color: var(--text-3); }
.instrument__wide { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; }
.instrument__next { font-weight: 700; font-size: 17px; white-space: nowrap; }
.journey__odo .odo__d > span { transition: none; }
.instrument__note { margin-top: 12px; font-size: 12px; color: var(--text-3); }
.hero__attrib { position: absolute; z-index: 2; inset-inline-end: 10px; bottom: 6px; margin: 0; font-size: 9px; line-height: 1; color: var(--text-3); opacity: 0.55; direction: ltr; pointer-events: none; }

/* Compteur à rouleaux */
.odo { direction: ltr; display: inline-flex; font: 600 30px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--text); }
.odo__d { display: inline-block; height: 1em; overflow: hidden; position: relative; width: 0.62em; }
.odo__d > span { display: flex; flex-direction: column; transition: transform 0.7s var(--ease-spring); }
.odo__d > span > i { font-style: normal; height: 1em; display: block; text-align: center; }
.odo__d.is-dim { color: var(--text-3); opacity: 0.45; }

/* Marqueurs sur la carte Leaflet */
.veh { position: relative; width: 22px; height: 22px; }
.veh__halo { position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 106, 43, 0.45), rgba(255, 106, 43, 0)); }
.veh__body { position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); border: 2px solid #ffffff; box-shadow: 0 0 0 4px rgba(255, 106, 43, 0.25); }
.veh__head { position: absolute; left: 50%; top: -9px; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-bottom: 8px solid var(--text); transform-origin: 5px 20px; }
.veh--b .veh__body { background: var(--sand); box-shadow: 0 0 0 4px rgba(140, 118, 68, 0.22); }
.veh--b .veh__halo { background: radial-gradient(closest-side, rgba(140, 118, 68, 0.3), rgba(140, 118, 68, 0)); }
.town-lbl { font: 700 12px/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); text-shadow: 0 0 6px var(--paper), 0 0 12px var(--paper); white-space: nowrap; }
.town-lbl::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--text); background: var(--paper); margin-inline-end: 7px; vertical-align: 1px; }

/* ---------- 2. Pourquoi ---------- */
.why { padding: clamp(96px, 12vw, 168px) 0 clamp(72px, 9vw, 128px); }
.why__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.why__title { font-size: clamp(30px, 3.4vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.keylist { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; }
.keylist li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.keylist h3 { font-size: 20px; letter-spacing: -0.015em; margin-bottom: 6px; }
.keylist p { color: var(--text-2); }
.keylist__sym { height: 14px; margin-top: 7px; position: relative; }
.keylist__sym--motorway { background: linear-gradient(var(--accent), var(--accent)) 0 2px/100% 3px no-repeat, linear-gradient(var(--accent), var(--accent)) 0 9px/100% 3px no-repeat; }
.keylist__sym--national { background: linear-gradient(var(--sand), var(--sand)) 0 5px/100% 4px no-repeat; }
.keylist__sym--track { background: repeating-linear-gradient(90deg, var(--sand) 0 8px, transparent 8px 13px) 0 6px/100% 2px no-repeat; }

/* ---------- 3. Le trajet : vidéo pilotée par le défilement ---------- */
.journey { position: relative; }
/* La vidéo occupe tout l'écran ; le texte vient par-dessus, centré, en haut et en bas,
   pour laisser la bande du milieu aux véhicules et à leurs écrans. */
.journey__pin {
  position: relative; height: 100dvh; min-height: 560px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 88px var(--gutter) 22px;
  background: var(--panel-2);
}
.journey__head, .journey__foot { position: relative; z-index: 4; width: 100%; text-align: center; }
.journey__head { max-width: 760px; }
.journey__title { font-size: clamp(30px, 3.4vw, 50px); letter-spacing: -0.03em; }
.journey__intro { margin: 12px auto 0; max-width: 600px; color: var(--text-2); }
/* Fin du trajet : la phrase remplace le titre, au même endroit, sur le ciel */
.journey__lead, .journey__claim { transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-spring), filter 0.6s var(--ease-out); }
.journey__claim { position: absolute; left: 0; right: 0; top: 50%; margin: 0; transform: translateY(-30%); opacity: 0; filter: blur(6px); pointer-events: none;
  font-size: clamp(34px, 5.2vw, 76px); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.journey__claim b { color: var(--accent-text); }
.journey__head.is-claim .journey__lead { opacity: 0; transform: translateY(-16px); filter: blur(6px); }
.journey__head.is-claim .journey__claim { opacity: 1; transform: translateY(-50%); filter: none; }
/* Écrans d'informations désactivés (voir ECRANS_HTML dans site.js) */
.feed--sans-ecrans .hud, .feed--sans-ecrans .hud-links { display: none; }
.journey__foot {
  max-width: 940px; padding: 14px clamp(14px, 2.4vw, 26px) 12px;
  border-radius: var(--r-m);
  background: rgba(250, 250, 247, 0.74);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(17, 26, 39, 0.06), 0 24px 48px -32px rgba(17, 26, 39, 0.55);
}

/* Étapes : frise horizontale, l'étape en cours détaillée dessous */
.stops { list-style: none; margin: 12px 0 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); }
.stops::before { content: ""; position: absolute; left: 10%; right: 10%; top: 5px; height: 1px; background: var(--line-2); }
.stops li { position: relative; padding-top: 20px; opacity: 0.45; transition: opacity 0.5s var(--ease-out); }
.stops li::before { content: ""; position: absolute; left: 50%; top: 0; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--sand-dim); transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.stops li.is-past { opacity: 0.7; }
.stops li.is-past::before { background: var(--sand); border-color: var(--sand); }
.stops li.is-now { opacity: 1; }
.stops li.is-now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.stops time { display: block; font: 600 12.5px/1.5 var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.stops li.is-now time { color: var(--accent-text); }
.stops b { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; }
.stops span { display: none; }
.stops__now { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--text); font-size: 15px; line-height: 1.45; min-height: 1.45em; }
.journey__note { margin-top: 4px; font-size: 12px; color: var(--text-3); }

.feed { position: absolute; inset: 0; margin: 0; z-index: 0; }
.feed__poster, .feed__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.feed__poster { object-fit: cover; object-position: 45% 50%; }
.feed__canvas { opacity: 0; transition: opacity 0.4s var(--ease-out); }
.feed.is-ready .feed__canvas { opacity: 1; }
/* Voile clair en haut (titre) et en bas (frise) ; le milieu reste net */
.feed__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(242, 243, 238, 0.94) 0, rgba(242, 243, 238, 0.78) 16%, rgba(242, 243, 238, 0) 36%),
    linear-gradient(0deg, rgba(242, 243, 238, 0.55) 0, rgba(242, 243, 238, 0) 30%);
}
.feed__bar {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2);
}
.feed__clock { font-variant-numeric: tabular-nums; color: var(--text); }

/* Liens entre les écrans et les véhicules */
.hud-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.hud-links line { stroke: var(--text); stroke-width: 1.25; stroke-dasharray: 3 3; opacity: 0.85; }
.hud-links circle { fill: var(--accent); stroke: #fff; stroke-width: 2; }

/* Écrans d'informations (verre dépoli, coins de visée) */
.hud {
  position: absolute; left: 0; top: 0; z-index: 3;
  width: 200px; padding: 8px 10px 7px;
  color: var(--text);
  background: rgba(250, 250, 247, 0.62);
  backdrop-filter: blur(12px) saturate(1.35); -webkit-backdrop-filter: blur(12px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(17, 26, 39, 0.08), 0 18px 36px -24px rgba(17, 26, 39, 0.5);
  border-radius: 4px;
  font-size: 13px; line-height: 1.35;
  will-change: transform;
  opacity: 0; clip-path: inset(0 100% 100% 0);
}
.hud::before, .hud::after { content: ""; position: absolute; width: 12px; height: 12px; border-color: var(--accent); border-style: solid; }
.hud::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.hud::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.hud.is-on { animation: hudBoot 0.9s var(--ease-out) forwards; }
.hud.is-on .hud__grid > div, .hud.is-on .hud__title, .hud.is-on .hud__foot { animation: hudLine 0.5s steps(2, end) both; }
.hud.is-on .hud__grid > div:nth-child(1) { animation-delay: 0.35s; }
.hud.is-on .hud__grid > div:nth-child(2) { animation-delay: 0.42s; }
.hud.is-on .hud__grid > div:nth-child(3) { animation-delay: 0.49s; }
.hud.is-on .hud__grid > div:nth-child(4) { animation-delay: 0.56s; }
.hud.is-on .hud__grid > div:nth-child(5) { animation-delay: 0.63s; }
.hud.is-on .hud__grid > div:nth-child(6) { animation-delay: 0.7s; }
.hud.is-on .hud__grid > div:nth-child(7) { animation-delay: 0.77s; }
.hud.is-on .hud__title { animation-delay: 0.25s; }
.hud.is-on .hud__foot { animation-delay: 0.85s; }
@keyframes hudBoot { 0% { opacity: 0; clip-path: inset(0 100% 100% 0); } 35% { opacity: 1; clip-path: inset(0 0 100% 0); } 100% { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes hudLine { 0% { opacity: 0; } 50% { opacity: 0.35; } 100% { opacity: 1; } }

.hud__head { display: flex; align-items: center; gap: 7px; font: 700 9.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.hud__live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: live 2s var(--ease-out) infinite; }
.hud__net { margin-inline-start: auto; display: inline-flex; align-items: flex-end; gap: 2px; letter-spacing: 0.04em; }
.hud__net i { display: inline-block; width: 3px; background: var(--text); border-radius: 1px; }
.hud__net i:nth-child(1) { height: 4px; } .hud__net i:nth-child(2) { height: 6px; } .hud__net i:nth-child(3) { height: 8px; } .hud__net i:nth-child(4) { height: 10px; }
.hud__net i.off { opacity: 0.25; }
.hud__title { margin-top: 6px; font-weight: 800; font-size: 13px; line-height: 1.2; letter-spacing: -0.01em; }
.hud__title span { display: block; margin-top: 1px; font: 600 10px var(--mono); color: var(--text-2); letter-spacing: 0.02em; }
.hud__alert { display: none; margin-top: 6px; padding: 4px 6px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); font: 700 9.5px/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.hud__grid { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid rgba(17, 26, 39, 0.12); display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; }
.hud__grid dt { font: 600 9px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.hud__grid dd { margin: 2px 0 0; font: 600 11px/1.25 var(--mono); font-variant-numeric: tabular-nums; }
.hud__wide { grid-column: 1 / -1; }
.hud__speed b { font: 700 18px/1 var(--mono); letter-spacing: -0.02em; }
.hud__speed small { display: block; margin-top: 2px; font: 500 9px var(--mono); color: var(--text-3); }
.hud__compass { display: inline-block; width: 12px; height: 12px; margin-inline-end: 6px; vertical-align: -1px; border: 1.25px solid var(--text); border-radius: 50%; position: relative; }
.hud__compass::after { content: ""; position: absolute; left: 50%; top: 1px; width: 0; height: 0; margin-left: -2.5px; border: 2.5px solid transparent; border-bottom: 4px solid var(--accent); }
.hud__foot { margin-top: 9px; padding-top: 7px; border-top: 1px solid rgba(17, 26, 39, 0.12); display: flex; justify-content: space-between; gap: 8px; font: 500 10.5px/1.2 var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.hud__foot span { white-space: nowrap; }

.hud.is-alert { background: rgba(255, 244, 236, 0.78); border-color: rgba(255, 106, 43, 0.7); }
.hud.is-alert .hud__alert { display: block; }
.hud.is-alert .hud__speed b { color: var(--accent-text); }

/* ---------- 4. Plateforme ---------- */
.platform { padding: clamp(96px, 12vw, 176px) 0 clamp(80px, 10vw, 140px); }
.platform__title { font-size: clamp(32px, 4vw, 56px); letter-spacing: -0.035em; max-width: 16ch; }
.platform__lead { margin-top: 16px; color: var(--text-2); }
.sheets { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 28px); }
.sheet { margin: 0; }
.sheet--xl { grid-column: 1 / span 8; }
.sheet--tall { grid-column: 9 / span 4; align-self: end; }
.sheet--wide { grid-column: 1 / span 5; }
.sheet--side { grid-column: 6 / span 7; margin-top: clamp(24px, 6vw, 88px); }
.bezel {
  padding: 6px; border-radius: var(--r-m);
  background: rgba(17, 26, 39, 0.04);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.8s var(--ease-spring), border-color 0.4s var(--ease-out);
}
.bezel img { border-radius: calc(var(--r-m) - 6px); width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.sheet--tall .bezel img { aspect-ratio: 4 / 5; object-position: 42% top; }
.sheet:hover .bezel { border-color: var(--line-2); transform: translateY(-4px); }
.sheet figcaption { margin-top: 14px; color: var(--text-2); font-size: 15px; max-width: 52ch; }
.sheet figcaption b { color: var(--text); font-weight: 700; }

.also { margin-top: clamp(72px, 9vw, 120px); display: grid; grid-template-columns: 1fr 2fr; gap: 32px 56px; border-top: 1px solid var(--line); padding-top: 40px; }
.also__title { font-size: 22px; letter-spacing: -0.02em; }
.also__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 40px; }
.also__list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.also__list i { font-size: 26px; color: var(--sand); line-height: 1; margin-top: 1px; }
.also__list b { display: block; font-weight: 700; margin-bottom: 3px; }
.also__list span { color: var(--text-2); font-size: 15.5px; }
.soon { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--text-2); font-size: 15px; padding-top: 6px; }
.soon__tag { font: 700 12px/1 var(--font); color: var(--accent-text); border: 1px solid rgba(255, 106, 43, 0.45); border-radius: 99px; padding: 6px 10px 5px; }

/* ---------- 5. Installation ---------- */
.install { padding: clamp(80px, 10vw, 150px) 0; }
.install__title { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -0.03em; max-width: 20ch; }
.road { position: relative; height: 2px; margin: clamp(48px, 6vw, 80px) 0 0; }
.road__line { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--sand-dim) 0 26px, transparent 26px 44px); transform-origin: left; }
.bornes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.borne { position: relative; padding-top: 0; }
.borne__stone { position: relative; display: block; width: 44px; height: 58px; margin: -30px 0 22px; border-radius: 22px 22px 4px 4px; background: #ffffff; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 10px 20px -12px rgba(17, 26, 39, 0.35); }
.borne__cap { position: absolute; left: 0; right: 0; top: 0; height: 22px; background: #c8322a; }
.borne__face { position: absolute; left: 0; right: 0; bottom: 7px; text-align: center; font-size: 22px; line-height: 1; color: #1a1a1a; }
.borne h3 { font-size: 22px; letter-spacing: -0.02em; }
.borne p { margin-top: 8px; color: var(--text-2); max-width: 34ch; }

/* ---------- 6. Tarifs ---------- */
.pricing { padding: clamp(80px, 10vw, 150px) 0; }
.pricing__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.pricing__head h2 { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -0.03em; }
.toggle { display: inline-flex; padding: 4px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); }
.toggle button { border: 0; background: transparent; color: var(--text-2); font: 700 14.5px/1 var(--font); padding: 11px 18px; border-radius: 99px; cursor: pointer; transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out); }
.toggle button small { font: 600 12px var(--font); color: var(--accent-text); margin-inline-start: 4px; }
.toggle button.is-on { background: var(--text); color: var(--paper); }
.toggle button.is-on small { color: #ffb08a; }
.plans { margin-top: 44px; display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 30px 28px 28px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); }
.plan--main { background: linear-gradient(180deg, #fff2e9 0%, var(--panel) 60%); border-color: rgba(255, 106, 43, 0.5); }
.plan h3 { font-size: 19px; letter-spacing: -0.01em; }
.plan--main h3 { color: var(--accent-text); }
.plan__price { margin-top: 18px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.plan__num { font: 800 50px/1 var(--font); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; display: inline-block; }
.plan__num--text { font-size: 36px; letter-spacing: -0.03em; }
.plan__unit { color: var(--text-3); font-size: 14px; }
.plan__for { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.plan ul { list-style: none; margin: 24px 0 28px; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; flex: 1; }
.plan li { position: relative; padding-inline-start: 26px; font-size: 15.5px; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.62em; width: 12px; height: 2px; background: var(--sand); }
.plan--main li::before { background: var(--accent); }
.plan .btn { justify-content: center; }
.plan .btn--accent { justify-content: space-between; }
.pricing__note { margin-top: 20px; color: var(--text-3); font-size: 13.5px; }

/* ---------- 7. Questions ---------- */
.faq { padding: clamp(80px, 10vw, 140px) 0; }
.faq__grid { display: grid; grid-template-columns: 1fr 1.8fr; gap: 40px 80px; align-items: start; }
.faq h2 { font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -0.03em; }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list details:first-child { border-top: 1px solid var(--line); }
.faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary i { font-size: 22px; color: var(--sand); transition: transform 0.5s var(--ease-spring); flex: none; }
.faq__list details[open] summary i { transform: rotate(45deg); }
.faq__list details p { padding: 0 0 24px; padding-inline-end: 48px; color: var(--text-2); max-width: 68ch; }
.faq__list summary:hover { color: var(--accent-text); }

/* ---------- 8. Contact ---------- */
.contact { padding: clamp(80px, 10vw, 150px) 0 clamp(96px, 12vw, 160px); }
.contact__grid { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__title { font-size: clamp(40px, 5.4vw, 76px); font-weight: 900; letter-spacing: -0.04em; }
.contact__pitch > p { margin-top: 20px; color: var(--text-2); font-size: 18px; max-width: 42ch; }
.contact__ways { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
.contact__ways li { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.contact__ways i { font-size: 24px; color: var(--sand); }
.contact__ways a { text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color 0.3s; }
.contact__ways a:hover { border-color: var(--accent); }
.form .cartouche__core { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.field label { font-size: 14px; font-weight: 700; color: var(--text); }
.field__opt { font-weight: 400; color: var(--text-3); }
.field input, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--text);
  background: #ffffff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 13px 14px; transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field textarea:hover { border-color: rgba(17, 26, 39, 0.32); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #ffffff; }
.field__err { display: none; font-size: 13px; color: #b42318; }
.field.is-bad input { border-color: #b42318; }
.field.is-bad .field__err { display: block; }
.form__hint { font-size: 13px; color: var(--text-3); text-align: center; }

/* ---------- Colophon : présentation + trois colonnes de liens ---------- */
.colophon { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0 40px; }
.colophon__top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px clamp(24px, 4vw, 56px); }
.colophon__brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; text-decoration: none; }
.colophon__brand img { width: 30px; height: 30px; border-radius: 8px; }
.colophon__text { margin-top: 14px; color: var(--text-2); font-size: 15px; max-width: 34ch; }
.colophon__col h3 { font-size: 13.5px; font-weight: 700; letter-spacing: 0; color: var(--text-3); }
.colophon__col ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.colophon__col a { font-size: 15px; color: var(--text); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.3s var(--ease-out); }
.colophon__col a:hover { border-color: var(--accent); }
.colophon__col li > span { font-size: 15px; color: var(--text-3); }
.colophon__col .soon__tag { margin-inline-start: 8px; padding: 4px 8px 3px; font-size: 11px; }
.colophon__small { margin-top: clamp(32px, 4vw, 48px); padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }

/* ---------- Apparition au défilement (état visible par défaut si JS absent) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-spring), filter 0.9s var(--ease-out); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; align-items: end; padding-top: 110px; }
  .hero__cartouche { align-self: end; }
  .instrument { justify-self: start; }
}
/* Écran étroit ou vertical : la vidéo est une bande (40 % de la largeur de l'image, placée par
   site.js) entre le titre et la frise, sur le papier ; écrans d'informations compacts,
   seule l'étape en cours est nommée. */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .journey__pin { padding-top: 78px; padding-bottom: 12px; background: var(--paper); }
  .feed { bottom: auto; }
  .feed__veil { background:
    linear-gradient(180deg, var(--paper) 0, rgba(242, 243, 238, 0) 9%),
    linear-gradient(0deg, var(--paper) 0, rgba(242, 243, 238, 0) 9%); }
  .journey__foot { background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* Toujours deux lignes : la frise garde sa hauteur, la bande vidéo ne saute pas */
  .stops__now { min-height: 2.9em; }
  .journey__title { font-size: clamp(24px, 6.4vw, 34px); }
  .journey__intro, .journey__note { display: none; }
  .journey__foot { padding: 10px 12px; }
  .stops b { display: none; }
  .stops li { padding-top: 16px; }
  .stops time { font-size: 11.5px; }
  .stops__now { font-size: 14px; margin-top: 6px; padding-top: 8px; }
  .stops__now b { margin-inline-end: 0.3em; }
  .hud { width: 166px; padding: 7px 9px 6px; }
  .hud__opt, .hud__foot { display: none; }
  .hud__speed b { font-size: 16px; }
  .feed--basse .hud { width: 128px; padding: 5px 8px; }
  .feed--basse .hud__head, .feed--basse .hud__title span, .feed--basse .hud__grid > div:not(.hud__speed) { display: none; }
  .feed--basse .hud__title { margin-top: 0; font-size: 12px; }
  .feed--basse .hud__grid { grid-template-columns: 1fr; margin-top: 4px; padding-top: 4px; }
  .feed--basse .hud__alert { margin-top: 4px; font-size: 8.5px; }
}
@media (min-width: 761px) and (min-aspect-ratio: 1/1) {
  .stops__now b { display: none; }
}
@media (max-width: 860px) {
  .why__grid, .faq__grid, .contact__grid, .also { grid-template-columns: 1fr; }
  .colophon__top { grid-template-columns: 1fr 1fr; }
  .colophon__about { grid-column: 1 / -1; }
  .soon { grid-column: 1; }
  .sheets { grid-template-columns: 1fr; }
  .sheet--xl, .sheet--tall, .sheet--wide, .sheet--side { grid-column: 1; margin-top: 0; }
  .sheet--tall .bezel img { aspect-ratio: 16 / 10; }
  .plans { grid-template-columns: 1fr; max-width: 480px; }
  .bornes { grid-template-columns: 1fr; gap: 44px; }
  .road { display: none; }
  .borne__stone { margin-top: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .legend { top: 10px; padding-inline-start: 14px; }
  .hero__inner { padding-bottom: 40px; gap: 18px; }
  .hero__veil { background: linear-gradient(0deg, rgba(242, 243, 238, 0.97) 0%, rgba(242, 243, 238, 0.8) 55%, rgba(242, 243, 238, 0.3) 100%); }
  .cartouche { padding: 0; border: 0; background: none; }
  .hero .cartouche__core { background: none; border: 0; box-shadow: none; padding: 0; }
  .scale { display: none; }
  .instrument { width: 100%; }
  .instrument { padding: 14px 16px 12px; }
  .instrument__grid { margin-top: 12px; gap: 10px 16px; }
  .instrument__wide { padding-top: 10px; }
  .instrument__note { display: none; }
  .odo { font-size: 24px; }
  .also__list { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero__actions .btn--accent { justify-content: space-between; }
  .faq__list details p { padding-inline-end: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .legend, .instrument, .menu { backdrop-filter: none; background: var(--panel); }
}

/* ---------- Signature de la marque (section contact) ----------
   L'icône de l'application posée comme l'épingle « vous êtes ici » d'une carte : un léger
   battement de deux cercles d'encre, au rythme d'un boîtier qui envoie sa position. */
.contact__sceau { position: relative; width: 72px; height: 72px; margin-bottom: 22px; }
.contact__sceau img { position: relative; z-index: 1; display: block; width: 72px; height: 72px; border-radius: 17px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 6px 18px -6px rgba(17, 26, 39, .35); transform: rotate(-4deg); }
.contact__sceau::before, .contact__sceau::after { content: ''; position: absolute; inset: 0; border-radius: 17px;
  border: 1.5px solid var(--line-2); transform: rotate(-4deg); animation: sceau-onde 3.2s var(--ease-out) infinite; }
.contact__sceau::after { animation-delay: 1.6s; }
@keyframes sceau-onde { from { transform: rotate(-4deg) scale(1); opacity: .9; } to { transform: rotate(-4deg) scale(1.55); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .contact__sceau::before, .contact__sceau::after { animation: none; opacity: 0; } }

/* ---------- 4 bis. Application mobile : trois téléphones ---------- */
.mobile { padding: clamp(72px, 9vw, 130px) 0; border-top: 1px solid var(--line); }
.mobile__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.mobile__title { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -0.03em; }
.mobile__lead { margin-top: 18px; color: var(--text-2); max-width: 44ch; }
.stores { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stores li { display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 14px; padding-inline: 14px 18px; border-radius: 12px; background: var(--text); color: var(--paper); }
.stores i { font-size: 28px; }
.stores span { display: grid; font-weight: 800; font-size: 17px; line-height: 1.1; }
.stores small { font-weight: 500; font-size: 11.5px; opacity: 0.75; }
.mobile__note { margin-top: 16px; color: var(--text-3); font-size: 14.5px; max-width: 44ch; }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); align-items: start; }
.phone { margin: 0; }
.phone--mid { margin-top: clamp(-40px, -3vw, -20px); transform: translateY(-28px); }
.js .phone--mid.reveal.is-in { transform: translateY(-28px); }
.phone__frame { padding: 7px; border-radius: 30px; background: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 24px 44px -28px rgba(17, 26, 39, 0.55); }
.phone__frame img { width: 100%; height: auto; border-radius: 23px; background: #fff; }
.phone figcaption { margin-top: 14px; color: var(--text-2); font-size: 14.5px; line-height: 1.45; }
.phone figcaption b { display: block; color: var(--text); font-weight: 700; }
@media (max-width: 860px) {
  .mobile__grid { grid-template-columns: 1fr; }
  .phone--mid, .js .phone--mid.reveal.is-in { margin-top: 0; transform: none; }
}
@media (max-width: 640px) {
  /* téléphone : les trois écrans défilent de côté */
  .phones { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 62%; scroll-snap-align: center; }
}

/* ---------- Changement de langue (français / arabe) ---------- */
.legend__lang { display: inline-flex; align-items: center; height: 42px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2);
  font-size: 14.5px; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; transition: border-color 0.3s var(--ease-out); }
.legend__lang:hover { border-color: var(--sand); }
.legend__lang { gap: 7px; }
.legend__lang i { font-size: 17px; color: var(--sand); }
.legend__lang[lang="ar"] { font-family: "Cairo", var(--font); }
.legend__lang[lang="fr"] { font-family: "Overpass", system-ui, sans-serif; }

/* ---------- Contact : choix du moyen (WhatsApp ou e-mail) ---------- */
.toggle--mode { display: grid; grid-template-columns: 1fr 1fr; }
.toggle--mode button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px; }
.toggle--mode i { font-size: 19px; }
.form__mode-lbl { font-size: 14px; font-weight: 700; margin-bottom: -8px; }
.form [hidden] { display: none !important; }
[data-cfg="whatsappLabel"], [data-cfg="email"], .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- Pages légales (mentions.html, mentions-ar.html) ---------- */
.legal { position: relative; z-index: 1; padding: clamp(120px, 14vw, 168px) 0 clamp(72px, 9vw, 120px); }
.legal__wrap { max-width: 780px; margin-inline: auto; padding-inline: var(--gutter); }
.legal h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 900; letter-spacing: -0.035em; }
.legal__lead { margin-top: 18px; color: var(--text-2); font-size: 18px; }
.legal__toc { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.legal__toc a { display: inline-flex; padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 14.5px; font-weight: 700; text-decoration: none; transition: border-color 0.3s var(--ease-out); }
.legal__toc a:hover { border-color: var(--sand); }
.legal section { margin-top: clamp(48px, 6vw, 72px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.legal h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; }
.legal h3 { margin-top: 28px; font-size: 19px; letter-spacing: -0.01em; }
.legal section p, .legal section ul { margin-top: 12px; color: var(--text-2); max-width: 68ch; }
.legal section ul { padding-inline-start: 22px; display: grid; gap: 6px; margin-bottom: 0; }
.legal section a { color: var(--accent-text); }
.legal__date { margin-top: 40px; font-size: 13.5px; color: var(--text-3); }

/* ---------- Arabe : écriture de droite à gauche (ar.html, mentions-ar.html) ---------- */
html[dir="rtl"] {
  --font: "Overpass", "Cairo", system-ui, sans-serif;  /* Overpass n'a pas de lettres arabes : le latin (marque, sigles) reste en Overpass, l'arabe passe en Cairo */
  --mono: "Overpass Mono", "Cairo", ui-monospace, monospace;
}
/* l'interlettrage casse les liaisons entre les lettres arabes */
html[dir="rtl"] * { letter-spacing: 0 !important; }
html[dir="rtl"] body { line-height: 1.8; }
html[dir="rtl"] :is(h1, h2, h3) { line-height: 1.35; }
html[dir="rtl"] .hero__title { line-height: 1.3; font-weight: 800; }
html[dir="rtl"] .hero__title .line-mask { padding-block: 0.2em; margin-block: -0.2em; }
html[dir="rtl"] :is(.contact__title, .journey__claim) { line-height: 1.3; }
html[dir="rtl"] .btn { line-height: 1.4; }
/* le texte est à droite : le voile du héros et le sens des flèches suivent */
html[dir="rtl"] .hero__veil {
  background:
    linear-gradient(270deg, rgba(242, 243, 238, 0.9) 0%, rgba(242, 243, 238, 0.5) 38%, rgba(242, 243, 238, 0) 65%),
    linear-gradient(0deg, var(--paper) 0%, rgba(242, 243, 238, 0) 22%),
    linear-gradient(180deg, rgba(242, 243, 238, 0.7) 0%, rgba(242, 243, 238, 0) 18%);
}
html[dir="rtl"] .btn__nib .ph-arrow-up-right { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .btn__nib { transform: translate(-2px, -2px) scale(1.06); }
html[dir="rtl"] .road__line { transform-origin: right; }
/* la carte, l'échelle et les mesures restent de gauche à droite */
html[dir="rtl"] :is(.hero__map, .scale, .feed__clock, .plan__num, .stops time) { direction: ltr; }
html[dir="rtl"] .scale { justify-content: end; }
/* les écrans du trajet sont minuscules : l'arabe a besoin d'un peu plus de corps */
html[dir="rtl"] :is(.hud__head, .hud__alert, .hud__grid dt, .hud__speed small) { font-size: 10.5px; }
html[dir="rtl"] .hud__title span { direction: ltr; text-align: right; }
html[dir="rtl"] .feed__bar { font-size: 12.5px; }
@media (max-width: 640px) {
  html[dir="rtl"] .hero__veil { background: linear-gradient(0deg, rgba(242, 243, 238, 0.97) 0%, rgba(242, 243, 238, 0.8) 55%, rgba(242, 243, 238, 0.3) 100%); }
}
html[dir="rtl"] .field :is(input[type="tel"], input[type="email"], input[type="number"]) { direction: ltr; text-align: right; }
