.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.booking-modal[aria-hidden="false"] {
  display: block;
}

.booking-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 27, 32, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.booking-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  margin: .75rem auto;
  background: #f6f8f9;
  border: 2px solid #33818f;
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.booking-modal__content {
  padding: 1rem;
  overflow: auto;
  max-height: calc(100vh - 2rem);
}

.booking-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #33818f;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.booking-modal__close:hover {
  background: #f0852e;
}

.booking-step__intro {
  max-width: 720px;
  margin: 0 auto 1rem;
  text-align: center;
}

.booking-step__eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #33818f;
  margin-bottom: 0.5rem;
}

.booking-step__intro h2,
.booking-calendar__title-wrap h2 {
  color: #33818f;
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
}

.booking-step__intro p,
.booking-calendar__title-wrap p {
  color: #162028;
}

.booking-services-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.booking-calendar__header {
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-right: 3.5rem;
}

.booking-back-btn {
  border: none;
  background: #dbe8e7;
  color: #22606d;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  white-space: nowrap;
}

.booking-back-btn:hover {
  background: #c8dddd;
}

.booking-calendar__frame-wrap {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(51, 129, 143, 0.2);
  min-height: 540px;
}

#bookingCalendarFrame {
  width: 100%;
  height: min(76vh, 720px);
  min-height: 540px;
  border: 0;
  display: block;
  background: #fff;
}
.booking-calendar__fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(51, 129, 143, 0.18);
  background: #f8fbfb;
  color: #405159;
  font-size: 0.92rem;
  line-height: 1.4;
}

.booking-calendar__fallback[hidden] {
  display: none;
}

.booking-calendar__fallback p {
  flex: 1 1 260px;
  margin: 0;
}

.booking-calendar__fallback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #33818f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.booking-calendar__fallback-link:hover {
  background: #f0852e;
  color: #fff;
}

.booking-calendar__fallback-warning {
  color: #8a3b16;
  font-weight: 700;
}

body.booking-modal-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .booking-services-list {
    grid-template-columns: 1fr;
  }

  .booking-calendar__header {
    flex-direction: column;
    padding-right: 0;
  }

  .booking-modal__content {
    padding: 1.25rem;
  }

  .booking-step__intro h2,
  .booking-calendar__title-wrap h2 {
    font-size: 1.6rem;
  }

  .booking-calendar__frame-wrap,
  #bookingCalendarFrame {
    min-height: 520px;
  }
}

.booking-service-card {
  background: #ffffff;
  border: 1px solid rgba(51, 129, 143, 0.18);
  border-left: 6px solid #33818f;
  border-radius: 14px;
  padding: .8rem .85rem;
  box-shadow: 0 6px 18px rgba(34, 96, 109, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.booking-service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(34, 96, 109, 0.12);
}

.booking-service-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.booking-service-card__title-wrap {
  flex: 1 1 auto;
}

.booking-service-card__title-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: #22606d;
  font-size: 1rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.booking-service-card__title-btn:hover {
  color: #f0852e;
}

.booking-service-card__meta {
  margin-top: 0.35rem;
  color: #4f6168;
  font-size: 0.95rem;
  line-height: 1.4;
}

.booking-service-card__toggle {
  border: none;
  background: #dbe8e7;
  color: #22606d;
  font-weight: 700;
  border-radius: 999px;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.booking-service-card__toggle:hover {
  background: #c8dddd;
}

.booking-service-card__details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 129, 143, 0.16);
}

.booking-service-card__details p {
  color: #162028;
  line-height: 1.6;
}

.booking-service-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.booking-service-card__choose,
.booking-service-card__reduce {
  border: none;
  border-radius: 999px;
  min-height: 36px;
  padding: 0.55rem .85rem;
  font-weight: 700;
  cursor: pointer;
}

.booking-service-card__choose {
  background: #33818f;
  color: #fff;
}

.booking-service-card__choose:hover {
  background: #f0852e;
}

.booking-service-card__reduce {
  background: #edf3f3;
  color: #22606d;
}

.booking-service-card__reduce:hover {
  background: #dde9e8;
}

.booking-service-card.is-open {
  border-left-color: #f0852e;
}

.booking-service-card__meta-block,
.booking-calendar__meta-block {
  margin-top: 0.35rem;
}

.booking-service-card__summary,
.booking-service-card__duration,
.booking-service-card__price,
.booking-calendar__summary,
.booking-calendar__duration,
.booking-calendar__price {
  margin: 0;
  line-height: 1.45;
}

.booking-service-card__summary,
.booking-calendar__summary {
  color: #4f6168;
  font-size: 0.95rem;
}

.booking-service-card__duration,
.booking-calendar__duration {
  color: #22606d;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.booking-service-card__price,
.booking-calendar__price {
  color: #33818f;
  font-size: 1rem;
  font-weight: 800;
  margin-top: 0.2rem;
}

.booking-calendar__info {
  margin-top: 0.35rem;
}

.booking-calendar__summary,
.booking-calendar__duration,
.booking-calendar__price {
  margin: 0;
  line-height: 1.45;
}

.booking-calendar__summary {
  color: #4f6168;
  font-size: 0.98rem;
}

.booking-calendar__duration {
  color: #22606d;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.booking-calendar__price {
  color: #33818f;
  font-size: 1rem;
  font-weight: 800;
  margin-top: 0.2rem;
}

.booking-calendar__details-wrapper {
  margin-top: 0.8rem;
}

.booking-calendar__toggle {
  border: none;
  background: #dbe8e7;
  color: #22606d;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
}

.booking-calendar__toggle:hover {
  background: #c8dddd;
}

.booking-calendar__details {
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #edf3f3;
  border: 1px solid rgba(51, 129, 143, 0.18);
}

.booking-calendar__details p {
  margin: 0;
  color: #162028;
  line-height: 1.6;
}

.booking-service-card--clickable {
  cursor: pointer;
}

.booking-service-card__title-btn {
  margin: 0;
}
/* Lot P4 accessibilite reservation */
.booking-modal__dialog:focus {
  outline: none;
}

.booking-modal__close:focus-visible,
.booking-back-btn:focus-visible,
.booking-service-card__toggle:focus-visible,
.booking-calendar__toggle:focus-visible,
.booking-service-card__choose:focus-visible,
.booking-service-card__reduce:focus-visible,
.booking-service-card--clickable:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(255, 191, 71, 0.38);
}

.booking-service-card--clickable:focus-visible {
  border-color: #22606d;
  border-left-color: #f0852e;
}

.booking-service-card__choose:hover,
.booking-service-card__choose:focus-visible {
  background: #22606d;
}

@media (max-width: 560px) {
  .booking-modal__dialog {
    width: min(100%, calc(100vw - 0.75rem));
    max-height: calc(100dvh - 0.75rem);
    margin: 0.375rem auto;
    border-radius: 18px;
  }

  .booking-modal__content {
    max-height: calc(100dvh - 0.75rem);
    padding: 1rem;
  }

  .booking-modal__close {
    top: 0.55rem;
    right: 0.55rem;
  }

  .booking-calendar__frame-wrap,
  #bookingCalendarFrame {
    min-height: min(520px, 68dvh);
  }

  .booking-service-card__header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-service-card,
  .booking-modal__dialog,
  .booking-service-card__title-btn,
  .booking-service-card__toggle,
  .booking-service-card__choose,
  .booking-service-card__reduce {
    transition: none !important;
  }
}
