/* =====================================================================
   RDV MAJUNGA - Parcours de reservation
   ---------------------------------------------------------------------
   Feuille chargee uniquement par la page de reservation et par sa
   confirmation. Elle reprend les jetons de couleur et les composants
   de style.css : rien n'est redefini inutilement.

     1. Barre de progression
     2. Mise en page et panneaux d'etape
     3. Champs : compteurs, erreurs
     4. Choix de l'appartement
     5. Suggestions et retours du serveur
     6. Recapitulatif lateral
     7. Paiement
     8. Confirmation
     9. Responsive et impression
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. BARRE DE PROGRESSION
   ------------------------------------------------------------------ */
.booking-steps {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.booking-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-align: center;
}

/* Le trait de liaison part du centre de la pastille precedente */
.booking-step::before {
    content: "";
    position: absolute;
    top: 17px;
    right: 50%;
    left: -50%;
    height: 2px;
    background: var(--line);
    transition: background 420ms var(--ease-out);
}
.booking-step:first-child::before { display: none; }

.booking-step__dot {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    transition: border-color 300ms ease, background 300ms ease,
                color 300ms ease, transform 300ms var(--ease-out);
}

.booking-step__number,
.booking-step__done {
    grid-area: 1 / 1;
    transition: opacity 220ms ease, transform 220ms ease;
}
.booking-step__done { opacity: 0; transform: scale(.5); }

.booking-step__label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .01em;
    transition: color 300ms ease;
}

/* Etape en cours */
.booking-step.is-current .booking-step__dot {
    border-color: var(--sun-500);
    background: var(--sun-500);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 0 0 5px rgba(224, 135, 44, .18);
}
.booking-step.is-current .booking-step__label { color: var(--ocean-900); }

/* Etapes franchies */
.booking-step.is-done .booking-step__dot {
    border-color: var(--palm-700);
    background: var(--palm-700);
    color: #fff;
}
.booking-step.is-done .booking-step__number { opacity: 0; transform: scale(.5); }
.booking-step.is-done .booking-step__done   { opacity: 1; transform: scale(1); }
.booking-step.is-done .booking-step__label  { color: var(--ocean-700); }
.booking-step.is-done + .booking-step::before,
.booking-step.is-current::before { background: var(--palm-700); }

/* ---------------------------------------------------------------------
   2. MISE EN PAGE ET PANNEAUX
   ------------------------------------------------------------------ */
.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.booking-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(22px, 3vw, 34px);
}

/* Une seule etape est visible a la fois. L'attribut hidden fait le
   travail ; l'animation n'est qu'un confort. */
.booking-panel[hidden] { display: none; }

.booking-panel.is-active {
    animation: bookingStepIn 420ms var(--ease-out) both;
}

@keyframes bookingStepIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* Retour en arriere : le panneau arrive par la gauche */
.booking-panel.is-active.is-back {
    animation-name: bookingStepBack;
}
@keyframes bookingStepBack {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: none; }
}

.booking-panel__head { margin-bottom: 22px; }
.booking-panel__head h2 { margin: 6px 0 6px; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.booking-panel__head p { margin: 0; color: var(--muted); font-size: .93rem; }

.booking-panel__count {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--sand-100);
    color: var(--ocean-700);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.booking-subtitle {
    margin: 28px 0 12px;
    font-size: 1.02rem;
    color: var(--ocean-900);
}

.booking-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.booking-note,
.booking-legal {
    margin: 16px 0 0;
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.6;
}
.booking-legal { text-align: center; }
.booking-note .icon { vertical-align: -.2em; margin-right: 4px; }

/* Le champ piège est masqué par style.css, chargé sur toutes les pages. */

/* ---------------------------------------------------------------------
   3. CHAMPS
   ------------------------------------------------------------------ */
.optional {
    font-size: .74rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
}

/* Le message d'erreur ne prend de la place que s'il en a besoin */
.booking .field-error:empty { display: none; }

/* Compteur d'occupants : plus simple au doigt qu'un champ nombre */
.stepper {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.stepper__btn {
    height: 46px;
    border: 0;
    background: var(--sand-50);
    color: var(--ocean-700);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease;
}
.stepper__btn:hover:not(:disabled) { background: var(--sand-200); }
.stepper__btn:disabled { opacity: .4; cursor: not-allowed; }

.stepper input {
    height: 46px;
    border: 0;
    border-radius: 0;
    text-align: center;
    font-weight: 700;
    color: var(--ocean-900);
    -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: 0; box-shadow: none; }
.stepper:focus-within { border-color: var(--ocean-600); }

/* ---------------------------------------------------------------------
   4. CHOIX DE L'APPARTEMENT
   ------------------------------------------------------------------ */
.room-choice {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.room-option {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms var(--ease-out);
}
.room-option:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 24px rgba(15, 23, 42, .1); }

.room-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.room-option__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--sand-100);
}
.room-option__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.room-option__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px 16px;
    flex: 1;
}

.room-option__name {
    display: block;
    font-weight: 700;
    color: var(--ocean-900);
    font-size: 1.02rem;
}

.room-option__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 5px 0 9px;
    font-size: .78rem;
    color: var(--muted);
}
.room-option__specs .icon { vertical-align: -.2em; margin-right: 3px; color: var(--ocean-600); }

.room-option__price {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}
.room-option__price strong { color: var(--sun-600); font-size: 1.08rem; }
.room-option__price small { display: block; color: var(--muted); font-size: .76rem; }

.room-option__check {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line);
    color: transparent;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .15);
    transition: all 220ms ease;
}

.room-option.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(17, 114, 133, .14);
}
.room-option.is-selected .room-option__check {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

/* Le clavier doit voir le meme repere que la souris */
.room-option input:focus-visible ~ .room-option__check,
.room-option:focus-within { outline: 2px solid var(--ocean-600); outline-offset: 3px; }

/* ---------------------------------------------------------------------
   5. SUGGESTIONS ET RETOURS DU SERVEUR
   ------------------------------------------------------------------ */
.booking-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
.booking-suggestions button {
    padding: 7px 13px;
    border: 1px dashed var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ocean-700);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
}
.booking-suggestions button:hover {
    border-style: solid;
    border-color: var(--accent);
    background: var(--sand-50);
}
.booking-suggestions .icon { vertical-align: -.2em; margin-right: 4px; }

.booking-feedback {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: .9rem;
    line-height: 1.55;
    animation: bookingStepIn 300ms var(--ease-out) both;
}
.booking-feedback[hidden] { display: none; }
.booking-feedback.is-free {
    background: rgba(28, 107, 77, .08);
    color: var(--palm-700);
    border: 1px solid rgba(28, 107, 77, .22);
}
.booking-feedback.is-busy {
    background: var(--danger-100);
    color: var(--danger);
    border: 1px solid rgba(180, 54, 47, .22);
}
.booking-feedback.is-loading { background: var(--sand-100); color: var(--muted); }

/* ---------------------------------------------------------------------
   6. RECAPITULATIF LATERAL
   ------------------------------------------------------------------ */
.booking-aside { position: sticky; top: calc(var(--header-h) + 16px); }

.booking-summary {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.booking-summary__media { position: relative; aspect-ratio: 16 / 10; background: var(--sand-100); }
.booking-summary__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.booking-summary__badge {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(6, 50, 58, .82);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}

.booking-summary__body { padding: 20px; }
.booking-summary__body h3 { margin: 0 0 14px; font-size: 1rem; }

.booking-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid var(--line);
}
.booking-summary__total strong { font-size: 1.2rem; color: var(--sun-600); }

/* Le total clignote doucement a chaque recalcul */
.booking-summary__total strong.is-updated { animation: totalPulse 620ms var(--ease-out); }
@keyframes totalPulse {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.07); color: var(--palm-700); }
    100% { transform: scale(1); }
}

.booking-summary__note {
    margin: 14px 0 0;
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.55;
}
.booking-summary__note .icon { vertical-align: -.2em; margin-right: 3px; }

.booking-summary__facts {
    margin: 16px 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
    font-size: .82rem;
    color: var(--muted);
}
.booking-summary__facts li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }

/* ---------------------------------------------------------------------
   7. PAIEMENT
   ------------------------------------------------------------------ */
.booking-recap {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--sand-50);
}
.booking-recap h3 { margin: 0 0 12px; font-size: 1rem; }

.booking-recap__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 2px solid var(--line);
    font-weight: 700;
}
.booking-recap__total strong { font-size: 1.35rem; color: var(--sun-600); }

.booking-recap__deposit {
    margin: 12px 0 0;
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Le mode de paiement
   ------------------------------------------------------------------
   Deux encadres sobres : un filet fin, pas d'ombre, pas de pastille.
   Ce qui distingue le choix retenu, c'est la couleur du filet et un
   fond tres legerement teinte. */
.pay-modes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.pay-mode {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: border-color 200ms ease, background 200ms ease;
}
.pay-mode:hover:not(.is-disabled) { border-color: var(--ocean-300); }

.pay-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.pay-mode__icon {
    flex: none;
    margin-top: 2px;
    color: var(--ocean-600);
}
.pay-mode__body strong {
    display: block;
    color: var(--ocean-900);
    font-size: .98rem;
    margin-bottom: 2px;
}
.pay-mode__body small {
    display: block;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.5;
}

/* Choix retenu : le filet passe a l'ocean, le fond s'eclaircit a peine. */
.pay-mode.is-selected {
    border-color: var(--ocean-600);
    background: var(--ocean-100);
}
.pay-mode.is-selected .pay-mode__body strong { color: var(--ocean-800); }

/* Moyen annonce mais pas encore en place : ni pastille ni majuscules,
   juste un encadre en retrait. */
.pay-mode.is-disabled {
    cursor: default;
    background: var(--sand-50);
    color: var(--muted);
}
.pay-mode.is-disabled .pay-mode__icon { color: var(--muted); }
.pay-mode.is-disabled .pay-mode__body strong { color: var(--ink-soft); font-weight: 600; }

/* Ce qui se devoile apres un choix */
.pay-branch { margin-top: 26px; }
.pay-branch[hidden] { display: none; }

.pay-methods { display: grid; gap: 14px; }

/* Les deux operateurs, cote a cote
   ------------------------------------------------------------------
   Chacun garde la couleur sous laquelle les clients le connaissent :
   le jaune de MVola, l'orange d'Orange Money. Le vrai logo dans une
   pastille blanche les rend reconnaissables d'un coup d'oeil, bien
   plus qu'un libelle ou une icone generique.

   Le numero est ecrit gros et espace : il va etre recopie a la main
   sur un clavier de telephone. */
.pay-methods--duo { grid-template-columns: repeat(2, 1fr); }

.pay-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 6px 18px rgba(6, 50, 58, .05);
    cursor: pointer;
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.pay-method:hover:not(.is-disabled) {
    border-color: var(--operateur, var(--ocean-300));
    box-shadow: 0 10px 24px rgba(6, 50, 58, .08);
    transform: translateY(-2px);
}

.pay-method--mvola        { --operateur: #ffcc00; }
.pay-method--orange_money { --operateur: #ff7900; }

.pay-method input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.pay-method__logo {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(6, 50, 58, .08);
    overflow: hidden;
}
.pay-method__logo img { width: 68%; height: 68%; object-fit: contain; }

.pay-method__body { flex: 1; min-width: 0; }
.pay-method__body strong {
    display: block;
    color: var(--ocean-900);
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.pay-method__body small {
    display: block;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.pay-method__check {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--sand-50);
    color: transparent;
    transition: color 200ms ease, background 200ms ease;
}

.pay-method.is-selected {
    border-color: var(--operateur, var(--ocean-600));
    background: var(--ocean-100);
    box-shadow: 0 10px 26px rgba(6, 50, 58, .1);
}
.pay-method.is-selected .pay-method__logo { border-color: var(--operateur, var(--ocean-600)); }
.pay-method.is-selected .pay-method__check { color: #fff; background: var(--operateur, var(--ocean-700)); }

/* Operateur annonce mais pas encore ouvert */
.pay-method.is-disabled { opacity: .55; cursor: not-allowed; background: var(--sand-50); box-shadow: none; }

.pay-detail {
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    background: var(--sand-50);
    animation: bookingStepIn 320ms var(--ease-out) both;
}
.pay-detail[hidden] { display: none; }
.pay-detail h4 { margin: 0 0 14px; font-size: .95rem; color: var(--ocean-900); }

/* Montant a payer, mis en avant en tete de l'etape */
.pay-amount {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 22px;
    padding: 18px 22px;
    border-radius: 14px;
    background: var(--ocean-900);
    color: #fff;
}
.pay-amount span { font-size: .9rem; opacity: .85; }
.pay-amount strong { font-size: 1.6rem; letter-spacing: .01em; }

/* Coordonnees du compte de la residence */
.pay-target {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed var(--line);
}

.pay-target__line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 10px;
    font-size: .89rem;
    color: var(--muted);
}
.pay-target__line:last-child { margin-bottom: 0; }
.pay-target__line strong {
    font-size: 1.08rem;
    color: var(--ocean-900);
    letter-spacing: .03em;
    text-align: right;
}

/* Marche a suivre, numerotee */
.pay-steps {
    margin: 0 0 14px;
    padding-left: 20px;
    font-size: .89rem;
    color: var(--ink-soft);
    line-height: 1.75;
}
.pay-steps li { padding-left: 4px; }

.pay-note {
    display: flex;
    gap: 9px;
    margin: 14px 0 0;
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.6;
}
.pay-note .icon { flex: none; margin-top: 2px; }

.pay-note--strong {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--sand-100);
    color: var(--ink-soft);
}
.pay-note--strong strong { color: var(--ocean-900); }

.pay-providers { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

.pay-provider { position: relative; cursor: pointer; }
.pay-provider input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.pay-provider__name {
    display: block;
    padding: 10px 18px;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: .87rem;
    font-weight: 600;
    color: var(--ocean-700);
    transition: all 200ms ease;
}
.pay-provider:hover .pay-provider__name { border-color: var(--accent); }
.pay-provider input:checked ~ .pay-provider__name {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.pay-provider input:focus-visible ~ .pay-provider__name {
    outline: 2px solid var(--ocean-600);
    outline-offset: 2px;
}

.pay-instructions {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fff;
    border: 1px dashed var(--line);
}
.pay-instructions[hidden] { display: none; }

.pay-instructions__line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 8px;
    font-size: .89rem;
    color: var(--muted);
}
.pay-instructions__line strong {
    font-size: 1.05rem;
    color: var(--ocean-900);
    letter-spacing: .02em;
}

.pay-instructions__note {
    margin: 10px 0 0;
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.6;
}
.pay-instructions__note .icon { vertical-align: -.2em; margin-right: 4px; }

.pay-secure-note {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(28, 107, 77, .07);
    color: var(--palm-700);
    font-size: .85rem;
    line-height: 1.55;
}

/* Conditions et informations pratiques, a l'etape du recapitulatif */
.booking-terms { margin-top: 26px; }

.booking-terms__list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}
.booking-terms__list li {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: .89rem;
    color: var(--ink-soft);
    line-height: 1.6;
}
.booking-terms__list li:last-child { border-bottom: 0; }
.booking-terms__list .icon { flex: none; margin-top: 2px; color: var(--ocean-600); }

.booking-terms__block {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--sand-50);
    border: 1px solid var(--line);
}
.booking-terms__block h4 {
    margin: 0 0 8px;
    font-size: .92rem;
    color: var(--ocean-900);
}
.booking-terms__block p {
    margin: 0 0 8px;
    font-size: .87rem;
    color: var(--ink-soft);
    line-height: 1.65;
}
.booking-terms__block p:last-child { margin-bottom: 0; }

.booking-status-preview {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.booking-status-preview li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: .88rem;
    color: var(--muted);
}
.booking-status-preview li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------------
   8. CONFIRMATION
   ------------------------------------------------------------------ */
.confirm-card {
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.confirm-card__check { display: flex; justify-content: center; margin-bottom: 10px; }

.confirm-check__circle {
    stroke: var(--palm-700);
    stroke-width: 2.5;
    stroke-dasharray: 152;
    stroke-dashoffset: 152;
    animation: confirmCircle 620ms var(--ease-out) forwards;
}
.confirm-check__mark {
    stroke: var(--palm-700);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: confirmMark 380ms var(--ease-out) 480ms forwards;
}
@keyframes confirmCircle { to { stroke-dashoffset: 0; } }
@keyframes confirmMark   { to { stroke-dashoffset: 0; } }

.confirm-card h2 { margin: 6px 0 4px; }
.confirm-card__lead { margin: 0 0 20px; color: var(--muted); }

.confirm-ref {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
    padding: 14px 26px;
    border-radius: 14px;
    background: var(--sand-100);
}
.confirm-ref span { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.confirm-ref strong { font-size: 1.3rem; color: var(--ocean-900); letter-spacing: .06em; }

.confirm-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-bottom: 24px;
}
.confirm-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.confirm-badge small { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.confirm-list { text-align: left; margin-bottom: 20px; }

.confirm-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.confirm-help {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.confirm-help p { margin: 0 0 10px; font-size: .88rem; color: var(--muted); }
.confirm-help .btn-group { justify-content: center; }

/* ---------------------------------------------------------------------
   9. RESPONSIVE ET IMPRESSION
   ------------------------------------------------------------------ */
@media (max-width: 1020px) {
    .booking-layout { grid-template-columns: 1fr; }
    .booking-aside { position: static; order: -1; }
    .booking-summary__media { aspect-ratio: 21 / 9; }
}

@media (max-width: 700px) {
    /* Sur telephone, seule l'etape en cours porte son intitule */
    .booking-steps { gap: 0; }
    .booking-step__label { display: none; }
    .booking-step.is-current .booking-step__label {
        display: block;
        position: absolute;
        top: 44px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }
    .booking-steps { margin-bottom: 46px; }

    .room-choice { grid-template-columns: 1fr; }

    .pay-method { padding: 14px 16px; }

    /* Deux cadres cote a cote deviennent illisibles sur un telephone :
       ils s'empilent. */
    .pay-modes { grid-template-columns: 1fr; }
    .pay-methods--duo { grid-template-columns: 1fr; }
    .pay-mode { padding: 14px; }

    .booking-actions { flex-direction: column-reverse; }
    .booking-actions .btn { width: 100%; justify-content: center; }
    .booking-actions > span { display: none; }

    /* Cibles confortables au doigt */
    .stepper { grid-template-columns: 52px 1fr 52px; }
    .stepper__btn, .stepper input { height: 50px; }
    .confirm-actions .btn { width: 100%; justify-content: center; }
}

@media print {
    .site-header, .site-footer, .mobile-nav, .mobile-cta,
    .scroll-progress, .page-hero, .booking-steps, .confirm-actions,
    .confirm-help, .skip-link { display: none !important; }

    .confirm-card { border: 0; box-shadow: none; padding: 0; }
    .section { padding: 0 !important; }
    body { background: #fff; }
}

/* Un visiteur qui a demande moins d'animations voit un parcours fixe */
@media (prefers-reduced-motion: reduce) {
    .booking-panel.is-active,
    .pay-detail,
    .booking-feedback { animation: none; }
    .confirm-check__circle,
    .confirm-check__mark { animation: none; stroke-dashoffset: 0; }
    .booking-summary__total strong.is-updated { animation: none; }
}

/* ==================================================================
   PERIODES PRISES, CODE PROMOTIONNEL ET ACOMPTE
   ================================================================== */

/* Dates deja prises pour l'appartement choisi */
.periodes {
    margin-top: 16px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--sun-400);
    border-radius: var(--radius-sm);
    background: var(--sand-50);
}
.periodes__titre {
    margin: 0 0 8px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sun-600);
}
.periodes__liste {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.periodes__liste .periode {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    font-size: .82rem;
    color: var(--ink-soft);
}
.periodes__liste .periode small { color: var(--muted); font-size: .72rem; }
/* Une fermeture decidee par la residence se distingue d'un sejour vendu */
.periodes__liste .periode--fermeture { border-color: var(--sun-400); }
.periodes__liste .periode--fermeture small { color: var(--sun-600); }
.periodes__reste { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }

/* Code promotionnel */
.promo-box {
    margin-top: 26px;
    padding: 22px 24px;
    border: 1px dashed var(--ocean-300);
    border-radius: var(--radius);
    background: var(--ocean-100);
}
.promo-box .booking-subtitle { margin-top: 0; }
.promo-box__ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.promo-box__ligne input {
    flex: 1;
    min-width: 160px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-family: inherit;
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.promo-box__ligne input:focus { outline: 2px solid var(--ocean-600); outline-offset: -1px; }
.promo-box__ligne .btn { flex: none; }
.promo-box__reponse {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .87rem;
}
.promo-box__reponse.is-ok { background: var(--palm-100); color: var(--palm-700); }
.promo-box__reponse.is-ko { background: var(--danger-100); color: var(--danger); }
.promo-box__note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
    font-size: .78rem;
    color: var(--muted);
}

/* La ligne de remise ressort du reste du recapitulatif */
.summary-list__remise span:last-child { color: var(--palm-700); font-weight: 700; }

/* Choix entre acompte et paiement integral */
.acompte-box { margin-top: 26px; }
.acompte-choix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.acompte-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}
.acompte-option:hover { border-color: var(--ocean-300); }
.acompte-option input { position: absolute; opacity: 0; pointer-events: none; }
.acompte-option__corps { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.acompte-option__corps strong { color: var(--ocean-900); font-size: .95rem; }
.acompte-option__corps small { color: var(--muted); font-size: .84rem; }
.acompte-option__check {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: transparent;
    flex: none;
    transition: var(--transition);
}
.acompte-option.is-selected {
    border-color: var(--ocean-700);
    background: var(--ocean-100);
}
.acompte-option.is-selected .acompte-option__check {
    background: var(--ocean-700);
    border-color: var(--ocean-700);
    color: #fff;
}
.acompte-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
    font-size: .82rem;
    color: var(--muted);
}

@media (max-width: 560px) {
    .promo-box__ligne .btn { width: 100%; justify-content: center; }
    .acompte-choix { grid-template-columns: 1fr; }
}

/* ==================================================================
   PLUSIEURS APPARTEMENTS DANS UNE MEME DEMANDE
   ================================================================== */

/* Precision sous le titre du choix des chambres */
.booking-hint {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: -8px 0 18px;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--muted);
}
.booking-hint .icon { flex: none; color: var(--ocean-600); margin-top: 2px; }

/* Detail des appartements retenus, dans le recapitulatif */
.recap-chambres {
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--ocean-600);
    border-radius: var(--radius-sm);
    background: var(--sand-50);
}
.recap-chambres__titre {
    margin: 0 0 10px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ocean-700);
}
.recap-chambres ul { margin: 0; padding: 0; list-style: none; }
.recap-chambres li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    font-size: .88rem;
    color: var(--ink-soft);
}
.recap-chambres li + li { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); }
.recap-chambres strong { color: var(--ocean-900); white-space: nowrap; font-size: .84rem; }

/* Une case cochee se distingue nettement d'un bouton radio */
.room-option input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.room-option__check { transition: var(--transition); }
