/* ============================================================
   Page /book/ : moteur de reservation Awilix (remplace Calendly).
   Charte du site : flat, aucune ombre, profondeur par les gris,
   un seul accent violet. Toutes les classes sont prefixees bk-.
   ============================================================ */

.bk-hero { padding-top: calc(var(--header-h) + clamp(2rem, 4vw, 3.5rem)); padding-bottom: 0; }
.bk-hero__body { display: grid; justify-items: center; text-align: center; max-width: 52rem; margin-inline: auto; }
.bk-hero__body .eyebrow { justify-self: center; }
.bk-hero__title { margin-block: 1.25rem 1rem; }
.bk-hero__lead { margin-inline: auto; max-width: 36rem; }

.bk-section { padding-top: clamp(2rem, 4vw, 3rem); }

.bk-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Le module : hote a gauche, etapes a droite ---------- */
.bk {
  display: grid;
  grid-template-columns: 300px 1fr;
  background: var(--card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-width: 1080px;
  margin-inline: auto;
  min-height: 560px;
}

.bk-host {
  padding: 2rem 1.75rem;
  background: var(--card-2);
  display: flex;
  flex-direction: column;
}
.bk-host__photo {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; background: var(--card-win);
}
.bk-host__name { margin: 1rem 0 0; font-weight: 600; color: var(--fg-strong); }
.bk-host__role { margin: .1rem 0 0; font-size: var(--fs-sm); color: var(--fg-muted); }
.bk-host__event {
  font-size: 1.5rem; font-weight: 600; letter-spacing: var(--tracking-heading);
  margin: 1.5rem 0 1rem; color: var(--fg-strong);
}
.bk-host__meta { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.bk-host__meta li {
  display: flex; align-items: center; gap: .6rem;
  font-size: var(--fs-sm); color: var(--fg-muted); font-weight: 500;
}
.bk-host__meta .icon { color: var(--fg-muted); flex: none; }
.bk-host__slot {
  display: flex; align-items: flex-start; gap: .6rem;
  margin-top: 1rem; padding: .75rem .85rem;
  border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.4;
}
.bk-host__slot .icon { flex: none; margin-top: 1px; }
.bk-host__slot[hidden] { display: none; }
.bk-host__points { margin-top: auto; padding-top: 2rem; }
.bk-host__points-title { margin: 0 0 .75rem; font-size: var(--fs-xs); font-weight: 600; color: var(--fg-strong); }
.bk-host__points ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.bk-host__points li { display: flex; gap: .5rem; font-size: var(--fs-sm); color: var(--fg-muted); line-height: 1.45; }
.bk-host__points .icon { color: var(--accent); flex: none; margin-top: 3px; }

.bk-main { padding: 2rem 2.25rem; background: var(--card-win); }
.bk-step[hidden] { display: none; }
.bk-title { font-size: 1.25rem; font-weight: 600; letter-spacing: var(--tracking-heading); margin: 0; color: var(--fg-strong); }

/* ---------- Etape 1 ---------- */
.bk-pick__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 1rem; margin-bottom: 1.5rem;
}
.bk-tools { display: flex; align-items: center; gap: .5rem; }
.bk-tz select {
  font: inherit; font-size: var(--fs-xs); font-weight: 500;
  color: var(--fg-strong); background: var(--chip);
  border: 0; border-radius: var(--radius-pill);
  padding: .5rem 2rem .5rem .85rem; max-width: 15rem;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23716f7d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
}
.bk-tz select:focus-visible, .bk-fmt button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bk-fmt { display: inline-flex; background: var(--chip); border-radius: var(--radius-pill); padding: 3px; }
.bk-fmt button {
  font: inherit; font-size: var(--fs-xs); font-weight: 550;
  border: 0; background: transparent; color: var(--fg-muted);
  padding: .35rem .65rem; border-radius: var(--radius-pill); cursor: pointer;
}
.bk-fmt button[aria-pressed="true"] { background: var(--card-win); color: var(--fg-strong); }

.bk-pick { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 2rem; }

.bk-cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.bk-cal__month { margin: 0; font-weight: 600; color: var(--fg-strong); }
.bk-cal__arrow {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  display: inline-grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); cursor: pointer;
  transition: background-color .15s var(--ease);
}
.bk-cal__arrow:hover { background: var(--accent-line); }
.bk-cal__arrow:disabled { background: transparent; color: var(--faint); cursor: default; }
.bk-cal__dow, .bk-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bk-cal__dow span {
  text-align: center; font-size: .6875rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
  padding-bottom: .5rem;
}
.bk-day {
  aspect-ratio: 1; max-height: 52px; width: 100%;
  display: grid; place-items: center; position: relative;
  border: 0; border-radius: 50%; background: transparent;
  font: inherit; font-size: var(--fs-sm); font-weight: 500;
  color: var(--faint); cursor: default;
}
.bk-day--open {
  background: var(--accent-soft); color: var(--accent); font-weight: 650; cursor: pointer;
  transition: background-color .15s var(--ease);
}
.bk-day--open:hover { background: var(--accent-line); }
.bk-day--today::after {
  content: ""; position: absolute; bottom: 6px; left: 50%;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor;
}
.bk-day[aria-pressed="true"] { background: var(--brand-purple); color: #fff; }
.bk-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bk-slots { display: flex; flex-direction: column; min-height: 0; }
.bk-slots__day { margin: .45rem 0 1.1rem; font-weight: 600; color: var(--fg-strong); min-height: 1.5em; }
.bk-slots__list {
  display: grid; gap: .5rem; align-content: start;
  max-height: 392px; overflow-y: auto; padding-right: 4px;
  scrollbar-width: thin;
}
.bk-slot { display: grid; grid-template-columns: 1fr; gap: .4rem; }
.bk-slot--chosen { grid-template-columns: 1fr 1fr; }
.bk-slot__time, .bk-slot__next {
  font: inherit; font-size: var(--fs-sm); font-weight: 650;
  padding: .8rem .5rem; border-radius: var(--radius); cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.bk-slot__time {
  background: var(--card-win); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.bk-slot__time:hover { border-color: var(--accent); background: var(--accent-soft); }
.bk-slot--chosen .bk-slot__time { background: var(--slab); border-color: var(--slab); color: #fff; }
.bk-slot__next { border: 0; background: var(--brand-purple); color: #fff; }
.bk-slot__next:hover { background: var(--brand-purple-dark); }
.bk-slot__next[hidden] { display: none; }
.bk-msg { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); line-height: 1.5; }

/* ---------- Etape 2 ---------- */
.bk-back {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-bottom: 1.25rem; padding: .4rem .75rem .4rem .55rem;
  border: 0; border-radius: var(--radius-pill); background: var(--chip);
  font: inherit; font-size: var(--fs-xs); font-weight: 550; color: var(--fg-strong); cursor: pointer;
}
.bk-back:hover { background: var(--card-2); }
.bk-form { margin-top: 1.25rem; }
.bk-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.bk-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.bk-chip {
  font: inherit; font-size: var(--fs-xs); font-weight: 550;
  padding: .5rem .85rem; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--card-win); color: var(--fg-strong); cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.bk-chip:hover { border-color: var(--accent-line); }
.bk-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.bk-error { margin: 1rem 0 0; font-size: var(--fs-sm); color: #b3423f; }
.bk-submit { width: 100%; margin-top: 1.4rem; }
.bk-submit:disabled { opacity: .7; cursor: wait; }
.bk-privacy { margin: .75rem 0 0; text-align: center; font-size: var(--fs-xs); color: var(--faint); }
.field--invalid input, .field--invalid textarea { border-color: #b3423f; }

/* ---------- Etape 3 ---------- */
.bk-done { display: grid; justify-items: center; text-align: center; align-content: center; min-height: 100%; padding-block: 2rem; }
.bk-done__icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.25rem;
}
.bk-done .bk-title { font-size: 1.75rem; }
.bk-done__when { margin: .75rem 0 0; font-weight: 600; color: var(--accent); }
.bk-done__text { margin: .5rem 0 0; color: var(--fg-muted); max-width: 26rem; }
.bk-done__text b { color: var(--fg-strong); font-weight: 600; }
.bk-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.75rem; }

.bk-proof { justify-content: center; margin-top: 2.5rem; }

/* Bandeau d'apercu (brouillon uniquement) */
.bk-ribbon {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  padding: .55rem 1rem; border-radius: var(--radius-pill);
  background: var(--brand-yellow); color: oklch(30% 0.05 90);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
}

/* ---------- Tablette et mobile ---------- */
/* ---------- Lien personnel : deplacer ou annuler l'appel ---------- */
.bk-manage {
  margin: 0 0 1.5rem; padding: 1rem 1.1rem;
  border-radius: var(--radius); background: var(--accent-soft);
  color: var(--fg-strong); font-size: var(--fs-sm); line-height: 1.5;
}
.bk-manage[hidden] { display: none; }
.bk-manage__text { margin: 0; font-weight: 500; }
.bk-manage__actions { margin-top: .6rem; }
.bk-manage__actions[hidden], .bk-manage__confirm[hidden] { display: none; }
.bk-manage__cancel {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.bk-manage__confirm { display: grid; gap: .5rem; margin-top: .9rem; }
.bk-manage__confirm textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem;
  background: var(--card); color: var(--fg-strong); font: inherit; resize: vertical;
}
.bk-manage__row { display: flex; flex-wrap: wrap; gap: .6rem; }
.bk-slot__next--wide { white-space: nowrap; }
.bk-slot--chosen:has(.bk-slot__next--wide) { grid-template-columns: 1fr 1.6fr; }
.bk-msg--error { color: #b3423f; margin-bottom: .75rem; }
.bk-done__when[hidden], [data-bk-gcal][hidden] { display: none; }

/* ---------- Module dans la page contact (/contact/#call) ---------- */
.contact-booking .bk { margin-top: 2.5rem; }

@media (max-width: 980px) {
  .bk { grid-template-columns: 1fr; }
  .bk-host { display: grid; grid-template-columns: 56px 1fr; column-gap: .9rem; padding: 1.5rem; }
  .bk-host__photo { width: 56px; height: 56px; grid-row: span 2; }
  .bk-host__name { margin: .2rem 0 0; }
  .bk-host__event, .bk-host__meta, .bk-host__slot, .bk-host__points { grid-column: 1 / -1; }
  .bk-host__event { margin: 1.1rem 0 .75rem; font-size: 1.25rem; }
  .bk-host__meta { grid-auto-flow: column; justify-content: start; gap: 1.1rem; }
  .bk-host__points { display: none; }
}
@media (max-width: 720px) {
  .bk-main { padding: 1.5rem 1.25rem; }
  .bk-pick { grid-template-columns: 1fr; gap: 1.5rem; }
  .bk-slots__list { max-height: none; grid-template-columns: 1fr 1fr; }
  .bk-slot--chosen { grid-column: 1 / -1; }
  .bk-host__meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
  .bk-form__grid { grid-template-columns: 1fr; }
  .bk-form__grid .field { grid-column: 1 / -1; }
  .bk-ribbon { white-space: normal; width: max-content; max-width: calc(100% - 32px); text-align: center; bottom: 12px; padding: .45rem .85rem; font-size: .6875rem; }
}
