/* Réservation en ligne — portail public.

   Registre volontairement clair, à l'inverse du panneau d'affichage
   (portail.css) : on quitte le « hall de gare » pour un parcours d'achat, où
   la lisibilité des champs prime sur l'effet. Les couleurs de marque sont
   redéclarées ici, cette feuille étant autonome comme sa voisine. */
:root {
    --ln-navy: #0B1F3C;
    --ln-navy-light: #16305A;
    --ln-green: #208040;
    --ln-red: #D3191A;
    --ln-gold: #F7C210;

    --rp-fond: #f4f6fb;
    --rp-carte: #ffffff;
    --rp-trait: #e6eaf2;
    --rp-doux: #8a94a6;
    --rp-ombre: 0 .5rem 1.5rem rgba(11, 31, 60, .07);
}

/* Plusieurs blocs de cette page (grilles, bandeau de confirmation…) fixent
   leur propre `display` sur la classe elle-même (ex. .rp-grille { display:
   grid }). Un attribut `hidden` a la même spécificité qu'une classe : sans
   cette règle, la classe l'emporte et l'élément reste visible malgré
   `hidden` — c'est ce qui faisait apparaître la date de retour en aller
   simple, et le bandeau de confirmation avant toute sélection. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }

.rp-body {
    margin: 0;
    background: var(--rp-fond);
    color: var(--ln-navy);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

/* ---------- En-tête ---------- */
.rp-entete { background: var(--ln-navy); }

.rp-entete-haut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
}

.rp-logo img { display: block; max-width: 165px; height: auto; }

.rp-retour-portail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c3cfe2;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}

.rp-retour-portail:hover { color: var(--ln-gold); }

.rp-brand-bar {
    height: 4px;
    background: linear-gradient(to right,
        var(--ln-green) 0%, var(--ln-green) 30%,
        var(--ln-gold) 45%, var(--ln-gold) 55%,
        var(--ln-red) 70%, var(--ln-red) 100%);
}

/* ---------- Fil d'étapes ---------- */
.rp-fil { background: #fff; border-bottom: 1px solid var(--rp-trait); }

.rp-fil ol {
    display: flex;
    gap: 8px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    list-style: none;
}

.rp-fil li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: var(--rp-doux);
    font-size: 13px;
    font-weight: 600;
}

.rp-puce {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #eef1f6;
    color: var(--rp-doux);
    font-size: 12px;
}

.rp-fil .rp-courant { color: var(--ln-navy); }
.rp-fil .rp-courant .rp-puce { background: var(--ln-navy); color: #fff; }
.rp-fil .rp-fait { color: var(--ln-green); }
.rp-fil .rp-fait .rp-puce { background: var(--ln-green); color: #fff; }

@media (max-width: 720px) {
    .rp-fil-libelle { display: none; }
    .rp-fil li { flex: 0; }
}

/* ---------- Corps ---------- */
.rp-main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 56px; }

.rp-titre { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 6px; }
.rp-sous-titre { color: var(--rp-doux); margin: 0 0 24px; }

.rp-carte {
    background: var(--rp-carte);
    border-radius: 14px;
    box-shadow: var(--rp-ombre);
    padding: 22px;
    margin-bottom: 16px;
}

.rp-carte-titre {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rp-doux);
    margin: 0 0 14px;
}

/* ---------- Formulaire ---------- */
.rp-grille { display: grid; gap: 14px; }
.rp-grille-3 { grid-template-columns: 1fr 1fr auto; align-items: end; }
.rp-grille-2 { grid-template-columns: 1fr 1fr; }
.rp-grille-1 { grid-template-columns: 1fr; }

@media (max-width: 720px) {
    .rp-grille-3, .rp-grille-2 { grid-template-columns: 1fr; }
}

.rp-champ label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--rp-doux);
    margin-bottom: 6px;
}

.rp-input, .rp-select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--rp-trait);
    border-radius: 10px;
    background: #fff;
    color: var(--ln-navy);
    font-family: inherit;
    font-size: 15px;
}

.rp-ville-recherche { position: relative; }

.rp-select-recherche {
    padding-left: 40px;
    padding-right: 38px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.rp-select-recherche::placeholder { color: #b7bfcd; }

.rp-ville-icone {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--ln-navy-light);
    font-size: 15px;
    pointer-events: none;
}

.rp-ville-chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--rp-doux);
    font-size: 12px;
    pointer-events: none;
    transition: transform .15s ease;
}

.rp-select-recherche:focus ~ .rp-ville-chevron { transform: translateY(-50%) rotate(180deg); }

.rp-ville-liste {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px;
    list-style: none;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--rp-trait);
    border-radius: 14px;
    box-shadow: 0 1rem 2.5rem rgba(11, 31, 60, .16);
    animation: rpApparitionListe .14s ease-out;
}

@keyframes rpApparitionListe {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rp-ville-liste li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14.5px;
    color: var(--ln-navy);
}

.rp-ville-liste li i {
    color: var(--rp-doux);
    font-size: 13px;
    flex-shrink: 0;
}

.rp-ville-liste li:hover,
.rp-ville-liste li:hover i {
    background: rgba(22, 48, 90, .07);
    color: var(--ln-navy-light);
}

.rp-ville-liste-active {
    background: rgba(32, 128, 64, .08);
    font-weight: 600;
}

.rp-ville-liste-active i { color: var(--ln-green) !important; }

.rp-ville-liste-vide {
    color: var(--rp-doux);
    cursor: default !important;
}

.rp-ville-liste-vide:hover {
    background: transparent !important;
}

.rp-input:focus, .rp-select:focus {
    outline: none;
    border-color: var(--ln-navy-light);
    box-shadow: 0 0 0 3px rgba(22, 48, 90, .1);
}

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    border: none;
    border-radius: 10px;
    background: var(--ln-navy);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: .15s;
}

.rp-btn:hover { background: var(--ln-navy-light); }
.rp-btn:disabled { opacity: .5; cursor: not-allowed; }

.rp-btn-or { background: var(--ln-gold); color: var(--ln-navy); }
.rp-btn-or:hover { background: #ffd23f; }

.rp-btn-large { width: 100%; height: 52px; font-size: 16px; }

.rp-btn-fantome {
    background: transparent;
    border: 1px solid var(--rp-trait);
    color: var(--ln-navy);
}

.rp-btn-fantome:hover { background: #f4f6fb; }

/* ---------- Résultats ---------- */
.rp-voyage {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border: 1px solid var(--rp-trait);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: .15s;
}

.rp-voyage:hover { border-color: var(--ln-navy-light); box-shadow: var(--rp-ombre); }

.rp-heures { text-align: center; flex-shrink: 0; min-width: 92px; }
.rp-heure { font-size: 21px; font-weight: 800; letter-spacing: .02em; }
.rp-heure-arrivee { font-size: 14px; color: var(--rp-doux); font-weight: 600; }
.rp-duree { font-size: 11px; color: var(--rp-doux); }

.rp-voyage-infos { flex: 1; min-width: 0; }
.rp-trajet { font-size: 16px; font-weight: 700; }
.rp-compagnie { font-size: 13px; color: var(--rp-doux); }

.rp-voyage-prix { text-align: right; flex-shrink: 0; }
.rp-prix { font-size: 20px; font-weight: 800; color: var(--ln-navy); white-space: nowrap; }
.rp-prix-mention { font-size: 11px; color: var(--rp-doux); }

.rp-pastille {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 2rem;
    font-size: 11px;
    font-weight: 700;
}

.rp-pastille-vert { background: #e6f4ea; color: var(--ln-green); }
.rp-pastille-or { background: #fef4d3; color: #a87b06; }
.rp-pastille-rouge { background: #fbe6e6; color: var(--ln-red); }
.rp-pastille-gris { background: #eef1f6; color: var(--rp-doux); }

@media (max-width: 720px) {
    .rp-voyage { flex-wrap: wrap; }
    .rp-voyage-prix { text-align: left; width: 100%; }
}

/* ---------- Aller-retour : cartes sélectionnables + bandeau de confirmation ---------- */
.rp-voyage-radio { cursor: pointer; align-items: flex-start; }
.rp-voyage-radio input[type="radio"] { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--ln-navy-light); cursor: pointer; }
.rp-voyage-radio:has(input:checked) {
    border-color: var(--ln-navy-light);
    box-shadow: 0 0 0 3px rgba(22, 48, 90, .12);
    background: #f8fafd;
}
.rp-voyage-indisponible { opacity: .55; cursor: not-allowed; }
.rp-voyage-indisponible input[type="radio"] { cursor: not-allowed; }

.rp-bandeau-continuer {
    position: sticky;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 -0.5rem 1.5rem rgba(11, 31, 60, .16);
    z-index: 10;
}

.rp-note-tarif { margin: 6px 0 0; font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.rp-note-tarif-ok { color: var(--ln-green); }
.rp-note-tarif-non { color: var(--rp-doux); }

.rp-paiement-ligne { border: 1px solid var(--rp-trait); border-radius: 10px; padding: 14px; margin-top: 12px; }
.rp-paiement-ligne + .rp-paiement-ligne { margin-top: 10px; }
.rp-paiement-ligne label { font-size: 12px; font-weight: 600; color: var(--rp-doux); display: block; margin-bottom: 4px; }
.rp-paiement-ligne select, .rp-paiement-ligne input { width: 100%; padding: 8px 10px; border: 1px solid var(--rp-trait); border-radius: 8px; margin-bottom: 8px; font-size: 14px; }

/* ---------- Plan des sièges ---------- */
.rp-bus { display: inline-block; background: #f8fafd; border: 1px solid var(--rp-trait); border-radius: 12px; padding: 16px; }
.rp-bus-rangee { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.rp-bus-couloir { width: 18px; flex-shrink: 0; }

.rp-siege {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #c9d4e6;
    border-radius: 8px;
    background: #fff;
    color: var(--ln-navy);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .1s;
}

.rp-siege:hover:not(:disabled) { border-color: var(--ln-navy); }
.rp-siege.rp-siege-pris { background: #eef1f6; color: #b6bfd0; cursor: not-allowed; border-style: dashed; }
.rp-siege.rp-siege-choisi { background: var(--ln-navy); color: #fff; border-color: var(--ln-navy); }

.rp-legende { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--rp-doux); }
.rp-legende span { display: inline-flex; align-items: center; gap: 6px; }
.rp-legende i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid #c9d4e6; display: inline-block; }

/* ---------- Choix (type de client, services) ---------- */
.rp-puces { display: flex; flex-wrap: wrap; gap: 8px; }

.rp-puce-choix {
    padding: 8px 16px;
    border: 1px solid var(--rp-trait);
    border-radius: 2rem;
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ln-navy);
    cursor: pointer;
}

.rp-puce-choix.rp-actif { background: var(--ln-navy); border-color: var(--ln-navy); color: #fff; }

.rp-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--rp-trait);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
}

.rp-option:has(input:checked) { border-color: var(--ln-navy); background: #f4f7fc; }
.rp-option input { width: 18px; height: 18px; accent-color: var(--ln-navy); }
.rp-option-nom { flex: 1; font-weight: 600; font-size: 14px; }
.rp-option-prix { font-weight: 700; white-space: nowrap; }

.rp-option-inactif { opacity: .5; cursor: not-allowed; }

/* ---------- Récapitulatif latéral ---------- */
.rp-colonnes { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }

@media (max-width: 900px) {
    .rp-colonnes { grid-template-columns: 1fr; }
}

.rp-resume-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.rp-resume-ligne + .rp-resume-total { border-top: 1px solid var(--rp-trait); margin-top: 8px; padding-top: 12px; }
.rp-resume-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; }
.rp-resume-cle { color: var(--rp-doux); }

/* ---------- Alertes ---------- */
.rp-alerte {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}

.rp-alerte-erreur { background: #fbe6e6; color: #8f1113; }
.rp-alerte-info { background: #eef2f9; color: var(--ln-navy-light); }
.rp-alerte-succes { background: #e6f4ea; color: #14602f; }

.rp-vide { text-align: center; padding: 48px 20px; color: var(--rp-doux); }
.rp-vide i { font-size: 40px; display: block; margin-bottom: 12px; opacity: .4; }

/* ---------- Pied ---------- */
.rp-pied { margin-top: 40px; background: var(--ln-navy); }
.rp-pied p { max-width: 1100px; margin: 0 auto; padding: 18px 24px; color: #93a4c4; font-size: 13px; text-align: center; }
.rp-pied a { color: var(--ln-gold); text-decoration: none; }

/* ---------- Impression du récapitulatif ---------- */
@media print {
    .rp-entete, .rp-fil, .rp-pied, .rp-no-print { display: none !important; }
    .rp-body { background: #fff; }
    .rp-carte { box-shadow: none; border: 1px solid var(--rp-trait); }
}

/* Voyageur dont les clics sur le plan des sièges seront attribués. */
.rp-passager-actif { border: 2px solid var(--ln-navy); }
