/* ══ Itinéraire (É5) — planificateur Tracéo ═══════════════════════════════
   Mobile = flux unique, le détail d'un trajet est une page poussée plein
   écran. Desktop ≥ 900 px = maître-détail : composeur + billets à gauche,
   panneau détail collant (tracé schématique + timeline) à droite. */

@media (min-width: 900px) { #app.journey-wide { max-width: 1280px; } }

/* ── En-tête de page ─────────────────────────────────────────── */
.jr-pagehead {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--sp-2); margin-bottom: var(--sp-4);
}
.jr-pagehead__id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jr-pagehead__title {
  font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.025em;
  color: var(--ink); line-height: 1.05; margin: 0;
}
.jr-squig { display: block; }
.jr-pagehead__od {
  display: none; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2);
}
.jr-pagehead__od .arr2 { color: var(--traceo-red); font-weight: 800; }
.jr-pagehead__od .to { color: var(--ink); }
@media (min-width: 900px) {
  .jr-pagehead { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
  .jr-pagehead__title { font-size: var(--fs-h1); }
  .jr-pagehead__od { display: flex; }
}

/* ── Grille maître-détail ────────────────────────────────────── */
.jr-layout { display: flex; flex-direction: column; gap: var(--sp-4); }
.jr-plan { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
@media (min-width: 900px) {
  .jr-layout {
    display: grid; grid-template-columns: minmax(0, 456px) minmax(0, 1fr);
    gap: var(--sp-5); align-items: start;
  }
  /* Mode vélo : pas de panneau détail → une seule colonne (piste libérée) */
  #step-journey[data-jmode="velo"] .jr-layout { grid-template-columns: minmax(0, 1fr); }
  #step-journey[data-jmode="velo"] .jr-plan { max-width: 620px; }
}

/* Bascule transport ⇄ vélo */
#step-journey[data-jmode="velo"] .jr-transit { display: none; }
#step-journey[data-jmode="transit"] .jr-velo { display: none; }
#step-journey[data-jmode="velo"] .jr-side { display: none; }
.jr-transit, .jr-velo { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }

.t-label {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 2px;
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--ls-label); color: var(--ink-3);
}
.t-label .num { font-family: var(--font-mono); color: var(--ink); }

.jr-source {
  margin: 2px 0 0; padding: 0 8px; text-align: center;
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  color: var(--ink-faint); line-height: 1.5;
}

/* ── ① Composeur : le tracé rouge relie départ et arrivée ────── */
.jr-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.odpair { position: relative; display: flex; gap: 11px; }
.odcurve { width: 26px; height: 96px; flex-shrink: 0; display: block; }
.odflds { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.od {
  position: relative; height: 45px; padding: 0 46px 0 14px;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  border-radius: var(--r-sm); background: var(--surface-2);
  border: 1px solid transparent; cursor: text;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.od:hover { border-color: var(--border); }
.od:focus-within { border-color: color-mix(in srgb, var(--traceo-red) 45%, var(--border)); }
.od__k {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--ls-label); color: var(--ink-3); cursor: text;
}
.od--d .od__k { color: var(--traceo-red); }
.od__in {
  width: 100%; border: 0; background: transparent; padding: 0; outline: none;
  font-family: var(--font-ui); font-size: 15px; font-weight: 700; color: var(--ink);
  text-overflow: ellipsis;
}
.od__in::placeholder { color: var(--ink-faint); font-weight: 600; }
.od__geo {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: var(--r-xs);
  background: transparent; color: var(--info); font-size: 15px; cursor: pointer;
  display: grid; place-items: center;
}
.od__geo:hover { background: var(--surface-3); }
.jswap {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); cursor: pointer; box-shadow: var(--sh-2);
  display: grid; place-items: center;
  transition: transform var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.jswap:hover { color: var(--ink); }
.jswap:active { transform: translateY(-50%) rotate(180deg) scale(.9); }

.whenrow { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.jr-seg-when { flex: 1; }
.jr-seg-when > button { flex: 1; }
/* Puce heure compacte : bouton visible « 🗓️ HH:MM » + input natif transparent
   superposé (le vrai contrôle, ouvert via showPicker) — cf. maquette itineraire. */
.datechip-wrap { position: relative; flex: 0 1 auto; min-width: 0; }
.datechip {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  min-width: 0; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink-2);
  font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 700;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.datechip:hover { border-color: var(--border-strong); }
.datechip__ic { display: inline-flex; align-items: center; }
.datechip-native {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0;
  color-scheme: light; accent-color: var(--traceo-red);
}
:root[data-theme="dark"] .datechip-native { color-scheme: dark; }
.quickrow { display: flex; gap: 6px; flex-wrap: wrap; }
.quickrow .tr-chip {
  min-height: 34px; padding: 5px 12px; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: var(--fs-xs);
}

/* Autocomplétion (partagée : itinéraire, agenda) */
.ac-list { display: flex; flex-direction: column; gap: 4px; }
.ac-list:empty { display: none; }
.od .ac-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--sh-3); padding: 5px;
  max-height: 300px; overflow-y: auto;
}
.ac-item {
  padding: 8px 10px; border-radius: var(--r-xs); cursor: pointer;
  font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--border);
}
.ac-item:hover { background: var(--surface-2); border-color: var(--border-strong); }
/* Dans le menu déroulant du composeur : items sans bordure (le menu l'a déjà) */
.od .ac-item { border: 0; background: transparent; }
.od .ac-item:hover { background: var(--surface-2); }
.ac-name { font-weight: 600; color: var(--ink); }
.ac-lines { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; align-items: center; }
.ac-more { color: var(--ink-3); font-size: var(--fs-2xs); font-weight: 600; }

/* Sélecteur transport ⇄ vélo */
.modeswitch {
  display: flex; gap: 5px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
}
.modeswitch button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; border: 0; background: transparent; cursor: pointer;
  border-radius: var(--r-sm); font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 700; color: var(--ink-3);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.modeswitch button .ms-ic { font-size: 15px; line-height: 1; }
.modeswitch button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }
.modeswitch button.is-active[data-m="velo"] { color: var(--ok); }

/* ── ② Tri par intention — pastels ───────────────────────────── */
.sortrow { display: flex; gap: 7px; overflow-x: auto; padding: 2px; margin: -2px; scrollbar-width: none; }
.sortrow::-webkit-scrollbar { display: none; }
.sortrow .tr-chip { min-height: 40px; padding: 7px 14px; flex: 0 0 auto; font-weight: 700; }
.sortrow .tr-chip--soleil.is-active { background: var(--soleil-mieux); color: #5C4500; border-color: transparent; }
.sortrow .tr-chip--coral.is-active  { background: var(--coral-idf);  color: #4A1812; border-color: transparent; }
.sortrow .tr-chip--bleu.is-active   { background: var(--bleu-luf);   color: #10304F; border-color: transparent; }
.sortrow .tr-chip--vert.is-active   { background: var(--vert-omnibus); color: #0E3D26; border-color: transparent; }
@media (min-width: 900px) { .sortrow { flex-wrap: wrap; overflow: visible; } }

/* ── ③ Carte de trajet — le billet ───────────────────────────── */
#journey-results { display: flex; flex-direction: column; gap: var(--sp-4); }
.jrn {
  padding: 0; overflow: hidden; border-radius: var(--r-lg); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.jrn:hover { border-color: var(--border-strong); box-shadow: var(--sh-2); }
.jrn.is-sel { border-color: var(--traceo-red); box-shadow: 0 0 0 1px var(--traceo-red), var(--sh-2); }
.jrn--reco { border-color: color-mix(in srgb, var(--ok) 42%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 24%, transparent), var(--sh-2); }
.jrn--reco.is-sel { border-color: var(--traceo-red); box-shadow: 0 0 0 1px var(--traceo-red), var(--sh-2); }

.ribbon {
  display: flex; align-items: center; gap: 7px; padding: 8px 16px;
  background: var(--ok-wash); color: var(--ok);
  font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid color-mix(in srgb, var(--ok) 22%, transparent);
}
.ribbon i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
  animation: jr-pulse 2s ease-out infinite; }
.ribbon small { margin-left: auto; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: color-mix(in srgb, var(--ok) 70%, var(--ink)); }

.jrn__top { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); }
.jrn__head { display: flex; align-items: center; gap: var(--sp-2); }
.jrn__times {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1;
}
.jrn__times .arr { color: var(--ink-faint); margin: 0 3px; font-weight: 600; font-size: 20px; }
.stamp {
  margin-left: auto; flex-shrink: 0; padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--ok-wash); color: var(--ok);
  font-family: var(--font-mono); font-weight: 800; font-size: 15px;
  letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap;
}
.stamp--n { background: var(--surface-2); color: var(--ink-2); }
.jrn__chev { margin-left: 6px; flex-shrink: 0; color: var(--ink-faint); }
.jw { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }

/* Barre proportionnelle : durée au-dessus du tracé, badge + note en dessous */
.jbar { display: flex; gap: 3px; height: 12px; align-items: center; }
.jbar > span { border-radius: var(--r-pill); height: 12px; min-width: 8px; }
.jbar > .jbar__w { height: 4px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 3px, transparent 3px 8px); }
.jbar__times { display: flex; gap: 3px; align-items: flex-end; margin: 2px 0 5px; }
.jbar__ann { display: flex; gap: 3px; margin-top: 5px; align-items: center; min-height: 28px; }
/* Bar proportionnelle + total de marche : deux colonnes, jamais de chevauchement */
.jbar__wrap { display: flex; align-items: center; gap: 10px; }
.jbar__prop { flex: 1 1 auto; min-width: 0; }
.jann { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 8px; }
.jann__m { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.jann__ic { display: grid; place-items: center; height: 26px; font-size: 13px; }
.jann__ic--bike { font-size: 17px; }
.jann--w .jann__ic { color: var(--ink-faint); }
.jann--w .jann__m { color: var(--ink-faint); font-weight: 600; }
.jrn__walktot {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); white-space: nowrap;
}
.jrn__walktot .num { font-family: var(--font-mono); color: var(--ink-2); }
.jleg { position: relative; display: inline-flex; align-items: center; }
.jann .jleg .tr-line { min-width: 28px; height: 28px; font-size: 13px; box-shadow: none; }
.jleg__n { position: absolute; top: -7px; right: -9px; }
.jleg__n .tr-note { min-width: 16px; height: 16px; font-size: 9px; border: 1.5px solid var(--surface); }

.jrn__meta {
  display: flex; align-items: center; gap: 5px 12px; flex-wrap: wrap;
  padding: 0 var(--sp-4) var(--sp-3);
  font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600;
}
.jrn__meta--bare { padding: 0; }
.jrn__meta .m { display: inline-flex; align-items: center; gap: 4px; }
.jrn__meta .num { font-family: var(--font-mono); color: var(--ink-2); }
.jrn__meta .tr-note { min-width: 20px; height: 20px; font-size: 11px; }
.m--direct { color: var(--ok); font-weight: 800; background: var(--ok-wash); padding: 1px 7px; border-radius: var(--r-xs); }
.co2pct { font-family: var(--font-mono); font-weight: 800; color: var(--ok); background: var(--ok-wash);
  padding: 1px 7px; border-radius: var(--r-xs); }
/* Perforation de billet */
.perf { position: relative; height: 18px; display: flex; align-items: center; }
.perf i { flex: 1; border-top: 2px dashed var(--border-strong); margin: 0 18px; }
.perf::before, .perf::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--canvas); border: 1px solid var(--border);
}
.perf::before { left: -11px; }
.perf::after { right: -11px; }

/* Bandeau de passages / départs (pilules horaires) */
.passband { padding: 2px var(--sp-4) var(--sp-3); display: flex; flex-direction: column; gap: 7px; }
.passband__hd { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.passband__lbl {
  display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; flex: 1; overflow: hidden;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2);
}
.passband__lbl b { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.passband__pre { flex-shrink: 0; white-space: nowrap; }
.passband__go {
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  color: var(--ok); font-weight: 700; font-size: var(--fs-xs); white-space: nowrap;
}
.passrow { display: flex; align-items: flex-start; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 3px 0 5px; }
.passrow::-webkit-scrollbar { display: none; }
.pass {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 58px; padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); font-family: var(--font-mono);
}
.pass__t { font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.pass__k { font-size: 9px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase;
  letter-spacing: .05em; font-family: var(--font-ui); white-space: nowrap; }
.pass--prev { background: var(--surface-2); opacity: .72; }
.pass--prev .pass__t { color: var(--ink-3); }
.pass--reco { background: var(--ok); border-color: var(--ok); min-width: 78px; box-shadow: var(--sh-2); }
.pass--reco .pass__t { color: #fff; font-size: 16px; }
.pass--reco .pass__k { color: rgba(255, 255, 255, .88); }

/* ── Panneau détail (page poussée mobile / colonne collante desktop) ── */
.jr-side {
  position: fixed; inset: 0; z-index: 80; background: var(--canvas);
  transform: translateX(100%); visibility: hidden;
  transition: transform .32s var(--ease-out), visibility 0s linear .32s;
}
#step-journey.jr-open .jr-side {
  transform: none; visibility: visible;
  transition: transform .32s var(--ease-out);
}
.jr-detail { display: flex; flex-direction: column; height: 100%; background: var(--canvas); }
@media (min-width: 900px) {
  .jr-side { position: sticky; top: var(--sp-4); inset: auto; transform: none; visibility: visible;
    transition: none; background: transparent; z-index: auto; }
  .jr-detail {
    height: auto; max-height: calc(100vh - 96px);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--sh-2); overflow: hidden;
  }
}

.dt-hd {
  flex-shrink: 0; display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}
.dt-back {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  cursor: pointer; display: grid; place-items: center; box-shadow: var(--sh-1);
}
@media (min-width: 900px) { .dt-back { display: none; } }
.dt-hd__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dt-hd__title b { font-size: var(--fs-body); font-weight: 800; letter-spacing: -.02em;
  color: var(--ink); line-height: 1.1; }
.dt-hd__title small { font-size: var(--fs-2xs); font-weight: 700; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Bouton épingler (signet) à droite de l'en-tête (maquette) */
.dt-save {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  cursor: pointer; display: grid; place-items: center; box-shadow: var(--sh-1);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.dt-save:hover, .dt-save.is-on {
  color: var(--traceo-red); border-color: color-mix(in srgb, var(--traceo-red) 45%, var(--border));
}

.dt-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.dt-body .jr-source { padding: 0 var(--sp-4) var(--sp-4); }

/* Placeholder carto : la vraie cartographie du tracé n'est pas encore branchée
   (maquette) → carte hachurée + pastille centrée « carte », sans schéma trompeur. */
.dt-map {
  position: relative; height: 150px; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center;
  margin: var(--sp-3) var(--sp-3) 0; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface-2);
  background-image: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--border-strong) 30%, transparent) 0 2px, transparent 2px 13px);
}
.dt-map__lbl {
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .1em;
  color: var(--ink-3); background: var(--surface); padding: 8px 16px;
  border-radius: var(--r-pill); border: 1px solid var(--border); box-shadow: var(--sh-1);
}
@media (min-width: 900px) {
  .dt-map { height: 180px; margin: 0; border-radius: 0; border: 0;
    border-bottom: 1px solid var(--border); }
}

/* Carte résumé (maquette) : carte blanche sur canvas en mobile ; bandeau continu
   en desktop (le panneau détail est déjà une carte). */
.dt-sum {
  margin: var(--sp-3); padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.dt-sum .jrn__meta { padding: 0; }
/* Rappel départ → arrivée en tête de carte résumé */
.dt-od { display: flex; flex-direction: column; gap: 1px; }
.dt-od__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dt-od__from, .dt-od__to {
  font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; line-height: 1.25;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dt-od__arr { flex-shrink: 0; color: var(--traceo-red); font-weight: 800; font-size: 16px; }
@media (min-width: 900px) {
  .dt-sum { margin: 0; border: 0; border-radius: 0;
    border-bottom: 1px solid var(--border); box-shadow: none; }
}

.dt-foot {
  flex-shrink: 0; display: flex; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.dt-foot .tr-btn { flex: 1; }
@media (min-width: 900px) { #jr-detail-alt { display: none; } }

.dt-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); padding: var(--sp-6) var(--sp-5); text-align: center; min-height: 320px;
}
.dt-empty__ic { font-size: 34px; opacity: .8; }
.dt-empty h3 { margin: 0; font-size: var(--fs-body); font-weight: 800; color: var(--ink); }
.dt-empty p { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); max-width: 260px; line-height: var(--lh-snug); }

/* ── Timeline pas-à-pas ──────────────────────────────────────────
   ⚠️ Les classes tl-* et les data-* sont AUSSI consommés par le mode GO
   (clonage de la timeline) et le suivi de marche — ne pas les renommer. */
.tl { padding: var(--sp-4) var(--sp-4) var(--sp-2); }
.tl-row { display: flex; gap: 10px; align-items: flex-start; }
.tl-dot, .tl-rail, .tl-ico { flex: 0 0 16px; align-self: stretch; position: relative; }
.tl-node { padding: 4px 0; }
.tl-leg, .tl-walk { padding: 6px 0; }
.tl-ico { text-align: center; font-size: 14px; color: var(--ink-faint); }

.tl-dot::before {
  content: ""; position: absolute; left: 1px; top: 5px;
  width: 13px; height: 13px; border-radius: 50%;
  border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--ink-3); background: var(--surface);
}
.tl-dot-start::before { box-shadow: 0 0 0 2px var(--ok); }
.tl-dot-end::before { background: var(--traceo-red); box-shadow: 0 0 0 2px var(--traceo-red); }
.tl-dot-x::before { box-shadow: 0 0 0 2px var(--warn); }
.tl-rail::before {
  content: ""; position: absolute; left: 4px; top: -8px; bottom: -8px;
  width: 8px; border-radius: 4px; background: var(--lc, var(--ink-3));
}
.tl-walk .tl-body { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }

.tl-body { flex: 1; min-width: 0; font-size: var(--fs-sm); line-height: 1.5; }
.tl-stopline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tl-time { font-family: var(--font-mono); font-weight: 800; font-size: 15px;
  color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-stop { color: var(--ink); font-weight: 700; font-size: 15px; }
.tl-tag {
  font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid currentColor; color: var(--ok);
}
.tl-tag-end { color: var(--traceo-red); }
.tl-tag-x { color: var(--warn); }

.tl-leg-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tl-dir { font-weight: 700; color: var(--ink); }
.tl-dur { margin-left: auto; font-family: var(--font-mono); font-size: 15px; font-weight: 800;
  color: var(--ink); white-space: nowrap; }
.tl-rel { display: inline-flex; }
.tl-nb { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 700; }
.tl-stops > summary { color: var(--ok); font-size: var(--fs-xs); font-weight: 700; cursor: pointer; list-style: none; }
.tl-stops > summary::-webkit-details-marker { display: none; }
.tl-stops > summary::before { content: '▸ '; }
.tl-stops[open] > summary::before { content: '▾ '; }
.tl-stops ol { list-style: none; margin: 6px 0 2px; padding: 0; color: var(--ink-3); font-size: var(--fs-xs); }
.tl-stops li { display: flex; gap: 8px; margin: 3px 0; }
.tl-s-time { flex: 0 0 2.8rem; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Encart correspondance (descente → reprise) */
.tl-tf {
  margin-top: 6px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--warn-wash); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  color: var(--ink-2); font-size: var(--fs-sm); line-height: var(--lh-snug);
}
.tl-tf strong { color: var(--ink); font-family: var(--font-mono); font-weight: 800; }

/* Bandeau passages à l'arrêt (montée / correspondance) */
.tl-conn { margin-top: 8px; }
.tl-conn-load { color: var(--ink-3); font-size: var(--fs-xs); }
.tl-conn-list.passband {
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--ok-wash) 34%, var(--surface));
  padding: 9px 11px;
}
.tl-conn-th { flex-shrink: 0; font-family: var(--font-mono); font-size: var(--fs-2xs);
  font-weight: 700; color: var(--estime); white-space: nowrap; }
.tl-pass-x { text-decoration: line-through; opacity: .55; }

/* Passages à la MONTÉE = sélectionnables : choisir un autre passage recalcule
   le reste du trajet (pickBoardDeparture). */
.board-conn .pass[data-pick] { cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.board-conn .pass[data-pick]:hover { border-color: var(--traceo-red); }
.board-conn .pass[data-pick].pass--reco:hover { border-color: var(--ok); }
.board-conn .pass[data-pick]:active { transform: scale(.96); }
/* Recalcul en cours : on fige le panneau détail le temps de l'appel calculateur. */
.jr-detail.is-busy { cursor: progress; }
.jr-detail.is-busy .dt-body { opacity: .5; pointer-events: none; }

/* Suivi de marche (E6.4) : pastille d'état sur une pilule horaire */
.walk-status {
  position: absolute; top: -8px; right: -6px; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 12px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--sh-1);
}
.walk-status.status-run { background: var(--crit-wash); animation: jr-run 1s infinite alternate; }
.walk-status.status-walk { background: var(--ok-wash); }
.walk-status.status-missed { opacity: .5; filter: grayscale(1); }
@keyframes jr-run { from { transform: scale(1); } to { transform: scale(1.12); } }

/* ── Option vélo / Vélib' (S2.3 — moteur Geovélo en parallèle) ── */
.jr-bike { cursor: default; }
.jr-bike:hover { transform: none; border-color: var(--border); box-shadow: var(--sh-1); }
.jrn__top--static { cursor: default; }
.jbike-load { color: var(--ink-3); font-size: var(--fs-sm); padding: 4px 2px; }
.vkind {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px;
  font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
.vkind .ms-ic { font-size: 15px; display: inline-flex; align-items: center; }
.vkind--velib {
  background: color-mix(in srgb, var(--velib, #6FA824) 14%, var(--surface)); color: var(--velib-ink, #3E6410);
  border-bottom-color: color-mix(in srgb, var(--velib, #6FA824) 26%, transparent);
}
.vkind--perso {
  background: var(--vert-omnibus-wash); color: #0E7A47;
  border-bottom-color: color-mix(in srgb, var(--vert-omnibus) 30%, transparent);
}
.vkind small { margin-left: auto; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: color-mix(in srgb, currentColor 60%, var(--ink)); }
.vbrand {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px;
  border-radius: var(--r-xs); background: var(--velib, #6FA824); color: #fff;
  font-family: var(--font-ui); font-weight: 800; font-size: 11px; letter-spacing: -.01em;
}
.vstation { display: flex; align-items: center; gap: 11px; padding: 12px var(--sp-4); }
.vstation + .vstation { border-top: 1px dashed var(--border); }
.vst__pin {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  flex-shrink: 0; font-size: 16px;
}
.vst__pin--dep { background: var(--surface-2); color: var(--ink-2); border: 1.5px solid var(--border-strong); }
.vst__pin--arr { background: var(--traceo-red); color: #fff; }
.vst__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vst__k { font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--ls-label); color: var(--ink-3); }
.vst__name { font-size: 14.5px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.vst__avail { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.avail { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  border-radius: var(--r-pill); font-size: 11px; font-weight: 700; }
.avail .n { font-family: var(--font-mono); font-weight: 800; }
.avail--meca { background: var(--vert-omnibus-wash); color: #0E7A47; }
.avail--elec { background: var(--soleil-wash); color: #8A6300; }
.avail--dock { background: var(--bleu-luf-wash); color: #2F6FB0; }
.avail--low  { background: var(--warn-wash); color: var(--warn); }
.vst__walk { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.vst__walk .d { font-family: var(--font-mono); font-size: 15px; font-weight: 800; color: var(--ink-2); }
.vst__walk .w { font-size: 10px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.velib-off .vst__name { color: var(--ink-3); }
.velib-closed { font-size: var(--fs-2xs); font-weight: 800; color: var(--crit); }
.velib-fresh { font-size: var(--fs-2xs); color: var(--ink-faint); }
.jbike-noavail { font-style: italic; font-weight: 600; color: var(--ink-3); }
.jbike-empty { padding: var(--sp-5) var(--sp-4); text-align: center;
  color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
.jbike-foot { padding: 2px 8px 0; text-align: center; font-family: var(--font-mono);
  font-size: var(--fs-2xs); color: var(--ink-faint); line-height: 1.5; }

/* ── S3.2 — épingler le trajet courant ───────────────────────── */
.journey-pin.hidden { display: none; }
.jpin {
  width: 100%; padding: 10px; cursor: pointer;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  color: var(--ink-2); font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 600;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.jpin:hover { border-color: var(--traceo-red); }
.jpin.is-on {
  border-style: solid; border-color: color-mix(in srgb, var(--traceo-red) 45%, var(--border));
  background: var(--surface-2); color: var(--ink);
}

/* ── E4.3 — meilleure heure pour partir ──────────────────────── */
.bd-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--ok); border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4); box-shadow: var(--sh-1);
}
.bd-loading { color: var(--ink-3); border-left-color: var(--border); font-size: var(--fs-sm); }
.bd-main { display: flex; align-items: center; gap: 10px; }
.bd-emoji { font-size: 22px; }
.bd-line { font-size: var(--fs-sm); color: var(--ink-2); }
.bd-line strong { color: var(--ink); font-family: var(--font-mono); }
.bd-line .bd-dep { color: var(--ok); font-size: 1.15em; }
.bd-sub { display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 3px; }
.bd-alts { margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-3);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bd-alt {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 4px 9px; cursor: pointer;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-xs);
}
.bd-alt:hover { border-color: var(--traceo-red); }
.bd-basis { font-size: var(--fs-2xs); color: var(--ink-faint); margin-top: 8px; font-family: var(--font-mono); }

/* ── E2.3/E2.4/E2.5 — alertes de trajet (armement + état armé) ── */
.svc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); box-shadow: var(--sh-1);
}
.svc-card.svc-on { border-left: 4px solid var(--traceo-red); }
.svc-card.svc-err { border-left: 4px solid var(--crit); color: var(--ink-3); }
.svc-arm {
  width: 100%; padding: 10px 12px; cursor: pointer;
  background: var(--surface-2); color: var(--ink);
  border: 1px dashed color-mix(in srgb, var(--traceo-red) 55%, var(--border)); border-radius: var(--r-sm);
  font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 600;
}
.svc-arm:hover { background: var(--traceo-red); color: #fff; border-style: solid; }
.svc-arm:disabled { opacity: .7; cursor: default; }
.svc-note { font-size: var(--fs-2xs); color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
.svc-main { font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.svc-main strong { color: var(--ink); }
.svc-src {
  font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .04em;
  background: var(--surface-2); color: var(--ink-3);
  border: 1px solid var(--border); border-radius: var(--r-xs); padding: 1px 6px;
}
.svc-sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 3px; }
.svc-cancel {
  margin-top: 8px; padding: 5px 10px; cursor: pointer;
  background: none; color: var(--ink-3); border: 1px solid var(--border); border-radius: var(--r-xs);
  font-family: var(--font-ui); font-size: var(--fs-xs); font-weight: 600;
}
.svc-cancel:hover { border-color: var(--traceo-red); color: var(--ink); }

/* E2.3 — formulaire de l'alerte matinale */
.mrn-form { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; margin: 8px 0 10px; }
.mrn-time { font-size: var(--fs-xs); color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.mrn-hour {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 4px 7px; font-family: var(--font-mono); font-size: var(--fs-sm);
}
.mrn-modes { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-xs); color: var(--ink-2); }
.mrn-modes label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mrn-days { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.mrn-day {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; padding: 0;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--border);
  font-family: var(--font-ui); font-size: var(--fs-2xs); font-weight: 700; line-height: 1;
}
.mrn-day:hover { border-color: var(--traceo-red); }
.mrn-day.on { background: var(--traceo-red); color: #fff; border-color: var(--traceo-red); }
.sub-morning .fav-info { gap: .15rem; }

/* ── Mouvement ───────────────────────────────────────────────── */
@keyframes jr-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon i, .walk-status.status-run { animation: none; }
  .jr-side { transition: none; }
  .jrn, .jswap { transition: none; }
}
