/*
 * reserver.css — Styles propres à la réservation (billetterie/reserver.php). Chargée APRÈS billetterie.css (jetons --bt-*, canaux --rs-*).
 *
 * Identité (v4.403.0) : celle du site vitrine, comme toute la billetterie — papier gris clair, encre bleu nuit, rouge, sarcelle, ambre,
 * ardoise ; titres Bricolage Grotesque 700 / 800 (jamais d'italique), texte Hanken Grotesk, horaires et numéros Space Mono ; puces
 * de la vitrine (Space Mono, coins de 6 px, fond teinté). Deux thèmes, clair et sombre :
 *   - toute couleur passe par un jeton --bt-* ou un canal --rs-* (classes Tailwind repointées par assets/tailwind-pont.js) ;
 *   - une surface « nuit » (en-tête de la liste, bandeau de la circulation, estimation du prix, bandeau du récapitulatif, vue 360°,
 *     visionneuse de photo, voitures de la composition) reste sombre dans les deux thèmes : elle prend --bt-nuit et REDÉCLARE les
 *     canaux du thème clair (bloc « Surfaces nuit » ci-dessous), si bien que le HTML fabriqué par le script dessus (text-white,
 *     text-blue-100, bg-white/15…) s'affiche à l'identique dans les deux thèmes ;
 *   - les rares valeurs écrites en dur sont sur ces surfaces nuit, dans les voiles de fenêtre, ou dans le plan des places (sièges
 *     dessinés par includes/seat_map.php en couleurs en ligne, adaptés ici par des filtres réglés par jeton).
 * Mobile d'abord : une colonne, cibles 44 px, champs 16 px, action principale collée en bas de l'écran sur téléphone.
 */

/* ───────────── Jetons propres à la réservation (clair, puis sombre deux fois : réglage de l'appareil et choix du visiteur) ─────────────
   --rs-p* : canal « prune » (classe Premium ; classes Tailwind purple / violet / fuchsia, non repointées par le pont).
   --rs-teinte-* : dosage des puces colorées fabriquées par le script (équipements, grille tarifaire) : color-mix(teinte, surface / encre).
   --rs-siege-* : réglages du plan des places (sièges en couleurs en ligne de seat_map.php, plus clairs en thème sombre). */
:root {
    --rs-p50: 244 242 251; --rs-p100: 236 232 249; --rs-p200: 214 206 242; --rs-p300: 184 170 232; --rs-p400: 147 128 214;
    --rs-p500: 112 92 190; --rs-p600: 90 70 168; --rs-p700: 72 55 140; --rs-p800: 56 43 110; --rs-p900: 40 31 80;
    --rs-teinte-fg: 62%;
    --rs-teinte-bg: 12%;
    --rs-siege-filtre: none;
    --rs-siege-survol: brightness(.78);
    --rs-siege-libere: #3B5199;
    --rs-siege-reserve: #22386E;
    --rs-caisse-filtre: none;
    --rs-voile: rgba(7, 12, 22, .58);
    --rs-signal: var(--bt-rouge);
    --rs-signal-fort: var(--bt-rouge-fort);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --rs-p50: 30 26 52; --rs-p100: 38 32 66; --rs-p200: 52 44 90; --rs-p300: 74 62 124; --rs-p400: 104 88 168;
        --rs-p500: 150 133 214; --rs-p600: 172 156 228; --rs-p700: 198 186 240; --rs-p800: 222 214 248; --rs-p900: 238 234 252;
        --rs-teinte-fg: 55%;
        --rs-teinte-bg: 20%;
        --rs-siege-filtre: brightness(1.6) saturate(1.05);
        --rs-siege-survol: brightness(1.2);
        --rs-siege-libere: #6A86D8;
        --rs-siege-reserve: #5A7AD4;
        --rs-caisse-filtre: invert(.86) hue-rotate(180deg);
        --rs-voile: rgba(0, 0, 0, .66);
        --rs-signal: #C0273C;
        --rs-signal-fort: #A51F31;
    }
}
:root[data-theme="dark"] {
    --rs-p50: 30 26 52; --rs-p100: 38 32 66; --rs-p200: 52 44 90; --rs-p300: 74 62 124; --rs-p400: 104 88 168;
    --rs-p500: 150 133 214; --rs-p600: 172 156 228; --rs-p700: 198 186 240; --rs-p800: 222 214 248; --rs-p900: 238 234 252;
    --rs-teinte-fg: 55%;
    --rs-teinte-bg: 20%;
    --rs-siege-filtre: brightness(1.6) saturate(1.05);
    --rs-siege-survol: brightness(1.2);
    --rs-siege-libere: #6A86D8;
    --rs-siege-reserve: #5A7AD4;
    --rs-caisse-filtre: invert(.86) hue-rotate(180deg);
    --rs-voile: rgba(0, 0, 0, .66);
    --rs-signal: #C0273C;
    --rs-signal-fort: #A51F31;
}

/* ───────────── Surfaces nuit : sombres dans les deux thèmes, canaux du thème clair redéclarés ─────────────
   Le HTML posé dessus (par la page ou par le script) a été écrit pour un fond sombre en thème clair : text-white, text-blue-100,
   text-green-300, bg-white/15, bg-slate-950/40… En redonnant aux canaux leurs valeurs claires, il reste identique en thème sombre
   (sans cela, text-white y deviendrait foncé, bg-slate-950/40 clair). Valeurs = celles du :root de billetterie.css. */
.rs-heros, #s2-hero, .rs-estimation, .rs-bandeau-trajet, .rs-simulation, #billet-modal-360, #billet-photo-lightbox, .comp-car-box, .trajet-banner {
    --rs-n50: 248 250 252; --rs-n100: 233 237 242; --rs-n200: 223 228 234; --rs-n300: 197 205 216; --rs-n400: 138 151 172; --rs-n500: 91 107 134;
    --rs-n600: 70 85 111; --rs-n700: 51 64 90; --rs-n800: 31 43 64; --rs-n900: 16 27 45; --rs-n950: 10 19 34;
    --rs-m50: 238 241 246; --rs-m100: 232 236 243; --rs-m200: 199 208 223; --rs-m300: 157 171 195; --rs-m400: 106 124 156; --rs-m500: 62 82 116;
    --rs-m600: 37 56 88; --rs-m700: 16 27 45; --rs-m800: 10 19 34; --rs-m900: 7 14 26; --rs-m950: 4 8 15;
    --rs-r50: 252 232 235; --rs-r100: 249 211 216; --rs-r200: 242 169 178; --rs-r300: 234 126 140; --rs-r400: 225 79 98; --rs-r500: 218 45 68;
    --rs-r600: 216 30 52; --rs-r700: 181 22 42; --rs-r800: 142 17 33; --rs-r900: 107 13 25;
    --rs-v50: 227 243 242; --rs-v100: 199 231 230; --rs-v200: 154 210 208; --rs-v300: 100 184 182; --rs-v400: 47 155 153; --rs-v500: 19 136 135;
    --rs-v600: 14 124 123; --rs-v700: 11 98 97; --rs-v800: 9 76 75; --rs-v900: 6 56 56;
    --rs-a50: 253 246 232; --rs-a100: 251 234 203; --rs-a200: 246 213 151; --rs-a300: 240 190 95; --rs-a400: 235 173 62; --rs-a500: 232 162 43;
    --rs-a600: 185 124 20; --rs-a700: 138 98 16; --rs-a800: 107 75 12; --rs-a900: 77 54 8;
    --rs-l50: 253 246 232; --rs-l100: 251 234 203; --rs-l200: 246 213 151; --rs-l300: 240 190 95; --rs-l400: 235 173 62; --rs-l500: 232 162 43;
    --rs-l600: 185 124 20; --rs-l700: 138 98 16; --rs-l800: 107 75 12; --rs-l900: 77 54 8;
    --rs-p50: 244 242 251; --rs-p100: 236 232 249; --rs-p200: 214 206 242; --rs-p300: 184 170 232; --rs-p400: 147 128 214;
    --rs-p500: 112 92 190; --rs-p600: 90 70 168; --rs-p700: 72 55 140; --rs-p800: 56 43 110; --rs-p900: 40 31 80;
    --rs-blanc: 255 255 255;
    color-scheme: dark;
}
/* Texte d'une surface nuit : blanc dans les deux thèmes (contour de focus blanc aussi, le rouge s'y perdrait). */
.rs-heros, #s2-hero, .rs-estimation, .rs-bandeau-trajet { color: #fff; }
body.rs-page :is(.rs-heros, #s2-hero, .rs-estimation, .rs-bandeau-trajet, .rs-simulation, #billet-modal-360) .bt-titre { color: #fff; }
body.bt-corps :is(#s2-hero, .rs-estimation, .rs-simulation, #billet-modal-360) :focus-visible { outline-color: #fff; }

/* ───────────── Polices : .font-sans / .font-mono de Tailwind = polices de la billetterie (le pont les déclare aussi ; ceinture et bretelles) ───────────── */
body.rs-page .font-sans { font-family: var(--bt-texte); }
body.rs-page .font-mono, body.rs-page code, body.rs-page .tabular-nums { font-family: var(--bt-mono); font-variant-numeric: tabular-nums; }

/* ───────────── Couleurs Tailwind que le pont ne repointe pas (teal, purple, violet, cyan, fuchsia, yellow) ─────────────
   Employées par la page et son script (classes Access / Premium, équipements, vue 360°, jauge BilletWeb) : ramenées sur les canaux
   de la billetterie — Access et cyan = sarcelle, Premium / violet / fuchsia = prune, jaune = ambre — donc lisibles dans les deux thèmes. */
body.rs-page .text-teal-600, body.rs-page .text-cyan-600 { color: rgb(var(--rs-v600)); }
body.rs-page .text-teal-700 { color: rgb(var(--rs-v700)); }
body.rs-page .bg-teal-50, body.rs-page .bg-cyan-50 { background-color: rgb(var(--rs-v50)); }
body.rs-page .bg-teal-50\/60 { background-color: rgb(var(--rs-v50) / .6); }
body.rs-page .border-teal-500 { border-color: rgb(var(--rs-v500)); }
body.rs-page .border-teal-200 { border-color: rgb(var(--rs-v200)); }
body.rs-page .text-purple-500 { color: rgb(var(--rs-p500)); }
body.rs-page .text-purple-600, body.rs-page .text-fuchsia-600 { color: rgb(var(--rs-p600)); }
body.rs-page .text-purple-700, body.rs-page .text-violet-700 { color: rgb(var(--rs-p700)); }
body.rs-page .text-violet-400 { color: rgb(var(--rs-p400)); }
body.rs-page .bg-purple-50, body.rs-page .bg-violet-50, body.rs-page .bg-fuchsia-50 { background-color: rgb(var(--rs-p50)); }
body.rs-page .bg-purple-50\/60 { background-color: rgb(var(--rs-p50) / .6); }
body.rs-page .bg-violet-100, body.rs-page .hover\:bg-violet-100:hover { background-color: rgb(var(--rs-p100)); }
body.rs-page .border-purple-500 { border-color: rgb(var(--rs-p500)); }
body.rs-page .border-purple-200 { border-color: rgb(var(--rs-p200)); }
body.rs-page .bg-yellow-400 { background-color: rgb(var(--rs-a400)); }
/* Textes trop pâles pour 4,5:1 dans l'une ou l'autre teinte (le script les emploie pour des mentions lisibles : « 32 libre(s) », « (facultatif) »,
   astérisques de champ obligatoire, compteur « 2 sél. ») : un cran plus soutenus, sauf sur les surfaces nuit (canaux clairs redéclarés).
   Poids (0,1,1) : au-dessus de la classe Tailwind, au-dessous de ses variantes hover: / group-hover:, qui gardent la main au survol. */
body:where(.rs-page) :is(.text-slate-300, .text-slate-400):where(:not(.rs-heros *, #s2-hero *, .rs-estimation *, .rs-bandeau-trajet *, #billet-modal-360 *, #billet-photo-lightbox *)) { color: rgb(var(--rs-n500)); }
body:where(.rs-page) :is(.text-red-500, .text-red-600):where(:not(.rs-heros *, #s2-hero *, .rs-estimation *, .rs-bandeau-trajet *, #billet-modal-360 *)) { color: color-mix(in srgb, rgb(var(--rs-r600)) 82%, var(--bt-encre)); }
body:where(.rs-page) :is(.text-green-600, .text-emerald-600) { color: rgb(var(--rs-v700)); }

/* ───────────── Page ───────────── */
body.rs-page { min-height: 100vh; }
.rs-main { padding-top: 20px; padding-bottom: 8px; }
@media (min-width: 640px) { .rs-main { padding-top: 28px; } }
.rs-titre-etape { font-family: var(--bt-titre); font-weight: 800; font-size: 25px; line-height: 1.1; letter-spacing: -.02em; color: var(--bt-encre); margin: 0 0 4px; text-wrap: balance; }
@media (min-width: 640px) { .rs-titre-etape { font-size: 30px; } }
.rs-chapeau-etape { margin: 0 0 18px; color: var(--bt-encre-2); font-size: 15px; }
.rs-carte { background: var(--bt-surface); border: 1px solid var(--bt-filet); border-radius: var(--bt-rayon); box-shadow: var(--bt-ombre-1); }
.rs-carte-titre { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--bt-titre); font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--bt-encre); }
.rs-ic { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
         background: var(--bt-marine-doux); color: var(--bt-marine); font-size: 14px; }
.rs-ic-laiton { background: var(--bt-laiton-doux); color: var(--bt-laiton-fg); }
.rs-ic-vert { background: var(--bt-vert-doux); color: var(--bt-vert); }
.rs-ic-rouge { background: var(--bt-rouge-doux); color: var(--bt-rouge); }
.rs-ic-gris { background: var(--bt-papier-2); color: var(--bt-encre-2); }
.fade-in { animation: rsApparait .3s ease; }
@keyframes rsApparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* ───────────── Barre d'étapes ───────────── */
.rs-progression { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; max-width: 360px; min-width: 0; }
.rs-progression-points { display: flex; align-items: center; gap: 3px; width: 100%; min-width: 0; }
.rs-progression-lib { font-family: var(--bt-mono); font-size: 11px; font-weight: 700; color: var(--bt-mut); line-height: 1.2; letter-spacing: .08em; text-transform: uppercase;
                      max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--bt-mono);
            font-weight: 700; font-size: 11px; flex-shrink: 0; transition: background .25s, color .25s, box-shadow .25s; border: 1.5px solid transparent; }
.step-dot .fas, .step-dot .fa-solid { font-size: 10px; }
.step-dot.active { background: var(--bt-marine); color: var(--bt-sur-marine); box-shadow: 0 0 0 3px var(--bt-marine-doux), inset 0 -2px 0 var(--bt-rouge); }
/* Texte posé sur un jeton coloré qui s'éclaircit en thème sombre (sarcelle, ambre) : la couleur de surface, claire puis foncée. */
.step-dot.done { background: var(--bt-vert); color: var(--bt-surface); border-color: var(--bt-vert); }
.step-dot.todo { background: var(--bt-papier-2); color: var(--bt-mut); border-color: var(--bt-filet); }
.step-line { flex: 1; height: 2px; background: var(--bt-filet); transition: background .25s; min-width: 4px; border-radius: 2px; }
.step-line.done { background: var(--bt-vert); }
@media (max-width: 639px) {
    .step-dot { width: 20px; height: 20px; font-size: 9px; border-width: 1px; }
    .step-dot .fas, .step-dot .fa-solid { font-size: 8px !important; }
    .step-line { min-width: 2px; }
    .rs-progression-lib { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .step-dot, .step-line { transition: none; } }

/* ───────────── Bandeau simulation (rouge soutenu, texte blanc dans les deux thèmes) ───────────── */
.rs-simulation { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--bt-rayon-petit);
                 background: var(--bt-rouge-fort); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.rs-simulation.hidden { display: none; }
.rs-simulation p { margin: 0; }

/* ───────────── Étape 1 : en-tête de la liste (surface nuit) ───────────── */
.rs-heros { position: relative; overflow: hidden; border-radius: var(--bt-rayon); background: var(--bt-nuit); padding: 22px 18px; margin-bottom: 20px;
            box-shadow: var(--bt-ombre-2); }
.rs-heros::before { content: ''; position: absolute; inset: 0; pointer-events: none; background:
    radial-gradient(70% 120% at 100% 0%, rgba(216, 30, 52, .38), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 56px); }
/* Filet de quatre couleurs au pied (celui de la vitrine) */
.rs-heros::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #D81E34 0 25%, #E8A22B 25% 50%, #0E7C7B 50% 75%, #5B6B86 75% 100%); }
.rs-heros > * { position: relative; }
.rs-heros-asso { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; font-family: var(--bt-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
                 color: #c9d0e6; font-weight: 700; }
.rs-heros-asso::before { content: ''; width: 22px; height: 2px; background: #E8A22B; }
.rs-heros h1 { font-family: var(--bt-titre); font-weight: 800; font-size: clamp(28px, 5vw, 44px); line-height: 1.05; margin: 0 0 12px; color: #fff; text-wrap: balance; letter-spacing: -.02em; }
.rs-heros h1 em { font-style: normal; color: #F4C25B; }
.rs-heros-chapeau { margin: 0; font-size: 15.5px; color: #d7dcec; max-width: 60ch; }
.rs-garanties { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rs-garanties li { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 11px; border-radius: 8px; font-size: 13px; font-weight: 600;
                   background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; }
.rs-garanties i { color: #F4C25B; font-size: 12px; }
@media (min-width: 640px) { .rs-heros { padding: 30px 30px 30px; } }

.rs-liste-tete { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.rs-liste-tete h2 { font-family: var(--bt-titre); font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; margin: 0; color: var(--bt-encre); }
.rs-liste-tete p { margin: 2px 0 0; font-size: 14px; color: var(--bt-mut); }
.rs-vue { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bt-papier-2); border: 1px solid var(--bt-filet); flex-shrink: 0; }
.rs-vue button { min-height: 40px; }
@media (pointer: coarse) { .rs-vue button { min-height: 44px; } }

/* Puces de filtre par mois (défilement horizontal sur téléphone) */
.mois-chips { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mois-chips::-webkit-scrollbar { display: none; }
.mois-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--bt-filet-fort);
             background: var(--bt-surface); color: var(--bt-encre-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.mois-chip .n { font-family: var(--bt-mono); font-size: 11px; font-weight: 700; background: var(--bt-papier-2); color: var(--bt-mut); border-radius: 6px; padding: 1px 6px; }
.mois-chip:hover { border-color: var(--bt-encre-2); }
.mois-chip.actif { background: var(--bt-marine); border-color: var(--bt-marine); color: var(--bt-sur-marine); }
.mois-chip.actif .n { background: color-mix(in srgb, var(--bt-sur-marine) 18%, transparent); color: var(--bt-sur-marine); }
.mois-chip:focus-visible, .trajet-card:focus-visible { outline: none; box-shadow: var(--bt-focus); }

/* ───────────── Cartes de circulation (carte de la vitrine : surface, filet, ombre, soulèvement au survol) ───────────── */
.trajet-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--bt-filet); border-radius: var(--bt-rayon); background: var(--bt-surface);
               box-shadow: var(--bt-ombre-2); cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.trajet-card:hover { border-color: var(--bt-filet-fort); box-shadow: var(--bt-ombre-3); transform: translateY(-3px); }
.trajet-card.selected { border-color: var(--bt-marine); background: var(--bt-marine-doux); }
.trajet-card-inner { padding: 16px 18px 14px; }
.trajet-nom { font-family: var(--bt-titre); font-weight: 700; font-size: 19px; line-height: 1.2; letter-spacing: -.01em; color: var(--bt-encre); margin: 0 0 12px; overflow-wrap: anywhere;
              display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trajet-pied { margin-top: auto; border-top: 1px dashed var(--bt-filet-fort); padding: 10px 14px 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trajet-complet { cursor: not-allowed; border-color: var(--bt-alerte-err-bd); background: var(--bt-rouge-doux); opacity: .85;
                  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(216, 30, 52, .06) 14px 28px); }
.trajet-complet:hover { transform: none; box-shadow: var(--bt-ombre-1); border-color: var(--bt-alerte-err-bd); }
.trajet-complet .trajet-date-chip, .trajet-complet img { filter: grayscale(.6); }
/* Pastilles posées sur la bannière (puce de la vitrine, un peu plus grande) : texte blanc sur rouge soutenu, foncé sur ambre. */
.trajet-complet-badge { position: absolute; top: 12px; right: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; background: var(--bt-rouge-fort); color: #fff;
                        font-family: var(--bt-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; box-shadow: var(--bt-ombre-2); }
.trajet-complet-badge-attente { background: var(--bt-ambre); color: var(--bt-surface); }
.statut-confirme, .statut-planifie, .statut-simulation { font-family: var(--bt-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
                                                         padding: 3px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.5; }
.statut-confirme { background: var(--bt-vert-doux); color: var(--bt-vert); }
.statut-planifie { background: var(--bt-laiton-doux); color: var(--bt-laiton-fg); }
.statut-simulation { background: var(--bt-rouge-fort); color: #fff; }
/* Sur la bannière, les pastilles d'état gardent un fond plein (elles sont lues par-dessus une photo). */
.trajet-statut.statut-confirme { background: var(--bt-surface); }
.trajet-statut.statut-planifie { background: var(--bt-surface); }
/* Bannière principale (en tête de carte) ; sans bannière : même hauteur, surface nuit et train — les cartes d'une rangée restent alignées */
.trajet-banner { position: relative; height: 128px; background: linear-gradient(135deg, var(--bt-nuit) 0%, var(--bt-nuit-2) 100%); overflow: hidden; }
.trajet-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.trajet-card:hover .trajet-banner img { transform: scale(1.04); }
.trajet-banner::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, rgba(7, 12, 22, .45), transparent); pointer-events: none; }
.trajet-banner-vide { display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .22); font-size: 36px;
                      background-image: radial-gradient(70% 120% at 100% 0%, rgba(216, 30, 52, .28), transparent 62%), linear-gradient(135deg, var(--bt-nuit) 0%, var(--bt-nuit-2) 100%); }
.trajet-banner-vide::after { display: none; }
@media (max-width: 639px) {
    .trajet-banner { height: 104px; }
    .trajet-banner-vide { font-size: 28px; }
    .trajet-card-inner { padding: 14px 16px 12px; }
    .trajet-nom { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .trajet-card, .trajet-banner img { transition: none; } .trajet-card:hover .trajet-banner img, .trajet-card:hover { transform: none; } }
/* Date et statut posés sur la bannière (frères de .trajet-banner, jamais ses enfants : le repli d'image en remplace le contenu) */
.trajet-date-chip { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; align-items: center; min-width: 48px; background: var(--bt-surface);
                    border-radius: 10px; padding: 6px 8px 5px; box-shadow: var(--bt-ombre-2); font-family: var(--bt-mono); }
.trajet-date-chip .j { font-size: 20px; font-weight: 700; line-height: 1; color: var(--bt-encre); }
.trajet-date-chip .m { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: color-mix(in srgb, var(--bt-rouge) 80%, var(--bt-encre)); margin-top: 3px; }
.trajet-statut { position: absolute; left: 12px; bottom: 10px; z-index: 2; box-shadow: var(--bt-ombre-2); }
/* Deux voies côte à côte : aller à gauche, retour à droite (chacun avec SES horaires) */
.trajet-voies { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--bt-filet); border-radius: 12px; overflow: hidden; background: var(--bt-surface); }
.trajet-voies.seule { grid-template-columns: minmax(0, 1fr); }
.voie { min-width: 0; padding: 10px 12px 11px; }
.voie + .voie { border-left: 1px solid var(--bt-filet); background: var(--bt-surface-2); }
.voie-titre { display: flex; align-items: center; gap: 6px; margin: 0 0 9px; font-family: var(--bt-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bt-mut); }
.voie-titre i { font-size: 9px; color: var(--bt-rouge); }
.voie ol { list-style: none; margin: 0; padding: 0; }
.voie li { position: relative; padding: 0 0 12px 21px; }
.voie li:last-child { padding-bottom: 0; }
.voie .pt { position: absolute; left: 0; top: 2px; width: 13px; height: 13px; border-radius: 50%; border: 3px solid; background: var(--bt-surface); z-index: 1; }
.voie .dep .pt { border-color: var(--bt-vert); }
.voie .arr .pt { border-color: var(--bt-rouge); }
.voie .dep::before { content: ''; position: absolute; left: 5.5px; top: 15px; bottom: -2px; width: 2px; background: var(--bt-filet-fort); }
.voie .h { display: block; font-family: var(--bt-mono); font-weight: 700; font-size: 16px; line-height: 1.1; color: var(--bt-encre); font-variant-numeric: tabular-nums; }
.voie .g { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--bt-encre-2); overflow-wrap: anywhere; }
.voie-via { margin: 9px 0 0; font-size: 12px; line-height: 1.35; color: var(--bt-mut); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Bouton « Réserver » de la carte (la carte entière est cliquable : c'est un repère visuel) */
.btn-reserver { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 40px; padding: 0 16px; border-radius: 10px; background: var(--bt-marine);
                color: var(--bt-sur-marine); font-family: var(--bt-titre); font-size: 14.5px; font-weight: 700; box-shadow: 0 2px 0 var(--bt-marine-fort); transition: background .15s; }
.trajet-card:hover .btn-reserver { background: var(--bt-marine-fort); }
.btn-reserver-attente { background: var(--bt-ambre); color: var(--bt-surface); box-shadow: 0 2px 0 color-mix(in srgb, var(--bt-ambre) 70%, #000); }
.trajet-card:hover .btn-reserver-attente { background: color-mix(in srgb, var(--bt-ambre) 86%, var(--bt-encre)); }
.btn-reserver-complet { background: var(--bt-rouge-doux); color: var(--bt-rouge); box-shadow: none; }
.trajet-card:hover .btn-reserver-complet { background: var(--bt-rouge-doux); }
/* Puces de repère (échéance, places) : la puce de la vitrine — Space Mono, coins de 6 px, fond teinté (couleurs par les classes Tailwind). */
.pastille-info { display: inline-flex; align-items: center; gap: 5px; font-family: var(--bt-mono); font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 8px;
                 white-space: nowrap; line-height: 1.45; }

/* Calendrier */
.cal-day { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 52px; border-radius: 10px; padding: 6px 3px 4px; font-size: 13px;
           font-weight: 700; color: var(--bt-encre-2); cursor: default; position: relative; transition: background .15s, transform .15s; font-family: var(--bt-mono); }
.cal-day.other-month { color: var(--bt-filet-fort); }
.cal-day.today { background: var(--bt-marine-doux); color: var(--bt-marine); outline: 2px solid var(--bt-alerte-info-bd); outline-offset: -2px; }
.cal-day.has-trajet { cursor: pointer; background: var(--bt-surface-2); }
.cal-day.has-trajet:hover { background: var(--bt-marine-doux); transform: scale(1.04); z-index: 2; }
.cal-day.has-trajet.highlighted { background: var(--bt-marine); color: var(--bt-sur-marine); box-shadow: var(--bt-ombre-2); transform: scale(1.04); z-index: 2; }
.cal-day.has-trajet.highlighted .cal-tag { background: color-mix(in srgb, var(--bt-sur-marine) 22%, transparent); color: var(--bt-sur-marine); }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; margin-top: 3px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cal-dot.confirme { background: var(--bt-vert); }
.cal-dot.planifie { background: var(--bt-laiton); }
.cal-tag { font-family: var(--bt-texte); font-size: 9px; font-weight: 700; text-align: center; line-height: 1.2; margin-top: 3px; background: var(--bt-marine-doux); color: var(--bt-marine);
           border-radius: 4px; padding: 1px 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }

/* Carte-bouton d'accueil (Comment réserver, questions fréquentes, anciens trajets) */
.rs-carte-bouton { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; text-align: left; cursor: pointer;
                   background: var(--bt-surface); border: 1px solid var(--bt-filet); border-radius: var(--bt-rayon); box-shadow: var(--bt-ombre-1); transition: border-color .15s, box-shadow .15s; }
.rs-carte-bouton:hover { border-color: var(--bt-filet-fort); box-shadow: var(--bt-ombre-2); }
.rs-carte-bouton:focus-visible { outline: none; box-shadow: var(--bt-focus); }
.rs-carte-bouton strong { display: block; font-family: var(--bt-titre); font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--bt-encre); }
.rs-carte-bouton small { display: block; font-size: 13px; color: var(--bt-mut); line-height: 1.35; }
.rs-tuto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--bt-filet); }
@media (min-width: 640px) { .rs-tuto { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rs-tuto li { background: var(--bt-surface); padding: 14px 16px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
@media (min-width: 640px) { .rs-tuto li { grid-template-columns: minmax(0, 1fr); text-align: left; } }
.rs-tuto .n { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--bt-marine); color: var(--bt-sur-marine);
              font-family: var(--bt-mono); font-weight: 700; grid-row: span 2; }
@media (min-width: 640px) { .rs-tuto .n { grid-row: auto; margin-bottom: 6px; } }
.rs-tuto strong { font-family: var(--bt-titre); font-weight: 700; font-size: 15px; color: var(--bt-encre); }
.rs-tuto span:last-child { font-size: 13px; color: var(--bt-encre-2); line-height: 1.45; }
.faq-carte:focus-visible, .faq-btn:focus-visible { outline: none; box-shadow: var(--bt-focus); }
.faq-q-input { font-size: 16px; }
.ancien-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--bt-filet); transition: background .12s; cursor: default; }
.ancien-row:first-child { border-top: none; }
.ancien-row:hover { background: var(--bt-surface-2); }

/* ───────────── Étape 2 ───────────── */
#s2-hero { border-radius: var(--bt-rayon); background: var(--bt-nuit); }
#s2-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 120% at 100% 0%, rgba(216, 30, 52, .36), transparent 62%); }
#s2-hero.s2-avec-banniere::before { display: none; }
#s2-hero .s2-contenu { min-height: 92px; }
#s2-hero.s2-avec-banniere .s2-contenu { min-height: 176px; }
@media (min-width: 640px) { #s2-hero.s2-avec-banniere .s2-contenu { min-height: 216px; } }
#s2-nom { font-family: var(--bt-titre); font-weight: 800; letter-spacing: -.02em; }
.rs-btn-info { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 15px;
               font-weight: 700; color: var(--bt-encre); background: var(--bt-surface); border: 1px solid var(--bt-filet-fort); transition: background .15s, border-color .15s; }
.rs-btn-info:hover { background: var(--bt-surface-2); border-color: var(--bt-encre-2); }
.rs-btn-info i { color: var(--bt-rouge); }
.rs-btn-info.hidden { display: none; }
.rs-libelle { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--bt-encre-2); }
.rs-pt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.rs-pt-dep { background: var(--bt-vert); }
.rs-pt-arr { background: var(--bt-rouge); }
/* Flèche de la liste : image en ligne (aucune variable possible) d'un gris moyen, lisible sur les deux fonds de saisie. */
.custom-select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 52px; padding: 12px 44px 12px 14px; font-size: 16px; font-weight: 500; color: var(--bt-encre);
                 background-color: var(--bt-saisie-fond); border: 1px solid var(--bt-filet-fort); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
                 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238A97AC' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
                 background-repeat: no-repeat; background-position: right 14px center; }
.custom-select:focus { outline: none; border-color: var(--bt-marine); box-shadow: var(--bt-focus); }
.custom-select:disabled { opacity: .55; cursor: not-allowed; background-color: var(--bt-surface-2); }
.custom-select option { background-color: var(--bt-surface); color: var(--bt-encre); }
/* Choix « aller simple / aller-retour » et classes : le script pose les classes Tailwind d'état (bordure, fond) ; la forme vient d'ici. */
#btn-aller, #btn-ar { min-height: 64px; border-radius: 12px; }
#btn-trd, #btn-std, #btn-prm, #btn-fst { min-height: 56px; border-radius: 12px; font-size: 13px; padding-inline: 6px; }
#btn-aller i, #btn-ar i { margin-bottom: 4px; }
.rs-btn-aide { margin-left: auto; width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
               background: var(--bt-papier-2); color: var(--bt-encre-2); border: 1px solid var(--bt-filet); }
.rs-btn-aide:hover { background: var(--bt-marine-doux); color: var(--bt-marine); }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bt-filet); }
.qty-row:last-child { border-bottom: none; }
.qty-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--bt-filet-fort); background: var(--bt-surface); display: flex; align-items: center; justify-content: center;
           cursor: pointer; font-size: 22px; font-weight: 600; color: var(--bt-encre); user-select: none; transition: background .15s, border-color .15s; line-height: 1; }
.qty-btn:hover { background: var(--bt-papier-2); border-color: var(--bt-encre-2); }
.qty-btn:active { transform: translateY(1px); }
.qty-val { min-width: 32px; text-align: center; font-family: var(--bt-mono); font-size: 20px; font-weight: 700; color: var(--bt-encre); }
.rs-estimation { border-radius: var(--bt-rayon); background: var(--bt-nuit); padding: 18px; box-shadow: var(--bt-ombre-2); position: relative; overflow: hidden; }
.rs-estimation::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #D81E34 0 25%, #E8A22B 25% 50%, #0E7C7B 50% 75%, #5B6B86 75% 100%); }
.rs-total-lib { display: block; font-family: var(--bt-mono); font-size: 11px; font-weight: 700; color: var(--bt-mut); text-transform: uppercase; letter-spacing: .12em; line-height: 1.2; }
.rs-total-val { display: block; font-family: var(--bt-mono); font-weight: 700; font-size: 24px; line-height: 1.1; color: var(--bt-encre); font-variant-numeric: tabular-nums; }
#bw-btn-wrap { display: flex; flex-direction: column; gap: 10px; }
/* Composition du train (les voitures sans photo sont des surfaces nuit : boîte foncée, pictogramme blanc) */
.comp-car-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.comp-car-img { height: 72px; width: auto; object-fit: contain; display: block; max-width: none; filter: drop-shadow(0 2px 4px rgba(7, 12, 22, .25)); }
.comp-car-box { display: flex; align-items: center; justify-content: center; height: 52px; border: 1.5px solid var(--bt-filet-fort); border-radius: 3px; }
.comp-car-lbl { font-family: var(--bt-mono); font-size: 9px; font-weight: 700; color: var(--bt-mut); margin-top: 3px; white-space: nowrap; max-width: 80px; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.comp-coupler { width: 5px; height: 4px; background: var(--bt-filet-fort); border-radius: 1px; align-self: flex-end; margin-bottom: 17px; flex-shrink: 0; }
.rs-rail { height: 6px; border-radius: 3px; margin-top: 5px; background: linear-gradient(180deg, var(--bt-filet) 0%, var(--bt-filet-fort) 40%, var(--bt-mut) 100%); box-shadow: var(--bt-ombre-1); }

/* ───────────── Étape 3 : plans des voitures ─────────────
   Les sièges sont des SVG en couleurs en ligne (includes/seat_map.php, partagé) : on ne les recolore pas, on les éclaircit en thème sombre
   (--rs-siege-filtre), sauf les places occupées (gris #64748b, qui restent estompées) et celles dont l'état impose sa couleur. Le fond du plan
   (carte de la voiture) suit le thème. Les éléments de caisse (plateforme, cabine, intercirculation, fenêtres, portes) sont inversés en sombre. */
.sm-canvas { position: relative; display: block; touch-action: pan-y; }
.sm-seat { position: absolute; border: none; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: transparent; cursor: default;
           user-select: none; transition: box-shadow .15s, transform .15s; }
.sm-seat:not(.seat-selected):not(.seat-libere):not(.seat-reserved):not(.seat-retenue):not(.seat-pris) svg:not([style*="#64748b"]) { filter: var(--rs-siege-filtre); }
.sm-caisse-ext, .sm-caisse-fenetre, .sm-caisse-porte { filter: var(--rs-caisse-filtre); }
.sm-zone-ph, .sm-empty { position: absolute; background: transparent !important; border: none !important; pointer-events: none; cursor: default !important; }
.sm-zone-ov { position: absolute; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 4px 6px; pointer-events: none; z-index: 10; }
.sm-aisle-seg { position: absolute; background: var(--bt-papier-2); border-radius: 2px; }
.sm-comp-sep { position: absolute; width: 2px; background: var(--bt-filet-fort); }
.sm-comp-sep-h { position: absolute; height: 2px; background: var(--bt-filet-fort); }
@media (max-width: 639px) { .sm-h-only { display: none; } }
@media (min-width: 640px) { .sm-v-only { display: none; } }
.seat-selectable { cursor: pointer !important; }
.seat-selectable:hover { filter: var(--rs-siege-survol); transform: scale(1.1); }
/* Place choisie : sarcelle fixe #0E7C7B — lisible sous le numéro blanc ET sur le fond sombre (contraste ≥ 3:1 des deux côtés). */
.seat-selected { transform: scale(1.1); filter: drop-shadow(0 0 3px #0E7C7B) drop-shadow(0 0 6px rgba(14, 124, 123, .5)); }
.seat-selected svg { color: #0E7C7B !important; }
/* Place vendue sur un AUTRE tronçon, donc libre sur celui-ci : le plan est dessiné au chargement, avant que les gares soient connues. On lève
   l'estompage et on la cercle de bleu pour signaler qu'elle vient d'être libérée. */
.seat-libere { opacity: 1 !important; filter: drop-shadow(0 0 2px var(--rs-siege-libere)); }
.seat-libere svg { color: var(--rs-siege-libere) !important; }
.seat-libere.seat-selected { filter: drop-shadow(0 0 3px #0E7C7B) drop-shadow(0 0 6px rgba(14, 124, 123, .5)); }
.seat-libere.seat-selected svg { color: #0E7C7B !important; }
/* Place libre mais non proposée à un voyageur seul (réglage « Place isolée ») : estompée et non cliquable. */
.seat-hors-optim { opacity: .35; filter: grayscale(.7); cursor: not-allowed !important; pointer-events: auto; }
.seat-hors-optim:hover { transform: none; filter: grayscale(.7); }
/* Places retenues en temps réel. « Occupée » : grise et estompée. « En cours de sélection par un autre voyageur » : hachurée ET marquée d'une horloge
   (l'état ne tient pas à la couleur seule), redevient libre toute seule à l'expiration. Brun fixe : lisible sur les deux fonds. */
.seat-pris { opacity: .6 !important; cursor: not-allowed !important; }
.seat-pris svg { color: var(--bt-mut) !important; }
.seat-pris:hover { transform: none; filter: none; }
.seat-retenue { opacity: 1 !important; cursor: not-allowed !important; }
.seat-retenue svg { color: #8A7656 !important; }
.seat-retenue:hover { transform: none; filter: none; }
.seat-retenue::before { content: ''; position: absolute; inset: 1px; border-radius: 5px; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(240, 210, 160, .9) 0 2px, transparent 2px 5px); }
.seat-retenue::after { content: '\f017'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; line-height: 12px;
                       font-size: 8px; text-align: center; border-radius: 50%; background: var(--bt-ambre-doux); color: var(--bt-ambre); border: 1px solid var(--bt-alerte-att-bd); pointer-events: none; }
@keyframes seatPrise { 0% { box-shadow: 0 0 0 0 rgba(232, 162, 43, 0); } 25% { box-shadow: 0 0 0 4px rgba(232, 162, 43, .6); } 100% { box-shadow: 0 0 0 0 rgba(232, 162, 43, 0); } }
.seat-prise-flash { animation: seatPrise 1.3s ease-out 1; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .seat-prise-flash { animation: none; } }
.sm-seat:focus-visible { outline: 2px solid var(--bt-rouge); outline-offset: 1px; }
.seat-reserved { filter: drop-shadow(0 0 3px var(--rs-siege-reserve)); }
.seat-reserved svg { color: var(--rs-siege-reserve) !important; }
/* Emplacement réservé du bandeau « places proposées » : sa hauteur ne change jamais quand son contenu passe de « recherche » à « résultat ». */
.bandeau-slot { min-height: 84px; margin-bottom: 12px; }
@media (min-width: 640px) { .bandeau-slot { min-height: 60px; } }
.bandeau-slot > div { margin-bottom: 0; }
/* Légende du plan (encart de la vitrine : filet coloré à gauche) */
.rs-legende { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; font-size: 13px; color: var(--bt-encre-2); margin-bottom: 16px; padding: 12px 14px;
              background: var(--bt-surface); border: 1px solid var(--bt-filet); border-left: 4px solid var(--bt-vert); border-radius: 0 12px 12px 0; }
.rs-legende > div:not(.hidden) { display: flex; align-items: center; gap: 8px; }
.rs-pastille-siege { width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; border: 1px solid; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; }
/* Pastilles = couleurs réelles des sièges du plan (seat_map.php : standard #1D4ED8, occupé #64748B estompé), avec le même éclaircissement en sombre. */
.rs-siege-libre { background: #1D4ED8; border-color: #1D4ED8; filter: var(--rs-siege-filtre); }
.rs-siege-choisi { background: #0E7C7B; border-color: #0E7C7B; }
.rs-siege-occupe { background: #64748B; border-color: #64748B; opacity: .6; }
.rs-siege-bloque { background: var(--bt-rouge-doux); border-color: var(--bt-alerte-err-bd); color: var(--bt-rouge); }
.legende-swatch-ret { background: repeating-linear-gradient(135deg, #F0D2A0 0 2px, #8A7656 2px 5px); border-color: var(--bt-alerte-att-bd); }
/* Sélecteur de voitures : onglets défilants sur téléphone, colonne sur ordinateur */
#step3-inner { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { #step3-inner { flex-direction: row; align-items: flex-start; gap: 16px; } }
#voiture-selector { display: flex; flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; flex-shrink: 0; scrollbar-width: thin; }
@media (min-width: 640px) { #voiture-selector { flex-direction: column; width: 200px; overflow-x: hidden; overflow-y: auto; max-height: 600px; gap: 6px; padding-bottom: 0; } }
.voiture-sel-card { border: 1px solid var(--bt-filet-fort); border-radius: 12px; background: var(--bt-surface); cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s;
                    flex-shrink: 0; min-width: 76px; min-height: 44px; padding: 6px 10px; user-select: none; text-align: center; }
.voiture-sel-card:hover { border-color: var(--bt-encre-2); background: var(--bt-surface-2); }
.voiture-sel-card.active { border-color: var(--bt-marine); background: var(--bt-marine-doux); box-shadow: 0 0 0 2px var(--bt-alerte-info-bd); }
.voiture-sel-card.ferme { border-color: var(--bt-alerte-att-bd); background: var(--bt-ambre-doux); cursor: not-allowed; opacity: .85; }
.voiture-sel-card.ferme:hover { border-color: var(--bt-alerte-att-bd); background: var(--bt-ambre-doux); }
@media (min-width: 640px) { .voiture-sel-card { min-width: unset; width: 100%; padding: 12px 14px; } }
#maps-container { flex: 1; min-width: 0; overflow-anchor: none; }
.voiture-block { border: 1px solid var(--bt-filet); border-radius: var(--bt-rayon); overflow: hidden; background: var(--bt-surface); box-shadow: var(--bt-ombre-1); }
.voiture-hdr { background: var(--bt-surface-2); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-bottom: 1px solid var(--bt-filet); }
/* NE PAS changer le padding : scaleSeatMap() le retranche (2 × 16 px) pour mettre le plan à l'échelle. */
.voiture-body { padding: 12px 14px; overflow: hidden; position: relative; }
.sm-scale-wrap { position: relative; transform-origin: top left; }
@keyframes seatLimitFlash { 0%, 100% { filter: drop-shadow(0 0 0 rgba(216, 30, 52, 0)); } 50% { filter: drop-shadow(0 0 5px var(--bt-rouge)) drop-shadow(0 0 9px rgba(216, 30, 52, .4)); } }
.seat-limit-flash { animation: seatLimitFlash .4s ease !important; pointer-events: none; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-7px); } 30% { transform: translateX(7px); } 45% { transform: translateX(-5px); } 60% { transform: translateX(5px); } 75% { transform: translateX(-3px); } 90% { transform: translateX(3px); } }
.btn-shake { animation: shake .45s ease !important; }
@media (prefers-reduced-motion: reduce) { .btn-shake, .seat-limit-flash { animation: none !important; } }
/* Compteur de places choisies (dans la barre d'action) */
.rs-compteur { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 2px 12px; border-radius: 12px;
               background: var(--bt-surface); border-color: var(--bt-filet-fort) !important; border-width: 1px !important; line-height: 1.1; flex-shrink: 0; }
.rs-compteur small { font-family: var(--bt-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--bt-mut); font-weight: 700; }
.rs-compteur > div { font-family: var(--bt-mono); font-size: 20px; font-weight: 700; }

/* ───────────── Étapes 4 à 6 ───────────── */
.rs-bandeau-trajet { border-radius: var(--bt-rayon); background: var(--bt-nuit); padding: 16px 18px 20px; margin-bottom: 16px; position: relative; overflow: hidden; }
.rs-bandeau-trajet::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 140% at 100% 0%, rgba(216, 30, 52, .3), transparent 62%); }
.rs-bandeau-trajet > * { position: relative; }
.rs-bandeau-trajet::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #D81E34 0 25%, #E8A22B 25% 50%, #0E7C7B 50% 75%, #5B6B86 75% 100%); }
#r-route { font-family: var(--bt-titre); font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: -.02em; }
.rs-tableau th { font-family: var(--bt-mono); font-size: 11px; font-weight: 700; color: var(--bt-mut); text-transform: uppercase; letter-spacing: .08em; }
.rs-tableau td { font-variant-numeric: tabular-nums; }
#r-total, #resto-total { font-family: var(--bt-mono); font-weight: 700; }
.field-err { border-color: var(--bt-rouge) !important; background: var(--bt-rouge-doux) !important; }
/* Champ date (date de naissance) : sur iPhone Safari il garde sa largeur propre et déborde de sa carte ; on le ramène à la largeur du champ. */
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left; min-height: 2.75rem; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
input[type="date"]::-webkit-calendar-picker-indicator { margin-left: auto; }
/* Champs fabriqués par le script (identités, restauration) : 16 px minimum sur téléphone, hauteur tactile */
body.rs-page #step6 :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
body.rs-page #step5 select, body.rs-page #s6-panel-billet :is(input, select), body.rs-page #s6-panel-formule :is(input, select) { font-size: 16px; min-height: 44px; }
body.rs-page :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus { outline: none; box-shadow: var(--bt-focus); }
/* Champs du script (classes bg-white / border-slate-*) : fond de saisie du thème, texte à l'encre. */
body.rs-page :is(#step5, #step6) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { color: var(--bt-encre); }
body.rs-page :is(#step5, #step6) :is(input:not([type="checkbox"]):not([type="radio"]), textarea)::placeholder { color: var(--bt-mut); opacity: 1; }
body.rs-page input[type="checkbox"], body.rs-page input[type="radio"] { accent-color: var(--bt-vert); }

/* ───────────── Barre d'action (Retour / Continuer) : collée en bas de l'écran sur téléphone ───────────── */
.rs-actions { display: flex; align-items: center; gap: 10px; }
.rs-actions.hidden { display: none; }
.rs-actions > .bt-btn { min-height: 52px; }
.rs-actions .rs-principal { flex: 1; min-width: 0; }
@media (max-width: 639px) {
    .rs-actions { position: sticky; bottom: 0; z-index: 30; margin-inline: -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
                  background: var(--bt-entete-fond); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--bt-filet);
                  box-shadow: 0 -8px 24px -16px rgba(7, 12, 22, .45); }
    .rs-actions > .bt-btn-second { padding-inline: 14px; }
    .rs-actions .rs-court { display: none; }
}
@media (min-width: 640px) { .rs-actions { margin-top: 8px; } }
/* Bilan + bouton de l'étape 2 : collé en bas sur téléphone, dans la colonne sur ordinateur */
.rs-total-barre { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-right: 4px; }

/* ───────────── Fenêtres (voile foncé dans les deux thèmes) ───────────── */
.modal-seats-overlay { position: fixed; inset: 0; background: var(--rs-voile); z-index: 60; display: flex; align-items: flex-end; }
.modal-seats-sheet { background: var(--bt-surface); border-radius: 20px 20px 0 0; width: 100%; max-height: 88vh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom, 0px);
                     border-top: 1px solid var(--bt-filet); }
.modal-seats-hdr { padding: 14px 16px; border-bottom: 1px solid var(--bt-filet); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0;
                   background: var(--bt-surface); z-index: 1; border-radius: 20px 20px 0 0; }
.modal-seats-body { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; flex: 1; padding: 12px; }
.modal-plan-overlay { position: fixed; inset: 0; background: var(--rs-voile); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-plan-sheet { background: var(--bt-surface); border: 1px solid var(--bt-filet); border-radius: var(--bt-rayon); width: 100%; max-width: 1140px; max-height: 92vh; display: flex; flex-direction: column;
                    overflow: hidden; box-shadow: var(--bt-ombre-3); }
.modal-plan-hdr { padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--bt-filet); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; background: var(--bt-surface-2); }
.modal-plan-hdr h3 { font-family: var(--bt-titre); font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--bt-encre); }
.modal-plan-body { overflow: auto; flex: 1; padding: 16px; -webkit-overflow-scrolling: touch; }
.rs-fermer { width: 44px; height: 44px; border-radius: 999px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--bt-encre-2);
             background: var(--bt-surface); border: 1px solid var(--bt-filet); cursor: pointer; transition: background .15s; }
.rs-fermer:hover { background: var(--bt-papier-2); }
@media (max-width: 639px) {
    /* Plan complet : plein écran, défilement dans les deux sens */
    .modal-plan-overlay { padding: 0; align-items: flex-start; }
    .modal-plan-sheet { border-radius: 0; border: 0; max-height: 100dvh; height: 100dvh; max-width: 100vw; }
    .modal-plan-body { padding: 12px; }
    /* Fenêtres de lecture (horaires, classes, grille, questions) : feuille qui monte du bas */
    .modal-plan-overlay.rs-feuille { align-items: flex-end; }
    .modal-plan-overlay.rs-feuille .modal-plan-sheet { height: auto; max-height: 92dvh; border-radius: 20px 20px 0 0; border-top: 1px solid var(--bt-filet); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
.faq-body { transition: none; }
.faq-icon.open { transform: rotate(180deg); }

/* ───────────── Pied ───────────── */
body.rs-page .bt-pied { margin-top: 40px; }

/* Vue 360° d'une voiture (surface nuit) */
.rs-360 { background: var(--bt-nuit); box-shadow: var(--bt-ombre-3); max-height: 100dvh; }
@media (min-width: 640px) { .rs-360 { border-radius: var(--bt-rayon); } }

/* ───────────── Ordre des feuilles ─────────────
   Tailwind (CDN) injecte sa feuille APRÈS celles-ci, et sa remise à zéro donne `background-color: transparent` à tout [type="button"] (même poids
   qu'une classe). Les fonds des boutons de la page sont donc réaffirmés ici, préfixés par body.rs-page. */
body.rs-page .bt-btn-primaire { background-color: var(--bt-marine); }
body.rs-page .bt-btn-primaire:hover { background-color: var(--bt-marine-fort); }
/* Bouton « Payer » : texte blanc ; en sombre le rouge éclairci de --bt-rouge n'atteindrait pas 4,5:1, d'où --rs-signal (rouge soutenu). */
body.rs-page .bt-btn-signal { background-color: var(--rs-signal); }
body.rs-page .bt-btn-signal:hover { background-color: var(--rs-signal-fort); }
body.rs-page .bt-btn-second { background-color: var(--bt-surface); }
body.rs-page .bt-btn-second:hover { background-color: var(--bt-surface-2); }
body.rs-page :is(.mois-chip, .rs-btn-info, .rs-carte-bouton, .qty-btn, .rs-fermer) { background-color: var(--bt-surface); }
body.rs-page :is(.rs-btn-info, .rs-carte-bouton, .rs-fermer):hover, body.rs-page .qty-btn:hover { background-color: var(--bt-papier-2); }
body.rs-page .mois-chip.actif { background-color: var(--bt-marine); }
body.rs-page .rs-btn-aide { background-color: var(--bt-papier-2); }
body.rs-page .rs-btn-aide:hover { background-color: var(--bt-marine-doux); }
body.rs-page .bt-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
body.rs-page .trajet-card.hidden, body.rs-page .modal-plan-overlay.hidden, body.rs-page .modal-seats-overlay.hidden { display: none; }

/* ───────────── Barre d'étapes sous l'en-tête commun (v4.401.1) ─────────────
   L'en-tête de la réservation est celui des autres pages ; la progression vit dans ce bandeau, collé sous l'en-tête, caché à
   l'étape 1 (liste des circulations) par goStep(). Il a toute la largeur : points plus grands, libellé de l'étape lisible. */
.rs-etapes-bande { position: sticky; top: calc(var(--bt-entete-h) + 1px + env(safe-area-inset-top, 0px)); z-index: 35; background: var(--bt-entete-fond);
                   -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bt-filet); padding: 8px 0 6px; }
.rs-etapes-bande[hidden] { display: none !important; }
.rs-etapes-bande .rs-progression { max-width: 520px; margin: 0 auto; }
.rs-etapes-bande .step-dot { width: 28px; height: 28px; }
.rs-etapes-bande .rs-progression-lib { font-size: 11px; }
@media (max-width: 479px) {
    .rs-etapes-bande .step-dot { width: 24px; height: 24px; font-size: 10px; }
    .rs-etapes-bande .step-dot .fas, .rs-etapes-bande .step-dot .fa-solid { font-size: 9px !important; }
}
