/* ==========================================================================
   Page « Parlons de votre projet » : formulaire à étapes + créneaux
   S'appuie sur les variables et composants de landing.css.
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.booking-page { min-height: 100vh; }
.booking-page [hidden] { display: none !important; }

/* ---------- En-tête ---------- */
.bk-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 84px;
}
.bk-back-site {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.92rem; font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.bk-back-site:hover { color: var(--ink); }

/* ---------- Mise en page ---------- */
.bk-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px;
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 80px);
}

/* ---------- Colonne d'introduction (sombre, grain) ---------- */
.bk-intro {
  position: sticky;
  top: 20px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--on-dark);
  min-height: 560px;
  display: flex; flex-direction: column;
}
.bk-intro .label { color: var(--on-dark-muted); }
.bk-intro h1 {
  margin: 28px 0 20px;
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
}
.bk-intro__lead { color: var(--on-dark-muted); font-size: 1.05rem; max-width: 26em; }
.bk-intro__list {
  margin: auto 0 0; padding: 40px 0 0;
  list-style: none;
}
.bk-intro__list li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--dark-line);
  font-size: 0.95rem;
}
.bk-intro__list li::before {
  content: "";
  width: 18px; height: 18px; flex: none;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E0E13' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Carte du formulaire ---------- */
.bk-card {
  position: relative;
  min-height: 560px;
  display: flex; flex-direction: column;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.bk-progress { margin-bottom: 36px; }
.bk-progress__text {
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bk-progress__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.bk-progress__bar span {
  display: block;
  height: 100%;
  width: 14%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}

.bk-demo {
  margin: -16px 0 28px;
  padding: 10px 14px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 0.85rem;
}

#booking { display: flex; flex-direction: column; flex: 1; }

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

/* ---------- Étapes ---------- */
.bk-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.bk-step.is-active { animation: step-in 0.45s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.bk-step.is-back { animation-name: step-back; }
@keyframes step-back { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

.bk-step legend {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  padding: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.bk-step legend:focus { outline: none; }
.bk-hint { margin: -12px 0 22px; font-size: 0.92rem; color: var(--muted); }
.bk-step .bk-hint:last-child { margin: 18px 0 0; }

/* Champs texte */
.bk-fields { display: grid; gap: 18px; }
.bk-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-field--full { grid-column: 1 / -1; }
.bk-field { display: grid; gap: 8px; }
.bk-field > span { font-size: 0.9rem; font-weight: 500; color: var(--ink-2); }
.bk-field em { font-style: normal; color: var(--muted); font-weight: 400; }
.bk-field input,
.bk-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.bk-field textarea { resize: vertical; min-height: 96px; }
.bk-field input::placeholder { color: #A3A19B; }
.bk-field input:hover,
.bk-field textarea:hover { border-color: #C9C5BB; }
.bk-field input:focus,
.bk-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.bk-field input[aria-invalid="true"] { border-color: #D93B3B; }
.bk-step .bk-field + .bk-field,
.bk-choices + .bk-field { margin-top: 20px; }

/* Choix (cases cliquables) */
.bk-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.bk-choices--list { grid-template-columns: minmax(0, 1fr); }
.bk-choice { position: relative; display: block; cursor: pointer; }
.bk-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-choice span {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.bk-choice span::before {
  content: "";
  width: 18px; height: 18px; flex: none;
  border: 1.5px solid #B9B5AB;
  border-radius: 50%;
  background: var(--surface) center / 11px no-repeat;
  transition: border-color 0.25s, background-color 0.25s;
}
.bk-choice--check span::before { border-radius: 6px; }
.bk-choice:hover span { border-color: #C9C5BB; background: var(--surface); }
.bk-choice:active span { transform: scale(0.99); }
.bk-choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.bk-choice input:checked + span::before {
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E0E13' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
}
.bk-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Créneaux ---------- */
.bk-slots__loading,
.bk-slots__empty { color: var(--muted); font-size: 0.95rem; }
.bk-days {
  display: flex; gap: 8px;
  margin: 0 -4px 20px;
  padding: 4px 4px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.bk-day {
  flex: none;
  display: grid; justify-items: center; gap: 2px;
  min-width: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.bk-day small { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bk-day strong { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.bk-day:hover { border-color: #C9C5BB; background: var(--surface); }
.bk-day[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-dark); }
.bk-day[aria-pressed="true"] small { color: var(--on-dark-muted); }

.bk-times-title { margin-bottom: 12px; font-size: 0.92rem; font-weight: 500; color: var(--ink-2); }
.bk-times-title::first-letter { text-transform: uppercase; }
.bk-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.bk-time {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.bk-time:hover { border-color: var(--accent); background: var(--surface); }
.bk-time[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--ink); font-weight: 600; }

/* ---------- Navigation & erreurs ---------- */
.bk-error {
  min-height: 1.6em;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #C42F2F;
}
.bk-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}
.bk-nav .btn { min-height: 52px; }
.bk-nav [data-next] { margin-left: auto; }
.bk-prev { color: var(--ink) !important; }
.bk-prev:hover { background: var(--surface-2) !important; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* ---------- Confirmation ---------- */
.bk-success { margin: auto 0; padding: 20px 0; }
.bk-success:focus { outline: none; }
.bk-success__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  animation: pop 0.6s var(--ease);
}
.bk-success__icon svg { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.bk-success h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: 18px; }
.bk-success p { color: var(--ink-2); max-width: 34em; }
.bk-success p + p { margin-top: 12px; }
.bk-success__when { font-size: 1.1rem; }
.bk-success__when strong { color: var(--ink); }
.bk-success .text-link { margin-top: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bk-layout { grid-template-columns: minmax(0, 1fr); }
  .bk-intro { position: static; min-height: 0; }
  .bk-intro h1 { margin: 18px 0 12px; }
  .bk-intro__list { display: none; }
  .bk-card { min-height: 0; }
}

@media (max-width: 560px) {
  .bk-header { min-height: 68px; }
  .bk-back-site { font-size: 0.85rem; }
  .bk-choices,
  .bk-fields--2 { grid-template-columns: minmax(0, 1fr); }
  .bk-progress__text span:last-child { display: none; }
  .bk-nav [data-next] { flex: 1; justify-content: center; position: relative; padding-inline: 52px; }
  .bk-nav [data-next] .btn__icon { position: absolute; right: 6px; top: 50%; margin-top: -20px; }
}

@media (prefers-reduced-motion: reduce) {
  .bk-step.is-active, .bk-success__icon { animation: none; }
}
