/* ══════════════════════════════════════════════════════════════════════════
   Booking flow — shared design system
   Pages : reservation.php, options.php, verification.php, paiement.php
   Aligné visuellement avec paiementreturn.php
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    --bk-red: #c40018;
    --bk-red-dark: #900010;
    --bk-dark: #111;
    --bk-bg: #f4f4f4;
    --bk-card: #fff;
    --bk-muted: #888;
    --bk-border: #e5e5e5;
    --bk-shadow: 0 2px 16px rgba(0, 0, 0, .09);
    --bk-shadow-hover: 0 6px 24px rgba(0, 0, 0, .15);
    --bk-radius: 14px;
    --bk-radius-lg: 16px;
}

/* ── Base layout ─────────────────────────────────────────────────────── */
body.bk-page {
    background: var(--bk-bg);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.bk-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 72px;
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.bk-hero {
    background: linear-gradient(135deg, var(--bk-dark) 0%, var(--bk-red) 100%);
    color: #fff;
    padding: 120px 20px 56px;
    text-align: center;
    position: relative;
}
.bk-hero h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #fff;
    letter-spacing: -.5px;
}
.bk-hero p {
    font-size: 1.9rem;
    opacity: .85;
    margin: 0;
    font-weight: 400;
}
@media (max-width: 768px) {
    .bk-hero { padding: 100px 16px 40px; }
    .bk-hero h1 { font-size: 2.8rem; }
    .bk-hero p { font-size: 1.6rem; }}

/* ── Progressbar moderne ─────────────────────────────────────────────── */
.bk-steps {
    max-width: 720px;
    margin: 28px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}
.bk-steps::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: rgba(255, 255, 255, .25);
    z-index: 0;
}
.bk-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    color: rgba(255, 255, 255, .6);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.bk-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 2px solid rgba(255, 255, 255, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    transition: all .3s;
}
.bk-step--active { color: #fff; }
.bk-step--active .bk-step-num {
    background: #fff;
    color: var(--bk-red);
    border-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
.bk-step--done { color: rgba(255, 255, 255, .9); }
.bk-step--done .bk-step-num {
    background: rgba(255, 255, 255, .9);
    color: var(--bk-red);
    border-color: rgba(255, 255, 255, .9);
}
.bk-step--done .bk-step-num::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}
.bk-step--done .bk-step-num span { display: none; }
@media (max-width: 560px) {
    .bk-steps { max-width: 100%; }
    .bk-step { font-size: 1rem; }
    .bk-step-num { width: 36px; height: 36px; font-size: 1.3rem; }
    .bk-steps::before { top: 18px; }}

/* ── Section title ───────────────────────────────────────────────────── */
.bk-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--bk-red);
    display: inline-block;
    text-shadow: none;
}

/* ── Recap bar (dates + agences) ─────────────────────────────────────── */
.bk-recap {
    background: var(--bk-card);
    border-radius: var(--bk-radius);
    box-shadow: var(--bk-shadow);
    padding: 20px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.bk-recap-dot {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.bk-recap-dot--dep { background: #eaf5ea; color: #27ae60; }
.bk-recap-dot--ret { background: #fde9e9; color: var(--bk-red); }
.bk-recap-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    font-weight: 700;
}
.bk-recap-val {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--bk-dark);
}
.bk-recap-sub {
    font-size: 1.3rem;
    color: var(--bk-muted);
}
.bk-recap-sub i { color: var(--bk-red); margin-right: 4px; }
.bk-recap-edit {
    background: #f7f7f7;
    color: var(--bk-red);
    border: 1px solid var(--bk-border);
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    cursor: pointer;
}
.bk-recap-edit:hover {
    background: var(--bk-red);
    color: #fff;
    border-color: var(--bk-red);
    text-decoration: none;
}
@media (max-width: 768px) {
    .bk-recap { padding: 16px 18px; }
    .bk-recap-val { font-size: 1.5rem; }}

/* ── Included / inclus ───────────────────────────────────────────────── */
.bk-included {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .bk-included { grid-template-columns: repeat(2, 1fr); }}
.bk-included-item {
    background: var(--bk-card);
    border-radius: var(--bk-radius);
    box-shadow: var(--bk-shadow);
    padding: 24px 18px;
    text-align: center;
}
.bk-included-item i {
    font-size: 2.8rem;
    color: var(--bk-red);
    margin-bottom: 10px;
}
.bk-included-item h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bk-dark);
    margin: 0 0 4px;
}
.bk-included-item p {
    font-size: 1.2rem;
    color: var(--bk-muted);
    margin: 0;
    line-height: 1.4;
}
.bk-included-full {
    background: var(--bk-card);
    border-left: 5px solid var(--bk-red);
    border-radius: var(--bk-radius);
    box-shadow: var(--bk-shadow);
    padding: 24px 32px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}
.bk-included-full i {
    font-size: 3.4rem;
    color: var(--bk-red);
    flex-shrink: 0;
}
.bk-included-full h4 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--bk-dark);
    margin: 0 0 6px;
}
.bk-included-full p {
    font-size: 1.4rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* ── Form (paiement.php) ─────────────────────────────────────────────── */
.bk-form {
    background: var(--bk-card);
    border-radius: var(--bk-radius);
    box-shadow: var(--bk-shadow);
    padding: 32px 36px;
    margin-bottom: 24px;
}

.bk-form-field { display: flex; flex-direction: column; }
.bk-form-field label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}
.bk-form-field label.is-error { color: var(--bk-red); }
/* ──────────────────────────────────────────────────────────────────────
   Champs de formulaire (.bk-form-field) — section consolidée
   ──────────────────────────────────────────────────────────────────────
   Style unique pour input / textarea / select / input[type=date] dans
   tous les contextes booking (modale, autres pages). Tout est groupé
   ici pour éviter les overrides éparpillés et la cascade compliquée.

   Variables CSS clés :
     - taille texte : 1.3rem
     - hauteur cible : 40px (= padding 8+8 + font ~24px)
     - bordure : --bk-border, focus : --bk-red

   Hacks navigateurs nécessaires :
     - <input type=date> : Chrome n'hérite pas du font-size sur le
       widget interne (shadow DOM). On le force via ::-webkit-datetime-edit-*.
     - <select> : flèche native moche. On la cache (appearance: none)
       et on dessine un chevron SVG en background.
   ────────────────────────────────────────────────────────────────────── */

/* Conteneur d'un champ */
.bk-form-field input, .bk-form-field textarea, .bk-form-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bk-border);
    border-radius: 8px;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--bk-dark);
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

/* Hauteur uniforme + reset apparence native pour les contrôles HTML5
   qui ont leur propre rendering (date, select). */
.bk-form-field input[type="date"], .bk-form-field select {
    height: 40px;
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
}

/* <input type="date"> : forcer le font-size sur le shadow DOM interne
   (sans ça Chrome rend la date plus petite que les <select>). */
.bk-form-field input[type="date"]::-webkit-datetime-edit, .bk-form-field input[type="date"]::-webkit-datetime-edit-fields-wrapper, .bk-form-field input[type="date"]::-webkit-datetime-edit-text, .bk-form-field input[type="date"]::-webkit-datetime-edit-year-field, .bk-form-field input[type="date"]::-webkit-datetime-edit-month-field, .bk-form-field input[type="date"]::-webkit-datetime-edit-day-field {
    font: inherit;
    color: inherit;
    line-height: 1;
}
/* Icône calendrier discrète, pleine opacité au hover */
.bk-form-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .55;
    filter: grayscale(.3);
    margin-left: 4px;
}
.bk-form-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* <select> : chevron SVG custom (la flèche native est masquée par
   appearance:none plus haut). */
.bk-form-field select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 6 8 10 12 6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* États focus / error */
.bk-form-field input:focus, .bk-form-field textarea:focus, .bk-form-field select:focus {
    outline: none;
    border-color: var(--bk-red);
    box-shadow: 0 0 0 3px rgba(196, 0, 24, .1);
}
.bk-form-field.is-error input, .bk-form-field.is-error textarea, .bk-form-field.is-error select {
    border-color: var(--bk-red);
    background: #fff8f8;
}

/* ── CTA principal réutilisable (.bk-cta) ────────────────────────────
   Bouton d'action primaire harmonisé (gradient noir → rouge avis, uppercase {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(to right, var(--bk-dark), var(--bk-red));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
    transition: opacity .2s, transform .2s, box-shadow .2s;
}
.bk-cta:hover, .bk-cta:focus {
    opacity: .94;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
    color: #fff;
    text-decoration: none;
}
.bk-cta i { transition: transform .2s; }
.bk-cta:hover i { transform: translateX(4px); }
.bk-cta--block { display: flex; width: 100%; }

/* ── Alertes unifiées (.bk-alert) ────────────────────────────────────── */
/* Une classe pour TOUS les messages d'erreur / avertissement / confirmation
   du flow de réservation : modale, bandeau plein-largeur, panneau inline.
   3 variantes : --error / --warning / --success.
   Ajouter --banner pour la version sticky pleine largeur (au-dessus de la
   navbar). */
.bk-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid;
    margin: 12px 0;
    font-size: 1rem;
    line-height: 1.5;
}
.bk-alert__icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1.5;
}
.bk-alert__body { flex: 1; }
.bk-alert__title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}
.bk-alert__actions {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.bk-alert__btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: .9rem;
    border: 1.5px solid;
    cursor: pointer;
    background: transparent;
}
.bk-alert__btn:hover { text-decoration: none; }

/* Variants */
.bk-alert--error { background: #fdebec; border-color: #c40018; color: #870010; }
.bk-alert--warning { background: #fff8e1; border-color: #ffa000; color: #6b3a00; }
.bk-alert--success { background: #e8f5e9; border-color: #2e7d32; color: #1b5e20; }

.bk-alert--error   .bk-alert__btn { border-color: #c40018; color: #c40018; }
.bk-alert--error   .bk-alert__btn:hover { background: #c40018; color: #fff; }
.bk-alert--warning .bk-alert__btn { border-color: #c47700; color: #6b3a00; }
.bk-alert--warning .bk-alert__btn:hover { background: #c47700; color: #fff; }
.bk-alert--success .bk-alert__btn { border-color: #2e7d32; color: #2e7d32; }
.bk-alert--success .bk-alert__btn:hover { background: #2e7d32; color: #fff; }

/* Banner sticky : pleine largeur, en haut, par-dessus la navbar */
.bk-alert--banner {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 3px solid;
    padding: 16px 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 99999;
    justify-content: center;
    text-align: center;
}
.bk-alert--banner.bk-alert--error { background: #c40018; color: #fff; border-bottom-color: #870010; }
.bk-alert--banner.bk-alert--error a { color: #fff; text-decoration: underline; font-weight: 600; }
.bk-alert--banner.bk-alert--error .bk-alert__btn { border-color: #fff; color: #fff; }
.bk-alert--banner.bk-alert--error .bk-alert__btn:hover { background: #fff; color: #c40018; }

/* ── Modal (reservation.php) ─────────────────────────────────────────── */
.bk-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    z-index: 99999;            /* au-dessus du widget Crisp (~ 9999) */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Reset au cas où un vieux CSS legacy (style.css / reservation.css)
       imposait visibility:hidden via le sélecteur #modifdateresa */
    visibility: visible;
}
.bk-modal.is-open { display: flex; visibility: visible; }

/* Le dropdown du timepicker (jquery.timepicker) a z-index:10001 par défaut
   → il apparaissait DERRIÈRE la modale .bk-modal qui est à 99999. On le
   passe au-dessus pour qu'il reste utilisable depuis l'intérieur de la
   modale "Modifier le trajet". Idem pour le datepicker jQuery UI. */
.ui-timepicker-wrapper { z-index: 100001 !important; }
.ui-datepicker { z-index: 100001 !important; }
.bk-modal-box {
    background: #fff;
    border-radius: 14px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;        /* élimine le scroll horizontal parasite quand
                                  un input natif a une largeur intrinsèque
                                  qui dépasse de quelques pixels */
    padding: 16px 18px 18px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
    box-sizing: border-box;
}
/* (box-sizing border-box est déjà sur .bk-form-field input/textarea/select
   dans la section consolidée plus haut — pas besoin de le redéfinir ici.
   On garde juste max-width: 100% en filet de sécurité pour les boutons
   et autres éléments éventuels qui ne sont pas .bk-form-field) */
.bk-modal-box button { max-width: 100%; }
.bk-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f3f3f3;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.15rem;
    color: #555;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bk-modal-close:hover { background: var(--bk-red); color: #fff; }
.bk-modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bk-dark);
    margin: 0 0 10px;
}
.bk-modal-sub { display: none; }
.bk-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.bk-modal-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 10px 11px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}
.bk-modal-col-title {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bk-dark);
    display: flex;
    align-items: center;
    gap: 5px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 1px;
}
/* Override label dans la modale : plus compact (label sur 1 ligne au-dessus
   du champ), pas en uppercase. Affecte uniquement les labels de la modale, pas les autres pages booking. */
.bk-modal .bk-form-field label {
    font-size: 1rem;
    margin-bottom: 2px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
/* (Bloc .bk-modal .bk-form-field input retiré : il sur-contraignait les
   inputs uniquement — pas les <select> ni input[type=date] — créant une
   incohérence visuelle entre les types de champs. Les valeurs uniformes
   sont définies plus haut dans la section ".bk-form-field input/textarea/
   select" consolidée.) */
@media (max-width: 640px) { .bk-modal-grid { grid-template-columns: 1fr; } }

.bk-radio-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bk-radio-group input[type=radio] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.bk-radio-group label {
    padding: 4px 12px;
    border: 1.5px solid var(--bk-border);
    border-radius: 18px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all .2s;
    font-size: 1.05rem;
    background: #fff;
}
.bk-radio-group label:hover {
    border-color: var(--bk-red);
    color: var(--bk-red);
    background: #fff5f6;
}
.bk-radio-group input[type=radio]:checked + label {
    background: linear-gradient(to right, var(--bk-dark), var(--bk-red));
    color: #fff;
    border-color: transparent;
}
.bk-radio-group input[type=radio]:checked + label:hover {
    opacity: .9;
    color: #fff;
}
.bk-modal-submit {
    width: 100%;
    background: linear-gradient(to right, var(--bk-dark), var(--bk-red));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: 10px;
    transition: opacity .2s;
}
.bk-modal-submit:hover { opacity: .88; }
.bk-modal-err {
    background: #fde9e9;
    border-left: 4px solid var(--bk-red);
    color: #7a0010;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 1.3rem;
}

/* ── Loading overlay (existing #Loading compatibility) ───────────────── */
.bk-loading {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .92);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bk-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(196, 0, 24, .15);
    border-top-color: var(--bk-red);
    border-radius: 50%;
    animation: bk-spin .8s linear infinite;
}
@keyframes bk-spin { to { transform: rotate(360deg); } }