/* ==========================================================================
   Tang Physio — page de réservation
   ========================================================================== */

.booking-hero {
  position: relative;
  padding: 70px 0 60px;
  background:
    linear-gradient(90deg, var(--black) 35%, rgba(11,11,11,.7) 70%, rgba(11,11,11,.9)),
    url("../assets/img/hero-athlete.jpg") right 30% / 55% auto no-repeat,
    var(--black);
  border-bottom: 1px solid var(--line-dark);
}
.booking-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.booking-hero p { margin: 0; color: #d0d0d0; max-width: 520px; }

.booking {
  background: var(--paper);
  color: var(--ink);
  padding: 60px 0 90px;
}
.booking__layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* Étapes */
.steps {
  display: flex;
  gap: 0;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8a8a8a;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  letter-spacing: 0;
}
.steps li.is-current { color: var(--ink); border-color: var(--red); }
.steps li.is-current::before { background: var(--red); border-color: var(--red); color: var(--white); }
.steps li.is-done { color: var(--ink); border-color: var(--ink); }
.steps li.is-done::before { content: "✓"; background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Panneaux */
.panel {
  background: var(--white);
  border: 1px solid var(--line-light);
  padding: 34px;
}
.panel[hidden] { display: none; }
.panel__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.panel__hint { margin: 0 0 26px; font-size: 13px; color: var(--muted-light); }
.panel__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
}
.btn--ghost-dark {
  border-color: var(--line-light);
  color: var(--ink);
}
.btn--ghost-dark:hover { background: var(--paper); border-color: var(--ink); }
.booking .btn--solid { color: var(--white); }
.booking .btn[disabled]:hover { background: var(--red); }

/* Choix du service */
.service-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.service-option { position: relative; }
.service-option input { position: absolute; opacity: 0; pointer-events: none; }
.service-option label {
  display: block;
  height: 100%;
  padding: 20px 20px 18px;
  border: 1.5px solid var(--line-light);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.service-option label:hover { border-color: #999; }
.service-option input:checked + label { border-color: var(--red); background: #fff6f6; }
.service-option input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 2px; }
.service-option strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.service-option .duration {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: .08em;
}
.service-option p { margin: 0; font-size: 13px; color: var(--muted-light); line-height: 1.5; }

/* Choix du physiothérapeute */
.panel__title--sub { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line-light); }
.practitioner-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.practitioner-option { position: relative; }
.practitioner-option input { position: absolute; opacity: 0; pointer-events: none; }
.practitioner-option label {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--line-light);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.practitioner-option label:hover { border-color: #999; }
.practitioner-option input:checked + label { border-color: var(--red); background: #fff6f6; }
.practitioner-option input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 2px; }
.practitioner-option__photo {
  flex: none;
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 2px solid var(--red);
  object-fit: cover;
}
.practitioner-option__photo--any {
  display: grid;
  place-items: center;
  border-color: var(--line-light);
  background: var(--paper);
}
.practitioner-option__photo--any svg,
.summary__any svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.practitioner-option__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.practitioner-option strong { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.practitioner-option__title { font-size: 12px; color: var(--muted-light); }
.practitioner-option__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.practitioner-option__tags span {
  padding: 2px 8px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  color: #555;
}
.summary__any {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line-dark);
}
.summary__any svg { stroke: var(--white); width: 22px; height: 22px; }

/* Calendrier + créneaux */
.datetime { display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; }

.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.calendar__month {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.calendar__nav {
  width: 36px; height: 36px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  transition: border-color .2s, background .2s;
}
.calendar__nav:hover:not([disabled]) { border-color: var(--ink); }
.calendar__nav[disabled] { opacity: .3; cursor: not-allowed; }

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar__dow {
  padding: 6px 0;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.calendar__day {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.calendar__day:hover:not([disabled]) { border-color: var(--ink); }
.calendar__day[disabled] { color: #c3c0ba; cursor: not-allowed; }
.calendar__day.has-slots::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 5px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--red);
}
.calendar__day.is-today { border-color: var(--line-light); }
.calendar__day.is-selected { background: var(--ink); border-color: var(--ink); color: var(--white); }
.calendar__day.is-selected::after { background: var(--white); }
.calendar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted-light);
}
.calendar__legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar__legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.calendar__legend i.off { background: #c3c0ba; }

.slots__date {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.slots__group { margin-bottom: 18px; }
.slots__label {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.slots__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  padding: 10px 0;
  border: 1px solid var(--line-light);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.slot:hover:not([disabled]) { border-color: var(--red); color: var(--red); }
.slot[disabled] { color: #c3c0ba; text-decoration: line-through; cursor: not-allowed; background: #faf9f7; }
.slot.is-selected,
.slot.is-selected:hover:not([disabled]) { background: var(--red); border-color: var(--red); color: var(--white); }
.slots__empty {
  padding: 28px 18px;
  border: 1px dashed var(--line-light);
  text-align: center;
  font-size: 13px;
  color: var(--muted-light);
}

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  font-size: 13px;
  color: var(--muted-light);
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line-light);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Formulaire */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.field label .req { color: var(--red); }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-light);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--red); }
.field__error { min-height: 16px; font-size: 12px; color: var(--red); }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #444;
}
.checkbox input { margin-top: 3px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }

.form-alert {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--red);
  background: #fff1f1;
  font-size: 13px;
}
.form-alert[hidden] { display: none; }

/* Confirmation */
.confirm { text-align: center; padding: 20px 0; }
.confirm__icon {
  display: grid;
  place-items: center;
  width: 70px; height: 70px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 30px;
}
.confirm h2 { margin: 0 0 10px; font-size: 20px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.confirm > p { margin: 0 auto 26px; max-width: 460px; font-size: 14px; color: var(--muted-light); }
.confirm__ref {
  display: inline-block;
  margin-bottom: 26px;
  padding: 8px 18px;
  border: 1px dashed var(--line-light);
  font-size: 12px;
  letter-spacing: .16em;
}
.confirm__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* Récapitulatif */
.summary {
  position: sticky;
  top: 120px;
  background: var(--ink);
  color: var(--white);
  padding: 30px;
}
.summary h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.summary h2::before { content: ""; width: 22px; height: 2px; background: var(--red); }
.summary dl { margin: 0; }
.summary dt {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.summary dd {
  margin: 4px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
}
.summary dd.is-empty { color: #666; }
.summary__practitioner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.summary__practitioner img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--red);
  object-fit: cover;
}
.summary__practitioner strong { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.summary__practitioner span { font-size: 11px; color: var(--muted-dark); }
.summary__note {
  margin: 22px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-dark);
}
.summary__note a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 1000px) {
  .booking__layout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .datetime { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .booking-hero { background: linear-gradient(0deg, var(--black), rgba(11,11,11,.75)), url("../assets/img/hero-athlete.jpg") center 30% / cover no-repeat; }
  .booking { padding: 30px 0 60px; }
  .panel { padding: 22px 16px; }
  .steps li { font-size: 0; gap: 0; justify-content: center; }
  .steps li::before { font-size: 11px; }
  .service-options { grid-template-columns: 1fr; }
  .practitioner-options { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .panel__actions { flex-direction: column-reverse; align-items: stretch; }
  .panel__actions .btn { justify-content: center; }
  .summary { padding: 22px 16px; }
}
