/* ==========================================================================
   pages/booking.css — Réserver (reserver.html / en/book.html)
   ========================================================================== */

.bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.bk-form { display: grid; gap: 18px; min-width: 0; }
.bk-step { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); padding: 22px; min-width: 0; }
.bk-step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 16px; padding: 0; }
.bk-step legend + * { clear: both; }
.bk-hint { color: var(--muted); font-size: .84rem; margin-top: 10px; }
.bk-hint:empty { display: none; }

/* Choix table / salle */
.bk-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bk-kind { position: relative; cursor: pointer; }
.bk-kind input, .bk-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bk-kind span { display: grid; gap: 4px; height: 100%; padding: 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2); background: var(--ink); transition: border-color .15s, background .15s; }
.bk-kind i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--brass); background: rgba(212, 162, 76, .1); border: 1px solid rgba(212, 162, 76, .3); margin-bottom: 4px; }
.bk-kind input:checked + span i { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.bk-kind b { font-size: 1.05rem; }
.bk-kind small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.bk-kind input:checked + span { border-color: var(--brass); background: rgba(212, 162, 76, .1); }
.bk-kind input:focus-visible + span, .bk-choice input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 3px; }

/* Créneaux et blocs */
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.bk-slot { display: grid; gap: 2px; text-align: center; padding: 14px 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2); background: var(--ink); color: var(--cream); cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.bk-slot b { font-size: 1.1rem; }
.bk-slot small { color: var(--muted); font-size: .78rem; }
.bk-slot:hover:not(:disabled) { border-color: var(--brass); }
.bk-slot.is-on { border-color: var(--brass); background: var(--brass); color: var(--ink); }
.bk-slot.is-on small { color: rgba(20, 17, 14, .75); }
.bk-slot:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; text-decoration-color: rgba(244, 234, 216, .3); }

.bk-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bk-room { padding: 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2); background: var(--ink); display: grid; gap: 10px; align-content: start; }
.bk-room.is-on { border-color: var(--brass); }
.bk-room.is-small { opacity: .6; }
.bk-room__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.bk-room__head span { color: var(--muted); font-size: .8rem; }
.bk-room__price { font-family: var(--font-display); font-size: 1.35rem; color: var(--brass); }
.bk-room__price small { font-family: var(--font-body); font-size: .75rem; color: var(--muted); }
.bk-room__note { color: var(--muted); font-size: .82rem; }
.bk-room__blocks { display: grid; gap: 8px; }
.bk-slot--block { text-align: left; }

/* Paiement */
.bk-pay { display: grid; gap: 10px; }
.bk-choice { position: relative; cursor: pointer; }
.bk-choice span { display: grid; gap: 2px; padding: 14px 16px 14px 46px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2); background: var(--ink); position: relative; }
.bk-choice span::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); }
.bk-choice small { color: var(--muted); font-size: .82rem; }
.bk-choice input:checked + span { border-color: var(--brass); background: rgba(212, 162, 76, .08); }
.bk-choice input:checked + span::before { border-color: var(--brass); background: radial-gradient(circle, var(--brass) 45%, transparent 50%); }

.bk-who { font-size: .88rem; color: var(--cream-2); margin-bottom: 14px; }
.bk-who a { color: var(--brass); font-weight: 600; }
.bk-terms { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .86rem; color: var(--cream-2); cursor: pointer; }
.bk-terms input { margin-top: 2px; width: 20px; height: 20px; accent-color: var(--brass); flex-shrink: 0; }
.bk-terms a { color: var(--brass); text-decoration: underline; }
.bk-submit { min-height: 54px; font-size: 1rem; }
.bk-msg { font-size: .9rem; min-height: 1px; }
.bk-msg:empty { display: none; }
.bk-msg--error { padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(226, 100, 90, .14); color: #f3b7b0; }
.bk-secure { text-align: center; color: var(--muted); font-size: .8rem; }
.bk-secure .icon { margin-right: 4px; vertical-align: -2px; }

/* Récapitulatif */
.bk-summary { position: sticky; top: calc(var(--header-h) + 20px); padding: 22px; border-radius: var(--radius); border: 1px solid rgba(212, 162, 76, .35); background: linear-gradient(160deg, rgba(47, 70, 31, .55), var(--ink-2) 65%); }
.bk-summary h2 { font-size: 1.35rem; margin-bottom: 12px; }
.bk-rows { display: grid; gap: 8px; }
.bk-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.bk-rows dt { color: var(--muted); }
.bk-rows dd { text-align: right; font-weight: 600; }
.bk-rows--total { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.bk-rows--total b { font-family: var(--font-display); font-size: 1.4rem; color: var(--brass); }

/* Suivi d'une réservation, mode vitrine */
.bk-status-wrap, .bk-offline { max-width: 680px; margin: 0 auto 28px; }
.bk-offline { padding: 28px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-2); text-align: center; }
.bk-offline .btn-row { justify-content: center; margin-top: 18px; }
.bk-status { padding: 28px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-2); }
.bk-status h2 { font-size: 1.7rem; margin-bottom: 8px; }
.bk-status > p { color: var(--cream-2); margin-bottom: 18px; }
.bk-status--confirmed { border-color: rgba(91, 212, 122, .45); }
.bk-status--cancelled, .bk-status--expired { border-color: rgba(226, 100, 90, .35); }
.bk-cancel { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.bk-cancel h3 { font-size: 1.1rem; margin-bottom: 6px; }
.bk-cancel p { color: var(--cream-2); font-size: .9rem; margin-bottom: 12px; }
[data-bk-status]:not([hidden]) ~ .bk-layout { display: none; }
[data-bk-offline]:not([hidden]) ~ .bk-layout { display: none; }

@media (max-width: 960px) {
  .bk-layout { grid-template-columns: 1fr; }
  .bk-summary { position: static; order: -1; }
}
@media (max-width: 620px) {
  .bk-kinds { grid-template-columns: 1fr; }
  .bk-step { padding: 18px 16px; }
  .bk-slots { grid-template-columns: repeat(3, 1fr); }
  .bk-status, .bk-offline { padding: 22px 18px; }
}

/* ==========================================================================
   Parcours guidé en 4 étapes
   ========================================================================== */
/* Pastille numérotée ; devient une coche quand l'étape est terminée */
.bk-num {
  position: relative; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  display: inline-grid; place-items: center; font: 700 .9rem/1 var(--font-body);
  color: var(--brass); border: 1.5px solid rgba(212, 162, 76, .55); transition: background .2s, color .2s;
}
.bk-step.is-done .bk-num { background: var(--brass); color: transparent; border-color: var(--brass); }
.bk-step.is-done .bk-num::after {
  content: ""; position: absolute; left: 10px; top: 6px; width: 7px; height: 13px;
  border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.bk-step { scroll-margin-top: calc(var(--header-h) + 14px); transition: border-color .2s; }
.bk-step:focus-within { border-color: rgba(212, 162, 76, .35); }

/* Choix table / salle : cartes compactes, icône à gauche */
.bk-kind span { grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 14px 16px; }
.bk-kind i { grid-row: span 2; margin-bottom: 0; }
.bk-kind b { align-self: end; }
.bk-kind small { align-self: start; }
.bk-when { margin-top: 16px; }

/* Forfait (facultatif), sous les créneaux */
.bk-package { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.bk-opt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.bk-terms { margin: 18px 0 16px; }
.bk-step .bk-msg:not(:empty) { margin-top: 12px; }
.bk-step .bk-secure { margin-top: 12px; }

/* Bouton « étape suivante » du récapitulatif (ordinateur) */
.bk-summary__cta { margin-top: 18px; }

/* Barre d'action fixe (téléphone, tablette) */
.bk-bar { display: none; }
@media (max-width: 960px) {
  .bk-summary { display: none; }   /* sur petit écran : la barre du bas fait office de récapitulatif */
  .bk-bar {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(20, 17, 14, .97); border-top: 1px solid rgba(212, 162, 76, .35);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform .25s ease;
  }
  .bk-bar.is-hidden, .is-typing .bk-bar { transform: translateY(110%); }
  .bk-bar__info { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
  .bk-bar__info b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bk-bar__info span { font-size: .82rem; color: var(--brass-2); }
  .bk-bar .btn { flex-shrink: 0; min-height: 48px; padding: 12px 20px; }
  .has-bkbar .chatbot:not(.is-open) { bottom: calc(86px + env(safe-area-inset-bottom)); }
  [data-page="reserver"] .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  /* En-tête de page plus court : le formulaire commence plus haut */
  [data-page="reserver"] .page-hero { padding: 36px 0 8px; }
  [data-page="reserver"] .page-hero .lead { display: none; }
  [data-page="reserver"] main > .section { padding-top: 28px; }
}
@media (max-width: 620px) {
  .bk-kinds { grid-template-columns: 1fr; gap: 10px; }
  .bk-step legend { font-size: 1.2rem; }
}
