/* ===== Page réservation ===== */
.page-book { background: var(--black); }
.book { padding: 124px 0 96px; }
.book-head h1 { font-size: clamp(36px, 5.6vw, 76px); margin: 18px 0 40px; }
@media (max-width: 560px) { .back-home { padding: 0 14px; } .back-home svg { display: none; } }

/* Stepper */
.stepper { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stepper li { position: relative; padding-top: 14px; font-size: 13px; font-weight: 600; color: var(--grey); display: flex; gap: 8px; align-items: baseline; }
.stepper li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--anth-3); border-radius: 2px; transition: background .4s var(--ease); }
.stepper li span { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 12px; }
.stepper li.is-active, .stepper li.is-done { color: var(--white); }
.stepper li.is-done::before { background: var(--white); }
.stepper li.is-active::before { background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb),.7); }
.stepper li.is-active span { color: var(--accent); }
@media (max-width: 720px) { .stepper li { font-size: 0; } .stepper li span { font-size: 12px; } .stepper li.is-active { font-size: 12px; } .stepper { grid-template-columns: repeat(5, auto); } }

.book-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
@media (max-width: 1000px) { .book-grid { grid-template-columns: 1fr; } .summary { display: none; } }

/* Form */
.book-form { background: var(--anth); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3.4vw, 40px); }
.bstep { border: 0; margin: 0; padding: 0; min-width: 0; animation: fadeUp .45s var(--ease); }
.bstep[hidden] { display: none; }
.bstep legend { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.05; padding: 0; margin-bottom: 8px; }
.hint { color: var(--grey); font-size: 14.5px; margin-bottom: 28px; }
.err { color: #ff8a80; font-size: 14px; margin-top: 16px; min-height: 1px; }
.err:empty { display: none; }

.svc-group { margin-bottom: 28px; }
.svc-group > h4 { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }
.svc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 640px) { .svc-list { grid-template-columns: 1fr; } }

.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--anth-2); transition: border-color .2s, background .2s, color .2s;
}
.choice:hover .box { border-color: rgba(255,255,255,.3); }
.choice input:checked + .box { background: var(--white); color: var(--black); border-color: var(--white); }
.choice input:focus-visible + .box { outline: 2px solid var(--white); outline-offset: 2px; }
.choice .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.choice .name { font-weight: 600; font-size: 15.5px; }
.choice .pr { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 17px; white-space: nowrap; }
.choice .pr small { font-family: var(--f-body); font-stretch: 100%; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--grey); margin-right: 4px; }
.choice input:checked + .box .pr small, .choice input:checked + .box .desc { color: #5b5c61; }
.choice .desc { font-size: 13px; color: var(--grey); line-height: 1.45; }

.qty { display: none; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.choice input:checked + .box .qty { display: flex; }
.qty button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-dark); background: none; color: var(--black); font-size: 18px; line-height: 1; display: grid; place-items: center; }
.qty button:hover { border-color: var(--black); }
.qty output { min-width: 18px; text-align: center; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 16px; }

.svc-devis {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px; border: 1px dashed rgba(255,255,255,.25); border-radius: var(--radius-sm); transition: border-color .2s, background .2s;
}
.svc-devis:hover { border-color: var(--white); background: rgba(255,255,255,.03); }
.svc-devis strong { display: block; font-size: 15px; }
.svc-devis span:not(.pill) { font-size: 13px; color: var(--grey); }
.pill { flex: none; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Options (checkbox) */
.opt-list { display: grid; gap: 8px; }
.opt-check .box { flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 18px; }
.opt-check .box::before {
  content: ""; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.35); flex: none; margin-right: 14px;
  background-position: center; background-repeat: no-repeat; background-size: 14px;
}
.opt-check input:checked + .box::before { border-color: var(--black); background-color: var(--black); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.opt-check .name { flex: 1; font-weight: 500; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; min-width: 0; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-2); }
.label em { font-style: normal; color: var(--grey); text-transform: none; letter-spacing: 0; font-weight: 500; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; background: var(--anth-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--white); font: inherit; font-size: 16px; padding: 14px 16px; transition: border-color .2s, background .2s;
}
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: #6c6d72; }
input:focus, textarea:focus { outline: none; border-color: var(--white); background: #2c2d31; }
.invalid { border-color: #ff8a80 !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip { position: relative; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--anth-2); transition: all .2s; }
.chip:hover span { border-color: rgba(255,255,255,.3); }
.chip input:checked + span { background: var(--white); color: var(--black); border-color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--grey-2); cursor: pointer; margin-top: 6px; }
.check input { width: 20px; height: 20px; accent-color: #fff; flex: none; margin-top: 1px; }

/* Calendar */
.date-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .date-grid { grid-template-columns: 1fr; } }
.cal { background: var(--anth-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-head strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: 15px; }
.cal-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; display: grid; place-items: center; }
.cal-nav:hover:not(:disabled) { border-color: var(--white); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-nav svg { width: 16px; height: 16px; }
.cal-dow, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); padding: 6px 0; }
.cal-days button {
  aspect-ratio: 1; border: 1px solid transparent; background: none; border-radius: 8px; font-size: 14px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.cal-days button:hover:not(:disabled) { border-color: rgba(255,255,255,.35); }
.cal-days button:disabled { color: #55565b; cursor: default; }
.cal-days button.today { border-color: var(--line); }
.cal-days button.sel { background: var(--accent); color: var(--white); font-weight: 700; }
.slots-wrap .label { display: block; margin-bottom: 12px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slots button {
  height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--anth-2);
  font-family: var(--f-display); font-stretch: 125%; font-weight: 700; font-size: 14px; transition: all .15s;
}
.slots button:hover { border-color: rgba(255,255,255,.35); }
.slots button.sel { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* Nav */
.book-nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.book-nav .mob-total { display: none; margin-right: auto; flex-direction: column; line-height: 1.2; }
.book-nav .mob-total span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.book-nav .mob-total strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 20px; }
#prevBtn[hidden] { display: none; }
.book-nav .btn[disabled] { opacity: .5; pointer-events: none; }
@media (max-width: 1000px) {
  .book { padding-bottom: 120px; }
  .book-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
    background: rgba(10,10,11,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .book-nav .mob-total { display: flex; }
  .book-nav .btn { height: 48px; padding: 0 18px; }
}
@media (max-width: 420px) { #prevBtn { width: 48px; padding: 0; font-size: 0; } #prevBtn::before { content: "←"; font-size: 18px; } }

/* Summary */
.summary { position: sticky; top: 100px; background: var(--white); color: var(--black); border-radius: var(--radius); padding: 28px; }
.summary h3 { font-size: 18px; margin-bottom: 18px; }
.summary dl { margin: 0; }
.summary dl > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-dark); font-size: 14px; }
.summary dt { color: #77787d; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; padding-top: 2px; }
.summary dd { margin: 0; font-weight: 500; }
.summary dd.muted { color: #a3a4a8; }
.summary dd ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.summary dd li { display: flex; justify-content: space-between; gap: 8px; }
.summary dd li b { font-weight: 600; white-space: nowrap; }
.sum-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 18px 0 0; margin-top: 6px; border-top: 2px solid var(--accent); }
.sum-total span { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; }
.sum-total small { font-size: 11px; font-weight: 500; color: #77787d; text-transform: uppercase; letter-spacing: .1em; }
.sum-total strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 38px; line-height: 1; }
.sum-note { font-size: 12.5px; color: #77787d; margin-top: 14px; }
.sum-help { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-dark); font-size: 13.5px; color: #5b5c61; }
.sum-help span { display: block; margin-bottom: 4px; color: var(--black); font-weight: 600; }
.sum-help a { text-decoration: underline; text-underline-offset: 3px; color: var(--black); }

/* Success */
.done { text-align: left; padding: 12px 0; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--white); display: grid; place-items: center; margin-bottom: 28px; }
.done-icon svg { width: 30px; height: 30px; }
.done h2 { margin-bottom: 18px; }
.done .lead { margin-bottom: 32px; }
.done-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.is-done-state .book-nav { display: none; }
.is-done-state .stepper li::before { background: var(--white); }
@media (max-width: 1000px) { .page-book .pied-site { padding-bottom: 96px; } }

/* =========================================================
   RÉSERVATION SUR UN SEUL ÉCRAN (ordinateur)
   Le formulaire tient dans la fenêtre ; chaque étape défile
   en interne si besoin, les boutons restent toujours visibles.
   ========================================================= */
@media (min-width: 1001px) and (min-height: 600px) {
  .page-book .book { height: 100vh; height: 100svh; padding: calc(76px + 2.2vh) 0 2.4vh; box-sizing: border-box; display: flex; }
  .page-book .book > .wrap { display: flex; flex-direction: column; min-height: 0; flex: 1; }
  .book-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: clamp(14px, 2.4vh, 26px); }
  .book-head h1 { font-size: clamp(26px, min(3vw, 5.4vh), 46px); margin: 10px 0 0; white-space: nowrap; }
  .book-top .stepper { margin: 0; flex: 0 1 620px; }
  .book-grid { flex: 1; min-height: 0; grid-template-columns: 1fr clamp(280px, 24vw, 340px); gap: 22px; align-items: stretch; }
  .book-form { display: flex; flex-direction: column; min-height: 0; padding: clamp(18px, 2.6vh, 30px) clamp(20px, 2vw, 32px); }
  .book-form .bstep:not([hidden]) { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; margin-right: -8px; scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb), .6) transparent; }
  .bstep legend { font-size: clamp(18px, min(1.7vw, 3vh), 26px); margin-bottom: 4px; }
  .hint { margin-bottom: clamp(10px, 1.8vh, 20px); font-size: 13.5px; }
  .book-nav { margin-top: clamp(10px, 1.6vh, 18px); padding-top: clamp(10px, 1.6vh, 16px); flex: none; }
  .book-nav .btn { height: 46px; }

  /* Étape 1 : grille compacte 3 colonnes */
  .svc-group { margin-bottom: clamp(10px, 1.8vh, 18px); }
  .svc-group > h4 { margin-bottom: 8px; font-size: 11px; }
  .svc-list { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .choice .box { padding: clamp(9px, 1.4vh, 14px) 14px; gap: 3px; }
  .choice .name { font-size: 14px; }
  .choice .pr { font-size: 15px; }
  .choice .desc { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .svc-devis { padding: 12px 16px; }
  /* Étape 2 : options sur 2 colonnes */
  #optionList { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .opt-check .box { padding: clamp(9px, 1.3vh, 13px) 14px; }
  .opt-list { gap: 6px; }
  /* Étape 3 / 5 : champs plus compacts */
  .field { margin-bottom: clamp(8px, 1.4vh, 16px); gap: 6px; }
  input[type="text"], input[type="email"], input[type="tel"], textarea { padding: clamp(9px, 1.3vh, 13px) 14px; }
  textarea { min-height: 70px; }
  .chip span { height: 38px; }
  /* Étape 4 : calendrier compact */
  .cal { padding: 12px; }
  .cal-days button { aspect-ratio: auto; height: clamp(28px, 4vh, 40px); }
  .slots button { height: clamp(36px, 4.6vh, 46px); }

  /* Récapitulatif : tient dans la colonne */
  .summary { position: relative; top: 0; display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: clamp(18px, 2.4vh, 26px); }
  .summary h3 { margin-bottom: 10px; }
  .summary dl > div { padding: clamp(7px, 1.1vh, 11px) 0; }
  .sum-total strong { font-size: clamp(28px, 4.4vh, 38px); }
  .sum-note { margin-top: 8px; }
  .sum-help { margin-top: auto; padding-top: 12px; }
}

/* Étape 1 : une catégorie à la fois */
.svc-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.svc-cat { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); transition: color .3s, border-color .3s, text-shadow .3s; }
.svc-cat:hover { color: var(--white); border-color: rgba(255,255,255,.3); }
.svc-cat.on { color: var(--accent); border-color: rgba(var(--accent-rgb), .55); text-shadow: 0 0 8px rgba(var(--accent-rgb), .8), 0 0 20px rgba(var(--accent-rgb), .4); }
.svc-group[hidden] { display: none; }
.svc-group > h4 { display: none; }
@keyframes grpIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.svc-group.grp-in .choice { animation: grpIn .5s cubic-bezier(.2,.7,.1,1) both; }
.svc-group.grp-in .choice:nth-child(2) { animation-delay: .05s; } .svc-group.grp-in .choice:nth-child(3) { animation-delay: .1s; } .svc-group.grp-in .choice:nth-child(4) { animation-delay: .15s; }
@media (min-width: 1001px) and (min-height: 600px) {
  .svc-list { grid-template-columns: repeat(2, 1fr); }
  .choice .box { padding: clamp(12px, 2vh, 18px) 16px; }
  .choice .desc { -webkit-line-clamp: 3; }
}
@media (min-width: 1001px) and (min-height: 600px) {
  .book-top .stepper { flex: 0 1 760px; gap: 14px; }
  .book-top .stepper li { font-size: 12.5px; white-space: nowrap; }
  .svc-devis { padding: 10px 16px; margin-bottom: 2px; }
}
@media (min-width: 1001px) and (max-height: 720px) {
  .choice .desc { -webkit-line-clamp: 2; }
  .svc-cats { margin-bottom: 10px; }
  .svc-group { margin-bottom: 10px; }
}
