:root {
  --black: #000;
  --ink: #0d0f11;
  --muted: #646d75;
  --line: #e3e6e9;
  --surface: #fff;
  --page: #f4f5f6;
  --accent: #00ccf8;
  --red: #c8283a;
  --ok: #138a4b;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --bar-h: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* En-tête */
.bk-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px auto 1fr 44px;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 max(12px, calc((100vw - 760px) / 2));
  background: var(--black);
  color: #fff;
}
.bk-top__back, .bk-top__close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; text-decoration: none; }
.bk-top__back:hover, .bk-top__close:hover { background: rgba(255, 255, 255, 0.12); }
.bk-top__back[hidden] { display: grid !important; visibility: hidden; }
.bk-top__brand img { height: 30px; width: auto; display: block; }
.bk-top__title { margin: 0; font-size: 16px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bk-progress { display: flex; gap: 6px; padding: 10px max(16px, calc((100vw - 728px) / 2)) 0; }
.bk-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background-color 0.3s; }
.bk-progress span.is-done { background: var(--ink); }

/* Contenu */
.bk-main { width: min(100% - 32px, 728px); margin: 0 auto; padding: 20px 0 calc(var(--bar-h) + 32px); }
.bk-step:focus { outline: none; }
.bk-muted { color: var(--muted); }
.bk-small { font-size: 13px; }
.bk-hint { margin: 4px 0 16px; font-size: 15px; }
.bk-error { color: var(--red); font-weight: 600; }
.bk-note { background: #fff8e6; border: 1px solid #f3dfa6; border-radius: var(--radius); padding: 12px 14px; font-size: 15px; }
.bk-link { border: 0; background: none; padding: 0; color: var(--ink); font-weight: 700; text-decoration: underline; cursor: pointer; }

.bk-biz { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 18px 20px; margin-bottom: 18px; border-radius: var(--radius); background: var(--black); color: #fff; }
.bk-biz__name { margin: 0; font: 800 italic 26px/1.05 var(--font-display); text-transform: uppercase; }
.bk-biz p { margin: 2px 0 0; font-size: 14px; }
.bk-biz .bk-muted { color: #a9b1b8; }
.bk-biz__rating { text-decoration: none; font-weight: 700; white-space: nowrap; }
.bk-star { color: #fbbc05; }

.bk-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.bk-chips button { flex: none; border: 1.5px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; }
.bk-chips button span { color: var(--muted); margin-left: 4px; }
.bk-chips button[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bk-chips button[aria-selected='true'] span { color: #b8c0c6; }

/* Cartes prestations */
.bk-services { display: grid; gap: 12px; }
.bk-service { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color 0.15s, box-shadow 0.15s; }
.bk-service.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bk-service__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bk-service h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.bk-badge { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.bk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.bk-tags span { font-size: 13px; color: var(--muted); background: var(--page); padding: 2px 8px; border-radius: 4px; }
.bk-lines { margin: 0 0 6px; padding: 0; list-style: none; font-size: 14px; }
.bk-lines li { position: relative; padding: 2px 0 2px 22px; }
.bk-lines li::before { content: '•'; position: absolute; left: 6px; color: var(--muted); }
.bk-lines li.is-in::before { content: '✓'; left: 2px; color: var(--ok); font-weight: 700; }
.bk-lines li.is-out { color: #9aa1a7; text-decoration: line-through; }
.bk-lines li.is-out::before { content: '×'; left: 3px; color: #b5bbc0; text-decoration: none; }
.bk-lines.is-clamped li:nth-child(n + 5) { display: none; }
.bk-service__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.bk-price { margin: 0; font-size: 14px; }
.bk-price strong { font-size: 20px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.bk-policy { font-size: 13px; margin-top: 20px; }

/* Boutons */
.bk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.bk-btn--primary { background: var(--ink); color: #fff; }
.bk-btn--primary:hover:not(:disabled) { background: #2b3036; }
.bk-btn--primary:disabled { background: #a9afb4; cursor: not-allowed; }
.bk-btn--outline { border-color: var(--ink); background: var(--surface); }
.bk-btn--outline:hover { background: var(--page); }
.bk-btn--selected { background: var(--accent); color: #00141a; }

/* Véhicules */
.bk-vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bk-vehicle { display: grid; justify-items: start; gap: 2px; text-align: left; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.bk-vehicle svg { width: 72px; height: 45px; margin-bottom: 6px; color: var(--ink); }
.bk-vehicle span { font-size: 14px; }
.bk-vehicle.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bk-vehicle.is-on svg { color: #0098bb; }

/* Options, lieux */
.bk-group { margin-bottom: 28px; }
.bk-group__title { margin: 0 0 12px; font-size: 18px; }
.bk-option, .bk-radio { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 8px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.bk-option.is-on, .bk-radio.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bk-option input, .bk-radio input, .bk-check input { width: 20px; height: 20px; flex: none; accent-color: var(--ink); margin: 0; }
.bk-option__text, .bk-radio > span { display: grid; flex: 1; }
.bk-option__text .bk-muted, .bk-radio .bk-muted { font-size: 14px; }
.bk-option__price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

.bk-address { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding: 16px; background: var(--surface); border-radius: var(--radius); border: 1.5px solid var(--line); }
.bk-travel { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); }
.bk-travel.bk-error { color: var(--red); }

/* Champs */
.bk-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bk-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.bk-field--full { grid-column: 1 / -1; }
.bk-field input, .bk-field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 400; font-size: 16px; }
.bk-field input:focus, .bk-field textarea:focus { border-color: var(--ink); outline: none; }
.bk-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.bk-check input { margin-top: 2px; }

/* Calendrier et créneaux */
.bk-calendar { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; }
.bk-calendar__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bk-calendar__head strong { text-transform: capitalize; }
.bk-calendar__head button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; }
.bk-calendar__head button:disabled { opacity: 0.35; cursor: default; }
.bk-calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.bk-calendar__dow { font-size: 12px; color: var(--muted); padding: 4px 0; }
.bk-calendar__grid button { aspect-ratio: 1; max-height: 48px; border: 0; border-radius: 50%; background: none; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.bk-calendar__grid button:hover:not(:disabled) { background: var(--page); }
.bk-calendar__grid button:disabled { color: #c3c8cc; cursor: default; font-weight: 400; }
.bk-calendar__grid button.is-today { box-shadow: inset 0 0 0 1.5px var(--line); }
.bk-calendar__grid button.is-on { background: var(--ink); color: #fff; }
.bk-slots { margin-top: 16px; }
.bk-slots__date { font-weight: 700; margin: 0 0 10px; }
.bk-slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bk-slots__grid button { min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.bk-slots__grid button:hover { border-color: var(--ink); }
.bk-slots__grid button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Récapitulatif */
.bk-summary { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; }
.bk-summary__when { margin: 0 0 16px; font-size: 17px; }
.bk-summary__table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.bk-summary__table td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.bk-summary__table td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bk-summary__total td { font-size: 18px; font-weight: 800; border-top: 2px solid var(--ink); }
.bk-summary__deposit td { background: #e9fbff; padding-inline: 10px; }

/* Résultat */
.bk-result { text-align: center; background: var(--surface); border-radius: var(--radius); border: 1.5px solid var(--line); padding: 36px 24px; }
.bk-result h2 { margin: 12px 0 8px; font: 800 italic 34px/1 var(--font-display); text-transform: uppercase; }
.bk-result__icon { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #fff; font-size: 32px; font-weight: 800; }
.bk-result--cancelled .bk-result__icon { background: var(--red); }
.bk-result--pending_payment .bk-result__icon, .bk-result--request .bk-result__icon { background: var(--ink); }
.bk-result__when { display: grid; gap: 4px; max-width: 460px; margin: 18px auto; padding: 16px 18px; border-radius: 12px; background: var(--page); border-left: 4px solid var(--accent); text-align: left; font-size: 15px; }
.bk-result__when strong { font-size: 18px; }
.bk-result__mail { max-width: 460px; margin: 0 auto 14px; padding: 12px 14px; border-radius: 10px; background: #e6f9fe; color: #00566a; font-size: 14px; text-align: left; }
.bk-result__steps { max-width: 460px; margin: 0 auto; padding-left: 22px; text-align: left; font-size: 14px; color: var(--muted); }
.bk-result__steps li { margin: 6px 0; }
.bk-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

/* Barre du bas */
.bk-bar { position: fixed; inset: auto 0 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px max(10px, env(safe-area-inset-bottom)); }
.bk-bar__inner { width: min(100%, 728px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bk-bar__total { display: grid; font-size: 13px; color: var(--muted); }
.bk-bar__total strong { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bk-bar .bk-btn { min-width: 180px; min-height: 52px; }
.bk-bar__legal { width: min(100%, 728px); margin: 8px auto 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; justify-content: center; }

@media (max-width: 560px) {
  .bk-top { grid-template-columns: 44px 1fr 44px; }
  .bk-top__brand { display: none; }
  .bk-address, .bk-form { grid-template-columns: 1fr; }
  .bk-bar .bk-btn { min-width: 0; flex: 1; max-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
