/* DEZIGN PRODUCTION — Réservation */

.bk-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: bkFade 200ms var(--ease-out) both;
}

@keyframes bkFade { from { opacity: 0 } to { opacity: 1 } }

.bk-dialog {
  position: relative;
  width: min(100%, 940px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  padding: 44px 48px 40px;
  animation: bkRise 260ms var(--ease-out) both;
}

@keyframes bkRise {
  from { opacity: 0; transform: translateY(14px) }
  to { opacity: 1; transform: none }
}

.bk-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.bk-close:hover { color: var(--accent); border-color: var(--line); }

/* ---------- head ---------- */

.bk-head { margin-bottom: 36px; }

.bk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.bk-eyebrow .bk-zmark { display: block; height: 13px; width: auto; flex-shrink: 0; }

.bk-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.bk-sub {
  margin-top: 16px;
  max-width: 430px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

.bk-sub strong { color: var(--text); font-weight: 700; }

.bk-progress {
  list-style: none;
  display: flex;
  gap: 26px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bk-progress li {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  transition: color 200ms ease;
}

.bk-progress li span {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 400;
}

.bk-progress li.is-on { color: var(--text-dim); }
.bk-progress li.is-on span { color: var(--text-dim); }
.bk-progress li.is-done { color: var(--text-dimmer); }
.bk-progress li.is-done span { color: var(--text-dimmer); }

/* ---------- step 1 : calendar + slots ---------- */

.bk-when {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
  gap: 44px;
}

.bk-cal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.bk-month {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bk-nav {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.bk-nav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--bg-2); }
.bk-nav:disabled { color: var(--text-dimmer); opacity: 0.4; cursor: default; }
.bk-nav:active:not(:disabled) { transform: scale(0.94); }

.bk-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.bk-dows span {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dimmer);
}

.bk-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.bk-day {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.bk-day.is-blank { pointer-events: none; }
.bk-day.is-off { color: var(--text-dimmer); opacity: 0.32; cursor: default; }
.bk-day:not(.is-off):hover { border-color: var(--line-2); background: var(--bg-2); }
.bk-day.is-on, .bk-day.is-on:hover { background: var(--accent); border-color: var(--accent); color: #0a0908; font-weight: 700; }
.bk-day:active:not(.is-off) { transform: scale(0.94); }

/* Jours ouverts (lundi, mercredi) : 3 voyants = 3 créneaux, orange = libre. */
.bk-day { position: relative; }
.bk-day.is-open { border-color: var(--line); }
.bk-day.is-full { opacity: 0.32; text-decoration: line-through; text-decoration-color: var(--text-dimmer); }
.bk-day-dots {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
}
.bk-day-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dimmer);
  opacity: 0.45;
}
.bk-day-dots i.is-free { background: var(--accent); opacity: 1; }
.bk-day.is-on .bk-day-dots i { background: #0a0908; opacity: 0.35; }
.bk-day.is-on .bk-day-dots i.is-free { opacity: 1; }



.bk-slots { display: flex; flex-direction: column; gap: 18px; }

.bk-slots-empty {
  font-size: 14px;
  color: var(--text-dim);
  padding-top: 6px;
}

.bk-slots-note {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.bk-slots-day {
  align-self: flex-start;
  background: var(--accent);
  color: #0a0908;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  padding: 9px 13px 10px;
  margin-top: -6px;
}

.bk-slot-group { display: flex; flex-direction: column; gap: 10px; }

.bk-slot-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.bk-slot-row { display: flex; flex-wrap: wrap; gap: 8px; }

.bk-slot {
  min-width: 74px;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.bk-slot:hover { border-color: var(--line-2); background: var(--bg-2); }
.bk-slot.is-on { background: var(--accent); border-color: var(--accent); color: #0a0908; }
.bk-slot:active { transform: scale(0.96); }

/* libre = voyant orange · pris = éteint, barré, non cliquable */
.bk-slot.is-free { border-color: var(--accent); color: var(--accent); }
.bk-slot.is-free:hover { background: var(--accent); color: #0a0908; }
.bk-slot.is-taken {
  opacity: 0.32;
  cursor: not-allowed;
  text-decoration: line-through;
  color: var(--text-dim);
  border-color: var(--line);
  background: var(--bg-2);
}
.bk-slot.is-taken:active { transform: none; }

.bk-slots-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: -6px; }
.bk-slots-head .bk-slots-day { margin-top: 0; }
.bk-places {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.bk-slot-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.bk-slot-legend i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-dimmer); opacity: 0.45;
}
.bk-slot-legend i.is-free { background: var(--accent); opacity: 1; }
.bk-slot-legend i + i, .bk-slot-legend i:not(:first-child) { margin-left: 10px; }

.bk-loading { animation: bkPulse 1.2s ease-in-out infinite; }
@keyframes bkPulse { 0%, 100% { opacity: 0.55 } 50% { opacity: 1 } }

.bk-nodispo {
  margin-top: auto;
  padding-top: 18px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: color 160ms ease;
}
.bk-nodispo:hover { color: var(--accent); }

/* ---------- step 2 : form ---------- */

.bk-who, .bk-how { display: flex; flex-direction: column; gap: 26px; }
.bk-how .bk-modes legend { font-size: 10px; margin-bottom: 14px; }

.bk-recap {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
}

.bk-recap-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

.bk-recap-value { font-size: 14px; font-weight: 600; color: var(--text); }

.bk-edit {
  background: none;
  border: none;
  padding: 8px 0;
  color: var(--accent);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.bk-edit:hover { opacity: 0.68; }

.bk-modes { border: none; }

.bk-modes legend {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding: 0;
}

.bk-mode-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bk-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 66px;
  padding: 13px 15px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.bk-mode:hover { border-color: var(--line-2); }
.bk-mode.is-on { background: var(--accent); border-color: var(--accent); color: #0a0908; }
.bk-mode:active { transform: scale(0.98); }

.bk-mode-label { font-size: 13.5px; font-weight: 700; letter-spacing: 0.01em; }

.bk-mode-note {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--text-dim);
  transition: color 160ms ease;
}

.bk-mode.is-on .bk-mode-note { color: rgba(10, 9, 8, 0.72); }

.bk-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.bk-field { display: flex; flex-direction: column; gap: 8px; }
.bk-field-wide { grid-column: 1 / -1; }

.bk-field > span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.bk-field > span i { color: var(--accent); font-style: normal; }

.bk-field input,
.bk-field select,
.bk-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 180ms ease, background 180ms ease;
}

.bk-field textarea { resize: vertical; min-height: 84px; }
.bk-field select option { background: #17140f; color: #f5f1ea; }

.bk-field select {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #807a72 50%), linear-gradient(135deg, #807a72 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.bk-field input:focus,
.bk-field select:focus,
.bk-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}

.bk-field input::placeholder,
.bk-field textarea::placeholder { color: var(--text-dimmer); }

.bk-addr { position: relative; display: flex; flex-direction: column; gap: 10px; }

.bk-addr-list {
  position: absolute;
  top: 78px;
  left: 0;
  right: 0;
  z-index: 5;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--accent);
  max-height: 216px;
  overflow-y: auto;
}

.bk-addr-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.bk-addr-list li:last-child button { border-bottom: none; }
.bk-addr-list button:hover { background: var(--bg-2); color: var(--accent); }

.bk-addr-note {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dimmer);
}

.bk-urgent {
  margin-top: 4px;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--accent);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 420px;
  text-wrap: pretty;
  opacity: 0;
  animation: bkUp 420ms var(--ease-out) 1000ms both;
}

.bk-urgent strong { color: var(--text); font-weight: 700; }

.bk-error {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--accent);
  padding: 12px 16px;
  border: 1px solid rgba(255, 79, 18, 0.35);
}

/* ---------- buttons ---------- */

.bk-foot {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 26px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
}

.bk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out);
}

.bk-btn:active:not(:disabled) { transform: scale(0.97); }

.bk-btn-primary { background: var(--accent); color: #0a0908; }
.bk-btn-primary:hover:not(:disabled) { background: #ff6a30; }
.bk-btn-primary:disabled { background: var(--line); color: var(--text-dimmer); cursor: default; }

.bk-btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.bk-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- step 3 : confirmation ---------- */

.bk-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 28px 0 12px;
}

.bk-seal { position: relative; width: 96px; height: 96px; }

.bk-seal::after {
  content: '';
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(255, 79, 18, 0.34) 0%, transparent 68%);
  filter: blur(18px);
  opacity: 0;
  animation: bkGlow 1100ms var(--ease-out) 260ms both;
}

@keyframes bkGlow {
  0% { opacity: 0; transform: scale(0.85) }
  45% { opacity: 1; transform: scale(1) }
  100% { opacity: 0.35; transform: scale(1.04) }
}

.bk-seal svg { position: relative; width: 100%; height: 100%; overflow: visible; }

.bk-seal circle, .bk-seal path {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk-seal-track { stroke: var(--line-2); }

.bk-seal-ring {
  stroke: var(--accent);
  stroke-dasharray: 227;
  stroke-dashoffset: 227;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: bkDraw 620ms var(--ease-out) 120ms forwards;
}

.bk-seal-check {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: bkDraw 320ms var(--ease-out) 660ms forwards;
}

@keyframes bkDraw { to { stroke-dashoffset: 0 } }

.bk-done-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1;
  margin-top: 12px;
  opacity: 0;
  animation: bkUp 420ms var(--ease-out) 780ms both;
}

.bk-ticket {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto auto;
  align-items: baseline;
  column-gap: 26px;
  row-gap: 4px;
  margin-top: 20px;
  padding: 18px 26px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in oklab, var(--accent) 7%, transparent);
  font-family: 'Montserrat', system-ui, sans-serif;
  opacity: 0;
  animation: bkUp 420ms var(--ease-out) 860ms both;
}
.bk-ticket-date, .bk-ticket-meta { display: flex; flex-direction: column; align-items: flex-start; }
.bk-ticket-label, .bk-ticket-time, .bk-ticket-mode { border-left: 1px solid var(--line); padding-left: 26px; }
.bk-ticket-dow, .bk-ticket-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
  line-height: 1; color: var(--accent);
}
.bk-ticket-num {
  font-size: clamp(44px, 6vw, 60px); font-weight: 900; line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text);
  margin: 8px 0 0;
}
.bk-ticket-mon {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text);
}
.bk-ticket-time {
  font-size: clamp(30px, 4vw, 40px); font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--text); margin: 8px 0 0;
}
.bk-ticket-mode { font-size: 13px; font-weight: 600; color: var(--muted, var(--text)); }

.bk-done-line {
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--dim, #a8a29a);
  opacity: 0;
  animation: bkUp 420ms var(--ease-out) 940ms both;
}

.bk-done-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.bk-done-step {
  position: relative;
  padding-left: 32px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim);
  text-wrap: pretty;
  opacity: 0;
  animation: bkUp 420ms var(--ease-out) 940ms both;
}

.bk-done-step:last-child { animation-delay: 1020ms; }

.bk-done-step strong { color: var(--text); font-weight: 700; }

.bk-done-n {
  position: absolute;
  left: 0;
  top: 0.2em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.bk-done .bk-btn {
  margin-top: 18px;
  opacity: 0;
  animation: bkUp 420ms var(--ease-out) 1100ms both;
}

@keyframes bkUp {
  from { opacity: 0; transform: translateY(8px) }
  to { opacity: 1; transform: none }
}

@media (prefers-reduced-motion: reduce) {
  .bk-loading { animation: none; }
  .bk-overlay, .bk-dialog,
  .bk-seal::after, .bk-seal-ring, .bk-seal-check,
  .bk-done-title, .bk-ticket, .bk-done-step, .bk-done-line, .bk-done .bk-btn {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .bk-dialog { padding: 36px 24px 30px; max-height: calc(100vh - 32px); }
  .bk-overlay { padding: 16px; }
  .bk-when { grid-template-columns: 1fr; gap: 32px; }
  .bk-modes { border: none; }
  .bk-fields { grid-template-columns: 1fr; }
  .bk-mode-row { grid-template-columns: 1fr 1fr; }
  .bk-foot { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .bk-btn { width: 100%; }
  .bk-edit { text-align: center; }
  .bk-head { margin-bottom: 28px; }
  .bk-sub {
  margin-top: 16px;
  max-width: 430px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

.bk-sub strong { color: var(--text); font-weight: 700; }

.bk-progress { gap: 18px; }
}

/* iPhone : les 3 étapes tiennent sur une ligne (« 03 Format » sortait du cadre) — 22/10 */
@media (max-width: 520px) {
  .bk-progress { gap: 0; justify-content: space-between; }
  .bk-progress li { gap: 6px; letter-spacing: 0.14em; font-size: 9.5px; }
  .bk-progress li span { letter-spacing: 0.06em; }
}
