/* Objectif Forclaz · design system
   Direction validée : Nothing OS sur bleu nuit. Chiffres en matrice de points (Doto),
   filets fins, graduations, lime comme seul accent, verre uniquement pour les commandes flottantes. */

:root {
  --bg: #050b15;
  --bg2: #0a1628;
  --tx: #e4edf7;
  --mu: #8ea6c2;
  --mu2: #5d7593;
  --hl: rgba(228, 237, 247, .12);
  --hl2: rgba(228, 237, 247, .22);
  --acc: #c6ff6b;
  --acc-18: rgba(198, 255, 107, .18);
  --acc-25: rgba(198, 255, 107, .25);
  --red: #ff6b6b;
  --night: #1a2638;
  --glass: rgba(10, 22, 40, .55);
  --glass-b: rgba(228, 237, 247, .10);

  --fd: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, Impact, sans-serif;
  --fx: "Doto", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --fb: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --fm: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --gx: max(20px, calc(var(--sal) + 16px));
  --gxr: max(20px, calc(var(--sar) + 16px));
  --tabh: 56px;
  --tabgap: max(12px, var(--sab));
  --tabspace: calc(var(--tabh) + var(--tabgap) + 14px);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 200ms;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--tx);
  font-family: var(--fb); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body { position: fixed; inset: 0; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: var(--tx); text-decoration-color: var(--hl2); text-underline-offset: 3px; }
svg { display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 1.5px solid var(--acc); outline-offset: 2px; }
::selection { background: var(--acc); color: var(--bg); }

/* ---------- Typo primitives (mêmes noms que la planche) ---------- */
.k {
  font-family: var(--fm); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mu); font-weight: 400; line-height: 1.3;
}
.k--tx { color: var(--tx); }
.k--acc { color: var(--acc); }
.k--red { color: var(--red); }
.dx {
  font-family: var(--fx); font-weight: 900; line-height: .85;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.dx .u { font-family: var(--fm); font-size: 12px; color: var(--mu); font-weight: 400; letter-spacing: 0; }
.dx .dim { color: var(--mu); }
.hd { font-family: var(--fd); font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: .01em; }
.h1 { font-size: 46px; }
.h2 { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.mono { font-family: var(--fm); font-variant-numeric: tabular-nums; }
.muted { color: var(--mu); font-size: 13.5px; }
.rule { height: 1px; background: var(--hl); }
.acc { color: var(--acc); }
.red { color: var(--red); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); margin-right: 7px; vertical-align: 1px; flex: none; }
.dot--red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot--ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--acc); }
.dot--mu { background: var(--mu); box-shadow: none; }

/* allumage des chiffres en matrice quand ils changent */
.lit { animation: lit 260ms var(--ease); }
@keyframes lit {
  0% { opacity: .7; text-shadow: 0 0 0 transparent; }
  45% { opacity: 1; text-shadow: 0 0 14px rgba(198, 255, 107, .55); }
  100% { opacity: 1; text-shadow: 0 0 0 transparent; }
}

/* ---------- Graduations ---------- */
.ticksw { position: relative; }
.ticks {
  position: relative; height: 14px;
  --n: 50;
  background:
    repeating-linear-gradient(90deg, rgba(228, 237, 247, .35) 0 1px, transparent 1px calc(100% / var(--n)));
  -webkit-mask: linear-gradient(#000 0 7px, transparent 7px);
  mask: linear-gradient(#000 0 7px, transparent 7px);
}
.ticks--km::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(228, 237, 247, .7) 0 1px, transparent 1px calc(500% / var(--n)));
}
.ticksw .done { position: absolute; top: 0; left: 0; height: 7px; width: 0; background: linear-gradient(90deg, transparent, var(--acc-25)); transition: width 250ms var(--ease); }
.ticksw .cur { position: absolute; top: -3px; left: 0; width: 2px; height: 14px; margin-left: -1px; background: var(--acc); box-shadow: 0 0 10px var(--acc); transition: left 250ms var(--ease); }
.scale { display: flex; justify-content: space-between; font-family: var(--fm); font-size: 9.5px; color: var(--mu); margin-top: 4px; font-variant-numeric: tabular-nums; }
.scale--abs { position: relative; display: block; height: 14px; }
.scale--abs span { position: absolute; top: 0; white-space: nowrap; }

/* ---------- Readouts (chiffres séparés par des filets verticaux) ---------- */
.readouts { display: grid; grid-template-columns: repeat(4, 1fr); }
.readouts--3 { grid-template-columns: repeat(3, 1fr); }
.readouts > div { padding: 0 0 0 10px; border-left: 1px solid var(--hl); min-width: 0; }
.readouts > div:first-child { border-left: 0; padding-left: 0; }
.rv { font-family: var(--fm); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv small { font-size: 10px; color: var(--mu); font-weight: 400; }
.rv--wx { display: flex; align-items: center; gap: 5px; }
.rv--wx svg { width: 18px; height: 18px; flex: none; }
.rbig { font-size: 30px; margin-top: 7px; }
.rcap { font-family: var(--fm); font-size: 10px; color: var(--mu); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Layout global ---------- */
.maplayer { position: fixed; inset: 0; z-index: 0; background: var(--bg); visibility: hidden; }
body[data-tab="carte"] .maplayer, body[data-tab="route"] .maplayer { visibility: visible; }
.map { position: absolute; inset: 0; background: var(--bg); }
.map canvas { outline: none; }
.plan { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--bg); touch-action: none; }
.maplibregl-ctrl-attrib { font-family: var(--fm); font-size: 9px; background: rgba(5, 11, 21, .6) !important; color: var(--mu); }
.maplibregl-ctrl-attrib a { color: var(--mu); }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: var(--tabspace); }

.views { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.view {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
}
.view.is-active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s; }
.view--scroll { background: var(--bg); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.view--overlay.is-active { pointer-events: none; }
.view--overlay.is-active > * { pointer-events: auto; }
.view--overlay.is-active > .scrim { pointer-events: none; }

.col { padding: 0 var(--gxr) calc(var(--tabspace) + 24px) var(--gx); max-width: 640px; margin: 0 auto; }
.page { padding-top: calc(var(--sat) + 26px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 16px; border-bottom: 1px solid var(--hl); }

.scrim { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }

/* ---------- Glass : commandes flottantes uniquement ---------- */
.tabs, .gbtn, .sheet, .hud, .manual, .toast {
  background: var(--glass); border: 1px solid var(--glass-b);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
}

/* ---------- Barre d'onglets ---------- */
.tabs {
  position: fixed; z-index: 6;
  left: max(12px, var(--sal)); right: max(12px, var(--sar)); bottom: var(--tabgap);
  height: var(--tabh); border-radius: 20px;
  display: flex; justify-content: space-around; align-items: stretch;
  max-width: 520px; margin: 0 auto;
}
.tab {
  flex: 1; min-width: 44px;
  font-family: var(--fm); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mu);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: color 180ms var(--ease);
}
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease), filter 200ms; }
.tab span { display: block; max-height: 0; opacity: 0; overflow: hidden; line-height: 1; transition: max-height 200ms var(--ease), opacity 160ms; }
.tab.is-on { color: var(--acc); }
.tab.is-on svg { filter: drop-shadow(0 0 6px rgba(198, 255, 107, .55)); }
.tab.is-on span { max-height: 12px; opacity: 1; }
.tab:active svg { transform: scale(.9); }

/* ---------- Boutons ---------- */
.gbtn {
  min-width: 44px; height: 44px; border-radius: 13px; padding: 0 8px;
  display: grid; place-items: center;
  font-family: var(--fm); font-size: 9.5px; letter-spacing: .08em; color: var(--mu);
  transition: color 150ms, border-color 150ms, transform 150ms var(--ease);
}
.gbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gbtn:active { transform: scale(.94); }
.gbtn.is-on, .gbtn[aria-pressed="true"] { color: var(--acc); border-color: rgba(198, 255, 107, .45); }
.gbtn--acc { color: var(--acc); }
.gbtn--acc svg { fill: var(--acc); stroke: none; }
.gbtn--lg { width: 52px; height: 52px; border-radius: 15px; grid-auto-flow: row; gap: 3px; padding: 6px 0 5px; align-content: center; font-size: 8.5px; }
.gbtn--lg span { text-transform: uppercase; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--hl2); color: var(--tx);
  font-family: var(--fm); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  transition: border-color 150ms, color 150ms, background 150ms, transform 150ms var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:active { transform: scale(.98); background: rgba(228, 237, 247, .04); }
.btn--acc { border-color: rgba(198, 255, 107, .6); color: var(--acc); width: 100%; }
.btn--acc:active { background: rgba(198, 255, 107, .07); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

.txtbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--mu); }
.txtbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.txtbtn.is-busy svg { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- AVANT · le pli ---------- */
.fold { position: relative; height: 100%; min-height: 610px; max-height: 1100px; overflow: hidden; }
.fold__media {
  position: absolute; left: 0; right: 0; top: 0; height: 58%;
  background: var(--bg2) url("icons/hero.jpg") 62% 40% / cover no-repeat;
}
.fold__map { position: absolute; inset: 0; opacity: 0; }
.fold__map.is-live { opacity: 1; }
.fold__map .map { pointer-events: none; }
.fold__map .maplibregl-control-container { display: none; }
.scrim--ht { top: 0; height: 38%; background: linear-gradient(rgba(5, 11, 21, .96) 0%, rgba(5, 11, 21, .78) calc(var(--sat) + 40px), rgba(5, 11, 21, .35) 60%, transparent); }
.scrim--hb { top: 30%; height: 30%; background: linear-gradient(transparent, var(--bg) 92%); }
.fold__in { position: absolute; inset: 0; z-index: 2; padding: 0 var(--gxr) 0 var(--gx); pointer-events: none; }
.fold__in > * { pointer-events: auto; }
.fold__in > div:first-child { position: absolute; left: var(--gx); right: var(--gxr); top: calc(var(--sat) + 14px); }
.hero-title { font-size: clamp(48px, 14vw, 64px); margin-top: 6px; }
.hero-col { position: absolute; right: var(--gxr); top: 39%; text-align: right; }
.hero-col__v { font-size: 40px; color: var(--acc); margin-top: 3px; }
.cd { position: absolute; left: var(--gx); right: var(--gxr); top: 51%; }
.cd__v { font-size: clamp(50px, 15vw, 64px); margin-top: 7px; white-space: nowrap; }
.cd__v .dim { font-size: .52em; }
.cd__v .days { font-size: .52em; color: var(--acc); margin-right: .25em; }

.day { position: absolute; left: var(--gx); right: var(--gxr); top: 66%; }
.day__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.day__t { font-size: 14px; font-weight: 600; white-space: nowrap; }
.day__verdict { text-align: right; }
.day__bar { position: relative; height: 30px; margin-top: 8px; }
.day__bar i { position: absolute; top: 12px; height: 6px; transform-origin: left center; }
.day__bar .trk { left: 0; right: 0; border-radius: 3px; background: rgba(228, 237, 247, .08); }
.day__bar .ride { background: var(--acc); }
.day__bar .pause { background: repeating-linear-gradient(90deg, var(--acc) 0 3px, transparent 3px 6px); }
.day__bar .margin { background: var(--acc-18); }
.day__bar .over { background: var(--red); }
.day__bar .night { background: var(--night); border-radius: 0 3px 3px 0; }
.day__bar .first { border-radius: 3px 0 0 3px; }
.day__bar .sun { top: 4px; width: 1px; height: 22px; background: var(--tx); }
.day__bar .now { top: 2px; width: 2px; height: 26px; margin-left: -1px; background: var(--acc); box-shadow: 0 0 8px var(--acc); }
.day__bar.anim i:not(.trk):not(.sun):not(.now) { animation: grow 600ms var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.day__labels { position: relative; height: 30px; font-family: var(--fm); font-size: 10px; color: var(--mu); font-variant-numeric: tabular-nums; }
.day__labels span { position: absolute; top: 0; white-space: nowrap; line-height: 1.35; transition: left 200ms var(--ease); }
.day__labels b { color: var(--tx); font-weight: 600; }

.wxline { position: absolute; left: var(--gx); right: var(--gxr); top: 80.5%; display: flex; align-items: center; gap: 12px; min-height: 40px; }
.wxline svg { width: 30px; height: 30px; flex: none; }
.wxline__t { font-size: 13.5px; line-height: 1.35; }
.wxline__t b { font-weight: 600; }
.wxline__t span { color: var(--mu); }

/* ---------- AVANT · sous le pli ---------- */
.below { padding-top: 8px; }
.stats { padding: 18px 0 20px; border-top: 1px solid var(--hl); border-bottom: 1px solid var(--hl); }
.sec { padding: 26px 0 26px; border-bottom: 1px solid var(--hl); }
.sec--first { padding-top: 22px; }
.sec:last-of-type { border-bottom: 0; }
.sec__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; min-height: 30px; }

.ctl { margin-bottom: 22px; }
.ctl__top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.ctl__v { font-size: 30px; }
.ctl__v small { font-family: var(--fm); font-size: 11px; color: var(--mu); font-weight: 400; margin-left: 4px; }

.slider { position: relative; height: 34px; --p: 0; --n: 10; }
.slider__tk {
  position: absolute; left: 0; right: 0; top: 13px; height: 8px;
  background: repeating-linear-gradient(90deg, rgba(228, 237, 247, .3) 0 1px, transparent 1px calc(100% / var(--n)));
  pointer-events: none;
}
.slider__tk::after { content: ""; position: absolute; right: 0; top: 0; width: 1px; height: 8px; background: rgba(228, 237, 247, .3); }
.slider__fill { position: absolute; left: 0; top: 13px; height: 8px; width: calc(var(--p) * 100%); background: linear-gradient(90deg, transparent, var(--acc-25)); pointer-events: none; transition: width 120ms var(--ease); }
.slider input {
  -webkit-appearance: none; appearance: none; position: absolute; left: -11px; right: -11px; top: 0; width: calc(100% + 22px); height: 34px;
  margin: 0; background: transparent; cursor: pointer; touch-action: pan-y;
}
.slider input::-webkit-slider-runnable-track { height: 34px; background: transparent; }
.slider input::-moz-range-track { height: 34px; background: transparent; }
.slider input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 34px; border: 0; border-radius: 0;
  background: linear-gradient(var(--acc), var(--acc)) center 4px / 2px 26px no-repeat;
  filter: drop-shadow(0 0 5px var(--acc));
}
.slider input::-moz-range-thumb {
  width: 22px; height: 34px; border: 0; border-radius: 0; background: linear-gradient(var(--acc), var(--acc)) center 4px / 2px 26px no-repeat;
}
.keys { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--hl); }
.keys .ctl__v { font-size: clamp(20px, 6.2vw, 26px); margin-top: 7px; white-space: nowrap; }

/* Météo */
.pts { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--hl); margin-bottom: 16px; }
.pts button { position: relative; min-height: 40px; font-family: var(--fm); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); transition: color 150ms; white-space: nowrap; flex: none; }
.pts__e { color: var(--mu2); margin-left: 4px; }
.pts button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform 200ms var(--ease); }
.pts button[aria-selected="true"] { color: var(--tx); }
.pts button[aria-selected="true"]::after { transform: scaleX(1); }

.hourly { position: relative; overflow-x: auto; overflow-y: hidden; margin: 0 calc(var(--gxr) * -1) 0 calc(var(--gx) * -1); padding: 0 var(--gxr) 6px var(--gx); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hourly::-webkit-scrollbar { display: none; }
.hourly__in { position: relative; display: grid; min-width: 100%; padding-top: 30px; }
.hourly__in::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: var(--hl); }
.hourly__curve { width: 100%; height: 30px; margin-top: 12px; pointer-events: none; overflow: visible; }
.hr__w { font-family: var(--fm); font-size: 11px; color: var(--mu); margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hr__w small { font-size: 8.5px; letter-spacing: .06em; }
.hr__w.acc { color: var(--acc); }
.hourly__cap { margin-top: 10px; }
.hr { position: relative; font-family: var(--fm); font-size: 10px; color: var(--mu); padding-right: 6px; }
.hr::before { content: ""; position: absolute; top: -9px; left: 0; width: 1px; height: 6px; background: rgba(228, 237, 247, .4); }
.hr b { display: block; color: var(--tx); font-size: 15px; font-weight: 600; margin-top: 5px; }
.hr svg { width: 22px; height: 22px; margin: 7px 0 0 -1px; }
.hr .hr__sp { height: 40px; }
.hr .hr__x { display: block; margin-top: 2px; white-space: nowrap; }
.hr.is-you { color: var(--acc); }
.hr.is-you::before { background: var(--acc); height: 9px; top: -11px; box-shadow: 0 0 6px var(--acc); }
.hr.is-now::after { content: "maint."; position: absolute; top: -26px; left: -2px; font-size: 8.5px; letter-spacing: .1em; color: var(--acc); text-transform: uppercase; }
.src-line { margin-top: 14px; font-family: var(--fm); font-size: 9.5px; color: var(--mu); letter-spacing: .04em; }
.src-line a { color: var(--mu); }

/* moment « au-dessus des brumes » */
.brumes { position: relative; margin: -4px calc(var(--gxr) * -1) 20px calc(var(--gx) * -1); padding: 0 var(--gxr) 0 var(--gx); overflow: hidden; }
.brumes svg { width: 100%; height: 120px; overflow: visible; }
.brumes__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; }
.brumes__cap div { font-size: 13px; color: var(--mu); text-align: right; }
.fog { animation: drift 14s ease-in-out infinite alternate; }
.fog--2 { animation-duration: 19s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-10px); } to { transform: translateX(12px); } }
.sunpulse { animation: pulse 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: .7; transform: scale(1.25); } }

/* Check-list */
.checklist { margin-top: 12px; }
.checklist li { border-bottom: 1px solid var(--hl); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; align-items: center; gap: 14px; min-height: 48px; cursor: pointer; }
.checklist input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cb { width: 18px; height: 18px; flex: none; border: 1px solid var(--hl2); border-radius: 50%; display: grid; place-items: center; transition: border-color 150ms, background 150ms; }
.cb::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); transform: scale(0); transition: transform 180ms var(--ease); }
.checklist input:checked + .cb { border-color: rgba(198, 255, 107, .6); }
.checklist input:checked + .cb::after { transform: scale(1); }
.checklist input:checked ~ .cl__t { color: var(--mu); }
.checklist input:focus-visible + .cb { outline: 1.5px solid var(--acc); outline-offset: 2px; }
.cl__t { font-size: 14.5px; transition: color 150ms; }
.cl__n { margin-left: auto; font-family: var(--fm); font-size: 9.5px; color: var(--mu2); letter-spacing: .08em; text-transform: uppercase; }

/* Hors ligne */
#offText { margin-bottom: 16px; }
.off-prog { margin-bottom: 0; }
#offMeta { margin-bottom: 16px; }

.a2hs { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; color: var(--mu); font-size: 13px; }
.a2hs svg { width: 20px; height: 20px; fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.a2hs button { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.a2hs button svg { stroke: var(--mu); width: 16px; height: 16px; }

/* ---------- CARTE ---------- */
.scrim--mt { top: 0; height: calc(var(--sat) + 70px); background: linear-gradient(rgba(5, 11, 21, .75), transparent); }
.mapbtn { position: absolute; z-index: 3; right: max(12px, calc(var(--sar) + 8px)); top: calc(var(--sat) + 14px); display: flex; flex-direction: column; gap: 8px; }

.hud {
  position: absolute; z-index: 3; left: max(12px, var(--sal)); right: calc(max(12px, var(--sar)) + 60px); top: calc(var(--sat) + 14px);
  border-radius: 16px; padding: 12px 12px 12px 16px;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 0; align-items: center;
}
.hud > div { padding-left: 10px; border-left: 1px solid var(--hl); }
.hud > div:first-child { padding-left: 0; border-left: 0; }
.hud__v { font-size: 26px; margin-top: 6px; }
.hud__stop { width: 44px; height: 44px; margin-left: 8px; }
.hud__stop svg { fill: var(--acc); stroke: none; }

.sheet {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  border-radius: 26px 26px 0 0; border-bottom: 0; border-left: 0; border-right: 0;
  padding: 0 var(--gxr) var(--tabspace) var(--gx);
  background: rgba(5, 11, 21, .62);
  transform: translateY(var(--sy, 0px));
  transition: transform 260ms var(--ease);
  max-width: 760px; margin: 0 auto;
  touch-action: none;
}
.sheet.is-drag { transition: none; }
.sheet__grab { display: block; width: 100%; height: 26px; touch-action: none; cursor: grab; }
.sheet__grab i { display: block; width: 36px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .22); margin: 10px auto 12px; }
.sheet .readouts .dx { font-size: 30px; margin-top: 6px; }
.sheet__body { padding-top: 14px; transition: opacity 200ms var(--ease); }
.sheet:not(.is-open) .sheet__body { opacity: 0; pointer-events: none; }
.readline { display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; font-family: var(--fm); font-size: 11px; color: var(--mu); min-height: 18px; font-variant-numeric: tabular-nums; }
.readline b { color: var(--tx); font-weight: 600; font-size: 13px; }
.readline .acc { color: var(--acc); }
.profile { position: relative; margin-top: 8px; height: 128px; touch-action: none; cursor: crosshair; }
.profile svg { width: 100%; height: 100%; overflow: visible; }

/* ---------- EN ROUTE · écran de bord ---------- */
.scrim--ct { top: 0; height: 44%; background: linear-gradient(rgba(5, 11, 21, .97) 0%, rgba(5, 11, 21, .82) 50%, rgba(5, 11, 21, .35) 80%, transparent); }
.scrim--cb { bottom: 0; height: 33%; background: linear-gradient(transparent, rgba(5, 11, 21, .9) 40%); }
.ck-top { position: absolute; z-index: 2; left: var(--gx); right: var(--gxr); top: calc(var(--sat) + 14px); pointer-events: none; }
.ck-row { display: flex; justify-content: space-between; gap: 12px; }
.ck-remain { font-size: clamp(72px, 22vw, 104px); margin-top: 6px; }
.ck-ruler { margin-top: 14px; }
.ck-next { margin-top: 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ck-next__l { min-width: 0; }
.ck-next__name { font-size: 27px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-next__r { text-align: right; flex: none; }
.ck-next__d { font-size: 32px; color: var(--acc); }
.ck-next__r .k { margin-top: 5px; }

.ck-side { position: absolute; z-index: 3; right: max(12px, calc(var(--sar) + 8px)); top: 57%; display: flex; flex-direction: column; gap: 8px; }

.ck-bot { position: absolute; z-index: 2; left: var(--gx); right: var(--gxr); bottom: calc(var(--tabspace) + 6px); pointer-events: none; }
.ck-bot .rule { margin: 12px 0; }
.ck-status { font-family: var(--fm); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); margin-bottom: 14px; display: flex; align-items: center; min-height: 14px; }
.ck-alert { display: flex; align-items: center; gap: 2px; font-family: var(--fm); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: -4px 0 14px; }
.ck-alert.is-acc { color: var(--acc); }

.manual {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; max-height: 72%;
  border-radius: 26px 26px 0 0; border-bottom: 0; border-left: 0; border-right: 0;
  padding: 0 var(--gxr) var(--tabspace) var(--gx);
  background: rgba(5, 11, 21, .78);
  display: flex; flex-direction: column;
  animation: up 240ms var(--ease);
  max-width: 760px; margin: 0 auto;
}
@keyframes up { from { transform: translateY(30%); opacity: 0; } to { transform: none; opacity: 1; } }
.manual .sec__head { margin-bottom: 6px; }
.manual__list { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.manual__list button { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--hl); text-align: left; }
.manual__list button:last-child { border-bottom: 0; }
.manual__list .mk { width: 54px; font-family: var(--fm); font-size: 11px; color: var(--mu); flex: none; font-variant-numeric: tabular-nums; }
.manual__list .mn { font-size: 14.5px; flex: 1; min-width: 0; }
.manual__list .mt { font-family: var(--fm); font-size: 11px; color: var(--mu); }
.manual__list button.is-cur .mn, .manual__list button.is-cur .mk { color: var(--acc); }

/* ---------- ÉTAPES ---------- */
.timeline { position: relative; margin-top: 4px; }
.tl { position: relative; display: grid; grid-template-columns: 58px 18px 1fr; column-gap: 10px; }
.tl__time { padding-top: 15px; text-align: right; }
.tl__time .dx { font-size: 21px; }
.tl__time .k { margin-top: 5px; }
.tl__rail { position: relative; }
.tl__rail::before { content: ""; position: absolute; left: 8.5px; top: 0; bottom: 0; width: 1px; background: var(--hl2); }
.tl:first-child .tl__rail::before { top: 22px; }
.tl:last-child .tl__rail::before { bottom: calc(100% - 22px); }
.tl__rail i { position: absolute; left: 4px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--mu); }
.tl--stop .tl__rail i, .tl--start .tl__rail i, .tl--end .tl__rail i { box-shadow: inset 0 0 0 1.5px var(--acc); }
.tl--col .tl__rail i { left: 2px; top: 16px; width: 14px; height: 14px; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.tl--danger .tl__rail i { box-shadow: inset 0 0 0 1.5px var(--red); }
.tl.is-past { opacity: .5; }
.tl.is-past .tl__rail i { background: var(--mu); box-shadow: none; }
.tl.is-next .tl__rail i { animation: beacon 1.8s ease-out infinite; }
@keyframes beacon { 0% { box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 0 rgba(198, 255, 107, .5); } 100% { box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 10px rgba(198, 255, 107, 0); } }
.tl__main { padding: 12px 0 16px; border-bottom: 1px solid var(--hl); min-width: 0; }
.tl__btn { display: block; width: 100%; text-align: left; min-height: 44px; }
.tl__name { font-size: 16.5px; font-weight: 600; line-height: 1.25; }
.tl--col .tl__name { font-family: var(--fd); font-weight: 900; text-transform: uppercase; font-size: 26px; letter-spacing: .01em; line-height: 1; color: var(--acc); }
.tl__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-family: var(--fm); font-size: 10.5px; color: var(--mu); font-variant-numeric: tabular-nums; }
.tl__meta .acc { color: var(--acc); }
.tl__meta .red { color: var(--red); }
.tl__note { margin-top: 7px; font-size: 13.5px; color: var(--mu); }
.tl__wx { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-family: var(--fm); font-size: 11px; color: var(--tx); }
.tl__wx svg { width: 18px; height: 18px; flex: none; }
.tl__wx span { color: var(--mu); }
.tl__links { display: none; gap: 16px; margin-top: 6px; }
.tl.is-open .tl__links { display: flex; }
.tl__links .tl__map { font-family: var(--fm); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.tl__links .tl__map::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tl__links a { font-family: var(--fm); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.tl__links a::before { content: ""; width: 5px; height: 5px; border: 1px solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.seg-row { display: grid; grid-template-columns: 58px 18px 1fr; column-gap: 10px; }
.seg-row .tl__rail::before { background: var(--acc); width: 2px; left: 8px; box-shadow: 0 0 6px rgba(198, 255, 107, .4); }
.seg-row--detour .tl__rail::before, .seg-row--danger .tl__rail::before { background: repeating-linear-gradient(var(--red) 0 4px, transparent 4px 8px); box-shadow: none; }
.seg-row--descent .tl__rail::before { background: repeating-linear-gradient(var(--acc) 0 4px, transparent 4px 7px); box-shadow: none; }
.seg-row__t { padding: 10px 0; border-bottom: 1px solid var(--hl); font-family: var(--fm); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); display: flex; gap: 10px; flex-wrap: wrap; }
.seg-row__t b { color: var(--tx); font-weight: 600; }
.seg-row--detour .seg-row__t b, .seg-row--danger .seg-row__t b { color: var(--red); }

/* ---------- PLUS ---------- */
.sos { display: grid; grid-template-columns: repeat(3, 1fr); }
.sos a { display: block; text-decoration: none; padding: 4px 0 6px 14px; border-left: 1px solid var(--hl); min-height: 84px; }
.sos a:first-child { padding-left: 0; border-left: 0; }
.sos .dx { font-size: 50px; color: var(--tx); display: block; -webkit-user-select: text; user-select: text; }
.sos a:first-child .dx { color: var(--red); }
.sos .k { display: block; margin-top: 10px; }
.sos a:active .dx { color: var(--acc); }
.posline { margin-top: 12px; font-family: var(--fm); font-size: 11px; color: var(--mu); -webkit-user-select: text; user-select: text; word-break: break-all; min-height: 16px; }
.lines li { padding: 13px 0; border-bottom: 1px solid var(--hl); font-size: 14.5px; display: flex; gap: 12px; align-items: baseline; }
.lines li:first-child { padding-top: 0; }
.lines li:last-child { border-bottom: 0; }
.lines .k { flex: none; width: 84px; }
.lines--src li { font-size: 13.5px; color: var(--mu); }
.lines--src a { color: var(--tx); }
.audit-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--hl); align-items: baseline; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .dot { margin: 0; }
.audit-row__l { font-size: 14px; }
.audit-row__v { font-family: var(--fm); font-size: 12px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.audit-row__r { grid-column: 2 / 4; font-size: 12.5px; color: var(--mu); }
.audit-txt { font-size: 13px; color: var(--mu); margin-top: 14px; }
.audit-txt .k { display: block; margin-bottom: 4px; }
.audit-lim { margin-top: 14px; }
.audit-lim li { font-size: 12.5px; color: var(--mu); padding: 5px 0 5px 14px; position: relative; }
.audit-lim li::before { content: ""; position: absolute; left: 0; top: 12px; width: 6px; height: 1px; background: var(--mu); }
.version { padding: 22px 0 8px; text-align: left; color: var(--mu2); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 9; left: max(12px, var(--sal)); right: max(12px, var(--sar)); top: calc(var(--sat) + 10px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 520px; margin: 0 auto; }
.toast {
  pointer-events: auto; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  background: rgba(5, 11, 21, .82);
  animation: tin 220ms var(--ease);
}
.toast.is-out { animation: tout 200ms var(--ease) forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(-10px); } }
.toast__t { flex: 1; min-width: 0; }
.toast__t b { display: block; font-family: var(--fd); font-weight: 900; text-transform: uppercase; font-size: 20px; line-height: 1; letter-spacing: .02em; }
.toast__t span { display: block; font-size: 13px; color: var(--mu); margin-top: 4px; }
.toast--alert { border-color: rgba(255, 107, 107, .55); }
.toast--alert b { color: var(--red); }
.toast--acc { border-color: rgba(198, 255, 107, .5); }
.toast--acc b { color: var(--acc); }
.toast button { font-family: var(--fm); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); min-height: 40px; padding: 0 6px; flex: none; }

/* ---------- Petits écrans / paysage ---------- */
@media (max-height: 700px) {
  .ck-remain { font-size: 84px; }
  .ck-next { margin-top: 12px; }
  .ck-next__name { font-size: 22px; }
  .ck-side { top: 54%; }
  .ck-side .gbtn--lg { width: 46px; height: 46px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .scrim--ct { width: 58%; height: 100%; background: linear-gradient(90deg, var(--bg) 0%, rgba(5, 11, 21, .85) 60%, transparent); }
  .scrim--cb { height: 42%; }
  .ck-top { right: 50%; }
  .ck-remain { font-size: 76px; }
  .ck-side { top: calc(var(--sat) + 14px); }
  .ck-bot { left: 50%; bottom: calc(var(--tabspace)); }
  .ck-bot .rule { margin: 8px 0; }
  .fold { height: auto; min-height: 640px; }
}
@media (min-width: 700px) {
  .fold__in > div:first-child, .cd, .day, .wxline { max-width: 600px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .fog, .sunpulse, .tl.is-next .tl__rail i { animation: none !important; }
}

/* easter egg : le couple d'étoiles */
.stars{position:absolute;width:44px;height:29px;pointer-events:none;z-index:60;filter:drop-shadow(0 0 6px rgba(244,240,224,.75));will-change:transform,opacity}
.stars svg{display:block;width:100%;height:100%;fill:#f4f0e0}
.stars--twinkle{animation:st-tw 4.2s ease-in-out forwards}
.stars--rise{position:fixed;animation:st-rise 1.7s cubic-bezier(.2,.7,.2,1) forwards}
.stars--pop{position:fixed;animation:st-pop 3.2s ease-out forwards}
.stars--fall{position:fixed;animation:st-fall 2.6s ease-in forwards}
.stars--map{position:relative;width:46px;height:30px;filter:drop-shadow(0 0 5px rgba(255,250,230,.95)) drop-shadow(0 0 14px rgba(244,240,224,.6));animation:st-loop 3.2s ease-in-out infinite}
.stars--rm{animation:st-fade 2s ease forwards!important}
.stars--map.stars--rm{animation:none!important;opacity:1}
@keyframes st-tw{0%{opacity:0;transform:scale(.6) rotate(-8deg)}18%{opacity:1;transform:scale(1) rotate(0)}40%{opacity:.55}55%{opacity:1}75%{opacity:.7}100%{opacity:0;transform:scale(.9) rotate(4deg)}}
@keyframes st-rise{0%{opacity:0;transform:translateY(10px) scale(.5)}20%{opacity:1;transform:translateY(-6px) scale(1.05)}100%{opacity:0;transform:translateY(-70px) scale(.9) rotate(12deg)}}
@keyframes st-pop{0%{opacity:0;transform:scale(.3) rotate(-20deg)}25%{opacity:1;transform:scale(1.15) rotate(0)}45%{transform:scale(1)}80%{opacity:1}100%{opacity:0;transform:translateY(-30px) scale(.95)}}
@keyframes st-fall{0%{opacity:0;transform:translateY(0) rotate(0)}15%{opacity:1}100%{opacity:0;transform:translateY(70vh) rotate(160deg)}}
@keyframes st-loop{0%,100%{opacity:.7;transform:scale(.94)}50%{opacity:1;transform:scale(1.08)}}
@keyframes st-fade{0%{opacity:0}30%{opacity:1}100%{opacity:0}}

body[data-tab="avant"] .stars--map { display: none !important; }

/* intro : le couple d'étoiles à l'ouverture (sans texte) */
#splash{position:fixed;inset:0;z-index:100;background:radial-gradient(130% 90% at 50% 45%,#0b1a31 0%,#050b15 60%,#03070e 100%);display:flex;align-items:center;justify-content:center;overflow:hidden;transition:opacity 600ms ease,visibility 0s linear 600ms;animation:sp-safety 500ms ease 4.5s forwards}
#splash.out{opacity:0;visibility:hidden}
.splash__halo{position:absolute;left:50%;top:50%;width:520px;height:520px;margin:-260px 0 0 -260px;border-radius:50%;background:radial-gradient(circle,rgba(255,248,225,.26) 0%,rgba(198,220,255,.10) 30%,rgba(5,11,21,0) 62%);opacity:0;transform:scale(.2);animation:sp-halo 1900ms cubic-bezier(.2,.8,.2,1) 80ms both}
.splash__stars{position:relative;width:150px;height:98px;overflow:visible;filter:drop-shadow(0 0 10px rgba(255,250,230,.8)) drop-shadow(0 0 30px rgba(244,240,224,.35));animation:sp-lift 900ms cubic-bezier(.4,0,.2,1) 1250ms both}
.splash__stars path{fill:#f6f2e3;transform-box:fill-box;transform-origin:center}
.splash__stars .s1{animation:sp-born 900ms cubic-bezier(.2,1.35,.35,1) 150ms both, sp-flash 520ms ease-in-out 1150ms 1}
.splash__stars .s2{animation:sp-orbit 1050ms cubic-bezier(.3,.9,.25,1) 380ms both, sp-flash 520ms ease-in-out 1230ms 1}
.splash__sp{position:absolute;left:50%;top:50%;width:0;height:0}
.splash__sp i{position:absolute;width:3px;height:3px;border-radius:50%;background:#fffbe9;box-shadow:0 0 6px 1px rgba(255,250,230,.8);opacity:0;animation:sp-twk 1100ms ease-in-out both}
.splash__sp i:nth-child(1){left:-92px;top:-54px;animation-delay:420ms}
.splash__sp i:nth-child(2){left:86px;top:-70px;animation-delay:560ms;width:2px;height:2px}
.splash__sp i:nth-child(3){left:110px;top:30px;animation-delay:700ms}
.splash__sp i:nth-child(4){left:-118px;top:42px;animation-delay:820ms;width:2px;height:2px}
.splash__sp i:nth-child(5){left:-30px;top:-96px;animation-delay:930ms;width:2px;height:2px}
.splash__sp i:nth-child(6){left:40px;top:78px;animation-delay:1040ms}
@keyframes sp-halo{0%{opacity:0;transform:scale(.2)}45%{opacity:1}100%{opacity:.85;transform:scale(1.15)}}
@keyframes sp-born{0%{opacity:0;transform:scale(0) rotate(-150deg)}60%{opacity:1}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes sp-orbit{0%{opacity:0;transform:translate(-62px,-40px) scale(0) rotate(-200deg)}35%{opacity:1;transform:translate(-30px,-58px) scale(.9) rotate(-120deg)}70%{transform:translate(18px,-26px) scale(1.08) rotate(-30deg)}100%{opacity:1;transform:translate(0,0) scale(1) rotate(0)}}
@keyframes sp-flash{0%,100%{filter:none}45%{filter:brightness(1.6)}}
@keyframes sp-lift{from{transform:none}to{transform:translateY(-14px) scale(1.04)}}
@keyframes sp-twk{0%{opacity:0;transform:scale(.2)}40%{opacity:1;transform:scale(1.4)}100%{opacity:0;transform:scale(.6)}}
@media (prefers-reduced-motion: reduce){.splash__stars,.splash__stars path,.splash__halo,.splash__sp i{animation:none!important}.splash__halo{opacity:.8;transform:none}}
@keyframes sp-safety{to{opacity:0;visibility:hidden}}

/* iOS mode app : pleine hauteur réelle (le transform rend les éléments fixes relatifs au body) */
/* iOS 26, app écran d'accueil (WebKit 301108) : la vue est raccourcie de la hauteur de la barre d'état
   et WebKit arrête de dessiner le contenu fixe à ce bord. Une page au moins aussi haute que l'écran rend la vue entière. */
html.standalone { min-height: min(100lvh, calc(100% + env(safe-area-inset-top, 0px))); }
@supports not (height: 100lvh) { html.standalone { min-height: calc(100% + env(safe-area-inset-top, 0px)); } }

/* arrêts réels (trace GPS) */
.ck-pause { margin-left: 10px; color: var(--acc); }
.tl--halt .tl__rail i { background: var(--acc); box-shadow: 0 0 8px var(--acc); border-color: var(--acc); }
.tl--halt .tl__name { font-size: 15px; color: var(--acc); }

/* Duo */
.duo__row { display: flex; gap: 10px; margin-top: 12px; }
.duo__who { flex: 1; min-height: 64px; border: 1px solid var(--hl2); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-family: var(--fm); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); }
.duo__who svg { width: 22px; height: 22px; fill: #fffbe9; opacity: .55; }
.duo__who.is-on { border-color: rgba(198, 255, 107, .6); color: var(--acc); }
.duo__who.is-on svg { opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 250, 230, .9)); }
.duo__code { flex: 1; min-width: 0; min-height: 48px; border-radius: 12px; border: 1px solid var(--hl2); background: transparent; color: var(--tx); font-family: var(--fm); font-size: 14px; padding: 0 14px; }
.duo__code:focus { outline: none; border-color: var(--acc); }
.duo__go { width: auto; flex: none; }
.duo__st { margin-top: 10px; font-size: 13px; }

/* Récompense : survol puis carte souvenir */
.rw { position: fixed; inset: 0; z-index: 60; background: #03070e; opacity: 0; transition: opacity 350ms var(--ease); }
.rw.is-in { opacity: 1; }
.rw-mapbox { position: absolute; inset: 0; }
.rw-mapbox .map { position: absolute; inset: 0; }
.rw-mapbox .maplibregl-control-container { display: none; }
.rw-scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(3, 7, 14, .75), transparent 22%, transparent 70%, rgba(3, 7, 14, .85)); transition: background 600ms; }
.rw.is-card .rw-scrim { background: rgba(3, 7, 14, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rw-cap { position: absolute; left: var(--gx); top: calc(var(--sat) + 18px); color: var(--acc); }
.rw-x { position: absolute; right: var(--gxr); top: calc(var(--sat) + 10px); z-index: 3; }
.rw-skip { position: absolute; right: var(--gxr); bottom: calc(var(--sab) + 18px); z-index: 3; color: var(--mu); }
.rw-stage { position: absolute; inset: 0; display: grid; place-items: center; perspective: 900px; pointer-events: none; padding: calc(var(--sat) + 56px) 20px calc(var(--sab) + 24px); }
.rw-stage > * { pointer-events: auto; }
.rw-card { --rx: 0deg; --ry: 0deg; --hx: 50%; --hy: 50%; position: relative; width: min(340px, 86vw); aspect-ratio: 5 / 7.4; border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 80% at 70% 0%, #14305a 0%, #0a1830 45%, #050b15 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(228, 237, 247, .14), inset 0 0 0 1px rgba(255, 255, 255, .05);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; animation: rw-in 900ms cubic-bezier(.2, .9, .2, 1) both; }
@keyframes rw-in { from { opacity: 0; transform: translateY(40px) rotateX(18deg) scale(.92); } to { opacity: 1; } }
.rw-card::before { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 78% 18%, transparent 0 13px, rgba(120, 160, 210, .09) 13px 14px); pointer-events: none; }
.rw-holo { position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  background: radial-gradient(40% 30% at var(--hx) var(--hy), rgba(255, 255, 255, .35), transparent 70%),
    conic-gradient(from 210deg at var(--hx) var(--hy), rgba(198, 255, 107, .0), rgba(198, 255, 107, .22), rgba(143, 211, 255, .25), rgba(255, 170, 230, .18), rgba(198, 255, 107, .0)); }
.rw-in { position: relative; height: 100%; display: flex; flex-direction: column; padding: 18px 18px 16px; }
.rw-top { display: flex; justify-content: space-between; }
.rw-title { font-size: 44px; line-height: .9; margin-top: 10px; }
.rw-map { flex: 1; width: 100%; min-height: 0; margin: 4px 0 6px; overflow: visible; }
.rw-lake { fill: rgba(40, 80, 130, .28); stroke: rgba(143, 211, 255, .35); stroke-width: .8; }
.rw-glow { fill: none; stroke: var(--acc); stroke-width: 7; stroke-opacity: .18; stroke-linecap: round; stroke-linejoin: round; filter: blur(3px); }
.rw-line { fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: rw-draw 2600ms cubic-bezier(.5, 0, .2, 1) 400ms forwards; filter: drop-shadow(0 0 4px rgba(198, 255, 107, .7)); }
@keyframes rw-draw { to { stroke-dashoffset: 0; } }
.rw-stop { fill: #050b15; stroke: #fffbe9; stroke-width: 1.2; opacity: 0; animation: st-fade-in 400ms ease 2.6s forwards; }
.rw-col circle { fill: var(--acc); } .rw-col text { fill: var(--acc); font-family: var(--fm); font-size: 9px; letter-spacing: .08em; }
.rw-stars path { fill: #fffbe9; filter: drop-shadow(0 0 4px rgba(255, 250, 230, .9)); }
@keyframes st-fade-in { to { opacity: 1; } }
.rw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 10px; border-top: 1px solid rgba(228, 237, 247, .12); }
.rw-v { font-size: 30px; color: var(--tx); }
.rw-stats > div:first-child .rw-v { color: var(--acc); }
.rw-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-family: var(--fm); font-size: 10px; letter-spacing: .06em; color: var(--mu); }
@media (prefers-reduced-motion: reduce) { .rw-card { animation: none; } .rw-line { animation: none; stroke-dashoffset: 0; } .rw-stop { animation: none; opacity: 1; } }

/* au feeling + éco */
.feel { width: 100%; margin-top: 14px; }
.feel[aria-pressed="true"], #ecoBtn[aria-pressed="true"] { border-color: rgba(198, 255, 107, .6); color: var(--acc); }
#ecoBtn { width: 100%; }
#picnicCtl.is-off { opacity: .35; pointer-events: none; }
.ck-rec { margin-left: 10px; color: var(--red); }
.ck-rec::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 5px; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite; }

/* bouton Forme dans le cockpit */
.fitbar { display: flex; align-items: center; gap: 12px; width: calc(100% - 66px); min-height: 56px; margin-bottom: 12px; padding: 0 14px 0 16px; border-radius: 16px; border: 1px solid rgba(198, 255, 107, .6); background: rgba(198, 255, 107, .1); color: var(--acc); font-family: var(--fm); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: left; }
.fitbar[hidden] { display: none; }
.fitbar__ic { width: 12px; height: 12px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); flex: none; animation: pulse 1.6s ease-in-out infinite; }
.fitbar--stop { border-color: rgba(255, 107, 107, .6); background: rgba(255, 107, 107, .1); color: #ffb3b3; }
.fitbar--stop .fitbar__ic { border-radius: 2px; background: var(--red); box-shadow: 0 0 10px var(--red); }
.fitbar__t { flex: 1; }
.fitbar__x { font-size: 22px; line-height: 1; color: var(--mu); padding: 8px; margin-right: -6px; }
