.booking-app {
  max-width: 100%;
  overflow: hidden;
  --booking-primary: #894b34;
  --booking-primary-soft: rgba(137, 75, 52, 0.12);
  --booking-surface: #f5f3ef;
  --booking-muted: #53433e;
}

.booking-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.booking-step {
  flex: 1;
  min-width: 5rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--booking-muted);
  opacity: 0.5;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: opacity 0.25s, border-color 0.25s;
}

.booking-step.is-active,
.booking-step.is-done {
  opacity: 1;
  color: var(--booking-primary);
}

.booking-step.is-active {
  border-bottom-color: var(--booking-primary);
}

.booking-step.is-done {
  border-bottom-color: rgba(137, 75, 52, 0.35);
}

.booking-panel[hidden] {
  display: none !important;
}

.booking-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.booking-cal-title {
  font-family: 'Noto Serif', serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.booking-cal-nav {
  display: flex;
  gap: 0.25rem;
}

.booking-cal-nav button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(134, 115, 109, 0.25);
  background: #fff;
  color: var(--booking-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.booking-cal-nav button:hover:not(:disabled) {
  border-color: var(--booking-primary);
  color: var(--booking-primary);
}

.booking-cal-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.booking-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--booking-muted);
  text-align: center;
}

.booking-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.booking-day {
  aspect-ratio: 1;
  min-height: 2.75rem;
  border: none;
  border-radius: 0.65rem;
  background: transparent;
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--booking-muted);
  cursor: default;
}

.booking-day.is-empty {
  visibility: hidden;
}

.booking-day.is-available {
  background: #fff;
  border: 1px solid rgba(134, 115, 109, 0.2);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.booking-day.is-available:hover {
  border-color: var(--booking-primary);
  background: var(--booking-primary-soft);
}

.booking-day.is-selected {
  background: var(--booking-primary);
  color: #fff;
  border-color: var(--booking-primary);
  font-weight: 700;
}

.booking-day.is-today.is-available:not(.is-selected) {
  box-shadow: inset 0 0 0 2px var(--booking-primary);
}

.booking-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.5rem;
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.25rem;
}

.booking-slot {
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(134, 115, 109, 0.25);
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--booking-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.booking-slot:hover {
  border-color: var(--booking-primary);
  color: var(--booking-primary);
}

.booking-slot.is-selected {
  background: var(--booking-primary);
  border-color: var(--booking-primary);
  color: #fff;
}

.booking-summary {
  background: var(--booking-primary-soft);
  border-left: 3px solid var(--booking-primary);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.booking-summary strong {
  color: var(--booking-primary);
}

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.booking-btn-back {
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(134, 115, 109, 0.3);
  background: transparent;
  font-weight: 600;
  color: var(--booking-muted);
  cursor: pointer;
  transition: background 0.2s;
}

.booking-btn-back:hover {
  background: var(--booking-surface);
}

.booking-success {
  text-align: center;
  padding: 2rem 1rem;
}

.booking-success .material-symbols-outlined {
  font-size: 3.5rem;
  color: var(--booking-primary);
  margin-bottom: 1rem;
}

.booking-empty-slots {
  color: var(--booking-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}

.booking-loading {
  opacity: 0.6;
  pointer-events: none;
}

#cal-com-embed {
  --cal-embed-primary: #894b34;
  --cal-embed-surface: #f5f3ef;
  width: 100%;
  min-height: 34rem;
  margin: 0 -0.25rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  transition: opacity 0.35s ease, min-height 0.35s ease;
}

#cal-com-embed.is-ready {
  opacity: 1;
}

#cal-com-embed iframe {
  display: block;
  width: 100% !important;
  min-height: 34rem;
  border: 0;
  background: transparent;
}

.cal-com-booking {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.25rem;
}

.cal-com-booking-note {
  padding: 0.85rem 1.1rem;
  border-radius: 0.75rem;
  background: rgba(137, 75, 52, 0.06);
  border-left: 3px solid var(--cal-embed-primary, #894b34);
  transition: opacity 0.25s ease;
}

/* Écran de confirmation : fond continu, pas de « cadre dans un cadre » */
.cal-com-booking.is-confirmed {
  margin-top: -0.5rem;
}

.cal-com-booking.is-confirmed .cal-com-booking-note {
  display: none;
}

.cal-com-booking.is-confirmed #cal-com-embed,
.cal-com-booking.is-confirmed #cal-com-embed iframe {
  min-height: 22rem;
}

@media (min-width: 768px) {
  #cal-com-embed,
  #cal-com-embed iframe {
    min-height: 38rem;
  }

  .cal-com-booking.is-confirmed #cal-com-embed,
  .cal-com-booking.is-confirmed #cal-com-embed iframe {
    min-height: 26rem;
  }
}

@media (max-width: 640px) {
  #cal-com-embed,
  #cal-com-embed iframe {
    min-height: 30rem;
  }

  .cal-com-booking.is-confirmed #cal-com-embed,
  .cal-com-booking.is-confirmed #cal-com-embed iframe {
    min-height: 20rem;
  }

  .cal-com-booking-note {
    font-size: 0.8rem;
  }
}

#cal-com-setup-hint {
  font-size: 0.8rem;
  color: var(--booking-muted);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(137, 75, 52, 0.06);
  border: 1px dashed rgba(137, 75, 52, 0.25);
  margin-bottom: 1rem;
  line-height: 1.5;
}

#cal-com-setup-hint code {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
}
