/* ---------- 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 15px/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(28px, 3.6vw, 42px); font-weight: 800; }
h2 { font-size: clamp(23px, 2.6vw, 32px); font-weight: 700; }
h3 { font-size: 17px; 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 11.5px/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: 16.5px; 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: 13px; 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 11px/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 14.5px/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: 13.5px; }
.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 14.5px 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 19px/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 14px 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 14px 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: 15px; }
  .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(32px, 4.6vw, 54px); 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: 17px; }
.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: 13.5px; 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 13px var(--head); color: var(--ink); }
.preview-top span { font-size: 11px; 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: 12.5px; padding: 8px 10px; background: var(--surface-2); border-radius: 12px; }
.preview li b { font: 700 12px 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: 11.5px; 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 12.5px 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 28px/1 var(--head); color: var(--ink); letter-spacing: -.02em; }
.fact span { display: block; font-size: 13.5px; 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 12px 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 13px var(--head); color: var(--muted); }
.logo-tile small { display: block; font-size: 10.5px; color: var(--warn); margin-top: 2px; }
.trust-foot { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; text-align: center; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px 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: 14.5px; }
.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 .soon { position: absolute; right: 12px; top: 12px; font: 600 11px 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: 19px; }
.pole-body p { color: var(--muted); font-size: 14.5px; flex: 1; }
.pole-body .arrow-link { margin-top: 18px; }

/* ---------- 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 15px var(--head); }
.step:first-child .num { background: var(--gold); color: #22170a; }
.step h3 { font-size: 16px; margin: 18px 0 6px; }
.step p { color: #b8cbe0; font-size: 14px; }
@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: 15px; }
.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: 11px; }
.device-bar b { display: block; font: 700 15px 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 11.5px 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: 11px; display: block; }
.mini b { font: 800 18px 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: 22px; }
.zone .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.zone .chips span { font-size: 13px; 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 16px var(--head); color: var(--gold-ink); }
.opt-body b { display: block; font: 700 15px var(--head); color: var(--ink); }
.opt-body small { display: block; color: var(--muted); font-size: 13px; }
.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 56px/1 var(--head); color: var(--gold-hi); letter-spacing: -.03em; }
.finder-res h3 { color: #fff; font-size: 22px; margin: 10px 0 6px; }
.finder-res p { color: #c3d4e8; font-size: 14.5px; }
.finder-res ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; font-size: 14px; 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: 15px; }
.finder-res .hours { display: inline-flex; gap: 8px; align-items: center; margin-top: 4px; font: 600 13px 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: 13px; 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: 14.5px; }
.tbl thead th { border-top: 0; background: var(--surface-2); font: 700 11px 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 17px var(--head); color: var(--gold-ink); }
.tbl .fname { font: 700 15px var(--head); color: var(--ink); }
.tag-pop { display: inline-block; margin-left: 6px; font: 700 10.5px 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: 14.5px; 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(21px, 2.4vw, 27px); }
.cta p { color: #c3d4e8; font-size: 15px; 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: 13px; 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-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.phead-art .soon { position: absolute; left: 14px; bottom: 14px; font: 600 12px 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: 14.5px; 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 12px 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 13.5px var(--head); color: var(--ink); }
.req { color: var(--bad); }
.field input, .field select, .field textarea { font: 15px 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: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; 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: 14px; 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 15px 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: 13px; }
.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 11.5px 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: 14px; }
.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: 14px; 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: 12.5px; }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px 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 14px 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(22px, 2.4vw, 30px)/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: 14px; color: #dbe6f3; }
.auth-main { display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; }
.auth-card .sub { color: var(--muted); font-size: 15px; margin: 8px 0 26px; }
.auth-card .field { margin-bottom: 16px; }
.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 12.5px var(--head); cursor: pointer; }
.auth-help { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: grid; gap: 8px; }
.demo-accounts { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-accounts button { font: 600 12px 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 16px var(--head); flex: none; }
.who small { display: block; color: #9fb2c9; font-size: 12.5px; }
.who h1 { font: 800 20px/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 12px 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: 12.5px; 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 12px 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 14px 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 11px 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: 22px; }
.panel-head p { color: var(--muted); font-size: 14px; 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: 17px; }
.next p { color: #c9d9ec; font-size: 13.5px; 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 26px/1 var(--head); }
.next .date span { font: 700 11px 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: 12.5px; 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 26px/1.15 var(--head); color: var(--ink); margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi b small { font-size: 15px; color: var(--muted); font-weight: 700; }
.kpi .s { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/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 11.5px var(--head); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day b { font: 800 20px/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: 17px; } .day small { font-size: 10px; } }
.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 15px 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: 14px; 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: 12.5px; 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 14px var(--head); color: var(--ink); margin-bottom: 6px; }
.chart figcaption span { font: 500 12px 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 10.5px var(--body); }
.c-hn-t { fill: var(--warn); font: 800 11px 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 11px var(--head); text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.pass-date b { display: block; font: 800 24px/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 15px var(--head); color: var(--ink); }
.soins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.soin { font-size: 12.5px; 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: 11.5px; color: var(--muted); }
.const b { font: 700 14.5px 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 34px/1 var(--head); color: var(--ink); }
.ring .val small { font-size: 12px; color: var(--muted); }
.scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.scale span { font-size: 12px; 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: 12.5px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adv p { margin-top: 6px; font-size: 15px; 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: 13px; display: block; }
.due b { font: 800 28px/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 15px var(--head); color: var(--ink); }
.inv .amt { text-align: right; font: 800 15.5px 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 11px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.ct .n { font: 700 16px var(--head); color: var(--ink); }
.ct p { font-size: 14px; 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: 15px; font-weight: 500; cursor: pointer; }
.toggle-row small { display: block; color: var(--muted); font-size: 12.5px; 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 15px 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: 14.5px; 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: 14px; white-space: nowrap; vertical-align: middle; }
table.data thead th { font: 700 11px 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: 28px; }
.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: 15px 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 13px 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: 12.5px; }
.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: 21px; }
.modal .field { margin-bottom: 14px; }
.rules { background: var(--surface-2); border-radius: 12px; padding: 12px 16px 12px 32px; font-size: 13.5px; 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: 13px; 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: 13px; }
.code-etat small { font-size: 12.5px; }
.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 24px var(--head) !important; }
.u-fs-12 { font-size:12px !important; }
.u-fs-12_5 { font-size:12.5px !important; }
.u-fs-13 { font-size:13px !important; }
.u-fs-13_5 { font-size:13.5px !important; }
.u-fs-14 { font-size:14px !important; }
.u-fs-15 { font-size:15px !important; }
.u-fs-16 { font-size:16px !important; }
.u-fs-18 { font-size:18px !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; }

/* 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: 18px; }
.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: 16px; }
.carte-urgence p { margin-top: 4px; }
.carte-urgence .badge { margin-top: 10px; }
.niveau-egs { font: 800 24px var(--head); color: var(--ink); margin-top: 12px; }
.moment-court .moment-head { flex-wrap: wrap; gap: 6px; }
.egs .niveau-egs { font: 800 24px 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); }
@media (max-width: 768px) {
  /* Téléphone : 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 { display: block; position: relative; inset: auto; z-index: 0; aspect-ratio: 1 / .95; max-height: 520px; }
  .hero-photo-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, rgba(8,29,54,0), var(--navy)); }
  .hero-photo-img img { object-position: center 14%; }
  .hero-photo::before { display: none; }
  .hero-photo .hero-grid { margin-top: -28px; position: relative; }
}
.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: 14px; }
.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; }
