/* Modale réservation — teal sarcelle, or (CTA), gris (alignée maquette) */

:root {
  --bm-teal: #0d9488;
  --bm-teal-hover: #0f766e;
  --bm-title-teal: #00acc1;
  --bm-teal-soft: rgba(13, 148, 136, 0.1);
  --bm-teal-email-soft: rgba(0, 172, 193, 0.14);
  --bm-teal-border: rgba(13, 148, 136, 0.45);
  /* CTA principal (Suivant, Continuer, Confirmer) — jaune or */
  --bm-gold-cta: #d4af37;
  --bm-gold-cta-hover: #c5a028;
  --bm-cta-on-gold: #1a1814;
  --bm-surface: #e5e7eb;
  --bm-header: #ffffff;
  --bm-ink: #1f2937;
  --bm-ink-muted: #6b7280;
  --bm-line: #e5e7eb;
  --bm-overlay: rgba(15, 23, 42, 0.55);
  --bm-step-idle-bg: #f3f4f6;
  --bm-step-idle-ring: #d1d5db;
  --bm-step-num-idle: #9ca3af;
  --bm-track: #eef0f4;
  --bm-connector: #d1d5db;
  --bm-connector-active: #0d9488;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.booking-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
}

.booking-modal-overlay[hidden] {
  display: none !important;
}

.booking-modal-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bm-overlay);
}

.booking-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--bm-surface);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  font-family: Inter, system-ui, sans-serif;
}

/* Résumé des erreurs de validation */
.bm-error-summary {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.bm-error-summary__title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 0.8rem;
}

.bm-error-summary__list {
  margin: 0;
  padding-left: 1.15rem;
}

.bm-error-summary__list li {
  margin-bottom: 4px;
}

.bm-consent-intro {
  margin: 0 0 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--bm-ink-muted);
}

.bm-inline-link {
  color: var(--bm-title-teal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bm-inline-link:hover {
  color: var(--bm-teal-hover);
}

.bm-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.bm-consent-label {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--bm-ink);
  cursor: pointer;
}

/* Couche succès */
.booking-success-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background: rgba(243, 244, 246, 0.97);
  backdrop-filter: blur(4px);
}

.booking-success-card {
  max-width: 360px;
  text-align: center;
  padding: 28px 24px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--bm-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.booking-success__title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bm-teal);
}

.booking-success__text {
  margin: 0 0 22px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--bm-ink-muted);
}

.booking-success__btn {
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--bm-title-teal);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.booking-success__btn:hover {
  background: var(--bm-teal-hover);
}

.booking-success__btn:focus-visible {
  outline: 2px solid var(--bm-title-teal);
  outline-offset: 3px;
}

.booking-modal__footer-next:disabled {
  opacity: 0.85;
  cursor: wait;
}

.booking-modal__footer-next.is-loading {
  cursor: wait;
}

.booking-confirm__spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(26, 24, 20, 0.18);
  border-top-color: var(--bm-cta-on-gold);
  border-radius: 999px;
  animation: bm-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes bm-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header blanc */
.booking-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  background: var(--bm-header);
  border-bottom: 1px solid var(--bm-line);
  flex-shrink: 0;
}

.booking-modal__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.booking-modal__icon {
  flex-shrink: 0;
  color: var(--bm-title-teal);
}

.booking-modal__title {
  margin: 0;
  font-size: clamp(0.78rem, 2.5vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bm-title-teal);
  line-height: 1.25;
}

.booking-modal__close {
  border: none;
  background: transparent;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--bm-ink-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.booking-modal__close:hover {
  color: var(--bm-ink);
  background: rgba(0, 0, 0, 0.05);
}

.booking-modal__body {
  padding: 16px 18px 108px;
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Progress */
.booking-progress {
  margin-bottom: 18px;
}

.booking-progress__track {
  display: flex;
  align-items: center;
  background: var(--bm-track);
  border-radius: 999px;
  padding: 10px 12px;
}

.booking-progress__segment {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.booking-progress__dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  box-sizing: border-box;
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  border: 2px solid transparent;
  background: var(--bm-step-idle-bg);
  color: var(--bm-step-num-idle);
}

/* Étape courante : premier pas = plein teal */
.booking-progress__dot--fill {
  background: var(--bm-teal);
  color: #fff;
  border-color: var(--bm-teal);
}

/* Étape courante : étapes >1 = contour teal */
.booking-progress__dot--ring {
  background: #fff;
  color: var(--bm-teal);
  border-color: var(--bm-teal);
}

/* Terminée */
.booking-progress__dot--done {
  background: var(--bm-teal);
  color: #fff;
  border-color: var(--bm-teal);
}

.booking-progress__line {
  flex: 1;
  height: 3px;
  background: var(--bm-connector);
  margin: 0 4px;
  min-width: 6px;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.booking-progress__line--active {
  background: var(--bm-connector-active);
}

/* Steps */
.booking-step {
  display: none;
  animation: booking-fade 0.22s ease;
}

.booking-step--active {
  display: block;
}

@keyframes booking-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Labels sections */
.bm-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bm-ink);
  margin-bottom: 8px;
}

.bm-hint {
  font-size: 0.75rem;
  color: var(--bm-ink-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}

/* Segmented */
.bm-segment {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--bm-line);
}

.bm-segment__btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #f9fafb;
  color: var(--bm-ink-muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.bm-segment__btn + .bm-segment__btn {
  border-left: 1px solid var(--bm-line);
}

.bm-segment__btn--active {
  background: var(--bm-teal-soft);
  color: var(--bm-teal);
  box-shadow: inset 0 0 0 1px var(--bm-teal-border);
}

/* Liste services scroll + scrollbar */
.bm-services-wrap {
  border: 1px solid var(--bm-teal-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.bm-services-head {
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bm-teal);
  background: var(--bm-teal-soft);
  border-bottom: 1px solid var(--bm-line);
}

.bm-services-scroll {
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #6b7280 #eef0f4;
}

.bm-services-scroll::-webkit-scrollbar {
  width: 10px;
}

.bm-services-scroll::-webkit-scrollbar-track {
  background: #eef0f4;
  border-radius: 10px;
}

.bm-services-scroll::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 10px;
  border: 2px solid #eef0f4;
}

.bm-cat {
  padding: 10px 12px 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bm-ink);
  background: #fafafa;
  border-bottom: 1px solid var(--bm-line);
}

.bm-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--bm-ink);
  border: none;
  border-bottom: 1px solid var(--bm-line);
  background: #fff;
  cursor: pointer;
  transition: background 0.12s ease;
}

.bm-opt:last-child {
  border-bottom: none;
}

.bm-opt:hover {
  background: #f9fafb;
}

.bm-opt--selected {
  background: var(--bm-teal-soft);
  box-shadow: inset 3px 0 0 0 var(--bm-teal);
}

/* Champs */
.bm-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .bm-field-row {
    grid-template-columns: 1fr;
  }
}

.bm-field {
  margin-bottom: 14px;
}

.bm-input,
.bm-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 0.875rem;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bm-ink);
}

.bm-input:focus,
.bm-textarea:focus {
  outline: none;
  border-color: var(--bm-teal-border);
  box-shadow: 0 0 0 3px var(--bm-teal-soft);
}

.bm-textarea {
  min-height: 88px;
  resize: vertical;
}

/* Login box */
.bm-login {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bm-teal-soft);
  border: 1px solid var(--bm-teal-border);
  margin-top: 4px;
}

.bm-login__text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--bm-ink);
  line-height: 1.45;
  flex: 1;
  min-width: 180px;
}

.bm-login__btn {
  padding: 8px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bm-teal);
  background: #fff;
  border: 2px solid var(--bm-teal);
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.bm-login__btn:hover {
  background: var(--bm-teal);
  color: #fff;
}

/* Step 1 stylist */
.booking-step1__heading {
  margin: 8px 0 18px;
  text-align: center;
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bm-ink);
}

.booking-step1__card-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}

.booking-stylist-card {
  width: min(340px, 100%);
}

.booking-stylist-card__media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}

.booking-stylist-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.booking-stylist-card__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0) 38%,
    rgba(55, 65, 81, 0.45) 68%,
    rgba(30, 41, 59, 0.82) 100%
  );
  pointer-events: none;
}

.booking-stylist-card__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 22px 18px 20px;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f9fafb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.booking-step-placeholder {
  text-align: center;
  padding: 32px 16px 24px;
  color: var(--bm-ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.booking-step-placeholder strong {
  display: block;
  color: var(--bm-ink);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Footer fixe deux boutons */
.booking-modal__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px 18px;
  background: linear-gradient(to top, var(--bm-surface) 85%, transparent);
  border-top: 1px solid var(--bm-line);
  flex-shrink: 0;
}

.booking-modal__footer-back {
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bm-ink-muted);
  background: #e5e7eb;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.booking-modal__footer-back:hover {
  background: #d1d5db;
  color: var(--bm-ink);
}

.booking-modal__footer-next {
  flex: 1;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bm-cta-on-gold);
  background: var(--bm-gold-cta);
  border: 1px solid rgba(26, 24, 20, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.booking-modal__footer-next:hover {
  background: var(--bm-gold-cta-hover);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.booking-modal__footer-next:active {
  transform: scale(0.99);
}

.booking-modal__footer-next:focus-visible,
.booking-modal__footer-back:focus-visible {
  outline: 2px solid var(--bm-title-teal);
  outline-offset: 2px;
}

.bm-spacer {
  height: 8px;
}

/* —— Étape 4 : récapitulatif —— */
.bm-recap {
  background: #f9fafb;
  border: 1px solid var(--bm-line);
  border-radius: 12px;
  padding: 20px 20px 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.bm-recap-row {
  display: grid;
  grid-template-columns: minmax(100px, 120px) 1fr;
  gap: 12px 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.bm-recap-row--last,
.bm-recap-row:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.bm-recap-label {
  font-size: 0.8rem;
  color: var(--bm-ink-muted);
  line-height: 1.4;
  padding-top: 2px;
}

.bm-recap-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bm-ink);
  line-height: 1.45;
  text-align: right;
  word-break: break-word;
}

.bm-recap-value--date {
  color: var(--bm-title-teal);
  font-weight: 700;
}

@media (max-width: 420px) {
  .bm-recap-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .bm-recap-value {
    text-align: left;
  }
}

/* Bouton confirmer final */
.booking-modal__footer-confirm {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  min-height: 56px;
}

.booking-confirm__badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #22c55e;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.booking-confirm__label {
  font-size: clamp(0.65rem, 2.5vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: left;
  color: var(--bm-cta-on-gold);
}

@media (max-width: 380px) {
  .booking-modal__footer-confirm {
    padding: 14px 10px;
  }

  .booking-confirm__label {
    font-size: 0.62rem;
  }
}

/* —— Étape 3 : date / heure / notifications —— */
.bm-step3-datetime {
  margin-bottom: 4px;
}

.bm-input-has-icon {
  position: relative;
}

.bm-input-has-icon .bm-input {
  padding-right: 42px;
}

.bm-input--date::placeholder {
  font-weight: 700;
  color: var(--bm-ink);
  opacity: 1;
}

.bm-input-suffix-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--bm-ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bm-cal-svg {
  display: block;
}

.bm-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 42px;
  font-weight: 600;
  color: var(--bm-ink);
}

.bm-select option[value=''] {
  font-weight: 600;
  color: var(--bm-ink);
}

/* Notifications — pilules */
.bm-notify-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 520px) {
  .bm-notify-pills {
    flex-direction: column;
  }

  .bm-pill {
    width: 100%;
    justify-content: center;
  }
}

.bm-pill {
  flex: 1;
  min-width: min(140px, 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid var(--bm-line);
  background: #f9fafb;
  color: var(--bm-ink-muted);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.bm-pill__ico {
  font-size: 1rem;
  line-height: 1;
}

.bm-pill--email.bm-pill--active {
  background: var(--bm-teal-email-soft);
  border-color: var(--bm-title-teal);
  color: var(--bm-title-teal);
}

.bm-pill--call.bm-pill--active {
  background: var(--bm-teal-soft);
  border-color: var(--bm-teal);
  color: var(--bm-teal);
}

.bm-pill--whatsapp {
  background: #fff;
  border-color: #86efac;
  color: #16a34a;
}

.bm-pill--whatsapp:hover {
  background: rgba(22, 163, 74, 0.06);
}

.bm-pill--whatsapp.bm-pill--active {
  background: rgba(22, 163, 74, 0.12);
  border-color: #22c55e;
  color: #15803d;
}

/* Checkbox marketing */
.bm-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
}

.bm-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #2563eb;
  border-radius: 4px;
}

.bm-checkbox-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bm-ink);
  line-height: 1.45;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .booking-step {
    animation: none;
  }

  .booking-confirm__spinner {
    animation: none;
    border-top-color: var(--bm-cta-on-gold);
  }
}

body.booking-modal-open {
  overflow: hidden;
}
