/* =====================================================================
   Le site en pages : en-têtes de page, équipe, pédiatre, rééducation,
   rendez-vous, pied de page, et le dock (couleurs + assistant).
   Chargé après style.css et v2.css.
   ===================================================================== */

/* ---------- En-tête au-dessus du film de nuit : tout passe en clair, menu compris ---------- */
body.is-night .site-header { color: var(--night-ink); }

/* ---------- Navigation : la page en cours ---------- */
.nav a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--plum) 9%, transparent); }
body.is-night .nav a[aria-current="page"] { color: var(--night-ink); background: rgba(255, 255, 255, .1); }
.menu-sheet__nav a[aria-current="page"] { color: var(--plum); font-style: italic; }

/* ---------- En-tête de page ---------- */
.page-head {
  position: relative; overflow: clip;
  padding: calc(var(--header-h) + clamp(36px, 6vw, 88px)) 0 clamp(48px, 7vw, 100px);
  background: linear-gradient(180deg, var(--blush) 0%, var(--canvas) 100%);
}
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.page-head__kicker { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--plum); }
.page-head__title { margin-top: 16px; font-size: var(--t-hero); line-height: 1.02; letter-spacing: -.02em; }
.page-head .lead { margin-top: clamp(18px, 2.5vw, 28px); }
.page-head__media { justify-self: end; width: 100%; max-width: 440px; }
.page-head__media .arch { aspect-ratio: 4 / 5; box-shadow: var(--e3); }
.page-head__media .arch img { object-position: 50% 40%; }
.page-head--art .page-head__media { max-width: 420px; }
.page-head--art .page-head__media img { width: 100%; height: auto; }
.page-head--plain .page-head__grid { grid-template-columns: minmax(0, 1fr) auto; }
.page-head__sprig { width: clamp(120px, 16vw, 220px); aspect-ratio: 220 / 300; height: auto; color: var(--sage-deep); opacity: .9; }
.page-head__sprig .sprig-leaves path:nth-child(even) { fill: var(--sage); }
@media (max-width: 900px) {
  .page-head__grid, .page-head--plain .page-head__grid { grid-template-columns: 1fr; }
  .page-head__media { justify-self: start; max-width: 340px; }
  .page-head--art .page-head__media { max-width: 260px; }
  .page-head__sprig { display: none; }
}

/* Entrée de l'en-tête de page */
.js .page-head__copy > *, .js .page-head__media { opacity: 0; transform: translateY(16px); }
.is-ready .page-head__copy > *, .is-ready .page-head__media {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out);
}
.is-ready .page-head__copy > :nth-child(2) { transition-delay: .08s; }
.is-ready .page-head__copy > :nth-child(3) { transition-delay: .16s; }
.is-ready .page-head__media { transition-delay: .2s; }


/* ---------- Les pages de soins : la sous-navigation suit l'en-tête ---------- */
.page-head + .soins { padding-top: 0; }
.soins-nav a sup { font-size: .6em; }
.chapter--pre { background: linear-gradient(var(--canvas), var(--blush) 30%, var(--blush) 72%, var(--canvas)); }

/* Titres : les pages ont un h1, les chapitres passent en h2 et leurs blocs en h3 */
.bento__item h3, .path h3, .note h3, .quinze__blocks h3 { font-size: var(--t-h4); margin-bottom: 12px; }
.path h3 { margin-bottom: 8px; }
.note h3 { margin-bottom: 18px; }

/* ---------- Accueil ---------- */
.audience-section .split__aside { position: static; }
.aside-photo { margin-top: clamp(28px, 4vw, 44px); max-width: 320px; aspect-ratio: 4 / 5; border-radius: var(--r-arch); overflow: hidden; box-shadow: var(--e2); background: var(--blush); }
.aside-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
@media (max-width: 900px) { .aside-photo { max-width: none; aspect-ratio: 16 / 10; border-radius: var(--r-lg); } }

.teaser { padding-top: 0; }
.teaser__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: clamp(20px, 4vw, 56px);
  border-radius: clamp(28px, 3vw, 44px);
  background: var(--blush);
}
.teaser__photo .arch { aspect-ratio: 4 / 5; max-width: 440px; box-shadow: var(--e2); }
.teaser__photo img { object-position: 50% 15%; }
.teaser__copy .h2 { margin: 14px 0 20px; }
.teaser__copy .lead { color: var(--ink); margin-bottom: 30px; }
@media (max-width: 900px) { .teaser__grid { grid-template-columns: 1fr; } .teaser__photo .arch { max-width: 360px; aspect-ratio: 1; } }

/* ---------- L'équipe ---------- */
.founders__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.founders__photo .arch { aspect-ratio: 3 / 4; box-shadow: var(--e3); }
.founders__photo img { object-position: 50% 15%; }
.founders__photo figcaption { margin-top: 14px; text-align: center; font-size: var(--t-small); color: var(--ink-soft); }
.founders__copy .h2 { margin: 14px 0 20px; }
.founders__copy .lead { color: var(--ink); }
.founders__copy > p:not(.lead):not(.chapter__kicker) { color: var(--ink-soft); max-width: 56ch; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 28px 0 32px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.names li { display: grid; gap: 4px; align-content: start; }
.names__name { font: 400 clamp(1.3rem, 1.05rem + .9vw, 1.7rem)/1.15 var(--font-display); letter-spacing: -.015em; }
.names__role { font-weight: 600; font-size: var(--t-small); color: var(--plum); }
.names__dip { font-size: .875rem; color: var(--ink-soft); line-height: 1.45; }
@media (max-width: 900px) { .founders__grid { grid-template-columns: 1fr; } .founders__photo { max-width: 440px; } }
@media (max-width: 520px) { .names { grid-template-columns: 1fr; } }

.collab { background: var(--blush); }
.collab__head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.collab__people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); align-items: start; }
.collab .person--offset { margin-top: clamp(40px, 7vw, 96px); }
.collab .person__photo { aspect-ratio: 720 / 1000; }
.collab .person__photo img { object-position: 50% 10%; }
@media (max-width: 760px) {
  .collab__people { grid-template-columns: 1fr 1fr; }
  .collab .person:last-child { grid-column: 1 / -1; width: calc(50% - clamp(8px, 1.5vw, 20px)); justify-self: center; margin-top: -24px; }
}

.pedia__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.pedia__photo { max-width: 400px; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--e2); background: var(--blush); }
.pedia__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.pedia__copy .h2 { margin: 14px 0 20px; }
.pedia__copy .lead { color: var(--ink); margin-bottom: 24px; }
.pedia__copy .link-arrow { font-size: 1.05rem; }
@media (max-width: 900px) { .pedia__grid { grid-template-columns: 1fr; } .pedia__photo { max-width: 320px; } }

/* ---------- Grossesse et bébé ---------- */
.projet { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.projet__art { max-width: 400px; }
.projet__art img { width: 100%; height: auto; }
.projet__copy .h3 { margin: 14px 0 20px; }
.projet__copy .lead { color: var(--ink); margin-bottom: 1em; }
.projet__copy > p:not(.lead):not(.chapter__kicker) { color: var(--ink-soft); max-width: 58ch; }
@media (max-width: 900px) { .projet { grid-template-columns: 1fr; } .projet__art { max-width: 240px; order: 2; } }

.post__media { position: sticky; top: calc(var(--header-h) + 90px); }
.post__media .arch { aspect-ratio: 4 / 5; }
.post__media img { object-position: 50% 30%; }
@media (max-width: 900px) { .post__media { position: static; max-width: 400px; } }

.chapter--quinze { background: var(--blush); }
.quinze { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.quinze__media { position: sticky; top: calc(var(--header-h) + 100px); }
.quinze__portrait { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--e2); }
.quinze__portrait > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.quinze__portrait figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  display: grid; gap: 2px; padding: 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.quinze__portrait strong { font: 400 1.2rem/1.2 var(--font-display); }
.quinze__portrait figcaption span { font-size: .85rem; font-weight: 600; color: var(--plum); }
.quinze__feet {
  position: absolute; z-index: 1; top: -7%; right: -9%;
  width: 40%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 6px var(--blush), var(--e2);
}
.quinze__feet img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.quinze__copy .chapter__head { margin-bottom: clamp(24px, 3vw, 36px); }
.quinze__blocks { display: grid; gap: 28px; }
.quinze__blocks p { color: var(--ink-soft); max-width: 60ch; }
.quinze .facts { margin-top: 0; }
.quinze .facts li { background: var(--surface); }
.source { margin: 0; font-size: .82rem; color: var(--ink-soft); }
@media (max-width: 900px) {
  .quinze { grid-template-columns: 1fr; }
  .quinze__media { position: relative; top: 0; width: min(78%, 360px); margin-top: 24px; }
}

/* ---------- Gynécologie ---------- */
.chapter--gyn .gyn__media img { object-position: 50% 60%; }
/* La photo des quatre générations reste en hauteur sur téléphone, pour garder les quatre visages */
@media (max-width: 900px) { .chapter--gyn .gyn__media .arch { aspect-ratio: 4 / 5; border-radius: var(--r-arch); max-width: 420px; } }
.chapter--reeduc { background: linear-gradient(var(--canvas), var(--blush) 26%, var(--blush) 78%, var(--canvas)); }
.reeduc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.reeduc__text .lead { color: var(--ink); margin-bottom: 1em; }
.reeduc__text > p:not(.lead) { color: var(--ink-soft); max-width: 62ch; }
.reeduc__schema {
  display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 22px; align-items: center;
  max-width: 560px; margin-top: clamp(28px, 4vw, 44px); padding: 16px 24px 16px 16px;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--e1);
}
.reeduc__schema img { width: 100%; height: auto; }
.reeduc__schema figcaption { font: italic 300 clamp(1.1rem, 1rem + .4vw, 1.3rem)/1.35 var(--font-display); color: var(--ink-soft); }
.emsella {
  position: sticky; top: calc(var(--header-h) + 90px);
  padding: 12px 12px clamp(22px, 3vw, 30px);
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--e2);
}
.emsella__photo { border-radius: calc(var(--r-lg) - 10px); overflow: hidden; background: #fff; }
.emsella__photo img { width: 100%; height: auto; }
.emsella > :not(.emsella__photo) { padding-inline: clamp(10px, 1.6vw, 18px); }
.emsella__tag { margin: 22px 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--plum); }
.emsella h3 { font-size: var(--t-h4); margin-bottom: 10px; }
.emsella p:not(.emsella__tag) { color: var(--ink-soft); font-size: var(--t-small); }
@media (max-width: 900px) { .reeduc { grid-template-columns: 1fr; } .emsella { position: static; max-width: 520px; } }
@media (max-width: 520px) { .reeduc__schema { grid-template-columns: 1fr; padding: 16px; } .reeduc__schema img { max-width: 220px; } }

.chapter--ivg { padding-top: clamp(24px, 4vw, 48px); }
.ivg--solid {
  margin-top: 0; color: var(--night-ink);
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--plum) 82%, #fff), transparent 62%),
    linear-gradient(140deg, var(--plum-700), var(--plum-900));
  box-shadow: var(--e3);
}
.ivg__title { font-size: var(--t-h4); margin-bottom: 8px; }

/* ---------- Rendez-vous ---------- */
.rdv__panel > .ways { align-self: center; }
.page-head + .rdv { padding-top: 0; }

/* ---------- Infos pratiques ---------- */
.chip--star { gap: 8px; }
.chip--star .icon { width: 1.05em; height: 1.05em; color: var(--plum); }

/* ---------- Pied de page ---------- */
/* Le dock flotte en bas : le pied de page lui laisse la place */
.site-footer { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (max-width: 760px) { .site-footer { padding-bottom: calc(150px + env(safe-area-inset-bottom)); } }
.footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer__nav { display: grid; gap: 8px; font-size: var(--t-small); }
.footer__nav a { text-decoration: none; }
.footer__grid { margin-top: 0; }
.footer__legal { margin-top: 40px; }
@media (hover: hover) and (pointer: fine) { .footer__nav a:hover { text-decoration: underline; } }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child { grid-row: span 2; } }
@media (max-width: 420px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Mentions légales ---------- */
.page-legal .legal { padding-bottom: clamp(48px, 6vw, 80px); }
.legal a.btn--primary { color: #fff; } /* le bouton de la page introuvable */
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* =====================================================================
   Le dock : le choix des couleurs (à gauche) et l'assistant (à droite)
   ===================================================================== */
.dock {
  position: fixed; z-index: 58;
  left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: flex-end;
  pointer-events: none;
  transition: transform .45s var(--ease-out);
}
.dock > * { position: relative; pointer-events: auto; }
.dock > .assistant { margin-left: auto; } /* reste à droite, avec ou sans le bouton Couleurs */
body.menu-open .dock { visibility: hidden; }
.dock__btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 18px 0 14px;
  border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: var(--e2), inset 0 0 0 1px var(--line);
  color: var(--ink); font: 600 .92rem/1 var(--font-text);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .14s var(--ease-out), background-color .2s ease, box-shadow .2s ease;
}
.dock__btn:active { transform: scale(.96); }
.dock__btn .icon { width: 1.3em; height: 1.3em; }
.assistant__toggle { background: var(--plum); color: #fff; box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--plum) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .16); }
@media (hover: hover) and (pointer: fine) {
  .assistant__toggle:hover { background: var(--plum-700); }
  .charte__toggle:hover { background: var(--surface); }
}

@media (max-width: 760px) {
  .dock__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dock__btn { width: 48px; padding: 0; justify-content: center; }
  /* La barre d'actions apparaît en bas : le dock monte au-dessus */
  body:has(.action-bar.is-visible) .dock { transform: translateY(-66px); }
}

/* Panneaux : apparition douce, en transform et opacity */
.charte__panel, .assistant__panel {
  position: absolute; bottom: calc(100% + 12px);
  opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity .22s var(--ease-out), transform .3s var(--ease-out);
}
.charte__panel.is-open, .assistant__panel.is-open { opacity: 1; transform: none; }
.charte__panel[hidden], .assistant__panel[hidden] { display: none; }

/* ---------- Les couleurs ---------- */
.charte__dots { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#6B2C5C 0 72deg, #3D5A46 0 144deg, #8A5130 0 216deg, #5A4A8C 0 288deg, #7B2335 0); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.charte__panel {
  left: 0; width: 248px; padding: 14px;
  border-radius: 22px; background: var(--surface); color: var(--ink);
  box-shadow: var(--e3), inset 0 0 0 1px var(--line);
  transform-origin: 0% 100%;
}
.charte__title { margin: 2px 6px 10px; font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.charte__list { display: grid; gap: 4px; }
.charte__list button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 46px; padding: 0 12px;
  border: 0; border-radius: 14px; background: transparent;
  font: 500 .98rem/1 var(--font-text); color: var(--ink); text-align: left; cursor: pointer;
  transition: background-color .18s ease;
}
.charte__list button span {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c) 0 50%, var(--c2) 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.charte__list button[aria-checked="true"] { background: var(--blush); font-weight: 600; }
.charte__list button[aria-checked="true"]::after {
  content: ""; margin-left: auto; width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  color: var(--plum);
}
@media (hover: hover) and (pointer: fine) { .charte__list button:not([aria-checked="true"]):hover { background: color-mix(in srgb, var(--plum) 6%, transparent); } }

/* ---------- L'assistant ---------- */
.assistant__panel {
  right: 0; width: min(384px, calc(100vw - 32px));
  max-height: min(600px, calc(100dvh - var(--header-h) - 110px));
  display: flex; flex-direction: column;
  border-radius: 24px; overflow: hidden;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--e3), inset 0 0 0 1px var(--line);
  transform-origin: 100% 100%;
}
.assistant__panel:not([hidden]) { display: flex; }
.assistant__head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 10px 14px 16px;
  color: #fff;
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--plum) 80%, #fff), transparent 65%), linear-gradient(140deg, var(--plum), var(--plum-900));
}
.assistant__mark { width: 40px; height: 40px; color: #fff; font-size: 1.4rem; }
.assistant__mark .brand__sprig { color: var(--hi); width: 22px; height: 28px; right: -7px; bottom: -5px; }
.assistant__head h2 { font-size: 1.25rem; letter-spacing: -.01em; }
.assistant__head p { margin: 2px 0 0; font-size: .82rem; color: var(--hi-soft); }
.assistant__head .icon-btn { color: #fff; }
@media (hover: hover) and (pointer: fine) { .assistant__head .icon-btn:hover { background: rgba(255, 255, 255, .12); } }
.assistant__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 10px; padding: 16px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.5; }
.msg p { margin: 0; }
.msg p + p { margin-top: .5em; }
.msg--bot { justify-self: start; border-bottom-left-radius: 6px; background: var(--blush); }
.msg--me { justify-self: end; border-bottom-right-radius: 6px; background: var(--plum); color: #fff; }
.msg__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.msg__actions .btn { min-height: 40px; padding: 0 1rem; font-size: .88rem; }
.msg__actions .btn--ghost { background: var(--surface); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.choices button {
  min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--surface);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--plum) 35%, transparent);
  font: 600 .88rem/1.2 var(--font-text); color: var(--plum); cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease, transform .14s var(--ease-out);
}
.choices button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .choices button:hover { background: color-mix(in srgb, var(--plum) 7%, transparent); box-shadow: inset 0 0 0 1.5px var(--plum); } }
.msg, .choices { animation: msg-in .35s var(--ease-out) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.assistant__foot { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--ink-soft); }
.assistant__foot a { font-weight: 700; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .charte__panel, .assistant__panel { transform: none !important; transition: opacity .2s ease; }
  .msg, .choices { animation: none; }
  .dock { transition: none; }
  .js .page-head__copy > *, .js .page-head__media { transform: none; }
}
@media print { .dock { display: none !important; } }
