/* Lyrge — réservation du diagnostic (components/booking.js)
   Fiche à deux volets : la présentation, puis le calendrier et les heures côte à côte quand la place le permet
   (requête de conteneur : le même composant tient dans le grand panneau de l'accueil et dans la carte de /audit/).
   Jetons : /components/chrome.css. */
.booker {
  display: grid;
  grid-template-columns: minmax(0, 17.5rem) minmax(0, 1fr);
  color: var(--ink);
  text-align: left;
}
.booker--bare { grid-template-columns: minmax(0, 1fr); }
.booker__info {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  border-right: 1px solid var(--line);
}
.booker .booker__info h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -.03em; color: var(--ink); }
.booker__meta { display: grid; gap: .55rem; font-size: .875rem; color: var(--ink-2); }
.booker__meta span { display: flex; align-items: center; gap: .55rem; }
.booker__meta .icon { width: 1rem; height: 1rem; color: var(--green-ink); }
.booker__summary {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .8rem .9rem;
  border-radius: 14px;
  background: var(--mint-soft);
  font-size: .875rem;
  line-height: 1.4;
  color: var(--green-deep);
}
.booker__summary::first-letter { text-transform: uppercase; }
.booker__summary .icon { width: 1rem; height: 1rem; margin-top: .15em; color: var(--green-ink); }
.booker__summary strong { font-weight: 600; }

.booker__main {
  container-type: inline-size;
  min-width: 0;
  min-height: 25rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}

/* 1. Le jour et l'heure */
.booker__pick { display: grid; gap: 1.5rem; }
@container (min-width: 34rem) {
  .booker__pick { grid-template-columns: minmax(0, 1fr) 10.5rem; gap: 2rem; }
  .booker__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.booker__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 2.25rem; margin-bottom: .75rem; }
.booker .booker__month { margin: 0; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.booker .booker__month::first-letter { text-transform: uppercase; }
.booker__nav { display: flex; gap: .25rem; }
.booker__nav button {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color .15s;
}
.booker__nav button:hover:not(:disabled) { background: var(--ivory-sunk); }
.booker__nav button:disabled { opacity: .25; cursor: default; }
.booker__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.booker__wd { padding-block: .35rem; text-align: center; font-size: .6875rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.booker__day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 12px;
  font-size: .9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
button.booker__day { background: var(--p1-soft); color: var(--green-deep); transition: background-color .15s, color .15s, transform .15s var(--ease-out, ease); }
button.booker__day:hover { background: var(--mint); transform: translateY(-1px); }
.booker__day.is-off { color: var(--ink-3); font-weight: 400; opacity: .55; }
.booker__day.is-today::after { content: ""; position: absolute; bottom: 14%; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
button.booker__day.is-selected, button.booker__day.is-selected:hover { background: var(--green); color: #fff; transform: none; }
.booker__ghost { display: block; aspect-ratio: 1; border-radius: 12px; background: var(--ivory-sunk); animation: booker-pulse 1.3s ease-in-out infinite; }
.booker__ghost--line { width: 9rem; height: 1.25rem; aspect-ratio: auto; border-radius: 8px; }
@keyframes booker-pulse { 50% { opacity: .45; } }

.booker__slots { min-width: 0; }
.booker .booker__date { display: flex; flex-wrap: wrap; gap: .3rem; align-items: baseline; min-height: 2.25rem; margin: 0 0 .75rem; font-size: .9375rem; line-height: 2.25rem; color: var(--ink-2); }
.booker .booker__date strong { font-weight: 600; color: var(--ink); text-transform: capitalize; }
.booker__times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; max-height: 22rem; overflow-y: auto; padding: 2px; }
.booker__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .65rem .5rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s, transform .15s var(--ease-out, ease);
}
.booker__slot:hover { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); transform: translateY(-1px); }
.booker__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p1); }
.booker .booker__hint { font-size: .875rem; color: var(--ink-3); }
.booker .booker__notice { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 12px; background: var(--p2-soft); color: var(--ink); font-size: .875rem; }
.booker__empty { display: grid; justify-items: center; align-content: center; gap: .5rem; min-height: 21rem; text-align: center; font-size: .9375rem; }
.booker .booker__empty p, .booker .booker__empty strong { color: var(--ink); }
.booker__ghost-btn { margin-top: .75rem; padding: .55rem 1.1rem; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 500; color: var(--ink); }
.booker__ghost-btn:hover { border-color: var(--green); }

/* 2. Les coordonnées */
.booker__form { display: grid; gap: 1rem; animation: booker-in .25s var(--ease-out, ease); }
@keyframes booker-in { from { opacity: 0; transform: translateY(6px); } }
.booker .booker__step { display: flex; align-items: center; gap: .6rem; margin: 0 0 .25rem; font-family: var(--font-sans); font-size: .9375rem; font-weight: 400; color: var(--ink-2); outline: 0; }
.booker .booker__step strong { font-weight: 600; color: var(--ink); }
.booker .booker__step span::first-letter { text-transform: uppercase; }
.booker__back { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink); transition: border-color .15s; }
.booker__back:hover { border-color: var(--green); }
.booker__row { display: grid; gap: 1rem; }
.booker__field { display: grid; gap: .35rem; min-width: 0; align-content: start; }
.booker__field label, .booker__modes legend { font-size: .875rem; font-weight: 500; color: var(--ink); }
.booker__field label span, .booker__field label em { font-weight: 400; font-style: normal; color: var(--ink-3); }
.booker__field input, .booker__field textarea {
  width: 100%;
  min-width: 0;
  padding: .7rem .85rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.booker__field textarea { resize: vertical; min-height: 5rem; }
.booker__field input:hover, .booker__field textarea:hover { border-color: rgb(8 18 15 / .3); }
.booker__field input:focus, .booker__field textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgb(47 143 104 / .18); }
.booker__field [aria-invalid="true"] { border-color: var(--you); }
.booker .booker__error { margin: 0; font-size: .8125rem; color: var(--you); }
.booker__modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0; padding: 0; border: 0; }
.booker__modes legend { padding: 0; margin-bottom: .35rem; }
.booker__modes label { position: relative; display: grid; cursor: pointer; }
.booker__modes input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.booker__modes span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem .5rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.booker__modes .icon { width: 1rem; height: 1rem; }
.booker__modes label:hover span { border-color: var(--green); }
.booker__modes input:checked + span { border-color: var(--green); background: var(--p1-soft); box-shadow: 0 0 0 1px var(--green); color: var(--green-deep); }
.booker__modes input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.booker__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.booker .booker__status { margin: 0; font-size: .875rem; color: var(--ink-2); }
.booker .booker__status:empty { display: none; }
.booker .booker__status a { color: var(--green-ink); text-decoration: underline; }
.booker__confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #0d5540, #073d2d);
  color: #fff;
  font-weight: 600;
  transition: filter .15s, transform .15s var(--ease-out, ease), opacity .15s;
}
.booker__confirm:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); }
.booker__confirm:disabled { opacity: .6; cursor: progress; }
.booker__confirm .icon { width: 1.1rem; height: 1.1rem; }
.booker__confirm--link { width: auto; margin-top: .5rem; }
.booker .booker__legal, .booker .captcha-note { margin: 0; font-size: .75rem; line-height: 1.5; color: var(--ink-3); }
.booker .booker__legal a, .booker .captcha-note a { color: inherit; text-decoration: underline; }

/* 3. La confirmation */
.booker__done { display: grid; justify-items: center; gap: .75rem; padding-block: 1.5rem; text-align: center; font-size: .9375rem; outline: 0; animation: booker-in .3s var(--ease-out, ease); }
.booker__check { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--mint); color: var(--green-deep); }
.booker .booker__done h4 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.booker .booker__done p { max-width: 30rem; margin: 0; color: var(--ink-2); }
.booker .booker__done strong { font-weight: 600; color: var(--ink); }
.booker .booker__when strong::first-letter { text-transform: uppercase; }

@media (max-width: 760px) {
  .booker { grid-template-columns: minmax(0, 1fr); }
  .booker__info { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .booker *, .booker *::before, .booker *::after { animation: none !important; transition: none !important; }
}
