/* ============================================================
   Parcours de réservation + confirmation
   ============================================================ */

.book-main {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding: 1.5rem var(--gouttiere) 8rem;
}

/* ---------- progression ---------- */
.progress-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  padding: 0.65rem var(--gouttiere) 0.6rem;
  background: var(--papier);
  border-bottom: 1px solid var(--brume);
}

@supports (backdrop-filter: blur(6px)) {
  .progress-wrap {
    background: rgba(244, 245, 242, 0.94);
    backdrop-filter: blur(10px);
  }
}

.progress-inner {
  max-width: 760px;
  margin-inline: auto;
}

.progress {
  display: flex;
  gap: 4px;
}

.progress-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--brume);
}

.progress-seg.is-done {
  background: var(--studio);
}

.progress-seg.is-current {
  background: var(--signal);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.45rem;
  font-size: 0.76rem;
  color: var(--encre-doux);
}

.progress-label b {
  color: var(--encre);
  font-weight: 600;
}

/* ---------- titres d'étape ---------- */
.step-title {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  margin-bottom: 0.45rem;
}

.step-sub {
  margin-bottom: 1.5rem;
  color: var(--encre-doux);
  font-size: 0.95rem;
  max-width: 56ch;
}

/* ---------- choix de format ---------- */
.opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  width: 100%;
  min-height: 96px;
  padding: 1.05rem;
  border: 2px solid var(--brume);
  border-radius: var(--r-panneau);
  background: var(--blanc);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.opt + .opt {
  margin-top: 0.65rem;
}

.opt:hover {
  border-color: var(--encre);
}

.opt.is-selected {
  border-color: var(--signal-fonce);
  background: #fdf3f0;
}

.opt-mark {
  grid-row: span 2;
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  border: 2px solid var(--brume);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}

.opt.is-selected .opt-mark {
  border-color: var(--signal-fonce);
}

.opt.is-selected .opt-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal-fonce);
}

.opt-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.opt-sub {
  grid-column: 2;
  font-size: 0.88rem;
  color: var(--encre-doux);
  line-height: 1.4;
}

/* ---------- calendrier ---------- */
.cal {
  padding: 0.85rem;
  border: 1px solid var(--brume);
  border-radius: var(--r-panneau);
  background: var(--blanc);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.cal-month {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: capitalize;
}

.cal-nav {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brume);
  border-radius: var(--r-champ);
  background: var(--blanc);
  color: var(--encre);
  cursor: pointer;
}

.cal-nav:hover:not(:disabled) {
  border-color: var(--encre);
}

.cal-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cal-dow,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-dow {
  margin-bottom: 4px;
}

.cal-dow span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--encre-doux);
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 52px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: var(--r-champ);
  background: var(--papier);
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.day-num {
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.day-free {
  font-size: 0.6rem;
  letter-spacing: -0.01em;
  color: var(--encre-doux);
}

.day:hover:not(:disabled) {
  border-color: var(--encre);
}

.day.is-off {
  background: transparent;
  color: #9aa29b;
  cursor: not-allowed;
}

.day.is-off .day-free {
  display: none;
}

.day.is-selected {
  background: var(--studio);
  color: var(--papier);
}

.day.is-selected .day-free {
  color: rgba(244, 245, 242, 0.8);
}

.day--empty {
  background: transparent;
  cursor: default;
}

.cal-legend {
  margin-top: 0.75rem;
  font-size: 0.76rem;
  color: var(--encre-doux);
}

.selected-dates {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.35rem 0.7rem;
  border: 1px solid var(--brume);
  border-radius: var(--r-pilule);
  background: var(--blanc);
  font-size: 0.8rem;
}

.date-chip button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--papier-2);
  color: var(--encre);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.date-chip button:hover {
  background: var(--brume);
}

/* ---------- packages ---------- */
.pkg-list {
  border-top: 1px solid var(--brume);
}

.pkg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.2rem 0.9rem;
  width: 100%;
  padding: 1rem 0.75rem;
  margin-inline: -0.75rem;
  border: 0;
  border-bottom: 1px solid var(--brume);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pkg:hover {
  background: var(--papier-2);
}

.pkg.is-selected {
  background: #fdf3f0;
  box-shadow: inset 3px 0 0 var(--signal);
}

.pkg-mark {
  grid-row: span 2;
  width: 20px;
  height: 20px;
  margin-top: 0.25rem;
  border: 2px solid var(--brume);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.pkg.is-selected .pkg-mark {
  border-color: var(--signal-fonce);
}

.pkg.is-selected .pkg-mark::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal-fonce);
}

.pkg-name {
  font-weight: 700;
  font-size: 1rem;
}

.pkg-desc {
  grid-column: 2;
  font-size: 0.85rem;
  color: var(--encre-doux);
  line-height: 1.4;
}

.pkg-side {
  grid-row: span 2;
  text-align: right;
  white-space: nowrap;
}

.pkg-prix {
  display: block;
  font-weight: 800;
  font-size: 1.02rem;
  font-stretch: 88%;
}

.pkg-heure {
  display: block;
  font-size: 0.72rem;
  color: var(--encre-doux);
}

/* ---------- créneaux ---------- */
.slot-group + .slot-group {
  margin-top: 1.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brume);
}

.slot-date {
  margin-bottom: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

@media (min-width: 520px) {
  .slot-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.slot {
  min-height: 48px;
  padding: 0.4rem;
  border: 2px solid var(--brume);
  border-radius: var(--r-champ);
  background: var(--blanc);
  color: inherit;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.slot:hover:not(:disabled) {
  border-color: var(--encre);
}

.slot.is-selected {
  background: var(--studio);
  border-color: var(--studio);
  color: var(--papier);
}

.slot:disabled {
  background: var(--papier-2);
  color: #8d958e;
  text-decoration: line-through;
  cursor: not-allowed;
}

.slot-legend {
  margin-top: 0.75rem;
  font-size: 0.76rem;
  color: var(--encre-doux);
}

/* ---------- formulaire ---------- */
.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.req {
  color: var(--signal-fonce);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--brume);
  border-radius: var(--r-champ);
  background: var(--blanc);
  color: var(--encre);
  font: inherit;
  font-size: 16px;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--encre);
}

.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--signal-fonce);
}

.hint {
  margin-top: 0.3rem;
  font-size: 0.76rem;
  color: var(--encre-doux);
}

.err {
  display: none;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--signal-fonce);
}

.field.has-error .err {
  display: block;
}

.field-row {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- paiement ---------- */
.pay {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.9rem;
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--brume);
  border-radius: var(--r-panneau);
  background: var(--blanc);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pay + .pay {
  margin-top: 0.6rem;
}

.pay:hover {
  border-color: var(--encre);
}

.pay.is-selected {
  border-color: var(--signal-fonce);
  background: #fdf3f0;
}

.pay-mark {
  grid-row: span 2;
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  border: 2px solid var(--brume);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.pay.is-selected .pay-mark {
  border-color: var(--signal-fonce);
}

.pay.is-selected .pay-mark::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal-fonce);
}

.pay-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.pay-detail {
  grid-column: 2;
  font-size: 0.85rem;
  color: var(--encre-doux);
  line-height: 1.4;
}

/* ---------- récapitulatif ---------- */
.recap {
  margin: 0;
  border-top: 1px solid var(--brume);
}

.recap-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--brume);
  font-size: 0.92rem;
}

.recap-row dt {
  color: var(--encre-doux);
}

.recap-row dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.recap-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0;
}

.recap-total span {
  color: var(--encre-doux);
  font-size: 0.9rem;
}

.recap-total strong {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-stretch: 88%;
  letter-spacing: -0.02em;
}

/* ---------- barre d'action ---------- */
.book-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 0.7rem var(--gouttiere) calc(0.7rem + env(safe-area-inset-bottom));
  background: var(--papier);
  border-top: 1px solid var(--brume);
}

@supports (backdrop-filter: blur(6px)) {
  .book-bar {
    background: rgba(244, 245, 242, 0.96);
    backdrop-filter: blur(10px);
  }
}

.book-bar-inner {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.book-total {
  font-size: 0.76rem;
  color: var(--encre-doux);
  line-height: 1.3;
}

.book-total strong {
  display: block;
  font-size: 1.05rem;
  color: var(--encre);
  font-stretch: 88%;
}

.book-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.book-actions .btn {
  white-space: nowrap;
}

/* ---------- confirmation ---------- */
.confirm-head {
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.confirm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-pilule);
  background: var(--studio);
  color: var(--papier);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.confirm-ref {
  margin: 1rem 0 0.35rem;
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-stretch: 80%;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.confirm-lead {
  max-width: 52ch;
  color: var(--encre-doux);
}

.confirm-block {
  margin-top: 2rem;
}

.confirm-block h2 {
  font-size: 1.2rem;
  font-stretch: 90%;
  margin-bottom: 0.75rem;
}

.notice {
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--soleil);
  background: var(--papier-2);
  font-size: 0.9rem;
}

.notice strong {
  display: block;
  margin-bottom: 0.2rem;
}

.demo-msg {
  margin: 0.6rem 0 0;
  padding: 0.8rem;
  border: 1px dashed var(--brume);
  background: var(--blanc);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* ---------- calendrier : cibles tactiles ≥ 44 px sur petits écrans ---------- */
@media (max-width: 420px) {
  .cal {
    padding: 0.55rem;
  }
  .cal-dow,
  .cal-grid {
    gap: 2px;
  }
}
