/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 0.9375rem/1.6 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); margin: 0; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 3.6vw, 2.625rem); font-weight: 800; }
h2 { font-size: clamp(1.4375rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--sapphire); text-underline-offset: 3px; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 100; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left)); }
.view { animation: fade .4s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .view, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
}

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 0.71875rem/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }
.eyebrow.light { color: var(--gold-hi); }
.lead { color: var(--muted); font-size: 1.03125rem; line-height: 1.65; max-width: 58ch; margin-top: 14px; }
.muted { color: var(--muted); }
.sec { padding: 88px 0; position: relative; }
.sec.tight { padding: 64px 0; }
.sec.tint { background: var(--surface-2); }
.sec.sand { background: var(--sand); }
.sec-head { max-width: 660px; margin-bottom: 36px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }
.sec-head.center .lead { margin-inline: auto; }
.sec-head.row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.sec-head.row > div { max-width: 640px; }
.todo { display: block; font-size: 0.8125rem; color: var(--warn); background: var(--warn-soft); border: 1px dashed color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 10px; padding: 10px 12px; font-style: italic; }
.tag-soon { display: inline-flex; align-items: center; gap: 6px; font: 600 0.6875rem/1 var(--head); letter-spacing: .02em; color: var(--warn); background: var(--warn-soft); padding: 5px 9px; border-radius: 999px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; font: 700 0.90625rem/1.2 var(--head); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, box-shadow .25s, transform .25s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-gold { background: linear-gradient(180deg, #d6ac62, var(--gold)); color: #22170a; box-shadow: 0 10px 24px -12px rgba(200,155,76,.9), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-gold:hover { background: linear-gradient(180deg, var(--gold-hi), #d3a95e); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-navy { background: #1d4f86; } }
:root[data-theme="dark"] .btn-navy { background: #1d4f86; }
.btn-wa { background: #1d7f47; color: #fff; }
.btn-wa:hover { background: #166a3a; }
.btn-glass { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.26); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-glass:hover { border-color: var(--gold-hi); color: var(--gold-hi); }
.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--gold); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.84375rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font: 700 0.90625rem var(--head); color: var(--sapphire); text-decoration: none; }
.arrow-link span { transition: transform .25s var(--ease); }
.arrow-link:hover span { transform: translateX(4px); }

/* ---------- En-tête ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(8,29,54,.9); backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); transition: box-shadow .3s; }
.topbar.scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 70px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 800 1.1875rem/1 var(--head); letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { position: relative; color: #c6d6ea; text-decoration: none; font: 600 0.875rem var(--head); padding: 10px 8px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold); }
.top-cta { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; min-height: 44px; min-width: 44px; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 12px; padding: 0 14px; font: 700 0.875rem var(--head); cursor: pointer; }
.menu-btn .bars { width: 16px; height: 10px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s; }
.menu-btn .bars::before { top: 0; } .menu-btn .bars::after { bottom: 0; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-4px) rotate(-45deg); }
.nav a { white-space: nowrap; }
@media (max-width: 1240px) {
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy); padding: 6px 20px 18px; border-top: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 40px -20px rgba(0,0,0,.6); }
  .nav.open { display: flex; }
  .nav a { padding: 15px 4px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 0.9375rem; }
  .nav a[aria-current="page"]::after { left: 4px; right: auto; width: 24px; bottom: 8px; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 620px) { .top-cta > .btn-gold { display: none; } .top-cta > .btn-glass .lbl-long { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--navy); padding: 64px 0 96px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(700px 460px at 80% 20%, rgba(200,155,76,.18), transparent 62%),
  radial-gradient(760px 520px at -5% 110%, rgba(27,79,140,.55), transparent 60%),
  linear-gradient(175deg, #0b2747, var(--navy) 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.375rem); line-height: 1.04; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #f1d8a6, var(--gold) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #c3d4e8; font-size: 1.0625rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.assure { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); }
.assure div { display: flex; align-items: center; gap: 10px; font-size: 0.84375rem; color: #c3d4e8; }
.assure svg { width: 18px; height: 18px; color: var(--gold-hi); flex: none; }
.hero-art { position: relative; border-radius: 30px; overflow: hidden; aspect-ratio: 600 / 540; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.1); }
.hero-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.preview { position: absolute; right: 16px; bottom: 16px; width: min(300px, calc(100% - 32px)); background: rgba(255,255,255,.94); color: var(--text); border-radius: 20px; padding: 16px; box-shadow: 0 24px 50px -24px rgba(0,0,0,.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .preview { background: rgba(13,27,46,.94); } }
:root[data-theme="dark"] .preview { background: rgba(13,27,46,.94); }
.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.preview-top b { font: 700 0.8125rem var(--head); color: var(--ink); }
.preview-top span { font-size: 0.6875rem; color: var(--muted); }
.preview ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.preview li { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; align-items: center; font-size: 0.78125rem; padding: 8px 10px; background: var(--surface-2); border-radius: 12px; }
.preview li b { font: 700 0.75rem var(--head); color: var(--ink); }
.preview .st { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.preview .st.ok { background: var(--ok-soft); color: var(--ok); }
.preview .st.wait { background: var(--surface); color: var(--muted); border: 1px dashed var(--line-strong); }
.preview .st svg { width: 12px; height: 12px; }
.preview-foot { margin-top: 10px; font-size: 0.71875rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chip-float { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(8,29,54,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font: 600 0.78125rem var(--head); border: 1px solid rgba(255,255,255,.14); }
.chip-float .dot { width: 8px; height: 8px; border-radius: 50%; background: #6ff0b0; box-shadow: 0 0 0 4px rgba(111,240,176,.2); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 48px 0 72px; } }

/* ---------- Chiffres ---------- */
.facts { position: relative; z-index: 2; margin-top: -44px; }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.fact { padding: 22px 24px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; }
.fact b { display: block; font: 800 1.75rem/1 var(--head); color: var(--ink); letter-spacing: -.02em; }
.fact span { display: block; font-size: 0.84375rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 760px) { .facts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .fact:nth-child(3) { border-left: 0; } .fact:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- Bande « Ils nous font confiance » ---------- */
.trust { padding: 56px 0 44px; }
.trust-title { text-align: center; font: 700 0.75rem var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: scroll 42s linear infinite; }
.marquee-track > div { display: flex; gap: 16px; }
.marquee.paused .marquee-track, .marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(calc(-50% - 8px)); } }
.logo-tile { width: 184px; height: 80px; flex: none; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: 8px; filter: grayscale(1); transition: filter .3s; }
.logo-tile:hover { filter: none; }
.logo-tile span { display: block; font: 700 0.8125rem var(--head); color: var(--muted); }
.logo-tile small { display: block; font-size: 0.65625rem; color: var(--warn); margin-top: 2px; }
.trust-foot { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; font-size: 0.78125rem; color: var(--muted); flex-wrap: wrap; text-align: center; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; font: 600 0.78125rem var(--head); background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); border-radius: 999px; padding: 6px 12px; min-height: 34px; cursor: pointer; }
.linkbtn svg { width: 12px; height: 12px; }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow-sm); min-width: 0; }
.card h3 { margin: 16px 0 8px; }
.card > h3:first-child { margin-top: 0; }
.card p { color: var(--muted); font-size: 0.90625rem; }
.ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sand); color: var(--gold-ink); border: 1px solid var(--line); }
.ico.blue { color: var(--sapphire); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Cartes des pôles */
.pole { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.pole:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.pole-art { position: relative; height: 176px; display: grid; place-items: center; overflow: hidden; }
.pole-art svg.big { width: 64px; height: 64px; fill: none; stroke: rgba(255,255,255,.92); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.pole-art::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%); }
.pole-art.a1 { background: linear-gradient(140deg, #b98a3e, #7a5312); }
.pole-art.a2 { background: linear-gradient(140deg, #2a6aac, #0f3a67); }
.pole-art.a3 { background: linear-gradient(140deg, #b8623a, #7c3518); }
.pole-art.a4 { background: linear-gradient(140deg, #2f7d6b, #17493e); }
.pole-art .soon { position: absolute; right: 12px; top: 12px; font: 600 0.6875rem var(--head); color: #fff; background: rgba(0,0,0,.28); padding: 5px 9px; border-radius: 999px; }
.pole-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.pole-body h3 { margin: 0 0 8px; font-size: 1.1875rem; }
.pole-body p { color: var(--muted); font-size: 0.90625rem; flex: 1; }
.pole-body .arrow-link { margin-top: 18px; }
.pole-photo { height: auto; aspect-ratio: 3 / 2; display: block; background: var(--line); }
.pole-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.pole-photo::before { display: none; }
.type-fr { margin: 2px 0 0; font: 600 0.75rem var(--head); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.type-sous { margin: 18px 0 0; font: 700 0.8125rem var(--head); letter-spacing: .04em; text-transform: uppercase; }
.type-conds, .site-services { margin: 12px 0 0; gap: 10px; }
.type-conds li, .site-services li { font-size: 0.875rem; }
.site-lits { flex: none !important; margin: 4px 0 0; color: var(--ink) !important; }

/* ---------- Parcours ---------- */
.dark-sec { background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
.dark-sec::before { content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; right: -260px; top: -280px; border-radius: 50%; background: radial-gradient(circle, rgba(200,155,76,.2), transparent 64%); }
.dark-sec h2, .dark-sec h3 { color: #fff; }
.dark-sec .lead { color: #c3d4e8; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 0; position: relative; counter-reset: s; }
.steps::before { content: ""; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(232,201,143,.15)); }
.step { position: relative; padding-right: 18px; }
.step .num { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); border: 2px solid var(--gold); color: var(--gold-hi); font: 800 0.9375rem var(--head); }
.step:first-child .num { background: var(--gold); color: #22170a; }
.step h3 { font-size: 1rem; margin: 18px 0 6px; }
.step p { color: #b8cbe0; font-size: 0.875rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .steps::before { left: 21px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; background: linear-gradient(180deg, var(--gold), rgba(232,201,143,.15)); }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; padding: 0; }
  .step h3 { margin: 10px 0 4px; }
  .step p { grid-column: 2; }
}

/* ---------- Plateforme ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.checks { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d6f4d' stroke-width='3'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.device { position: relative; margin: 0 auto; width: min(340px, 100%); border-radius: 38px; background: #0a1626; padding: 12px; box-shadow: var(--shadow-lg); border: 1px solid #22364f; }
.device-screen { border-radius: 28px; overflow: hidden; background: var(--bg); }
.device-bar { background: var(--navy); color: #fff; padding: 18px 16px 12px; }
.device-bar small { color: #9fb2c9; font-size: 0.6875rem; }
.device-bar b { display: block; font: 700 0.9375rem var(--head); margin-top: 2px; }
.device-tabs { display: flex; gap: 14px; padding: 10px 16px 0; background: var(--surface); border-bottom: 1px solid var(--line); font: 600 0.71875rem var(--head); color: var(--muted); overflow: hidden; white-space: nowrap; }
.device-tabs span { padding-bottom: 9px; }
.device-tabs span.on { color: var(--ink); border-bottom: 2px solid var(--gold); }
.device-body { padding: 14px; display: grid; gap: 10px; }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.mini small { color: var(--muted); font-size: 0.6875rem; display: block; }
.mini b { font: 800 1.125rem var(--head); color: var(--ink); }
.mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-week { display: flex; justify-content: space-between; margin-top: 8px; }
.mini-week i { width: 26px; height: 26px; border-radius: 8px; background: var(--ok-soft); display: block; }
.mini-week i.w { background: var(--warn-soft); box-shadow: inset 0 0 0 1.5px var(--warn); }

/* ---------- Zones ---------- */
.zones { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 680px) { .zones { grid-template-columns: 1fr; } }
.zone { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--navy-2), var(--navy)); color: #fff; border-radius: var(--r-lg); padding: 28px; min-height: 180px; }
.zone h3 { color: #fff; font-size: 1.375rem; }
.zone .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.zone .chips span { font-size: 0.8125rem; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.zone svg.pin { position: absolute; right: -14px; bottom: -20px; width: 150px; height: 150px; color: rgba(255,255,255,.06); }

/* ---------- Assistant de formule ---------- */
.finder { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .finder { grid-template-columns: 1fr; } }
.finder fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt-body { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); transition: border-color .2s, background .2s, box-shadow .2s; }
.opt-body .code { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--sand); font: 800 1rem var(--head); color: var(--gold-ink); }
.opt-body b { display: block; font: 700 0.9375rem var(--head); color: var(--ink); }
.opt-body small { display: block; color: var(--muted); font-size: 0.8125rem; }
.opt-body .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.opt:hover .opt-body { border-color: var(--line-strong); }
.opt input:checked + .opt-body { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, var(--surface)); box-shadow: 0 10px 24px -18px rgba(122,83,18,.8); }
.opt input:checked + .opt-body .radio { border-color: var(--gold); }
.opt input:checked + .opt-body .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.opt input:checked + .opt-body .code { background: var(--gold); color: #22170a; }
.opt input:focus-visible + .opt-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.finder-res { position: sticky; top: 92px; background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-lg); overflow: hidden; isolation: isolate; }
.finder-res::before { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; right: -120px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(200,155,76,.3), transparent 65%); }
.finder-res .big { font: 800 3.5rem/1 var(--head); color: var(--gold-hi); letter-spacing: -.03em; }
.finder-res h3 { color: #fff; font-size: 1.375rem; margin: 10px 0 6px; }
.finder-res p { color: #c3d4e8; font-size: 0.90625rem; }
.finder-res ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; font-size: 0.875rem; color: #dbe6f3; }
.finder-res li { display: flex; gap: 10px; }
.finder-res li::before { content: "✓"; color: var(--gold-hi); font-weight: 800; }
.finder-res .empty { color: #c3d4e8; font-size: 0.9375rem; }
.finder-res .hours { display: inline-flex; gap: 8px; align-items: center; margin-top: 4px; font: 600 0.8125rem var(--head); color: var(--gold-hi); }

/* ---------- Tableau des formules ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.tbl { width: 100%; border-collapse: collapse; min-width: 720px; }
.tbl caption { caption-side: top; text-align: left; padding: 16px 20px; font-size: 0.8125rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.tbl th, .tbl td { text-align: left; vertical-align: middle; padding: 16px 20px; border-top: 1px solid var(--line); font-size: 0.90625rem; }
.tbl thead th { border-top: 0; background: var(--surface-2); font: 700 0.6875rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--gold) 5%, var(--surface)); }
.tbl .code { font: 800 1.0625rem var(--head); color: var(--gold-ink); }
.tbl .fname { font: 700 0.9375rem var(--head); color: var(--ink); }
.tag-pop { display: inline-block; margin-left: 6px; font: 700 0.65625rem var(--head); letter-spacing: .04em; background: var(--gold); color: #22170a; padding: 3px 8px; border-radius: 999px; vertical-align: 2px; }
.note { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 18px; padding: 20px 24px; border-radius: var(--r); background: var(--sand); border: 1px solid var(--line); }
.note p { font-size: 0.90625rem; max-width: 72ch; }

/* ---------- Appel à l'action ---------- */
.cta { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 40px 44px; display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
.cta::before { content: ""; position: absolute; z-index: -1; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(200,155,76,.32), transparent 65%); }
.cta h2, .cta h3 { color: #fff; font-size: clamp(1.3125rem, 2.4vw, 1.6875rem); }
.cta p { color: #c3d4e8; font-size: 0.9375rem; margin-top: 6px; }
.cta .btns { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) { .cta { padding: 28px 22px; } }

/* ---------- Pages intérieures ---------- */
.phead { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: #fff; padding: 64px 0 72px; }
.phead::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(640px 380px at 92% 0%, rgba(200,155,76,.2), transparent 62%), linear-gradient(175deg, #0b2747, var(--navy) 70%); }
.phead h1 { color: #fff; }
.phead .lead { color: #c3d4e8; }
.phead .hero-btns { margin-top: 26px; }
.phead .crumbs { font-size: 0.8125rem; color: #9fb2c9; margin-bottom: 16px; }
/* Lien distinguable sans la couleur seule : souligné en permanence (WCAG 1.4.1). */
.phead .crumbs a { color: #c6d6ea; text-decoration: underline; text-underline-offset: 3px; }
.phead .crumbs a:hover { text-decoration-thickness: 2px; }
.phead-art { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 11; border: 1px solid rgba(255,255,255,.12); }
.phead-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.phead-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.phead-art .soon { position: absolute; left: 14px; bottom: 14px; font: 600 0.75rem var(--head); color: #fff; background: rgba(8,29,54,.7); padding: 6px 11px; border-radius: 999px; }
.bullets { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
@media (max-width: 900px) { .bullets { grid-template-columns: 1fr; } }
.bullets li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; font-size: 0.90625rem; font-weight: 500; }
.bullets li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d6f4d' stroke-width='3'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.ph { border-radius: var(--r); min-height: 200px; background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, transparent 14px 28px), var(--surface-2); border: 1px dashed var(--line-strong); display: flex; align-items: flex-end; padding: 12px; }
.ph-lbl { font: 600 0.75rem var(--head); background: var(--navy); color: #fff; padding: 6px 11px; border-radius: 999px; }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; align-content: start; }
.field label, .field .lbl { font: 600 0.84375rem var(--head); color: var(--ink); }
.req { color: var(--bad); }
.field input, .field select, .field textarea { font: 0.9375rem var(--body); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; min-height: 46px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 28%, transparent); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.field .hint { font-size: 0.78125rem; color: var(--muted); }
.field .err { font-size: 0.78125rem; color: var(--bad); font-weight: 600; }
.field .err:empty { display: none; }
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 0.875rem; margin-bottom: 14px; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.contact-list { display: grid; }
.contact-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-item:first-child { border-top: 0; padding-top: 4px; }
.contact-item b { font: 700 0.9375rem var(--head); color: var(--ink); display: block; }
.contact-item b a { color: inherit; text-decoration: none; }
.contact-item b a:hover { text-decoration: underline; }
.contact-item small { color: var(--muted); font-size: 0.8125rem; }
.contact-grid-page { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .contact-grid-page { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.site-foot { background: #051426; color: #aebfd4; padding: 64px 0 calc(28px + env(safe-area-inset-bottom)); }
.site-foot h2 { font: 700 0.71875rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 880px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-foot .cols { grid-template-columns: 1fr; } }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.875rem; }
.site-foot a { color: #aebfd4; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .brand { margin-bottom: 14px; }
.site-foot .about { font-size: 0.875rem; max-width: 34ch; }
.site-foot .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.78125rem; }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; font: 600 0.78125rem var(--head); background: transparent; border: 1px solid rgba(255,255,255,.2); color: #d7e3f1; border-radius: 999px; padding: 7px 12px; min-height: 36px; cursor: pointer; }
.theme-btn:hover { border-color: var(--gold-hi); }
.theme-btn svg { width: 14px; height: 14px; }
.wa-fab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; background: #1fa755; color: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(31,167,85,.75); z-index: 45; transition: transform .25s var(--ease); }
.wa-fab:hover { transform: scale(1.06); }
.wa-fab svg { width: 27px; height: 27px; fill: #fff; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font: 600 0.875rem var(--head); box-shadow: var(--shadow-lg); z-index: 80; max-width: calc(100% - 32px); display: flex; gap: 10px; align-items: center; animation: fade .3s var(--ease); }

/* ---------- Connexion ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 70px); }
.auth-art { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.auth-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-art .quote { position: absolute; left: 40px; right: 40px; bottom: 40px; }
.auth-art .quote p { font: 700 clamp(1.375rem, 2.4vw, 1.875rem)/1.2 var(--head); color: #fff; letter-spacing: -.02em; max-width: 18ch; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.auth-art .quote span { display: block; margin-top: 10px; font-size: 0.875rem; color: #dbe6f3; }
.auth-main { display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.75rem; }
.auth-card .sub { color: var(--muted); font-size: 0.9375rem; margin: 8px 0 26px; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .act-titre { font-size: 1.25rem; margin: 0 0 12px; }
.auth-card .act-titre:focus { outline: none; }
.auth-card .act-liste { margin: 14px 0; padding-left: 20px; display: grid; gap: 8px; font-size: 0.90625rem; }
.auth-card .act-actions { display: grid; gap: 10px; }
.auth-card a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field.check label { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; line-height: 1.5; }
.field.check input { flex: none; width: 22px; min-height: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy-2); }
.pw { position: relative; }
.pw input { padding-right: 96px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--ink); font: 600 0.78125rem var(--head); cursor: pointer; }
.auth-help { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.84375rem; color: var(--muted); display: grid; gap: 8px; }
.demo-accounts { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-accounts button { font: 600 0.75rem var(--head); background: var(--surface-2); color: var(--ink); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 6px 10px; cursor: pointer; min-height: 32px; }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Espace famille ---------- */
.fam-head { background: var(--navy); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.fam-head::before { content: ""; position: absolute; z-index: -1; right: -100px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(200,155,76,.22), transparent 65%); }
.fam-head .wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-block: 22px; flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(140deg, var(--gold-hi), var(--gold)); color: #22170a; display: grid; place-items: center; font: 800 1rem var(--head); flex: none; }
.who small { display: block; color: #9fb2c9; font-size: 0.78125rem; }
.who h1 { font: 800 1.25rem/1.2 var(--head); color: #fff; margin: 2px 0 4px; letter-spacing: -.01em; }
.type-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 0.75rem var(--head); padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.1); color: #e6eef8; border: 1px solid rgba(255,255,255,.14); }
.type-pill svg { width: 12px; height: 12px; opacity: .8; }
.demo-bar { background: var(--warn-soft); color: var(--warn); font-size: 0.78125rem; border-bottom: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.demo-bar .wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-block: 8px; }
.demo-bar button { font: 600 0.75rem var(--head); background: transparent; border: 1px dashed currentColor; color: inherit; border-radius: 999px; padding: 5px 11px; min-height: 32px; cursor: pointer; }
.demo-bar button[aria-pressed="true"] { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.volets-bar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 70px; z-index: 30; }
.volets { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.volets::-webkit-scrollbar { display: none; }
.volets button { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; font: 600 0.875rem var(--head); color: var(--muted); background: transparent; border: 0; padding: 0 14px; cursor: pointer; white-space: nowrap; transition: color .2s; }
.volets button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.volets button:hover { color: var(--ink); }
.volets button[aria-current="true"] { color: var(--ink); }
.volets button[aria-current="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold); }
.volets .count { font: 700 0.6875rem var(--head); background: var(--gold); color: #22170a; border-radius: 999px; padding: 2px 7px; }
.fam-body { padding-block: 26px 72px; }
.panel { display: grid; gap: 18px; min-width: 0; animation: fade .3s var(--ease); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.375rem; }
.panel-head p { color: var(--muted); font-size: 0.875rem; margin-top: 4px; }
.cols-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.cols-2.cols-egales { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .cols-2, .cols-2.cols-egales { grid-template-columns: 1fr; } }
.next { display: flex; gap: 18px; align-items: center; background: linear-gradient(120deg, var(--navy-2), var(--navy)); color: #fff; border-radius: var(--r); padding: 22px; position: relative; overflow: hidden; isolation: isolate; }
.next::before { content: ""; position: absolute; z-index: -1; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(200,155,76,.28), transparent 65%); }
.next h3 { color: #fff; font-size: 1.0625rem; }
.next p { color: #c9d9ec; font-size: 0.84375rem; margin-top: 2px; }
.next .date { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 10px 14px; text-align: center; min-width: 76px; }
.next .date b { display: block; font: 800 1.625rem/1 var(--head); }
.next .date span { font: 700 0.6875rem var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--gold-hi); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0; }
.kpi .k { display: flex; align-items: center; gap: 8px; font-size: 0.78125rem; color: var(--muted); font-weight: 600; }
.kpi .k i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.kpi .k i.w { background: var(--warn); }
.kpi .k i.n { background: var(--line-strong); }
.kpi b { display: block; font: 800 1.625rem/1.15 var(--head); color: var(--ink); margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi b small { font-size: 0.9375rem; color: var(--muted); font-weight: 700; }
.kpi .s { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 0.75rem/1 var(--head); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.neutral { background: var(--surface-2); color: var(--muted); }
.badge.info { background: color-mix(in srgb, var(--sapphire) 12%, var(--surface)); color: var(--sapphire); }

/* Semaine */
.week-nav { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; }
.day { display: grid; justify-items: center; gap: 4px; padding: 12px 4px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.day:hover { border-color: var(--line-strong); }
.day small { font: 600 0.71875rem var(--head); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day b { font: 800 1.25rem/1 var(--head); color: var(--ink); }
.day .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.day .dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.day .dot.neutral { background: transparent; border: 1.5px solid var(--line-strong); }
.day .dot.none { background: var(--line); }
.day[aria-pressed="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--surface)); transform: translateY(-2px); box-shadow: 0 10px 22px -16px rgba(122,83,18,.8); }
@media (max-width: 520px) { .week { gap: 4px; } .day { padding: 10px 2px 8px; border-radius: 12px; } .day b { font-size: 1.0625rem; } .day small { font-size: 0.625rem; } }
.moments { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
@media (max-width: 760px) { .moments { grid-template-columns: 1fr; } }
.moment { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.moment-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.moment-head h4 { margin: 0; display: flex; align-items: center; gap: 8px; font: 700 0.9375rem var(--head); color: var(--ink); }
.moment-head h4 svg { width: 18px; height: 18px; color: var(--gold-ink); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.moment dl { margin: 0; display: grid; gap: 0; }
.moment dl div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.875rem; align-items: center; }
.moment dl div:first-child { border-top: 0; }
.moment dt { color: var(--muted); }
.moment dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.moment dd.hn { color: var(--warn); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.78125rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Graphiques */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 10px; }
.chart figcaption { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font: 700 0.875rem var(--head); color: var(--ink); margin-bottom: 6px; }
.chart figcaption span { font: 500 0.75rem var(--body); color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.c-band { fill: var(--ok-soft); }
.c-band-l { stroke: color-mix(in srgb, var(--ok) 40%, transparent); stroke-dasharray: 3 4; stroke-width: 1; }
.c-line { fill: none; stroke: var(--sapphire); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.c-area { fill: color-mix(in srgb, var(--sapphire) 6%, transparent); }
.c-pt { fill: var(--surface); stroke: var(--sapphire); stroke-width: 2.2; }
.c-hn { fill: var(--warn); stroke: var(--surface); stroke-width: 2; }
.c-hn-ring { fill: none; stroke: var(--warn); stroke-opacity: .35; stroke-width: 6; }
.c-ax { fill: var(--muted); font: 600 0.65625rem var(--body); }
.c-hn-t { fill: var(--warn); font: 800 0.6875rem var(--head); }
.c-sel { fill: color-mix(in srgb, var(--gold) 12%, transparent); }

/* Passages (nursing) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.pass { display: grid; grid-template-columns: 86px 1fr; gap: 16px; }
.pass-date { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; align-self: start; }
.pass-date small { display: block; font: 600 0.6875rem var(--head); text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.pass-date b { display: block; font: 800 1.5rem/1.1 var(--head); color: var(--ink); }
.pass-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.pass-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.pass-top b { font: 700 0.9375rem var(--head); color: var(--ink); }
.soins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.soin { font-size: 0.78125rem; padding: 6px 10px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.soin.on { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.soin.off { background: var(--surface-2); color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.consts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
@media (max-width: 560px) { .consts { grid-template-columns: repeat(2, minmax(0,1fr)); } .pass { grid-template-columns: 64px 1fr; gap: 10px; } }
.const { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.const small { display: block; font-size: 0.71875rem; color: var(--muted); }
.const b { font: 700 0.90625rem var(--head); color: var(--ink); font-variant-numeric: tabular-nums; }

/* EGS */
.egs { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
@media (max-width: 560px) { .egs { grid-template-columns: 1fr; justify-items: start; } }
.ring { position: relative; width: 150px; height: 150px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.ring .fg { fill: none; stroke: url(#g-ring); stroke-width: 12; stroke-linecap: round; }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .val b { display: block; font: 800 2.125rem/1 var(--head); color: var(--ink); }
.ring .val small { font-size: 0.75rem; color: var(--muted); }
.scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.scale span { font-size: 0.75rem; text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.scale span.on { background: color-mix(in srgb, var(--sapphire) 14%, var(--surface)); color: var(--sapphire); box-shadow: inset 0 0 0 1.5px var(--sapphire); }

/* Conseils, factures, contacts, compte */
.adv { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.adv:first-of-type { border-top: 0; padding-top: 4px; }
.adv .av { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--sapphire) 12%, var(--surface)); color: var(--sapphire); display: grid; place-items: center; }
.adv .av svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.adv .meta { font-size: 0.78125rem; color: var(--muted); font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adv p { margin-top: 6px; font-size: 0.9375rem; color: var(--text); }
.due { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--sand); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.due small { color: var(--muted); font-size: 0.8125rem; display: block; }
.due b { font: 800 1.75rem/1.1 var(--head); color: var(--ink); font-variant-numeric: tabular-nums; }
.inv { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.inv:first-of-type { border-top: 0; padding-top: 4px; }
.inv .doc { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.inv .doc svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.inv b { font: 700 0.9375rem var(--head); color: var(--ink); }
.inv .amt { text-align: right; font: 800 0.96875rem var(--head); color: var(--ink); font-variant-numeric: tabular-nums; }
.inv .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
@media (max-width: 560px) { .inv { grid-template-columns: 1fr auto; } .inv .doc { display: none; } }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.ct { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 6px; min-width: 0; align-content: start; }
.ct.primary { background: var(--sand); grid-column: 1 / -1; }
.ct .k { font: 700 0.6875rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.ct .n { font: 700 1rem var(--head); color: var(--ink); }
.ct p { font-size: 0.875rem; color: var(--muted); }
.ct .btn { justify-self: start; margin-top: 6px; }
.toggle-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.toggle-row:first-of-type { border-top: 0; }
.toggle-row label { font-size: 0.9375rem; font-weight: 500; cursor: pointer; }
.toggle-row small { display: block; color: var(--muted); font-size: 0.78125rem; font-weight: 400; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .2s; pointer-events: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
details.faq { padding: 4px 0; border-top: 1px solid var(--line); }
details.faq:first-of-type { border-top: 0; }
details.faq summary { cursor: pointer; font: 600 0.9375rem var(--head); color: var(--ink); min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(45deg) translateY(-3px); transition: transform .25s var(--ease); }
details.faq[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
details.faq p { font-size: 0.90625rem; color: var(--muted); padding: 0 0 14px; max-width: 70ch; }
/* position: relative : les textes .sr-only (positionnés en absolu) restent dans la zone défilante
   au lieu d'élargir la page sur mobile (défaut constaté sur la maquette d'administration à 360 px). */
.tbl-scroll { overflow-x: auto; position: relative; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data caption { caption-side: top; text-align: left; }
table.data th, table.data td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 0.875rem; white-space: nowrap; vertical-align: middle; }
table.data thead th { font: 700 0.6875rem var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
table.data tbody th { font-weight: 600; color: var(--ink); }
table.data tr:last-child td, table.data tr:last-child th { border-bottom: 0; }
.more-toggle { margin-top: 4px; }

/* ---------- Administration ---------- */
.adm-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; padding-block: 36px 20px; }
.adm-top h1 { font-size: 1.75rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { flex: 1 1 260px; position: relative; }
.search input { width: 100%; font: 0.9375rem var(--body); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px 11px 40px; min-height: 46px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { font: 600 0.8125rem var(--head); border: 0; background: transparent; color: var(--muted); padding: 8px 12px; border-radius: 9px; min-height: 38px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.cell-who b { display: block; font-weight: 600; color: var(--ink); }
.cell-who small { color: var(--muted); font-size: 0.78125rem; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.modal-back { position: fixed; inset: 0; background: rgba(5,15,30,.62); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 90; animation: fade .2s ease; }
.modal { background: var(--surface); color: var(--text); border-radius: 22px; padding: 28px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h2 { font-size: 1.3125rem; }
.modal .field { margin-bottom: 14px; }
.rules { background: var(--surface-2); border-radius: 12px; padding: 12px 16px 12px 32px; font-size: 0.84375rem; color: var(--muted); margin: 14px 0 18px; }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.derive { display: flex; gap: 8px; align-items: center; font-size: 0.8125rem; color: var(--muted); margin-top: -4px; margin-bottom: 14px; }
/* Prototype v2 : maquette d'administration, activation, Mon compte (jetons existants uniquement) */
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.adm-bandeau { margin: 24px 0 0; }
.code-etat, .type-formule, .statut-code { display: grid; gap: 4px; justify-items: start; }
.statut-code { gap: 6px; }
.type-formule .muted { font-size: 0.8125rem; }
.code-etat small { font-size: 0.78125rem; }
.cell-who small + small { display: block; }
.field input[readonly] { background: var(--surface-2); color: var(--ink); font-weight: 600; cursor: default; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .track { opacity: .55; }
.toggle-row:has(input:disabled) label { cursor: default; }
#t-notif .badge { margin-left: 8px; vertical-align: middle; }

/* ---------- Utilitaires : remplacent les styles en ligne (une déclaration = une classe) ---------- */
.u-ac-start { align-content:start !important; }
.u-ai-start { align-items:start !important; }
.u-bg-ok { background:var(--ok) !important; }
.u-bg-ok-soft { background:var(--ok-soft) !important; }
.u-bg-warn { background:var(--warn) !important; }
.u-bl-4-solid-gold { border-left:4px solid var(--gold) !important; }
.u-border-1-solid-ok { border:1px solid var(--ok) !important; }
.u-border-1_5-solid-line-strong { border:1.5px solid var(--line-strong) !important; }
.u-c-ink { color:var(--ink) !important; }
.u-c-ok { color:var(--ok) !important; }
.u-c-text { color:var(--text) !important; }
.u-c-warn { color:var(--warn) !important; }
.u-d-flex { display:flex !important; }
.u-d-grid { display:grid !important; }
.u-font-800-24-head { font:800 1.5rem var(--head) !important; }
.u-fs-12 { font-size:0.75rem !important; }
.u-fs-12_5 { font-size:0.78125rem !important; }
.u-pre { white-space:pre-wrap; }
.u-fs-13 { font-size:0.8125rem !important; }
.u-fs-13_5 { font-size:0.84375rem !important; }
.u-fs-14 { font-size:0.875rem !important; }
.u-fs-15 { font-size:0.9375rem !important; }
.u-fs-16 { font-size:1rem !important; }
.u-fs-18 { font-size:1.125rem !important; }
.u-fw-500 { font-weight:500 !important; }
.u-fw-600 { font-weight:600 !important; }
.u-gap-10 { gap:10px !important; }
.u-gap-12 { gap:12px !important; }
.u-gap-18 { gap:18px !important; }
.u-gap-8 { gap:8px !important; }
.u-gtc-1fr-1fr { grid-template-columns:1fr 1fr !important; }
.u-h-220 { height:220px !important; }
.u-jc-space-between { justify-content:space-between !important; }
.u-m-0 { margin:0 !important; }
.u-m-10-0-6 { margin:10px 0 6px !important; }
.u-m-12-0-18 { margin:12px 0 18px !important; }
.u-m-4-0-6 { margin:4px 0 6px !important; }
.u-maxw-40ch { max-width:40ch !important; }
.u-mb-12 { margin-bottom:12px !important; }
.u-mb-14 { margin-bottom:14px !important; }
.u-mb-18 { margin-bottom:18px !important; }
.u-minh-140 { min-height:140px !important; }
.u-ml-6 { margin-left:6px !important; }
.u-mt-0 { margin-top:0 !important; }
.u-mt-10 { margin-top:10px !important; }
.u-mt-12 { margin-top:12px !important; }
.u-mt-14 { margin-top:14px !important; }
.u-mt-16 { margin-top:16px !important; }
.u-mt-22 { margin-top:22px !important; }
.u-mt-4 { margin-top:4px !important; }
.u-mt-6 { margin-top:6px !important; }
.u-mt-8 { margin-top:8px !important; }
.u-mt-n72 { margin-top:-72px !important; }
.u-p-12-14 { padding:12px 14px !important; }
.u-p-28-10 { padding:28px 10px !important; }
.u-p-30 { padding:30px !important; }
.u-p-6-18 { padding:6px 18px !important; }
.u-p-6-22 { padding:6px 22px !important; }
.u-p-8-24 { padding:8px 24px !important; }
.u-pb-110 { padding-bottom:110px !important; }
.u-pb-14 { padding-bottom:14px !important; }
.u-pb-64 { padding-bottom:64px !important; }
.u-pb-88 { padding-bottom:88px !important; }
.u-pt-0 { padding-top:0 !important; }
.u-pt-40 { padding-top:40px !important; }
.u-shadow-shadow { box-shadow:var(--shadow) !important; }
.u-ta-center { text-align:center !important; }
.u-ta-right { text-align:right !important; }

/* Espace famille connecté : liste des proches, lue via le serveur. */
.liste-proches { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.liste-proches li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
/* Mes aidants (étape 7) */
.liste-aidants { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.aidant-ligne { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.aidant-ligne > div { min-width: 0; }
.photo-ligne { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.photo-ligne p { margin: 0; }
.photo-apercu { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.photo-exemple { color: var(--navy); border-radius: 18px; }
.field .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; line-height: 1.45; }
.field .check input { margin-top: 3px; flex: none; width: 20px; height: 20px; }
.aidant-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.aidant-actions select { min-height: 40px; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 6px 10px; font: inherit; }
.code-aidant > div { min-width: 0; }
.code-aidant p { margin: 0 0 8px; }
.code-aidant-valeur { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.25rem; letter-spacing: 0.08em; }
.bandeau-aidant { margin: 0 0 12px; }

/* Les blocs du panneau peuvent rétrécir : un tableau large défile dans son conteneur, sans élargir la page (mobile). */
.panel > * { min-width: 0; }
.tbl-wrap { max-width: 100%; }

/* Suivi hébergement et domicile : mise en page du prototype (vSuivi). */
.semaine-grille { margin-top: 12px; }
.semaine-legende { margin-top: 12px; }
.legend .sw-ok { background: var(--ok); }
.legend .sw-warn { background: var(--warn); }
.legend .sw-neutre { background: transparent; border: 1.5px solid var(--line-strong); }
.jour-detail { display: grid; gap: 12px; margin-top: 18px; }
.jour-detail h3 { font-size: 1.125rem; }
.details-valeurs { padding: 6px 22px; margin-top: 18px; }
.details-blocs { display: grid; gap: 14px; padding-bottom: 14px; }
.pass-duree { font-weight: 500; }
/* Suivi nursing : espacement entre titre, frise, synthèse et repas (prototype). */
.nursing-bloc { display: grid; gap: 18px; }
.nursing-bloc .details-valeurs { margin-top: 0; }
.nursing-bloc h3 { margin-bottom: 12px; }
.legende-graphique { margin-top: 6px; }
.legend .sw-ok-doux { background: var(--ok-soft); border: 1px solid var(--ok); }
.charts { margin-top: 18px; }

/* A5-6a : Vue d'ensemble et Évaluation, sur le prototype. */
.colonne { display: grid; gap: 18px; align-content: start; }
.apercu-action { margin-top: 14px; }
.moment-court { padding: 12px 14px; }
.moment-court .moment-head { margin: 0; }
.carte-urgence { border-left: 4px solid var(--gold); }
.carte-urgence h3 { font-size: 1rem; }
.carte-urgence p { margin-top: 4px; }
.carte-urgence .badge { margin-top: 10px; }
.niveau-egs { font: 800 1.5rem var(--head); color: var(--ink); margin-top: 12px; }
.moment-court .moment-head { flex-wrap: wrap; gap: 6px; }
.egs .niveau-egs { font: 800 1.5rem var(--head); color: var(--ink); margin-top: 12px; }
h3 + .kpis { margin-top: 12px; }
.carte-faq { padding: 8px 24px; margin-top: 18px; }

/* ---------- Photo d'en-tête et logo ---------- */
.brand-logo { height: 60px; width: auto; display: block; }
.hero-photo { min-height: 520px; display: flex; align-items: center; }
.hero-photo > .wrap { width: 100%; }
.hero-photo-img { position: absolute; inset: 0; z-index: -2; }
.hero-photo-img img { width: 100%; height: 100%; object-fit: cover; object-position: 65% center; display: block; }
.hero-photo::before { z-index: -1; background: linear-gradient(90deg, rgba(8,29,54,.85) 0%, rgba(8,29,54,.55) 45%, rgba(8,29,54,.15) 100%); }
.hero-photo::after { display: none; }
.hero-photo .hero-grid { grid-template-columns: minmax(0, 620px); }
.hero-photo-img { display: block; }
@media (max-width: 1180px) {
  /* Téléphone et tablette : la photo en haut, sans voile, pour que les visages restent visibles ; le texte en dessous sur fond bleu marine. */
  .hero-photo { min-height: 0; display: block; padding: 0 0 48px; }
  .hero-photo-img { position: relative; inset: auto; z-index: 0; aspect-ratio: 16 / 9; width: 100%; max-height: 62vh; min-height: 300px; }
  .hero-photo-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, rgba(8,29,54,0), var(--navy)); }
  .hero-photo-img img { object-position: center 20%; }
  .hero-photo::before { display: none; }
  .hero-photo .hero-grid { margin-top: -28px; position: relative; }
}
@media (max-width: 700px) {
  .hero-photo-img { aspect-ratio: 1 / .95; max-height: 520px; min-height: 0; }
  .hero-photo-img::after { height: 38%; }
  .hero-photo-img img { object-position: center 14%; }
}
.logo-tile img { max-width: 100%; max-height: 68px; width: auto; height: auto; object-fit: contain; }

/* ---------- Bandeau d'urgence de l'espace famille ---------- */
.urgence-bar { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); font-size: 0.875rem; }
.urgence-bar .wrap { padding-block: 10px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.urgence-bar a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Avis des familles */
blockquote.u-m-0 p { font-size: 1.05rem; line-height: 1.55; margin: 0 0 12px; }
blockquote.u-m-0 p::before { content: "« "; }
blockquote.u-m-0 p::after { content: " »"; }
figure.card figcaption { color: var(--muted); font-size: 0.95rem; }

/* Vidéo de présentation de l'espace famille */
.video-wrap { max-width: 960px; margin: 0 auto; }
.video { display: block; width: 100%; border-radius: 16px; background: #0b1b33; box-shadow: 0 12px 32px rgba(11, 27, 51, 0.18); }
.video-h { aspect-ratio: 16 / 9; }
.video-v { display: none; aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
@media (max-width: 700px) {
  .video-h { display: none; }
  .video-v { display: block; }
}
.video-son-wrap { display: flex; justify-content: center; margin: 14px 0 0; }
.video-texte { max-width: 760px; margin: 20px auto 0; }
.video-texte summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.video-texte ol { margin: 8px 0 0; padding-left: 22px; line-height: 1.6; }

/* Évaluation : gestes du quotidien */
.gestes { list-style: none; margin: 0; padding: 0; }
.gestes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gestes li:last-child { border-bottom: 0; }

/* ---------- Nous écrire : conversation avec l'accueil ---------- */
.msg-urgence { display: flex; gap: 12px; align-items: center; background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 22%, transparent); border-radius: var(--r-sm); padding: 12px 16px; margin: 4px 0 18px; }
.msg-urgence p { color: inherit; font-size: 0.90625rem; }
.msg-urgence a { color: inherit; font-weight: 800; white-space: nowrap; }
.msg-urgence-ico svg { width: 22px; height: 22px; display: block; }
.msg-page { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.msg-cote { display: grid; gap: 12px; min-width: 0; }
@media (max-width: 960px) { .msg-page { grid-template-columns: minmax(0, 1fr); } }
.msg-carte { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }
.msg-entete { display: flex; gap: 14px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.msg-entete h3 { margin: 0; font-size: 1rem; }
.msg-entete p { font-size: 0.8125rem; margin-top: 2px; }
.msg-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-2); color: #fff; font: 800 0.8125rem var(--head); }
.msg-avatar.grand { width: 44px; height: 44px; font-size: 1rem; }
.msg-corps { padding: 20px 22px; min-height: 260px; max-height: 480px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); }
.msg-fil { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.msg-jour { display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--muted); font: 600 0.75rem var(--head); }
.msg-jour span::first-letter { text-transform: uppercase; }
.msg-jour::before, .msg-jour::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg-ligne { display: flex; gap: 10px; align-items: flex-end; min-width: 0; }
.msg-ligne.de-famille { flex-direction: row-reverse; }
.msg-ligne.de-famille .msg-avatar { background: var(--gold); color: var(--navy); }
.msg-bulle { max-width: min(520px, 86%); padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); color: var(--text); min-width: 0; }
.msg-ligne.de-famille .msg-bulle { border-radius: 18px 18px 6px 18px; background: var(--navy-2); color: #fff; }
.msg-qui { font-size: 0.75rem; color: var(--muted); margin-bottom: 3px; }
.msg-qui b { font-weight: 700; }
.msg-ligne.de-famille .msg-qui { color: rgba(255,255,255,.78); }
.msg-texte { color: inherit; font-size: 0.9375rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.card .msg-bulle p.msg-texte { color: inherit; }
.msg-medecin { display: flex; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--gold); color: var(--text); }
.msg-medecin p { margin: 2px 0 8px; font-size: 0.875rem; color: var(--text); overflow-wrap: anywhere; }
.msg-medecin b { font: 700 0.84375rem var(--head); color: var(--ink); }
.msg-medecin-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 22%, var(--surface)); color: var(--gold-ink); }
.msg-medecin-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.msg-vide { text-align: center; padding: 36px 16px; display: grid; gap: 6px; justify-items: center; }
.msg-vide p { max-width: 38ch; font-size: 0.90625rem; color: var(--muted); }
.msg-vide p b { color: var(--ink); font: 700 1rem var(--head); }
.msg-vide-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sand); color: var(--gold-ink); }
.msg-vide-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.msg-saisie { display: grid; gap: 12px; padding: 16px 22px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.msg-saisie textarea { min-height: 92px; }
.msg-actions { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.msg-etat { font-size: 0.84375rem; color: var(--ok); font-weight: 600; min-width: 0; }
.msg-etat:empty { display: none; }
.msg-actions .btn svg { width: 18px; height: 18px; }
.msg-actions .btn { margin-left: auto; }
@media (max-width: 560px) {
  .msg-corps, .msg-saisie, .msg-entete { padding-inline: 16px; }
  .msg-bulle { max-width: 90%; }
  .msg-actions .btn { width: 100%; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg-ligne.de-famille .msg-bulle { background: #1d4f86; } }
:root[data-theme="dark"] .msg-ligne.de-famille .msg-bulle { background: #1d4f86; }

.msg-cote .ct a { white-space: nowrap; }

/* Champ NIF : « NIF- » est fixe, la famille saisit la suite */
.nif-champ { display: flex; align-items: stretch; }
.nif-prefixe { display: inline-flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1.5px solid var(--line); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.nif-champ input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; flex: 1; }

.type-accueil { display: flex; flex-direction: column; }
.type-accueil > p.u-mt-10 { flex: 1; }

/* ---------- Carrousel de l'en-tête Hébergement ---------- */
.carrousel { background: var(--navy-d, #0b1d36); }
.car-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.car-slide.actif { opacity: 1; visibility: visible; }
.car-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-ctl { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 2; }
.car-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); background: rgba(8,29,54,.72); color: #fff; font: 700 1.25rem/1 var(--head); cursor: pointer; display: grid; place-items: center; padding: 0; }
.car-btn:hover { background: rgba(8,29,54,.9); }
.car-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .car-slide { transition: none; } }

/* ---------- Fenêtre « Organiser un transfert » (formulaire de la logistique dans le site) ---------- */
.dlg-transfert { border: 0; padding: 0; background: transparent; width: min(960px, calc(100vw - 32px)); max-width: none; max-height: none; color: var(--text); }
.dlg-transfert::backdrop { background: rgba(5,15,30,.68); backdrop-filter: blur(3px); }
.dlg-corps { display: flex; flex-direction: column; height: min(820px, calc(100dvh - 32px)); background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.dlg-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px 16px; background: linear-gradient(140deg, #0f3a67, #081d36); color: #fff; }
.dlg-tete h2 { margin: 0; font-size: 1.375rem; color: #fff; }
.dlg-sous { margin: 4px 0 0; font-size: 0.875rem; color: rgba(255,255,255,.82); }
.dlg-fermer { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; font: 400 1.625rem/1 var(--head); cursor: pointer; display: grid; place-items: center; padding: 0; }
.dlg-fermer:hover { background: rgba(255,255,255,.22); }
.dlg-fermer:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.dlg-cadre { position: relative; flex: 1; min-height: 0; background: var(--surface-2, #f4f1ea); }
.dlg-cadre iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.dlg-etat { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.9375rem; }
.dlg-pied { margin: 0; padding: 12px 24px; font-size: 0.84375rem; color: var(--muted); border-top: 1px solid var(--line); }
.dlg-pied a { color: var(--ink); font-weight: 600; }
body.dlg-ouvert { overflow: hidden; }
@media (max-width: 640px) {
  .dlg-transfert { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .dlg-corps { height: 100dvh; border-radius: 0; }
  .dlg-tete { padding: 14px 16px 12px; padding-top: max(14px, env(safe-area-inset-top, 0px)); }
  .dlg-tete h2 { font-size: 1.1875rem; }
  .dlg-pied { padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
}

.apropos-texte { display: grid; gap: 14px; max-width: 62ch; }
.apropos-texte p { margin: 0; }
.apropos-texte .arrow-link { justify-self: start; }
.apropos-accroche { font: 600 1.25rem/1.45 var(--head); color: var(--ink); text-wrap: balance; }
.chips-poles { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 4px 0 0; padding: 0; }
.chips-poles a, .chips-poles span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 600 .875rem/1 var(--head); color: var(--ink); text-decoration: none; }
.chips-poles a:hover, .chips-poles a:focus-visible { border-color: var(--sapphire); }
.chips-poles span { color: var(--muted); border-style: dashed; }

.grid-poles .pole-photo { aspect-ratio: auto; height: 176px; }
.grid-poles .pole-photo img { object-position: center 8%; }

/* ---------- Carte des deux sites (page Contact) ---------- */
.carte-sites { display: grid; gap: 16px; }
.carte-cadre { position: relative; height: 420px; border-radius: 20px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.carte-cadre iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.carte-attente { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.carte-attente p { margin: 0; max-width: 44ch; }
.carte-infos { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.carte-infos b { font-family: var(--head); color: var(--ink); }
.carte-liens { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .carte-cadre { height: 340px; } }

/* Cinq pôles : trois cartes sur la première ligne, deux centrées sur la seconde */
.grid-poles { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.grid-poles > * { flex: 1 1 300px; max-width: calc((100% - 40px) / 3); min-width: 260px; }
@media (max-width: 980px) { .grid-poles > * { max-width: calc((100% - 20px) / 2); } }
@media (max-width: 640px) { .grid-poles > * { max-width: 100%; flex-basis: 100%; } }

.pole-logo { background: #f7f7f7; }
.grid-poles .pole-logo img { object-fit: contain; object-position: center; padding: 14px 18px; box-sizing: border-box; }
.phead-logo { aspect-ratio: auto; background: #f7f7f7; display: grid; place-items: center; padding: 28px; box-sizing: border-box; }
.phead-logo img { width: 100%; height: auto; display: block; }
.digital-note { margin: 28px auto 0; max-width: 62ch; text-align: center; color: var(--muted); font-size: .9375rem; }
.pole-attente { margin-top: 18px; font: 600 0.875rem var(--head); color: var(--muted); }

/* Demande de rendez-vous : choix du délai, champ piège invisible */
.urgence-choix { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.urgence-choix legend { font: 600 0.84375rem var(--head); color: var(--ink); padding: 0; margin-bottom: 4px; }
.urgence-choix label { display: flex; gap: 10px; align-items: flex-start; font: 0.9375rem var(--body); color: var(--text); padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.urgence-choix label:has(input:checked) { border-color: var(--gold, #c9a14a); box-shadow: 0 0 0 2px rgba(201,161,74,.25); }
.urgence-choix input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; flex: none; }
.urgence-choix small { display: block; color: var(--muted); }
.alerte-urgence { margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 0.875rem; }
.field.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Bouton « Installer l'application » : présenté comme un lien du pied de page */
.lien-bouton { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.lien-bouton:hover { color: var(--gold-hi); }

/* ---------- Affichage : taille du texte et contraste élevé ---------- */
html[data-taille="grand"] { font-size: 118.75%; }
html[data-taille="tres-grand"] { font-size: 137.5%; }
.affichage { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 45; display: grid; gap: 10px; justify-items: start; }
.affichage-btn { min-width: 52px; min-height: 52px; border-radius: 50%; border: 2px solid var(--gold); background: var(--navy); color: #fff; font: 800 1.0625rem var(--head); cursor: pointer; box-shadow: var(--shadow); }
.affichage-btn:hover { background: var(--navy-2); }
.affichage-panel { order: -1; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-lg); display: grid; gap: 12px; max-width: calc(100vw - 32px); }
.affichage-panel[hidden] { display: none; }
.affichage-titre { margin: 0; font: 700 1rem var(--head); color: var(--ink); }
.affichage-tailles { display: flex; flex-wrap: wrap; gap: 8px; }
.affichage-panel button { min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 0.9375rem var(--head); cursor: pointer; }
.affichage-panel button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .affichage-panel button[aria-pressed="true"] { background: #1d4f86; border-color: #7ab0e6; } }
:root[data-theme="dark"] .affichage-panel button[aria-pressed="true"] { background: #1d4f86; border-color: #7ab0e6; }

/* Contraste élevé : texte noir ou blanc, bordures marquées, focus épais. Se combine avec clair et sombre. */
:root[data-contraste="fort"] { --ink: #000; --text: #000; --muted: #1c2430; --line: #5b6573; --line-strong: #2a323d; --sapphire: #0a3366; --gold-ink: #4d3205; --ok: #0f4d33; --warn: #6b4300; --bad: #7a1712; --focus: #000; }
@media (prefers-color-scheme: dark) {
  :root[data-contraste="fort"]:not([data-theme="light"]) { --ink: #fff; --text: #fff; --muted: #e8eef6; --line: #9db4cf; --line-strong: #cfdcec; --sapphire: #a9d0ff; --gold-ink: #ffe3a6; --ok: #9bf0c4; --warn: #ffd89a; --bad: #ffb4ad; --focus: #fff; }
}
:root[data-theme="dark"][data-contraste="fort"] { --ink: #fff; --text: #fff; --muted: #e8eef6; --line: #9db4cf; --line-strong: #cfdcec; --sapphire: #a9d0ff; --gold-ink: #ffe3a6; --ok: #9bf0c4; --warn: #ffd89a; --bad: #ffb4ad; --focus: #fff; }
:root[data-contraste="fort"] .card, :root[data-contraste="fort"] .field input, :root[data-contraste="fort"] .field select, :root[data-contraste="fort"] .field textarea { border-width: 2px; border-color: var(--line-strong); }
:root[data-contraste="fort"] a { text-decoration: underline; text-underline-offset: 3px; }
:root[data-contraste="fort"] :focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }

/* Texte agrandi : le menu passe en bouton « Menu » à toutes les largeurs, pour que la barre du haut ne déborde pas. */
html[data-taille] .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy); padding: 6px 20px 18px; border-top: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 40px -20px rgba(0,0,0,.6); }
html[data-taille] .nav.open { display: flex; }
html[data-taille] .nav a { padding: 15px 4px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
html[data-taille] .nav a[aria-current="page"]::after { left: 4px; right: auto; width: 24px; bottom: 8px; }
html[data-taille] .menu-btn { display: inline-flex; }
html[data-taille="tres-grand"] .top-cta > .btn-gold { display: none; }
.affichage-langues { display: flex; flex-wrap: wrap; gap: 8px; }
.affichage-langues[hidden] { display: none; }

/* Volet « Comment ça marche » vivant et page « Suivre ma demande » */
.step-act { display: inline-flex; gap: 6px; margin-top: 10px; font: 700 0.84375rem var(--head); color: var(--gold-hi); text-decoration: none; }
.step-act:hover, .step-act:focus-visible { text-decoration: underline; }
.step-mesure { margin-top: 10px; font-weight: 700; color: var(--gold-hi); }
.steps-suivi { margin-top: 34px; color: #b8cbe0; font-size: 0.9375rem; }
.steps-suivi a { color: var(--gold-hi); font-weight: 700; }
.suivi-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .suivi-grille { grid-template-columns: minmax(0, 1fr); } }
.frise { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.frise li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 14px; padding-bottom: 20px; }
.frise li:last-child { padding-bottom: 0; }
.frise li::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line-strong); }
.frise li:last-child::before { display: none; }
.frise li.fait::before { background: var(--ok); }
.frise .pt { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); font: 800 0.8125rem var(--head); color: var(--muted); }
.frise li.fait .pt { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.frise li.en-cours .pt { border-color: var(--gold); box-shadow: 0 0 0 4px var(--sand); color: var(--ink); }
.frise h3 { font-size: 1rem; margin: 4px 0 2px; color: var(--ink); }
.frise small { display: block; color: var(--muted); font-size: 0.84375rem; }
.frise .etat { display: inline-block; margin-left: 8px; font: 700 0.75rem var(--head); color: var(--gold-ink); }
.frise li.fait .etat { color: var(--ok); }

.zone-test { margin-top: 22px; max-width: 560px; }
.zone-resultat { margin-top: 14px; }
