/* =====================================================================
   Centre Étoile — maison médicale de quartier.
   « Le soin, sans la froideur » : porcelaine chaude plutôt que blanc
   clinique, encre bleu nuit, angles très arrondis (un seul système :
   22 / 12 px), Manrope serré pour les titres, Inter pour le texte.
   Le bleu pétrole ne sert qu'aux actions (R14).
   ===================================================================== */
:root {
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --surface-2: #ECEBE5;
  --ink: #15303A;
  --muted: #52646B;
  --line: #DAD9D2;
  --accent: #1D6A89;
  --accent-ink: #FFFFFF;
  --danger: #B3361F;
  --ok: #23704A;
  --warm: #F4E6D8;
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-text: 'Inter', system-ui, sans-serif;
  --radius: 22px;
  --radius-sm: 12px;
  --top-h: 68px;
  --chrome: calc(var(--demobar-h) + var(--top-h));
  --hero-h: 170vh;
}

[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--chrome) + 16px); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; }
.kicker { font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- En-tête ---------- */
.top { position: sticky; top: var(--demobar-h); z-index: 50; height: var(--top-h); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.logo__mark { width: 30px; height: 30px; }
.logo__mark rect { fill: var(--ink); }
.logo__mark path { stroke: var(--bg); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.top__nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.top__nav a:not(.btn) { text-decoration: none; padding-block: 12px; }
.top__nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }
.top__nav .btn { min-height: 44px; font-size: 15px; border-radius: 999px; }

/* Boutons : pilules, cohérentes avec les rayons doux */
.btn { border-radius: 999px; }
.btn--quiet { border-radius: var(--radius-sm); }

/* ---------- Ouverture ---------- */
.hero { position: relative; height: var(--hero-h); }
.hero__track { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--hero-h) - 100vh + var(--chrome) + 40vh); pointer-events: none; }
.hero__stick { position: sticky; top: var(--chrome); height: calc(100vh - var(--chrome)); min-height: 600px; display: grid; align-items: center; }
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.hero__text { grid-column: 1 / span 6; display: grid; gap: 26px; align-content: center; padding-bottom: 40px; }
.hero h1 { font-size: clamp(48px, 5.8vw, 88px); line-height: .98; letter-spacing: -0.045em; max-width: 10ch; }
.hero__lede { font-size: 19px; color: var(--muted); max-width: 42ch; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.status { display: inline-flex; align-items: center; gap: 10px; justify-self: start; min-height: 36px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 18%, transparent); }
.status.is-open .status__dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }

.hero__media { grid-column: 8 / -1; position: relative; }
.hero__seq { aspect-ratio: 4 / 5; max-height: calc(100vh - var(--chrome) - 80px); width: 100%; border-radius: 28px; background: #1B2125; }
.hero__caption { position: absolute; left: 20px; right: 20px; top: 18px; z-index: 1; font-size: 13.5px; line-height: 1.4; color: #EEF1F2; max-width: 30ch; }
.next {
  position: absolute; left: -96px; bottom: 28px; width: 290px; z-index: 2;
  display: grid; gap: 4px; padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--warm); box-shadow: 0 18px 40px rgba(21, 48, 58, .16), 0 2px 6px rgba(21, 48, 58, .08);
}
.next__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.next__when { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; min-height: 30px; border-radius: 8px; }
.next__when.skel { width: 70%; }
.next__who { font-size: 14px; color: var(--muted); min-height: 21px; }
.next__btn { margin-top: 10px; justify-self: start; min-height: 44px; padding-inline: 18px; background: var(--surface); }

/* ---------- Rendez-vous ---------- */
.rdv { padding-block: clamp(72px, 9vw, 128px); background: linear-gradient(var(--bg), var(--bg)); }
.rdv__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.rdv__head { grid-column: 1 / span 5; display: grid; gap: 18px; position: sticky; top: calc(var(--chrome) + 32px); }
.rdv__head h2, .team__head h2, .infos__head h2 { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.02; letter-spacing: -0.04em; }
.facts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; }
.facts li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; font-size: 15px; color: var(--muted); }
.facts .i { margin-top: 2px; color: var(--ink); }

.book { grid-column: 7 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(22px, 3vw, 36px); min-width: 0; }
.book__form { display: grid; gap: 8px; }
.book .steps { margin-bottom: 26px; }
.book .steps li { font-weight: 600; }
.step { display: grid; gap: 18px; min-height: 250px; align-content: start; min-width: 0; }
.step.is-entering { animation: step-in var(--t-in) var(--ease-out) both; }
.step.is-back { --step-x: -14px; }
@keyframes step-in { from { opacity: 0; translate: var(--step-x, 14px) 0; } }
.step__q { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.03em; line-height: 1.15; padding: 0; margin-bottom: 4px; outline: none; }

/* Cartes à choisir (spécialité, soignant) */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card, .who { position: relative; display: block; }
.card input, .who input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.card__box, .who__box {
  position: relative; display: grid; gap: 6px; padding: 20px 20px 18px; border-radius: 18px;
  background: var(--surface); border: 1.5px solid var(--line);
  transition: border-color var(--t-out) var(--ease-out), background-color var(--t-out), box-shadow var(--t-out);
}
.card__box { min-height: 150px; align-content: end; }
.card__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.card__meta { font-size: 14px; color: var(--muted); }
.card__box::before, .who__box::after {
  content: ""; position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface) no-repeat center / 14px;
  transition: background-color var(--t-out), border-color var(--t-out), transform var(--t-in) var(--ease-out);
}
.card input:hover + .card__box, .who input:hover + .who__box { border-color: color-mix(in srgb, var(--ink) 45%, var(--line)); }
.card input:checked + .card__box, .who input:checked + .who__box { border-color: var(--ink); background: color-mix(in srgb, var(--warm) 35%, var(--surface)); }
.card input:checked + .card__box::before, .who input:checked + .who__box::after {
  border-color: var(--accent); background-color: var(--accent);
  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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.card input:focus-visible + .card__box, .who input:focus-visible + .who__box { outline: 2px solid var(--accent); outline-offset: 3px; }
.field.is-invalid .card__box, .field.is-invalid .who__box { border-color: var(--danger); }

.whos { display: grid; gap: 10px; }
.who__box { grid-template-columns: 64px 1fr; column-gap: 16px; align-items: center; padding: 14px 52px 14px 14px; }
.who__img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--surface-2); }
.who__any { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); }
.who__any .i { width: 26px; height: 26px; }
.who__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.015em; }
.who__meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.who__note { font-size: 14px; color: var(--muted); }

/* Semaine : jours de consultation */
.week { display: inline-flex; gap: 3px; vertical-align: middle; }
.week b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.week b.on { background: var(--ink); color: var(--bg); }

/* Jours */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; margin: -4px -2px 0; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { position: relative; flex: 1 0 84px; }
@media (min-width: 761px) { .days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; } }
.day input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.day__box { display: grid; justify-items: center; gap: 1px; padding: 10px 6px 9px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); transition: background-color var(--t-out), border-color var(--t-out), color var(--t-out); }
.day__wd { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.day__n { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.day__free { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.day input:hover + .day__box { border-color: var(--ink); }
.day input:checked + .day__box { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.day input:checked + .day__box .day__wd, .day input:checked + .day__box .day__free { color: color-mix(in srgb, var(--bg) 78%, var(--ink)); }
.day input:focus-visible + .day__box { outline: 2px solid var(--accent); outline-offset: 3px; }
.day input:disabled { cursor: not-allowed; }
.day input:disabled + .day__box { opacity: .5; background: transparent; border-style: dashed; }

/* Créneaux */
.slots { display: grid; gap: 14px; min-height: 200px; align-content: start; }
.slots__h { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.slots__h small { font-size: 13px; font-weight: 400; color: var(--muted); }
.slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { position: relative; }
.slot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.slot span { display: grid; place-content: center; justify-items: center; min-height: 48px; padding: 4px 6px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; transition: background-color var(--t-out), border-color var(--t-out), color var(--t-out), transform var(--t-press) var(--ease-out); }
.slot span small { font-size: 11px; font-weight: 500; color: var(--muted); line-height: 1.2; }
.slot input:hover + span { border-color: var(--ink); }
.slot input:active + span { transform: scale(.97); }
.slot input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.slot input:checked + span small { color: color-mix(in srgb, var(--bg) 78%, var(--ink)); }
.slot input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.slot input:disabled { cursor: not-allowed; }
.slot input:disabled + span { background: transparent; border-color: transparent; color: var(--muted); text-decoration: line-through; opacity: .55; font-weight: 500; }
.slots.is-swapping { animation: fade-in 220ms var(--ease-out); }
@keyframes fade-in { from { opacity: 0; translate: 0 4px; } }

.empty { display: grid; gap: 12px; justify-items: start; padding: 22px; border-radius: 18px; background: var(--surface-2); }
.empty p { color: var(--ink); }
.empty .btn { min-height: 44px; background: var(--surface); }

/* Prénom */
.name-field { max-width: 380px; }
.nohealth { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); font-size: 14.5px; color: var(--ink); max-width: 60ch; }
.nohealth .i { margin-top: 1px; }

/* Ticket : le rendez-vous se compose sous vos yeux */
.ticket { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 16px; margin-top: 8px; border-top: 1.5px dashed var(--line); max-width: none; }
.ticket span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 600; transition: background-color var(--t-in), color var(--t-in); }
.ticket span.is-empty { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); font-weight: 500; }
.ticket span.is-new { animation: pop var(--t-in) var(--ease-out); }
@keyframes pop { from { scale: .94; opacity: .4; } }

.book__nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; }
.book__nav [data-next], .book__nav [data-submit] { margin-left: auto; }
.book__nav [data-prev].is-off { visibility: hidden; }
.book__privacy { font-size: 13px; color: var(--muted); flex: 1 1 180px; text-align: right; }
.book__privacy:not([hidden]) + .btn { margin-left: 0; }

/* Confirmation */
.done { display: grid; grid-template-columns: 116px 1fr; gap: 28px; align-items: start; animation: step-in var(--t-in) var(--ease-out) both; }
.done:focus { outline: none; }
.done__date { display: grid; justify-items: center; padding: 14px 8px 16px; border-radius: 20px; background: var(--ink); color: var(--bg); }
.done__date span { font-size: 14px; font-weight: 600; color: color-mix(in srgb, var(--bg) 75%, var(--ink)); }
.done__date b { font-family: var(--font-display); font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.done__body { display: grid; gap: 16px; }
.done__title { font-size: clamp(30px, 3vw, 42px); line-height: 1.05; letter-spacing: -0.04em; }
.done__when { font-size: 19px; }
.done__when b { font-weight: 600; }
.done__list { margin: 0; padding: 16px 0 0 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.status-ok, .status-wait { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.status-ok { color: var(--ok); }
.status-wait { color: var(--muted); }
.notice--err .btn { margin-top: 10px; min-height: 44px; }

/* ---------- Équipe ---------- */
.team { padding-block: clamp(72px, 9vw, 128px); background: var(--surface); }
.team__head { display: grid; gap: 16px; max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.team__head > p:not(.kicker) { color: var(--muted); font-size: 18px; }
.people { list-style: none; margin: 0; padding: 0; }
.person {
  display: grid; grid-template-columns: 168px minmax(0, 1.25fr) minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding-block: 26px; border-top: 1px solid var(--line);
}
.person:last-child { border-bottom: 1px solid var(--line); }
.person__img { width: 168px; height: 200px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.person:nth-child(1) .person__img { object-position: 42% 20%; }
.person:nth-child(2) .person__img { object-position: 50% 30%; }
.person__id { display: grid; gap: 6px; }
.person h3 { font-size: 28px; line-height: 1.1; }
.person__role { font-weight: 600; color: var(--muted); font-size: 15px; }
.person__id > p:last-child { color: var(--ink); margin-top: 4px; }
.person__facts { margin: 0; display: grid; gap: 10px; font-size: 14px; }
.person__facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.person__facts dt { color: var(--muted); }
.person__facts dd { margin: 0; font-weight: 500; }
.person__btn { white-space: nowrap; }

/* ---------- Infos ---------- */
.infos { padding-block: clamp(72px, 9vw, 128px); }
.infos__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 24px; }
.infos__head { grid-column: 1 / span 5; grid-row: 1 / span 2; display: grid; gap: 16px; align-content: start; }
.infos__head > p:not(.kicker) { color: var(--muted); }
.infos h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 12px; }
.hours { grid-column: 7 / span 3; }
.hours__t { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours__t th, .hours__t td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours__t td { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.hours__t tr.is-today th, .hours__t tr.is-today td { background: var(--warm); font-weight: 600; }
.hours__t tr.is-today th { border-radius: 10px 0 0 10px; }
.hours__t tr.is-today td { border-radius: 0 10px 10px 0; }
.hours__t tr.is-today th::after { content: " · aujourd'hui"; font-weight: 400; color: var(--muted); font-size: 13px; }
.prices { grid-column: 10 / -1; }
.prices dl { margin: 0; display: grid; }
.prices dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.prices dd { white-space: nowrap; margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.prices__note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.urgent { grid-column: 7 / -1; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 16px 18px; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.urgent .i { color: var(--danger); margin-top: 1px; }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
  .hero__text { grid-column: 1 / span 7; }
  .hero__media { grid-column: 8 / -1; }
  .next { left: -60px; width: 260px; }
  .rdv__head { grid-column: 1 / -1; position: static; }
  .book { grid-column: 1 / -1; }
  .person { grid-template-columns: 140px 1fr auto; }
  .person__img { width: 140px; height: 170px; }
  .person__facts { grid-column: 2 / span 1; }
  .person__btn { grid-column: 3; grid-row: 1; }
  .hours { grid-column: 7 / -1; }
  .prices { grid-column: 7 / -1; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  :root { --top-h: 58px; }
  .hero { height: auto; }
  .hero__track { height: 100%; }
  .hero__stick { position: static; height: auto; min-height: 0; display: block; padding: 18px 0 36px; }
  .hero__grid { display: flex; flex-direction: column; gap: 30px; }
  .hero__text { padding: 0; gap: 20px; }
  .hero h1 { font-size: clamp(42px, 12.5vw, 56px); }
  .hero__lede { font-size: 17px; }
  .hero__cta .btn--quiet { display: none; }
  .hero__media { width: 100%; }
  .hero__seq { aspect-ratio: 4 / 3.4; border-radius: 22px; max-height: none; }
  .next { position: relative; left: auto; bottom: auto; width: auto; margin: -44px 14px 0; }

  .rdv__grid { display: block; }
  .rdv__head { margin-bottom: 28px; }
  .book { border-radius: 22px; padding: 18px 16px 18px; margin-inline: calc(var(--gutter) * -0.5); }
  .step { min-height: 0; }
  .cards { grid-template-columns: 1fr; gap: 8px; }
  .card__box { min-height: 0; padding: 16px 52px 16px 16px; }
  .card__box::before { top: 50%; translate: 0 -50%; }
  .day { flex: 0 0 78px; }
  .slots__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .slot span { min-height: 48px; font-size: 14.5px; }
  .book__nav [data-prev].is-off { display: none; }
  .book__nav [data-next], .book__nav [data-submit] { flex: 1 1 auto; }
  .book__privacy { order: 3; flex-basis: 100%; text-align: left; }
  .done { grid-template-columns: 1fr; gap: 18px; }
  .done__date { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 10px; padding: 12px 16px; justify-self: start; }
  .done__date b { font-size: 34px; }

  .person { grid-template-columns: 96px 1fr; gap: 14px 16px; align-items: start; padding-block: 22px; }
  .person__img { width: 96px; height: 120px; border-radius: 16px; }
  .person h3 { font-size: 22px; }
  .person__facts { grid-column: 1 / -1; }
  .person__facts > div { grid-template-columns: 130px 1fr; }
  .person__btn { grid-column: 1 / -1; grid-row: auto; width: 100%; }

  .infos__grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
  .infos__head, .hours, .prices, .urgent { grid-column: 1; grid-row: auto; }
}
