/* Jeanne Arte — book.css · the booking page (account.html: /booking and /account) only.
   Shared tokens and components are in site.css. Started from concept 02's slip:
   the booking form is a printed card whose last lines are a bill. Every class here
   is page-scoped (the slip's own names, or book-…). Choices are real radio inputs,
   visually hidden; the label is the target. JS mirrors :checked as .is-on so the
   chosen row is marked in browsers without :has(). */

/* ---------------------------------------------------------------- head */
.book__head .link { margin-top: var(--s1); }
.book__title:focus { outline: none; }
/* as wide as the words: the morph scales the door's title by the ratio of the two boxes */
.book__title { width: fit-content; margin-inline: auto; }
.book-next {
  max-width: 30em;
  margin: var(--s2) auto 0;
  font-size: var(--fs-small);
}
.wrap--slip { width: min(100% - 2 * var(--gutter), 840px); margin-top: var(--s5); margin-inline: auto; }
.wrap--auth { width: min(100% - 2 * var(--gutter), 560px); margin-top: var(--s5); margin-inline: auto; }

/* a <button> that looks like .link (site.css styles it for <a>) */
button.link {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--serif);
  cursor: pointer;
}

.book-noscript { margin-bottom: var(--s4); }
.js .book-noscript { display: none; }
/* Without JavaScript (html has no .js) the slip is the readable French card and
   the note above gives the phone and WhatsApp: hide what only works with the script
   (steps 3 and 4, the bill, the line about the chosen hour, the consent and the send
   button, whose form post would end on a raw JSON page). How to prepare and the two
   promises stay: they hold however the visitor books. */
html:not(.js) #st-jour,
html:not(.js) #st-coord,
html:not(.js) #b-bill,
html:not(.js) #b-note-time,
html:not(.js) .slip__end > .check,
html:not(.js) .slip__send { display: none; }
html:not(.js) .book-prep { margin-top: 0; }

/* ---------------------------------------------------------------- the slip: numbered steps */
.step { min-width: 0; margin: 0; padding: 0; border: 0; }
.step + .step { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.step__legend {
  float: left;
  width: 100%;
  margin-bottom: var(--s3);
  padding: 0;
  font-size: clamp(1.5rem, 1.3rem + .6vw, 1.875rem);
  line-height: 1.2;
  color: var(--text-strong);
}
/* everything after the floated legend clears it — including when the first sibling is [hidden] */
.step__legend ~ * { clear: both; }
.step__n {
  display: inline-block;
  min-width: 1.1em;
  margin-right: .35em;
  font-style: italic;
  color: var(--accent);
}
.sub { min-width: 0; margin: var(--s4) 0 0; padding: 0; border: 0; }
.sub > legend { float: left; width: 100%; padding: 0; }
.sub > legend ~ * { clear: both; }

/* soin / lieu rows: menu lines you can pick */
.opts { border-top: 1px solid var(--line); }
.opt {
  --mask: var(--surface);
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  min-height: 60px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-strong);
  cursor: pointer;
  transition: background-color .2s;
}
.opt:hover,
.opt.is-on,
.opt:has(input:checked) { --mask: var(--tint); background: var(--tint); }
.opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.opt__dot {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1.5px solid var(--field);
  border-radius: 50%;
  background: var(--surface-2);
}
.opt__dot::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .2s var(--ease);
}
.opt input:checked ~ .opt__dot { border-color: var(--accent); }
.opt input:checked ~ .opt__dot::after { transform: none; }
.opt .line__r { font-size: 1.125rem; }
@media (max-width: 379px) {
  .opt { column-gap: 12px; padding-inline: 6px; }
}

/* durée: square-ish chips (form UI → Manrope) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip { position: relative; display: inline-flex; }
.chip > span,
.slot > span:first-of-type,
.wbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--field);
  border-radius: var(--r);
  background: var(--surface-2);
  color: var(--text-strong);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip > span:hover,
.slot:not(.is-taken) > span:first-of-type:hover,
.wbtn:not(:disabled):hover { border-color: var(--text-strong); }
.chip input:checked + span,
.slot input:checked + span {
  background: var(--selected);
  border-color: var(--selected);
  color: var(--selected-text);
}
.chip input:focus-visible + span,
.slot input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* lieu + the season notice beside it (under it on a phone, with no hole either way) */
.lieu { display: grid; gap: var(--s2); }
@media (min-width: 680px) {
  .lieu { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--s4); }
}
.season { font-size: 1.0625rem; line-height: 1.55; }
@media (max-width: 679px) {
  .season { margin-top: 4px; }
}
.adresse { margin-top: var(--s3); }
.book-help {
  margin-top: 6px;
  font-size: var(--fs-small);
  font-style: italic;
  line-height: 1.5;
  color: var(--text-muted);
}

/* jour: week strip */
.week {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "label label" "prev next";
  align-items: center;
  gap: var(--s1);
  margin-bottom: 12px;
}
.week [data-week="-1"] { grid-area: prev; justify-self: start; }
.week [data-week="1"] { grid-area: next; justify-self: end; }
.week__label { grid-area: label; }
@media (min-width: 620px) {
  .week { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "prev label next"; }
}
.wbtn { gap: 6px; padding: 0 14px 0 10px; font-size: 1rem; }
.week .wbtn:last-child { padding: 0 10px 0 14px; }
.wbtn:disabled { opacity: .45; cursor: default; }
.wbtn .i { width: 18px; height: 18px; }
@media (max-width: 379px) {
  /* « Предыдущая » / « Наступний » must fit two to a row at 320 px */
  .wbtn { gap: 4px; padding: 0 8px 0 6px; font-size: .9375rem; }
  .week .wbtn:last-child { padding: 0 6px 0 8px; }
  .wbtn .i { width: 16px; height: 16px; }
}
.week__label {
  min-height: 1.3em;
  text-align: center;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--text-strong);
}

.days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); transition: opacity .2s; }
@media (min-width: 620px) { .days { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.days.is-loading { opacity: .5; pointer-events: none; }
.day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  padding: 8px 2px;
  border: 1px solid var(--field);
  border-radius: var(--r);
  background: var(--surface-2);
  font-family: var(--sans);
  text-align: center;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.day:not(.is-off):not(.is-full):not(.is-past):hover { border-color: var(--text-strong); }
.day__d { font-size: .875rem; line-height: 1.3; color: var(--text-muted); }
.day__n { font-size: 1.375rem; line-height: 1.2; font-weight: 600; color: var(--text-strong); font-variant-numeric: lining-nums tabular-nums; }
.day__s { font-size: .875rem; line-height: 1.3; color: var(--text-muted); white-space: nowrap; }
.day.is-on,
.day:has(input:checked) { background: var(--selected); border-color: var(--selected); }
.day.is-on > span,
.day:has(input:checked) > span { color: var(--selected-text); }
.day:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.day.is-off,
.day.is-full,
.day.is-past {
  border-style: dashed;
  border-color: var(--line-2);
  background: transparent;
  cursor: not-allowed;
}
.day.is-off .day__n,
.day.is-full .day__n,
.day.is-past .day__n { font-weight: 400; color: var(--text-muted); }
@media (max-width: 379px) {
  /* four narrow cells: let « 16 libres » / « 3 места » wrap rather than spill */
  .day { padding-inline: 1px; }
  .day__s { white-space: normal; font-size: .8125rem; line-height: 1.2; }
}
.book-week-msg { margin-top: var(--s2); }
.book-week-msg .link { margin-left: .35em; }
/* « Choisissez une heure »: the one line that explains why the send stopped, above the hours */
#st-jour > #b-when-err { margin-top: var(--s3); font-size: 1rem; }

/* heure souhaitée */
.slots { display: grid; gap: var(--s3); }
.slots__label {
  margin-bottom: var(--s1);
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-muted);
}
.slots__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s1); }
.slot { position: relative; display: flex; }
.slot > span:first-of-type { width: 100%; padding: 0 8px; }
.slot.is-taken > span:first-of-type {
  border-style: dashed;
  border-color: var(--line-2);
  background: transparent;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  cursor: not-allowed;
}

/* vos coordonnées */
.form__grid { display: grid; gap: var(--s3); }
.book-as {
  margin-bottom: var(--s3);
  font-size: var(--fs-body);
  color: var(--text-strong);
}
.slip .field__error,
.book-done .field__error { font-family: var(--sans); }

/* ---------------------------------------------------------------- the bill */
.slip__end { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.recap {
  --mask: var(--surface-2);
  padding: var(--s3);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
@media (min-width: 760px) { .recap { padding: var(--s4) var(--s5); } }
.recap .label { margin-bottom: 12px; text-align: center; }
.recap .line { font-size: 1.125rem; line-height: 1.5; }
.recap .line[hidden] { display: none; }
.recap__when { margin-top: 4px; font-size: 1.0625rem; }
.recap__total {
  margin-top: var(--s2);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.recap .recap__total { font-size: var(--fs-h3); }
.recap .recap__status { margin-top: 4px; }
.recap__status .line__r { font-style: italic; color: var(--accent); }

/* how to prepare: the same footnote as on the carte, set compact on the slip */
.book-prep { margin-top: var(--s4); padding: var(--s3); }
@media (min-width: 760px) { .book-prep { padding: var(--s3) var(--s4); } }
.book-prep .footnote__title { font-size: 1.1875rem; }
.book-prep p { font-size: 1.0625rem; line-height: 1.55; }

/* consent, send, the promises */
.check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 48px;
  margin-top: var(--s4);
  padding: 4px 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text-strong);
  cursor: pointer;
}
.check input {
  flex: none;
  width: 24px; height: 24px;
  margin: 1px 0 0;
  accent-color: var(--btn-bg);
  cursor: pointer;
}
.check input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.slip__send { width: 100%; margin-top: var(--s3); }
@media (min-width: 560px) { .slip__send { width: auto; min-width: 300px; } }
.slip__note { margin-top: var(--s3); font-size: 1.0625rem; }
.slip__promise { margin-top: var(--s2); }
/* One run of text with a hanging lozenge — not flex: the JS sets these lines
   through typo(), whose <span class="nw"> would become a flex item of its own
   and split the sentence into side-by-side columns. */
.slip__promise li {
  padding: 2px 0 2px 17px;
  text-indent: -17px;
  font-size: 1.0625rem;
  color: var(--text-strong);
}
.slip__promise li::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 12px;
  text-indent: 0;
  background: var(--ornament);
  transform: translateY(-.25em) rotate(45deg);
}
.form__status:empty { display: none; }
.form__status { margin-top: var(--s2); font-style: italic; color: var(--accent); }
.form__status:focus { outline: none; }

/* ---------------------------------------------------------------- done: the receipt */
.book-done .recap { margin-top: 0; }
.book-done__way { margin-top: var(--s2); text-align: center; }
.book-done__mail { margin-top: var(--s3); text-align: center; font-style: italic; color: var(--text); }
.book-done__mail:empty { display: none; }
.book-offer {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.book-offer__title { font-size: var(--fs-h3); line-height: 1.3; }
.book-offer__text { margin-top: var(--s1); color: var(--text); }
.book-offer__form { margin-top: var(--s3); }
.book-offer__form .field { max-width: 26rem; }

.book-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  margin-top: var(--s3);
}
.book-actions--end {
  justify-content: center;
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
@media (max-width: 559px) {
  .book-actions--end { flex-direction: column; align-items: stretch; }
  .book-actions--end .btn { width: 100%; }
}

/* ---------------------------------------------------------------- auth */
.book-auth { padding-block: var(--s5); }
.book-auth .form { margin-top: 0; }
.book-auth__forgot { font-size: var(--fs-small); text-align: center; }
.book-auth__switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: .5em;
  margin-top: var(--s1);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  color: var(--text);
  text-align: center;
}
.book-auth__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: .6em;
  margin-top: var(--s4);
  text-align: center;
  color: var(--text);
}
.book-mine .book-auth__switch { margin-top: var(--s3); }
.book-done .book-auth__switch { margin-top: var(--s4); }

/* ---------------------------------------------------------------- mine: « Mes rendez-vous » */
.book-mine__sec + .book-mine__sec { margin-top: var(--s5); }
.book-mine__title { margin-bottom: 12px; text-align: center; }
.book-mine__empty { text-align: center; font-style: italic; color: var(--text-muted); }
.book-mine .form__status { margin: 0 0 var(--s3); text-align: center; }
.book-mine__retry { text-align: center; }   /* after a list that failed to load */
.appts { border-top: 1px solid var(--line); }
.appt { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.appt__when { font-size: var(--fs-h3); line-height: 1.35; color: var(--text-strong); }
.appt__st { font-size: 1.0625rem; font-style: italic; color: var(--text-muted); }
.appt__st--confirmed { color: var(--accent); font-style: normal; letter-spacing: .02em; }
.appt__what { margin-top: 4px; font-size: 1.0625rem; color: var(--text); }
.appt__hint { margin-top: 6px; font-size: var(--fs-small); }
.appt__note {
  margin-top: var(--s2);
  padding: 2px 0 2px var(--s3);
  border-left: 1px solid var(--line-2);
}
.appt__note-label {
  font-size: var(--fs-label);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.appt__note p + p { margin-top: 2px; font-style: italic; color: var(--text-strong); }
.appt__price { margin-top: var(--s2); font-size: 1.125rem; }
.appt__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) 12px;
  margin-top: var(--s2);
}
.appt__ask { flex-basis: 100%; font-style: italic; color: var(--text-strong); }
.appt--past .appt__when { font-size: 1.125rem; color: var(--text); }
.appt--past .appt__when .line__r { color: var(--text-muted); }
.appt--past .appt__what { color: var(--text-muted); }

@media print {
  .slip__send, .check, .slip__promise, .week, .book-actions, .book-offer, .appt__actions, .book-auth__alt { display: none !important; }
}

/* « Mes rendez-vous » already ends on a hairline (the last appointment): no second
   and third rule above the actions and the sign-in line. */
.book-mine .book-actions--end { margin-top: var(--s4); padding-top: 0; border-top: 0; }
.book-mine .book-auth__switch { margin-top: var(--s3); padding-top: 0; border-top: 0; }
