/* =====================================================================
   Heritage App — feuille de style
   Tokens → base → structure → composants → vues → responsive
   ===================================================================== */

@font-face{font-family:Manrope;font-style:normal;font-weight:400 800;font-display:swap;
  src:url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Manrope;font-style:normal;font-weight:400 800;font-display:swap;
  src:url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Material Symbols Rounded";font-style:normal;font-weight:400;font-display:block;
  src:url("../fonts/material-symbols.v1.woff2") format("woff2")}

/* ---------- tokens ---------- */
:root{
  --bg:#F3F6F4; --bar:#E9F0EC; --surface:#FFFFFF; --sunk:#F3F6F4; --field:#F7F9F8;
  --ink:#10201A; --ink2:#34473F; --muted:#5E7068; --muted2:#6B7B72;
  --line:#E3EAE6; --line2:#EDF1EE; --chip-bd:#D5DED9;
  --primary:#0E8A5F; --primary-press:#0B6F4C; --on-primary:#FFFFFF;
  --tonal:#D9F5E6; --on-tonal:#0B3D2E; --on-tonal2:#2F5A48;
  --icon-bg:#E1F3EA; --icon-fg:#0B3D2E; --neutral:#E3EBE6;
  --pos:#0E7C5A; --neg:#B4472F; --neg-bd:#E7C9C0; --warn:#B77A1C;
  --gold:#8A5A12; --gold-bg:#F6EDD5;
  --perso:#0E7C5A; --sasu:#1E5F8C; --eurl:#6B4E9E;
  --perso-soft:#E6F2ED; --sasu-soft:#E4EEF6; --eurl-soft:#EEE9F6;
  --c-immo:#0B3D2E; --c-bourse:#13966A; --c-crypto:#C9A34A; --c-startups:#5B6B63; --c-treso:#7FD8B0;
  /* carte « héros » et pastille de navigation : suivent le périmètre */
  --hero:#0B3D2E; --hero2:#10543F; --hero3:#14694E; --accent:#5FE3A6;
  --on-hero2:#9FD9BF; --on-hero3:#C6E9D8; --pill:#BDEBD3;
  --r-sm:14px; --r-md:20px; --r-lg:24px; --r-xl:28px;
  --nav-h:80px; --shadow:0 8px 24px rgba(11,61,46,.18);
  color-scheme:light;
}
:root[data-scope="sasu"]{--hero:#12395A;--hero2:#1A4A72;--hero3:#215985;--accent:#7CC4F5;
  --on-hero2:#A9CFEA;--on-hero3:#CFE4F3;--pill:#CFE3F4;--bg:#EFF3F7}
:root[data-scope="eurl"]{--hero:#35264F;--hero2:#46346A;--hero3:#54407C;--accent:#C7AEF7;
  --on-hero2:#CDBDEB;--on-hero3:#E2D8F4;--pill:#E2D8F4;--bg:#F3F1F7}

@media (prefers-color-scheme:dark){
  :root{
    --bg:#0D1512; --bar:#121C18; --surface:#16211C; --sunk:#1B2822; --field:#1B2822;
    --ink:#E4EDE8; --ink2:#C3D0C9; --muted:#93A59C; --muted2:#83958C;
    --line:#26342D; --line2:#22302A; --chip-bd:#33443B;
    --primary:#2FB37F; --primary-press:#27976B; --on-primary:#06231A;
    --tonal:#173A2C; --on-tonal:#BDEFD6; --on-tonal2:#8FC7AC;
    --icon-bg:#1D3A2E; --icon-fg:#9FE8C4; --neutral:#22302A;
    --pos:#4CC994; --neg:#EE8C74; --neg-bd:#5A2E24; --warn:#E0A94F;
    --gold:#E6C06A; --gold-bg:#3A2F14;
    --perso:#4CC994; --sasu:#6FB0E6; --eurl:#B39AE6;
    --perso-soft:#15342A; --sasu-soft:#172A3A; --eurl-soft:#262036;
    --c-immo:#CFF5E3; --c-bourse:#3DBE8F; --c-crypto:#D9B45A; --c-startups:#93A59C; --c-treso:#1F7A5A;
    --hero:#0F4A37; --hero2:#145A43; --hero3:#18684E; --pill:#1F4D3B;
    --shadow:0 8px 24px rgba(0,0,0,.4);
    color-scheme:dark;
  }
  :root[data-scope="sasu"]{--hero:#163E60;--hero2:#1D4C74;--hero3:#245A86;--pill:#1C3A55;--bg:#0D1317}
  :root[data-scope="eurl"]{--hero:#382A56;--hero2:#46356A;--hero3:#54417D;--pill:#342A4E;--bg:#110F17}
}

/* ---------- base ---------- */
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;background:var(--bg)}
body{font-family:Manrope,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:var(--bg);color:var(--ink);font-size:14px;line-height:1.45;
  -webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums;transition:background .25s}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
a{color:var(--primary)}
.hidden{display:none!important}
.num{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.mini{font-size:12px;color:var(--muted);font-weight:600}
.pos{color:var(--pos)} .neg{color:var(--neg)} .warn{color:var(--warn)}
.ic{font-family:"Material Symbols Rounded";font-weight:normal;font-style:normal;font-size:22px;line-height:1;
  letter-spacing:normal;text-transform:none;white-space:nowrap;direction:ltr;display:inline-block;
  font-variation-settings:"FILL" 0;-webkit-font-feature-settings:"liga";font-feature-settings:"liga";
  -webkit-font-smoothing:antialiased;user-select:none;flex:none}
.ic.fill{font-variation-settings:"FILL" 1}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---------- structure ---------- */
.app{display:flex;min-height:100dvh}
.nav{width:248px;flex:none;position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;
  padding:22px 12px 16px;background:var(--bar)}
.brand{display:flex;align-items:center;gap:10px;padding:0 12px 22px}
.brand .logo{width:34px;height:34px;border-radius:11px;background:var(--hero);color:var(--accent);
  display:grid;place-items:center;font-weight:800;font-size:17px}
.brand b{font-size:16px;font-weight:800;letter-spacing:-.01em;white-space:nowrap}
.brand .ver{margin-left:auto;font-size:11px;font-weight:700;color:var(--muted);
  padding:2px 8px;border-radius:10px;background:var(--neutral)}
.nav-items{display:flex;flex-direction:column;gap:2px}
.nav-items a{display:flex;align-items:center;gap:14px;height:52px;padding:0 16px;border-radius:26px;
  color:var(--ink2);text-decoration:none;font-weight:600;font-size:14.5px}
.nav-items a:hover{background:var(--neutral)}
.nav-items a[aria-current="page"]{background:var(--pill);color:var(--ink);font-weight:800}
.nav-items a[aria-current="page"] .ic{font-variation-settings:"FILL" 1}
.nav-items .ns{display:none}
.nav-foot{margin-top:auto;padding:12px 16px 0;font-size:12px;color:var(--muted);word-break:break-all}
.main{flex:1;min-width:0;padding:28px 36px 64px;max-width:1180px}
.page{display:flex;flex-direction:column;gap:18px}

/* ---------- en-têtes ---------- */
.ph{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ph h1{font-size:28px;font-weight:800;letter-spacing:-.02em;line-height:1.15}
.ph .over{font-size:13px;color:var(--muted);font-weight:500}
.ph .acts{display:flex;gap:8px;align-items:center}
.lead{font-size:15px;color:var(--muted);font-weight:500;line-height:1.45;margin-top:4px;text-wrap:pretty}
.sect{display:flex;justify-content:space-between;align-items:center;gap:10px}
.sect h2{font-size:17px;font-weight:800}
.link{color:var(--primary);font-size:14px;font-weight:700;padding:8px 0}

/* ---------- boutons ---------- */
.iconbtn{width:44px;height:44px;border-radius:50%;background:var(--neutral);display:grid;place-items:center;color:var(--ink)}
.iconbtn.sm{width:36px;height:36px}.iconbtn.sm .ic{font-size:19px}
.avatar{width:44px;height:44px;border-radius:50%;background:var(--hero);color:var(--accent);
  display:grid;place-items:center;font-weight:800;font-size:15px}
.btn{height:56px;padding:0 24px;border-radius:28px;background:var(--primary);color:var(--on-primary);
  font-size:16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn:active{background:var(--primary-press)}
.btn.sm{height:40px;padding:0 18px;border-radius:20px;font-size:14px;font-weight:700}
.btn.sm .ic{font-size:19px}
.btn.dark{background:var(--hero);color:#fff}
.btn.tonal{background:var(--tonal);color:var(--on-tonal)}
.btn.outline{background:var(--surface);color:var(--ink);border:1px solid var(--chip-bd)}
.btn.danger{background:var(--surface);color:var(--neg);border:1px solid var(--neg-bd)}
.btn.block{width:100%}
.btn[disabled]{opacity:.6;cursor:default}
.fab{position:fixed;right:24px;bottom:28px;z-index:30;height:56px;padding:0 20px 0 16px;border-radius:18px;
  background:var(--hero);color:#fff;font-size:15px;font-weight:800;display:flex;align-items:center;gap:8px;
  box-shadow:var(--shadow)}
.fab .ic{font-size:24px}

/* ---------- pastilles et onglets ---------- */
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;height:36px;padding:0 16px;border-radius:18px;border:1px solid var(--chip-bd);
  background:var(--surface);color:var(--ink);font-size:14px;font-weight:600;transition:background .2s,color .2s;
  display:inline-flex;align-items:center;gap:7px}
.chip i{width:8px;height:8px;border-radius:50%;background:var(--c);display:block}
.chip[aria-pressed="true"]{background:var(--hero);border-color:var(--hero);color:#fff}
.chip[aria-pressed="true"] i{background:var(--accent)}
.chip.sm{height:32px;padding:0 13px;font-size:13px;font-weight:700}
.tabs{display:flex;overflow-x:auto;border-bottom:1px solid var(--line);scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs button{flex:none;height:48px;padding:0 14px;font-size:14px;font-weight:700;color:var(--muted2);
  border-bottom:3px solid transparent;margin-bottom:-1px}
.tabs button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--primary)}

/* ---------- cartes ---------- */
.card{background:var(--surface);border-radius:var(--r-lg);padding:18px;display:flex;flex-direction:column;gap:14px}
.card.flush{padding:0;gap:0;overflow:hidden}
.card h3{font-size:17px;font-weight:800}
.card .hd{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.tonal-card{background:var(--tonal);color:var(--on-tonal);border-radius:var(--r-lg);padding:18px;
  display:flex;gap:14px;align-items:center;text-align:left;width:100%}
.tonal-card .tc-ic{width:48px;height:48px;border-radius:16px;background:var(--primary);color:var(--on-primary);
  display:grid;place-items:center;flex:none}
.tonal-card .tc-ic .ic{font-size:26px}
.tonal-card b{font-size:15px;font-weight:800;display:block}
.tonal-card span{font-size:13px;font-weight:500;color:var(--on-tonal2)}
.grid{display:grid;gap:14px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.tiles.t4{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:561px) and (max-width:1099px){.tiles.t4{grid-template-columns:repeat(4,minmax(0,1fr))}}
.tile{background:var(--surface);border-radius:var(--r-md);padding:14px 16px;display:flex;flex-direction:column;gap:3px}
.tile .tl{font-size:12.5px;color:var(--muted);font-weight:600;display:flex;align-items:center;gap:6px}
.tile .tl .ic{font-size:17px;color:var(--c,var(--primary))}
.tile .tv{font-size:20px;font-weight:800;letter-spacing:-.02em}
.tile .td{font-size:12px;font-weight:700}

/* carte héros (patrimoine net, projection) */
.hero{background:var(--hero);color:#fff;border-radius:var(--r-xl);padding:22px 20px 16px;
  display:flex;flex-direction:column;gap:6px;position:relative;overflow:hidden;transition:background .3s}
.hero::before{content:"";position:absolute;right:-60px;top:-80px;width:220px;height:220px;border-radius:50%;background:var(--hero2)}
.hero>*{position:relative}
.hero .cap{font-size:13px;font-weight:600;color:var(--on-hero2);letter-spacing:.02em}
.hero .big{font-size:38px;font-weight:800;letter-spacing:-.03em;line-height:1.1}
.hero .delta{font-size:14px;font-weight:700;color:var(--accent)}
.hero .sub{font-size:12.5px;color:var(--on-hero3);font-weight:600}
.hero .periods{display:flex;gap:6px;margin-top:4px;flex-wrap:wrap}
.hero .periods button{height:32px;padding:0 14px;border-radius:16px;background:var(--hero2);color:var(--on-hero3);font-size:13px;font-weight:700}
.hero .periods button[aria-pressed="true"]{background:var(--accent);color:var(--hero)}
.hero .stats{display:flex;gap:18px;flex-wrap:wrap;margin-top:6px;padding-top:12px;border-top:1px solid var(--hero3)}
.hero .stats div{display:flex;flex-direction:column}
.hero .stats span{font-size:12px;color:var(--on-hero2);font-weight:600}
.hero .stats b{font-size:16px;font-weight:800}

/* listes en lignes */
.rows{display:flex;flex-direction:column;background:var(--surface);border-radius:var(--r-md)}
.rows.sunk{background:var(--sunk);border-radius:18px}
.rows>*{border-top:1px solid var(--line2)}
.rows>*:first-child{border-top:0}
.kv{display:flex;justify-content:space-between;gap:12px;padding:13px 16px;font-size:14px;align-items:baseline}
.kv>span:first-child{color:var(--muted);font-weight:600}
.kv>span:last-child{font-weight:700;text-align:right}
.kv small{display:block;font-size:12px;color:var(--muted);font-weight:600}
.kv.total>span{color:var(--ink);font-weight:800}
.kv.total>span:last-child{font-size:15px}
.row{display:flex;gap:12px;align-items:center;padding:14px 16px;text-align:left;width:100%;color:var(--ink)}
.row .rc{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.row .rt{font-size:14.5px;font-weight:700;line-height:1.3}
.row .rs{font-size:12px;color:var(--muted);font-weight:600}
.row .rv{font-size:14px;font-weight:800;text-align:right}

/* position (carte cliquable) */
.plist{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));gap:10px}
.pcard{background:var(--surface);border-radius:var(--r-md);padding:16px;display:flex;gap:12px;align-items:center;
  text-align:left;color:var(--ink);width:100%;transition:transform .15s}
.pcard:active{transform:scale(.98)}
.pcard .pi,.pi{width:44px;height:44px;border-radius:14px;background:var(--icon-bg);color:var(--icon-fg);display:grid;place-items:center;flex:none}
.pi.gold{background:var(--gold-bg);color:var(--gold)}
.pcard .pc{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.pcard .pn{font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pcard .psub{font-size:12px;color:var(--muted);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pcard .pv{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex:none}
.pcard .pv b{font-size:15px;font-weight:800}
.pcard .pv span{font-size:12px;font-weight:700}
.tag{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:11px;font-size:11.5px;font-weight:700;
  background:var(--neutral);color:var(--ink2);white-space:nowrap}
.tag.perso{background:var(--perso-soft);color:var(--perso)}
.tag.sasu{background:var(--sasu-soft);color:var(--sasu)}
.tag.eurl{background:var(--eurl-soft);color:var(--eurl)}
.tag.pea-pme{background:var(--gold-bg);color:var(--gold)}

/* répartition (barre empilée + légende) */
.stack{display:flex;height:12px;border-radius:6px;overflow:hidden;gap:2px}
.stack i{display:block;height:100%;transition:width .4s}
.legend{display:flex;flex-direction:column;gap:10px}
.legend>div{display:flex;align-items:center;gap:10px;font-size:14px}
.legend .sw{width:10px;height:10px;border-radius:3px;flex:none}
.legend .lk{flex:1;font-weight:600}
.legend .lp{font-weight:700}
.legend .lg{width:84px;text-align:right;font-size:12px;font-weight:700}
.meter{position:relative;height:8px;border-radius:4px;background:var(--line)}
.meter i{position:absolute;inset:0 auto 0 0;border-radius:4px;background:var(--c,var(--primary))}
.meter b{position:absolute;top:-4px;width:2px;height:16px;border-radius:1px;background:var(--ink)}

/* jalons P1-P3 */
.jal{position:relative;height:6px;border-radius:3px;background:var(--line);margin:26px 8px 30px}
.jal .fill{position:absolute;inset:0 auto 0 0;border-radius:3px;background:var(--primary)}
.jal .mk{position:absolute;top:50%;transform:translate(-50%,-50%)}
.jal .mk i{display:block;width:15px;height:15px;border-radius:50%;background:var(--surface);border:3px solid var(--c)}
.jal .mk.done i{background:var(--c)}
.jal .mk b{position:absolute;left:50%;transform:translateX(-50%);top:-24px;font-size:11px;font-weight:800;color:var(--c)}
.jal .mk span{position:absolute;left:50%;transform:translateX(-50%);top:20px;font-size:11.5px;color:var(--muted);white-space:nowrap;font-weight:600}
.jal .you{position:absolute;top:50%;transform:translate(-50%,-50%);width:13px;height:13px;border-radius:50%;
  background:var(--ink);box-shadow:0 0 0 4px var(--surface),0 0 0 6px var(--ink)}
.jcard{border:1px solid var(--line);border-radius:var(--r-md);padding:14px;border-top:3px solid var(--c);display:flex;flex-direction:column;gap:6px}
.jcard .jk{font-size:11px;font-weight:800;color:var(--c);letter-spacing:.05em;display:flex;justify-content:space-between;gap:8px;align-items:center}
.jcard .jv{font-size:19px;font-weight:800;letter-spacing:-.02em}
.jcard p{font-size:12.5px;color:var(--muted);line-height:1.45}
.bar{height:5px;border-radius:3px;background:var(--line);overflow:hidden}
.bar i{display:block;height:100%;background:var(--c,var(--primary));border-radius:3px}

/* échéances */
.ev{background:var(--surface);border-radius:var(--r-md);padding:14px;display:flex;gap:14px;align-items:center;
  text-align:left;color:var(--ink);width:100%;transition:opacity .2s}
.ev.done{opacity:.5}.ev.done .et{text-decoration:line-through}
.dtile{width:52px;height:52px;border-radius:16px;background:var(--sunk);display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none}
.dtile b{font-size:19px;font-weight:800;line-height:1}
.dtile span{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase}
.ev .ec{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}
.ev .et{font-size:15px;font-weight:700;line-height:1.3}
.ev .ed{font-size:12.5px;color:var(--muted);line-height:1.4}
.ev .eg{font-size:12px;font-weight:700;color:var(--c)}
.ev .check{font-size:26px;color:var(--chip-bd)}
.ev.done .check{color:var(--primary);font-variation-settings:"FILL" 1}
.month{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted2);margin-top:4px}

/* actualités */
.news .row{align-items:flex-start}
.news .nm{font-size:12px;font-weight:700;color:var(--primary)}

/* graphiques */
.chart{position:relative;min-height:40px}
.chart svg{display:block;width:100%;height:auto;overflow:visible;touch-action:pan-y}
.chart text{font-size:11px;fill:var(--muted);font-family:Manrope,sans-serif}
.hero .chart text{fill:var(--on-hero2)}
.chart .gl{stroke:var(--line);stroke-width:1}
.hero .chart .gl{stroke:var(--hero3)}
.tip{position:absolute;transform:translate(-50%,-100%);pointer-events:none;background:var(--ink);color:var(--surface);
  padding:6px 10px;border-radius:10px;font-size:12px;opacity:0;transition:opacity .12s;white-space:nowrap;z-index:5;text-align:center}
.tip b{display:block;font-size:13.5px;font-weight:800}
.tip span{opacity:.75;font-size:11px}
.donut{display:grid;place-items:center}
.donut svg{width:180px;height:180px}
.donut text{fill:var(--ink)}

/* formulaires */
.fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px 14px}
.f{display:flex;flex-direction:column;gap:6px;min-width:0}
.f.wide{grid-column:1/-1}
.f>label,.f>.fl{font-size:13px;font-weight:700;color:var(--ink2)}
.f input,.f select{height:52px;border-radius:var(--r-sm);border:1.5px solid var(--chip-bd);padding:0 14px;
  font-size:16px;background:var(--field);width:100%;outline:none}
.f input:focus,.f select:focus{border-color:var(--primary)}
.f input[readonly]{color:var(--muted)}
.f .hint{font-size:12px;color:var(--muted);font-weight:500;line-height:1.4}
.checks{display:flex;flex-direction:column;max-height:240px;overflow:auto;border-radius:var(--r-sm);background:var(--field);
  border:1.5px solid var(--chip-bd)}
.checks label{display:flex;align-items:center;gap:10px;padding:10px 12px;font-size:14px;font-weight:600;cursor:pointer}
.checks label+label{border-top:1px solid var(--line2)}
.checks input{width:18px;height:18px;accent-color:var(--primary);flex:none}
.checks .num{margin-left:auto;color:var(--muted)}
.checks em{font-size:12px;color:var(--muted);font-style:normal}
.sum{font-size:12.5px;font-weight:700;margin-top:8px}

/* feuille (bas d'écran sur mobile, boîte centrée sur grand écran) */
.scrim{position:fixed;inset:0;z-index:50;background:rgba(6,22,15,.5);opacity:0;pointer-events:none;transition:opacity .25s;
  display:flex;align-items:flex-end;justify-content:center}
.scrim.on{opacity:1;pointer-events:auto}
.sheet{width:100%;max-width:640px;max-height:90dvh;overflow-y:auto;background:var(--surface);border-radius:28px 28px 0 0;
  padding:10px 20px calc(28px + env(safe-area-inset-bottom));transform:translateY(100%);
  transition:transform .34s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column;gap:16px}
.scrim.on .sheet{transform:none}
.sheet .grab{width:36px;height:4px;border-radius:2px;background:var(--chip-bd);align-self:center;margin-bottom:2px}
.sheet .sh-over{font-size:13px;font-weight:700;color:var(--primary)}
.sheet h2{font-size:22px;font-weight:800;letter-spacing:-.02em}
.sheet .sh-big{font-size:34px;font-weight:800;letter-spacing:-.03em}
.sheet .acts{display:flex;gap:10px}
.sheet .acts>*{flex:1}

/* paramètres */
.setcat{background:var(--surface);border-radius:var(--r-lg)}
.setcat>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:14px;padding:16px 18px;border-radius:var(--r-lg)}
.setcat>summary::-webkit-details-marker{display:none}
.setcat .ci{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;color:#fff;background:var(--c);flex:none}
.setcat .ct{font-size:16px;font-weight:800;display:block}
.setcat .cd{font-size:12.5px;color:var(--muted);font-weight:500}
.setcat .chev{margin-left:auto;color:var(--muted);transition:transform .2s}
.setcat[open] .chev{transform:rotate(180deg)}
.setcat .body{padding:4px 18px 20px;display:flex;flex-direction:column;gap:24px}
.setgrp h3{font-size:15px;font-weight:800}
.setgrp>p{font-size:12.5px;color:var(--muted);margin:3px 0 12px;font-weight:500}
.setgrp>h3+.fields{margin-top:12px}
.calc{background:var(--tonal);color:var(--on-tonal);border-radius:var(--r-md);padding:16px;display:flex;flex-direction:column;gap:12px}
.calc .grid{gap:10px}
.calc span{font-size:12px;font-weight:600;color:var(--on-tonal2);display:block}
.calc b{font-size:17px;font-weight:800}
.savebar{position:sticky;bottom:16px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 10px 10px 18px;border-radius:24px;background:var(--ink);color:var(--surface);box-shadow:var(--shadow);font-weight:700;font-size:14px}
.savebar .btn{background:var(--surface);color:var(--ink)}
.savebar .btn.ghost{background:transparent;color:inherit;border:1px solid currentColor}

/* connexion */
.login{position:fixed;inset:0;z-index:80;background:#0B3D2E;color:#fff;display:flex;justify-content:center;overflow:auto}
.login::before,.login::after{content:"";position:absolute;border-radius:50%}
.login::before{right:-120px;top:-60px;width:360px;height:360px;background:#10543F}
.login::after{right:-40px;top:20px;width:200px;height:200px;background:#14694E}
.login .in{position:relative;z-index:1;width:min(440px,100%);display:flex;flex-direction:column;padding:120px 28px 40px;gap:28px;min-height:100%}
.login .kick{font-size:14px;font-weight:800;letter-spacing:.14em;color:#5FE3A6}
.login h1{font-size:40px;font-weight:800;letter-spacing:-.035em;line-height:1.05;text-wrap:balance}
.login form,.login .sent{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.login label span{font-size:13px;font-weight:700;color:#C6E9D8;display:block;margin-bottom:6px}
.login input{width:100%;height:56px;border-radius:16px;border:1.5px solid #1F6A52;background:#10543F;color:#fff;padding:0 16px;font-size:16px;outline:none}
.login input:focus{border-color:#5FE3A6}
.login input::placeholder{color:#8FC7AC}
.login .btn{background:#5FE3A6;color:#0B3D2E}
.login .err{font-size:12.5px;color:#FFB4A0;font-weight:600;min-height:16px}
.login .note{font-size:12px;color:#9FD9BF;text-align:center;font-weight:500}
.login .box{background:#10543F;border-radius:20px;padding:18px;display:flex;gap:14px;align-items:center}
.login .box .ic{font-size:30px;color:#5FE3A6}
.login .box b{display:block;font-size:15px}
.login .box span{font-size:13px;color:#C6E9D8}
.login .ghost{height:44px;color:#C6E9D8;font-size:14px;font-weight:700}

/* divers */
.toast{position:fixed;left:50%;bottom:32px;z-index:90;transform:translate(-50%,12px);opacity:0;transition:all .3s;
  background:var(--ink);color:var(--surface);padding:12px 18px;border-radius:14px;font-size:14px;font-weight:600;
  pointer-events:none;max-width:calc(100vw - 32px);text-align:center}
.toast.on{opacity:1;transform:translate(-50%,0)}
.offline{position:fixed;top:0;left:0;right:0;z-index:95;background:var(--warn);color:#fff;text-align:center;font-size:12.5px;font-weight:700;padding:6px}
.empty{padding:32px 16px;text-align:center;color:var(--muted);font-size:14px;font-weight:500;background:var(--surface);border-radius:var(--r-md)}
.empty b{display:block;color:var(--ink);font-size:15px;margin-bottom:4px}
.note{font-size:12px;color:var(--muted);line-height:1.5;font-weight:500}
.skel{background:linear-gradient(90deg,var(--line) 0%,var(--sunk) 50%,var(--line) 100%);background-size:200% 100%;
  animation:sk 1.2s linear infinite;border-radius:var(--r-lg)}
@keyframes sk{from{background-position:200% 0}to{background-position:-200% 0}}
.flow svg{width:100%;max-width:820px;height:auto;display:block;margin:0 auto}
.flow text{font-family:Manrope,sans-serif}

/* ---------- responsive ---------- */
@media (min-width:1100px){
  .home{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:18px;align-items:start}
  .home>.col{display:flex;flex-direction:column;gap:18px;min-width:0}
}
@media (max-width:1099px){.home>.col{display:contents}.home{display:flex;flex-direction:column;gap:18px}}
@media (max-width:899px){
  .nav{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:40;width:100%;height:calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding:10px 4px env(safe-area-inset-bottom);flex-direction:row}
  .brand,.nav-foot{display:none}
  .nav-items{flex-direction:row;width:100%;justify-content:space-around;gap:0}
  .nav-items a{flex:1;flex-direction:column;gap:4px;height:auto;padding:0;border-radius:0;font-size:12px;font-weight:600;min-width:0}
  .nav-items a:hover{background:none}
  .nav-items a .ic{width:60px;height:32px;border-radius:16px;display:grid;place-items:center;font-size:24px;transition:background .25s}
  .nav-items a[aria-current="page"]{background:none}
  .nav-items a[aria-current="page"] .ic{background:var(--pill)}
  .nav-items a.opt{display:none}
  .nav-items .nl{display:none}.nav-items .ns{display:block;white-space:nowrap}
  .main{padding:14px 20px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom))}
  .chips,.tabs{margin:0 -20px;padding:0 20px}
  .fab{right:18px;bottom:calc(var(--nav-h) + 18px + env(safe-area-inset-bottom))}
  .toast{bottom:calc(var(--nav-h) + 20px + env(safe-area-inset-bottom))}
  .savebar{bottom:calc(var(--nav-h) + 12px + env(safe-area-inset-bottom))}
  .g3{grid-template-columns:1fr}
}
@media (max-width:560px){
  .g2{grid-template-columns:1fr}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tile .tv{font-size:18px}
  .plist{grid-template-columns:minmax(0,1fr)}
  .jal .mk span{display:none}
  .tiles.t4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero .big{font-size:34px}
}
@media (min-width:760px){
  .scrim{align-items:center;padding:24px}
  .sheet{border-radius:28px;transform:translateY(24px) scale(.98);opacity:0;transition:transform .25s,opacity .25s;padding-bottom:24px}
  .scrim.on .sheet{opacity:1}
  .sheet .grab{display:none}
}
