/* ==========================================================================
   Booking pages — /reserver/ (book), /reserver/confirmation/ (booked), /reserver/annuler/ (cancel).
   Loaded only on those pages (after site.css). Dark "pit lane" style, yellow = what you picked.
   ========================================================================== */

:root { --danger: #B42318; --danger-bg: #FEF3F2; --danger-line: #F2A7A0; }
/* Round 4 (2026-10-27): white pages, façade blue for what you picked (was yellow on dark). */

/* The booking page has its own call link and confirm button: no mobile action bar there. */
.page-book .action-bar { display: none; }
.page-book { padding-bottom: env(safe-area-inset-bottom); }

/* ---------- Hero (compact: the form is the hero) ---------- */
.bk-hero {
  position: relative; border-bottom: 1px solid var(--line);
  background: radial-gradient(70% 140% at 100% 0%, rgba(43, 74, 110, .07), transparent 60%), var(--bg);
  padding-block: clamp(20px, 4vw, 48px) clamp(28px, 4vw, 52px);
}
.bk-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--signal); }
.bk-hero .crumbs { margin-bottom: 6px; }
.bk-hero__title { font: 700 clamp(2.5rem, 4.4vw + 1rem, 4.5rem)/.92 var(--font-display); text-transform: uppercase; text-wrap: balance; margin-bottom: 14px; }
.bk-hero__title em { font-style: italic; color: var(--signal); }
.bk-hero__lead { color: var(--muted); font-size: clamp(1.0625rem, .4vw + 1rem, 1.1875rem); max-width: 60ch; text-wrap: pretty; }
.bk-hero__points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; color: var(--muted); font-size: .9375rem; font-weight: 600; }
.bk-hero__points li { display: inline-flex; align-items: center; gap: 8px; }
.bk-hero__points .icon { width: 18px; height: 18px; color: var(--ok); }

.bk-demo {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 12px 14px; max-width: 62ch;
  border: 1px dashed var(--azzurro-4); border-radius: var(--radius-sm); background: var(--azzurro-1);
  color: var(--text); font-size: .9375rem; font-weight: 600; line-height: 1.45;
}
.bk-demo .icon { width: 20px; height: 20px; color: var(--signal); margin-top: 1px; }
.bk-demo--small { margin-top: 12px; font-size: .875rem; }

/* ---------- Layout ---------- */
.bk-form { padding-block: clamp(24px, 4vw, 56px) clamp(56px, 7vw, 96px); }
.bk-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1024px) {
  .bk-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
  .bk-summary { position: sticky; top: calc(var(--header-h) + 20px); }
}
@media (min-width: 1200px) { .bk-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; } }
.bk-steps { display: grid; gap: 16px; min-width: 0; }

/* ---------- Steps (fieldsets) ---------- */
.bk-step {
  margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: clamp(18px, 3vw, 28px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.bk-step > legend { float: left; width: 100%; padding: 0; margin-bottom: 18px; }
.bk-step > legend + * { clear: both; }
.bk-step__title { display: flex; align-items: center; gap: 12px; font: 700 clamp(1.5rem, .9vw + 1.2rem, 1.9rem)/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.bk-step__no {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-3); color: var(--text); font: 700 1.15rem/1 var(--font-display); border: 1px solid var(--line-strong);
}
.bk-step.is-done .bk-step__no { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.bk-hint { margin-top: 12px; color: var(--faint); font-size: .875rem; }

/* ---------- 1 · Services ---------- */
.bk-group + .bk-group { margin-top: 22px; }
.bk-group__title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font: 700 .875rem/1.2 var(--font-text); letter-spacing: .1em; text-transform: uppercase; }
.bk-group__title .icon { width: 18px; height: 18px; }
.bk-group--tire .bk-group__title .icon { color: var(--tire); }
.bk-group--detail .bk-group__title .icon { color: var(--azzurro-4); }
.bk-services { display: grid; gap: 10px; }
@media (min-width: 600px) { .bk-services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.bk-svc { position: relative; display: block; cursor: pointer; }
.bk-svc > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bk-svc__face {
  position: relative; display: grid; gap: 6px; height: 100%; padding: 14px 16px 14px 18px; overflow: hidden;
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.bk-svc__face::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--bay, var(--signal)); opacity: .9; }
.bk-svc--tire { --bay: var(--tire); }
.bk-svc--detail { --bay: var(--azzurro-3); }
.bk-svc__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-right: 28px; }
.bk-svc__name { font-weight: 650; line-height: 1.25; }
.bk-svc__price { font: 700 1.45rem/1 var(--font-display); color: var(--signal); white-space: nowrap; }
.bk-svc__price .cur { font-size: .8em; }
.bk-svc__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: .875rem; }
.bk-svc__meta .icon { width: 16px; height: 16px; }
.bk-svc__suv { justify-self: start; color: var(--faint); font-size: .875rem; font-weight: 600; }
.bk-svc__check {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: transparent;
}
.bk-svc__check .icon { width: 14px; height: 14px; stroke-width: 3; }
.bk-svc:hover .bk-svc__face { border-color: var(--line-strong); background: var(--surface-3); }
.bk-svc > input:checked + .bk-svc__face { border-color: var(--signal); background: var(--azzurro-1); box-shadow: 0 0 0 1px var(--signal) inset; }
.bk-svc > input:checked + .bk-svc__face .bk-svc__check { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.bk-svc > input:focus-visible + .bk-svc__face { outline: 3px solid var(--signal); outline-offset: 3px; }

/* ---------- 2 · Calendar ---------- */
.bk-cal__months { margin-bottom: 10px; font: 700 1.2rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; color: var(--text); }
.bk-cal__dows, .bk-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bk-cal__dows { margin-bottom: 6px; }
.bk-cal__dows span { text-align: center; color: var(--faint); font-size: .8125rem; font-weight: 700; letter-spacing: .06em; }
@media (min-width: 600px) { .bk-cal__dows, .bk-cal__grid { gap: 8px; } }
.bk-day { position: relative; display: block; min-width: 0; }
.bk-day > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bk-day__face {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 48px; aspect-ratio: 1 / 1; max-height: 64px; width: 100%;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2);
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}
.bk-day__num { font: 700 1.25rem/1 var(--font-display); }
.bk-day__mo { font-size: .875rem; font-weight: 700; line-height: 1; color: var(--signal); letter-spacing: -.01em; }
.bk-day:hover .bk-day__face { border-color: var(--line-strong); background: var(--surface-3); }
.bk-day > input:checked + .bk-day__face { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.bk-day > input:checked + .bk-day__face .bk-day__mo { color: var(--signal-ink); }
.bk-day > input:focus-visible + .bk-day__face { outline: 3px solid var(--signal); outline-offset: 2px; }
.bk-day.is-today .bk-day__face { border-color: var(--azzurro-4); }
.bk-day.is-off .bk-day__face { background: transparent; border-style: dashed; border-color: var(--line); color: #9AA3B1; }
.bk-day.is-off .bk-day__num { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.bk-day.is-off .bk-day__mo { color: #9AA3B1; }
.bk-day.is-pad { visibility: hidden; }

.bk-nojs { margin-top: 16px; }
.js .bk-nojs { display: none; }

/* ---------- 3 · Times ---------- */
.bk-slots { min-height: 52px; }
.bk-slots__for { font-weight: 650; margin-bottom: 4px; }
.bk-slots__period { margin: 14px 0 8px; color: var(--faint); font-size: .875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.bk-slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.bk-slot { position: relative; display: block; }
.bk-slot > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bk-slot__face {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 10px;
  border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface-2);
  font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.bk-slot:hover .bk-slot__face { border-color: var(--text); }
.bk-slot > input:checked + .bk-slot__face { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.bk-slot > input:focus-visible + .bk-slot__face { outline: 3px solid var(--signal); outline-offset: 2px; }
.bk-slots__msg { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.bk-slots__msg.is-warn { color: var(--text); border: 1px solid var(--line-strong); }
.bk-slots__msg.is-loading::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2.5px solid var(--line-strong); border-top-color: var(--signal); animation: bk-spin .8s linear infinite;
}
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* ---------- 4 · Details ---------- */
.bk-fields { display: grid; gap: 16px; }
@media (min-width: 600px) { .bk-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; } .bk-field--full { grid-column: 1 / -1; } }
.bk-field { display: grid; gap: 6px; align-content: start; min-width: 0; margin: 0; border: 0; padding: 0; }
.bk-field > label:not(.bk-check):not(.bk-radio), .bk-field > legend { font-weight: 650; font-size: 1rem; padding: 0; }
.bk-field__opt { color: var(--faint); font-weight: 500; }
.bk-field__hint { color: var(--faint); font-size: .875rem; }
.bk-field input[type="text"], .bk-field input[type="tel"], .bk-field input[type="email"], .bk-field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 12px;
  background: var(--bg); color: var(--text); border: 1.5px solid var(--line-strong);
  font: 400 1.0625rem/1.4 var(--font-text); /* ≥ 16px: no zoom on iOS */
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.bk-field textarea { min-height: 96px; resize: vertical; }
.bk-field input::placeholder, .bk-field textarea::placeholder { color: #8A94A3; }
.bk-field input:hover, .bk-field textarea:hover { border-color: var(--faint); }
.bk-field input:focus, .bk-field textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(43, 74, 110, .2); }
.bk-field [aria-invalid="true"] { border-color: var(--danger-line); }
.bk-field__error { display: flex; align-items: flex-start; gap: 6px; color: var(--danger); font-size: .9375rem; font-weight: 600; }
.bk-step > .bk-field__error { margin-bottom: 12px; }
.bk-field__error .icon { width: 18px; height: 18px; margin-top: 2px; }

.bk-check { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface-2); cursor: pointer; }
.bk-check > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-check__box { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-strong); color: transparent; background: var(--bg); }
.bk-check__box .icon { width: 15px; height: 15px; stroke-width: 3; }
.bk-check__label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 600; }
.bk-check__label .icon { width: 22px; height: 22px; color: var(--muted); }
.bk-check__extra { color: var(--signal); font-weight: 700; }
.bk-check > input:checked ~ .bk-check__box { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.bk-check:has(> input:checked) { border-color: var(--signal); }
.bk-check > input:focus-visible ~ .bk-check__box { outline: 3px solid var(--signal); outline-offset: 2px; }

.bk-storage { display: grid; gap: 8px; }
.bk-storage > legend { margin-bottom: 4px; }
.bk-radio { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; }
.bk-radio input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--signal); }
.bk-radio:has(input:checked) { border-color: var(--signal); }

.bk-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Summary ---------- */
.bk-summary__card {
  position: relative; overflow: hidden; padding: 22px 20px 20px; border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-dark);
}
.bk-summary__card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--checker) 0 0 / 12px 12px; opacity: .9; }
.bk-summary__title { font: 700 1.6rem/1 var(--font-display); text-transform: uppercase; margin: 6px 0 14px; }
.bk-summary__list { margin: 0; }
.bk-summary__list > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.bk-summary__list dt { color: var(--faint); font-size: .875rem; font-weight: 600; }
.bk-summary__list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.bk-summary__empty { color: #8A94A3; font-weight: 500; }
.bk-summary__price dd { font: 700 1.9rem/1 var(--font-display); color: var(--signal); }
.bk-summary__price .cur { font-size: .8em; }
.bk-summary__note { color: var(--muted); font-size: .875rem; margin: 6px 0 16px; }
.bk-submit[disabled] { opacity: .75; cursor: progress; }
.bk-submit.is-busy .icon--arrow { animation: bk-spin .8s linear infinite; }
.bk-summary__privacy, .bk-summary__where { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; color: var(--muted); font-size: .875rem; }
.bk-summary__privacy .icon, .bk-summary__where .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--faint); }
.bk-summary__help { margin-top: 10px; color: var(--muted); font-size: .9375rem; }
.bk-summary__help a { color: var(--text); font-weight: 650; }

/* ---------- Errors ---------- */
.bk-alert {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius);
  background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--text);
}
.bk-alert:focus { outline: none; }
.bk-alert > .icon { width: 22px; height: 22px; color: var(--danger); margin-top: 1px; }
.bk-alert__general { font-weight: 650; }
.bk-alert__title { font-weight: 700; margin-bottom: 4px; }
.bk-alert__general + .bk-alert__title { margin-top: 8px; }
.bk-alert ul { margin: 0; padding-left: 18px; }
.bk-alert li a { color: var(--text); text-decoration-color: var(--danger-line); display: inline-block; padding-block: 3px; }

/* ---------- Confirmation / cancel ---------- */
.bk-done { padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 104px); background: radial-gradient(60% 50% at 50% 0%, rgba(43, 74, 110, .07), transparent 70%), var(--bg); }
.bk-cancel { background: radial-gradient(60% 50% at 50% 0%, rgba(43, 74, 110, .06), transparent 70%), var(--bg); }
.bk-done__inner { max-width: 720px; display: grid; gap: 22px; }
.bk-done__head { text-align: center; display: grid; justify-items: center; }
.bk-done__head .eyebrow { margin-bottom: 8px; }
.bk-done__badge { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; margin-bottom: 18px; background: var(--ok); color: #FFFFFF; box-shadow: 0 0 0 10px rgba(30, 158, 104, .14); animation: bk-pop .45s var(--ease) both; }
.bk-done__badge .icon { width: 38px; height: 38px; stroke-width: 3; }
.bk-done__badge--muted { background: var(--surface-3); color: var(--muted); box-shadow: 0 0 0 10px var(--surface); }
.bk-done__badge--warn { background: var(--azzurro-2); color: var(--ink); box-shadow: 0 0 0 10px var(--azzurro-1); }
.bk-done__badge--muted .icon, .bk-done__badge--warn .icon { width: 32px; height: 32px; stroke-width: 2.2; }
@keyframes bk-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.bk-done__title { font: 700 clamp(2.75rem, 5vw + 1rem, 4.75rem)/.92 var(--font-display); text-transform: uppercase; text-wrap: balance; }
.bk-done__title em { font-style: italic; color: var(--signal); }
.bk-done__lead { margin-top: 12px; color: var(--muted); font-size: clamp(1.0625rem, .4vw + 1rem, 1.25rem); max-width: 52ch; text-wrap: pretty; }
.bk-done__lead a { color: var(--text); font-weight: 650; }
.bk-done .bk-demo { margin-inline: auto; text-align: left; }

.bk-ticket { position: relative; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-dark); overflow: hidden; }
.bk-ticket::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--checker) 0 0 / 12px 12px; }
.bk-ticket__no { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 24px 22px 18px; border-bottom: 2px dashed var(--line-strong); }
.bk-ticket__label { color: var(--faint); font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bk-ticket__value { font: 700 clamp(2.4rem, 3vw + 1.4rem, 3.25rem)/1 var(--font-display); color: var(--signal); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.bk-ticket__list { margin: 0; padding: 6px 22px; }
.bk-ticket__list > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.bk-ticket__list > div:first-child { border-top: 0; }
.bk-ticket__list dt { color: var(--faint); font-size: .9375rem; font-weight: 600; }
.bk-ticket__list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.bk-ticket__price dd { font: 700 1.75rem/1 var(--font-display); color: var(--signal); }
.bk-ticket__price .cur { font-size: .8em; }
.bk-ticket__note { padding: 0 22px 20px; color: var(--muted); font-size: .9375rem; }
.bk-ticket__note .icon { display: inline-block; vertical-align: -3px; width: 16px; height: 16px; color: var(--ok); }
@media (min-width: 600px) { .bk-ticket__list > div { grid-template-columns: 150px minmax(0, 1fr); } }

.bk-done__keep { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.bk-done__keep .icon { width: 20px; height: 20px; color: var(--signal); margin-top: 1px; }
.bk-done__actions { display: grid; gap: 12px; }
@media (min-width: 600px) { .bk-done__actions { display: flex; flex-wrap: wrap; justify-content: center; } }
.bk-done__foot { text-align: center; color: var(--muted); display: grid; gap: 4px; justify-items: center; }
.bk-done__foot a { color: var(--text); font-weight: 650; }

.btn--danger { background: #C9372C; color: #fff; }
.btn--danger:hover { background: #B02E24; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .bk-done__badge { animation: none; }
  .bk-slots__msg.is-loading::before, .bk-submit.is-busy .icon--arrow { animation-duration: 2s; }
}
