/* =====================================================================
   VAROTRA — feuille de style (Dinamick)
   Mise en page : mobile, barre d'activité en haut, contenu, dock de 4
   onglets autour d'un gros bouton + ; PC, rail à gauche et contenu.
   Le seul élément spectaculaire est le cycle de l'argent (accueil) et
   le bouton + qui en reprend les couleurs ; tout le reste est calme.
   ===================================================================== */
/* polices hébergées avec l'appli (fonctionnent hors ligne) : Bricolage Grotesque et Hanken Grotesk, licence OFL */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/bricolage-grotesque-wght.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/hanken-grotesk-400.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/hanken-grotesk-500.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/hanken-grotesk-600.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/hanken-grotesk-700.woff2) format('woff2'); }

:root {
  /* papier carnet vert-gris, encre forêt */
  --paper: #EEF1EC;
  --paper-2: #E4E9E2;
  --sheet: #FFFFFF;
  --sheet-2: #F6F8F5;
  --ink: #15201B;
  --ink-2: #435049;
  --ink-3: #66726B;
  --line: #D6DDD5;
  --line-2: #E6EBE5;
  --hover: rgba(21, 32, 27, .05);
  --scrim: rgba(12, 20, 16, .42);
  --shadow: 0 1px 0 rgba(21, 32, 27, .04), 0 10px 30px -18px rgba(21, 32, 27, .35);
  --shadow-lg: 0 30px 80px -30px rgba(12, 20, 16, .55);
  /* étapes du cycle (palette vérifiée pour le daltonisme, toujours accompagnée d'un libellé) */
  --st-cash: #14916A;
  --st-buy: #DD6A1F;
  --st-make: #6650D6;
  --st-stock: #C8417F;
  --st-sell: #2A6FD0;
  /* états */
  --good: #0F7A53;
  --good-bg: #DDF1E7;
  --warn: #8F5B00;
  --warn-bg: #F7EBCF;
  --bad: #B8322A;
  --bad-bg: #F8E1DE;
  --info: #2457A6;
  --info-bg: #E1EAF7;
  --on-ink: #F4F7F3;
  --focus: #2A6FD0;
  /* typographie */
  --f-display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --f-ui: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sheet: 22px;
  --r-panel: 18px;
  --r-ctl: 12px;
  --dock-h: 74px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1512; --paper-2: #141D19; --sheet: #18211D; --sheet-2: #1E2823;
    --ink: #E7EEE9; --ink-2: #B3C0B8; --ink-3: #8C9A92; --line: #2C3832; --line-2: #24302A;
    --hover: rgba(231, 238, 233, .06); --scrim: rgba(0, 0, 0, .6);
    --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 12px 30px -18px rgba(0, 0, 0, .7); --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .9);
    --st-cash: #179A70; --st-buy: #DD7524; --st-make: #8577EE; --st-stock: #C9509E; --st-sell: #4689EC;
    --good: #5FD3A2; --good-bg: #133A2B; --warn: #F0C46A; --warn-bg: #3A2F14; --bad: #F08C82; --bad-bg: #44201C; --info: #8DB6F5; --info-bg: #1A2A44;
    --on-ink: #0E1512; --focus: #8DB6F5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1512; --paper-2: #141D19; --sheet: #18211D; --sheet-2: #1E2823;
  --ink: #E7EEE9; --ink-2: #B3C0B8; --ink-3: #8C9A92; --line: #2C3832; --line-2: #24302A;
  --hover: rgba(231, 238, 233, .06); --scrim: rgba(0, 0, 0, .6);
  --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 12px 30px -18px rgba(0, 0, 0, .7); --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .9);
  --st-cash: #179A70; --st-buy: #DD7524; --st-make: #8577EE; --st-stock: #C9509E; --st-sell: #4689EC;
  --good: #5FD3A2; --good-bg: #133A2B; --warn: #F0C46A; --warn-bg: #3A2F14; --bad: #F08C82; --bad-bg: #44201C; --info: #8DB6F5; --info-bg: #1A2A44;
  --on-ink: #0E1512; --focus: #8DB6F5;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); letter-spacing: -.02em; text-wrap: balance; line-height: 1.15; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-s { width: 17px; height: 17px; }
.ic-l { width: 24px; height: 24px; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--ink); color: var(--on-ink); font-weight: 650; font-size: 15px; text-decoration: none; transition: transform .15s ease, opacity .15s ease; white-space: nowrap; }
.btn:hover { opacity: .92; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-soft { background: var(--paper-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); flex: none; }
.iconbtn:hover { background: var(--hover); color: var(--ink); }
.link { background: none; border: 0; padding: 4px 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* puces de choix (une seule réponse) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--paper-2); color: var(--ink); font-weight: 550; font-size: 14px; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.chip small { font-weight: 500; opacity: .7; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper-2); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* pastilles d'état */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.mute { background: var(--paper-2); color: var(--ink-2); }

/* ---------- coque ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 8px calc(var(--dock-h) + 36px + env(safe-area-inset-bottom, 0px)); max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 8px; padding-block: 10px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.actbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 4px 12px 4px 5px; border: 0; border-radius: 999px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); max-width: calc(100vw - 132px); text-align: left; }
.actbtn .av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.actbtn .av .ic { width: 19px; height: 19px; stroke-width: 2; }
.actbtn b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actbtn small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actbtn > span { min-width: 0; }
.top .sp { flex: 1; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; border: 0; background: transparent; padding: 6px 8px; border-radius: 999px; font-family: inherit; cursor: pointer; }
.sync:hover { background: var(--hover); color: var(--ink); }
.led.pend { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }
.row.snap { align-items: center; gap: 10px; cursor: default; }
.row.snap .g { flex: 1; min-width: 0; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.led.saving { background: var(--info); animation: blink 1s ease-in-out infinite; }
.led.off { background: var(--ink-3); box-shadow: none; }
.led.err { background: var(--bad); }
@keyframes blink { 50% { opacity: .35; } }
.me { width: 42px; height: 42px; border-radius: 999px; border: 0; background: var(--ink); color: var(--on-ink); font-weight: 700; font-family: var(--f-display); font-size: 16px; flex: none; }

/* dock (mobile) */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); background: color-mix(in srgb, var(--sheet) 94%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line-2); }
.dock nav { display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center; height: var(--dock-h); max-width: 560px; margin: 0 auto; }
.dock a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 650; border-radius: 14px; }
.dock a .ic { width: 23px; height: 23px; }
.dock a[aria-current="page"] { color: var(--ink); }
.dock a[aria-current="page"] .ic { stroke-width: 2.3; }
.dock a[aria-current="page"] span { position: relative; }
.dock a[aria-current="page"] span::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 16px; height: 3px; margin-left: -8px; border-radius: 3px; background: var(--ink); }

/* le bouton + : un anneau des couleurs du cycle autour d'un disque d'encre */
.plus { position: relative; justify-self: center; width: 66px; height: 66px; border-radius: 50%; border: 0; padding: 0; margin-top: -26px; background: conic-gradient(from -90deg, var(--st-cash), var(--st-buy), var(--st-make), var(--st-stock), var(--st-sell), var(--st-cash)); box-shadow: 0 14px 28px -12px rgba(12, 20, 16, .55); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.plus::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink); }
.plus .ic { position: relative; width: 30px; height: 30px; stroke: var(--on-ink); stroke-width: 2.4; transition: transform .25s ease; }
.plus:hover { transform: translateY(-2px); }
.plus[aria-expanded="true"] .ic { transform: rotate(45deg); }

/* rail (PC) */
.rail { display: none; }
@media (min-width: 980px) {
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 18px 14px 18px max(14px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--line-2); background: var(--paper); overflow-y: auto; }
  .rail .actbtn { max-width: none; width: 100%; }
  .rail nav { display: flex; flex-direction: column; gap: 2px; }
  .rail nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
  .rail nav a:hover { background: var(--hover); color: var(--ink); }
  .rail nav a[aria-current="page"] { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .rail nav .sep { height: 1px; background: var(--line-2); margin: 8px 6px; }
  .rail .foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
  .rail .who { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); }
  .rail .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail .who > span { min-width: 0; flex: 1; }
  .dock, .top { display: none; }
  .main { padding-block: 26px 48px; padding-left: 36px; padding-right: max(36px, env(safe-area-inset-right, 0px)); }
}

/* ---------- en-têtes de vue ---------- */
.vhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vhead h1 { font-size: 30px; }
.vhead p { color: var(--ink-2); margin-top: 4px; font-size: 14.5px; }
.vhead .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* surfaces */
.panel { background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line-2); padding: 18px; min-width: 0; }
.panel-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-h p { color: var(--ink-3); font-size: 13.5px; margin-top: 3px; }
.grid2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.empty { padding: 26px 12px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .ic { width: 34px; height: 34px; color: var(--ink-3); stroke-width: 1.5; }
.empty b { color: var(--ink); font-size: 16px; }

/* listes */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-radius: 12px; border: 0; background: transparent; width: 100%; text-align: left; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 52px; right: 6px; height: 1px; background: var(--line-2); }
button.row:hover, a.row:hover { background: var(--hover); }
.row .g { flex: 1; min-width: 0; }
.row .g b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .g small { display: block; color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .v { text-align: right; flex: none; }
.row .v b { display: block; font-weight: 650; font-variant-numeric: tabular-nums; }
.row .v small { display: block; color: var(--ink-3); font-size: 12.5px; }
.row .v .pos { color: var(--good); }
.row .v .neg, .row .v b.neg { color: var(--bad); }
.row.hl { box-shadow: inset 0 0 0 2px var(--bad); border-radius: 14px; }
/* matériel : en service, d'un coup d'œil */
.eqhead { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.eqhead small { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-3); }
.eqhead b { display: block; font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.eqhead b span { font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.udots { display: flex; flex-wrap: wrap; gap: 6px; }
.udots i { width: 18px; height: 18px; border-radius: 6px; background: var(--st-make); }
.udots i.off { background: transparent; box-shadow: inset 0 0 0 2px var(--bad); position: relative; }
.udots i.off::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; margin-top: -1px; background: var(--bad); transform: rotate(-45deg); border-radius: 2px; }
.bub { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; }
.bub .ic { width: 19px; height: 19px; stroke-width: 2; }
.bub.soft { background: var(--paper-2); color: var(--ink-2); }
.daycap { font-size: 13px; font-weight: 650; color: var(--ink-3); padding: 14px 6px 4px; }

/* ---------- le cycle (accueil) ---------- */
.pulse { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.pulse .col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pulse .col:empty { display: none; }
.wide-only { display: none; }
@media (min-width: 980px) { .wide-only { display: block; } }
.starter ol { list-style: none; margin: 10px 0 0; padding: 0; }
.starter li + li .row::before { content: ""; position: absolute; top: 0; left: 52px; right: 6px; height: 1px; background: var(--line-2); }
@media (min-width: 1100px) { .pulse { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.cycle-card { position: relative; background: var(--sheet); border-radius: 26px; box-shadow: inset 0 0 0 1px var(--line-2); padding: 14px 14px 18px; overflow: hidden; }
.cycle-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 0 6px; }
.cycle-top .seg button { min-height: 32px; padding: 0 11px; font-size: 13px; }
.cycle-top h2 { font-size: 17px; }
.cycle-top p { font-size: 13px; color: var(--ink-3); }
.cycle { position: relative; width: 100%; max-width: 460px; margin: 6px auto 0; aspect-ratio: 400 / 335; }
.cycle-cap { text-align: center; font-size: 14px; color: var(--ink-2); max-width: 34em; margin: 4px auto 0; padding: 0 8px; text-wrap: balance; }
.cycle-cap b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cycle > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cycle canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* chaque étape : une bulle posée sur l'anneau, son libellé à l'extérieur */
.node { position: absolute; transform: translate(-50%, -50%); width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--sheet), 0 10px 18px -8px rgba(0, 0, 0, .55); transition: transform .2s ease; }
.node:hover { transform: translate(-50%, -50%) scale(1.07); }
.node .ic { width: 20px; height: 20px; stroke-width: 2; }
.node .lbl { position: absolute; display: flex; flex-direction: column; white-space: nowrap; color: var(--ink); text-align: left; }
.node .lbl small { font-size: 11.5px; color: var(--ink-3); font-weight: 600; line-height: 1.2; }
.node .lbl b { font-size: 14px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.node.r .lbl { left: calc(100% + 9px); top: 50%; transform: translateY(-50%); }
.node.l .lbl { right: calc(100% + 9px); top: 50%; transform: translateY(-50%); text-align: right; align-items: flex-end; }
.node.t .lbl { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); text-align: center; align-items: center; }
.node.b .lbl { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); text-align: center; align-items: center; }
@media (max-width: 420px) { .node { width: 36px; height: 36px; } .node .ic { width: 17px; height: 17px; } .node .lbl b { font-size: 13px; } .node .lbl small { font-size: 11px; } }
.cycle-center { position: absolute; left: 50%; top: 50.75%; transform: translate(-50%, -50%); width: 30%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.cycle-center .pct { font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 8.4vw, 46px); line-height: .95; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.cycle-center .pct small { font-size: .45em; font-weight: 700; margin-left: 2px; letter-spacing: 0; }
.cycle-center .lab { font-size: 12px; color: var(--ink-2); font-weight: 600; line-height: 1.25; }
.cycle-center .sub { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; margin-top: 4px; }
.cycle-center .sub b { color: var(--ink); font-weight: 700; }
@media (min-width: 980px) { .cycle-center .pct { font-size: 48px; } }

/* bandeau des 3 chiffres */
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.fig { padding: 14px 12px; border: 0; background: transparent; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-radius: var(--r-panel); }
.fig + .fig { border-left: 1px solid var(--line-2); border-radius: 0; }
.fig:hover { background: var(--hover); }
.fig small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig b { font-family: var(--f-display); font-size: clamp(17px, 4.6vw, 24px); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig b.neg { color: var(--bad); }
.fig b.pos { color: var(--good); }
.fig span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.money-card { background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.money-card .figs { box-shadow: none; border-radius: 0; background: transparent; border-bottom: 1px solid var(--line-2); }
.curve-btn { display: block; width: 100%; border: 0; background: transparent; padding: 10px 12px 10px; text-align: left; }
.curve-btn:hover { background: var(--hover); }
.curve-host { width: 100%; min-height: 60px; }
.curve-host svg { display: block; width: 100%; height: auto; overflow: visible; }
.curve-host .axis { fill: var(--ink-3); font: 500 11px var(--f-ui); font-variant-numeric: tabular-nums; }
.curve-host .grid { stroke: var(--line-2); stroke-width: 1; }
.curve-host .base { stroke: var(--line); stroke-width: 1; }
.curve-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 6px; }
.curve-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.curve-legend .faint { margin-left: auto; font-weight: 500; }
@keyframes drawline { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }
svg .draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawline 1.6s cubic-bezier(.3, .7, .2, 1) both; }

/* à faire */
.todo { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 0; background: transparent; width: 100%; text-align: left; }
.todo:hover { background: var(--hover); }
.todo + .todo { margin-top: 2px; }
.todo .mk { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.todo .mk.good { background: var(--good-bg); color: var(--good); }
.todo .mk.warn { background: var(--warn-bg); color: var(--warn); }
.todo .mk.bad { background: var(--bad-bg); color: var(--bad); }
.todo .mk.info { background: var(--info-bg); color: var(--info); }
.todo .g { flex: 1; min-width: 0; }
.todo b { display: block; font-size: 14.5px; font-weight: 650; }
.todo small { display: block; font-size: 13px; color: var(--ink-2); }
.todo .go { align-self: center; color: var(--ink-3); }

/* ---------- stock ---------- */
.items { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 8px; border: 0; background: transparent; text-align: left; border-radius: 12px; position: relative; width: 100%; }
.item + .item::before { content: ""; position: absolute; top: 0; left: 8px; right: 8px; height: 1px; background: var(--line-2); }
.item:hover { background: var(--hover); }
.item .nm { font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.item .nm span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item .q { text-align: right; font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.item .q small { font-family: var(--f-ui); font-size: 12.5px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.item .meta { font-size: 13px; color: var(--ink-3); min-width: 0; }
.item .runway { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin-top: 4px; }
.item .runway i { display: block; height: 100%; border-radius: 4px; background: var(--c, var(--st-stock)); }
.item .side { text-align: right; font-size: 12.5px; color: var(--ink-3); }

/* cuves / lots */
.lots { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.lot { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; padding: 16px; background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; border: 0; }
.lot:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.tank { position: relative; width: 74px; height: 112px; }
.tank svg { width: 100%; height: 100%; display: block; }
.lot h3 { font-size: 16px; margin-bottom: 4px; }
.lot .kv { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-2); }
.lot .kv b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lot .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.days { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; margin: 6px 0 2px; }
.days i { display: block; height: 100%; background: var(--st-make); border-radius: 6px; }

/* ---------- analyse ---------- */
.kgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border-radius: var(--r-panel); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
@media (min-width: 760px) { .kgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* une case seule en fin de grille prend la place restante, au lieu de laisser un trou */
.kgrid > .k:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .kgrid > .k:last-child:nth-child(odd) { grid-column: auto; }
  .kgrid > .k:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .kgrid > .k:last-child:nth-child(3n+2) { grid-column: span 2; }
}
@media (min-width: 1100px) { .kgrid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kgrid.k4 > .k:last-child { grid-column: auto; } }
/* Analyse : ce qu'on regarde (depuis le début, un mois, une campagne, des dates) */
.lens { display: flex; flex-direction: column; gap: 10px; padding: 8px; border-radius: 22px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.lens-modes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--paper-2); }
.lens-modes button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); font-weight: 650; font-size: 14px; transition: background .2s ease, color .2s ease; }
.lens-modes button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 6px 16px -10px rgba(0, 0, 0, .35); }
.lens-modes .li { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--ink-3); flex: none; transition: background .25s ease, color .25s ease; }
.lens-modes button[aria-pressed="true"] .li { background: var(--st-sell); color: #fff; animation: liPop .45s cubic-bezier(.3, 1.6, .5, 1); }
.lens-modes .ls { display: none; }
@keyframes liPop { 0% { transform: scale(.6) rotate(-12deg); } 100% { transform: none; } }
.lens-ctx { padding: 2px 6px 4px; }
.lens-ctx.enter { animation: lensIn .32s ease both; }
@keyframes lensIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lens-note { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); min-height: 36px; }
.mstep { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mstep .flip { display: inline-flex; transform: scaleX(-1); }
.mstep .iconbtn[disabled] { opacity: .3; cursor: default; }
.mlabel { text-align: center; }
.mlabel b { display: block; font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.mlabel small { font-size: 12.5px; color: var(--ink-3); }
.ccards { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ccards::-webkit-scrollbar { display: none; }
.ccard { flex: none; min-width: 170px; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; text-align: left; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--sheet-2); box-shadow: inset 0 0 0 1.5px var(--line-2); color: inherit; }
.ccard .cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); grid-row: 1; }
.ccard.open .cdot { background: var(--st-cash); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st-cash) 22%, transparent); }
.ccard b { font-size: 15px; grid-row: 1; }
.ccard small { grid-column: 2; font-size: 12.5px; color: var(--ink-3); }
.ccard[aria-pressed="true"] { background: color-mix(in srgb, var(--st-sell) 10%, var(--sheet)); box-shadow: inset 0 0 0 2px var(--st-sell); }
@media (max-width: 560px) {
  .lens-modes button { flex-direction: column; gap: 3px; min-height: 58px; font-size: 12.5px; }
  .lens-modes .lt { display: none; } .lens-modes .ls { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .lens-modes button[aria-pressed="true"] .li, .lens-ctx.enter { animation: none; } }
/* Analyse : où en êtes-vous ? la richesse comparée à l'argent mis */
.wealth .wlead { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.wealth .wlead b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wgain { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 18px; }
.wgain small { display: block; font-size: 13px; font-weight: 650; color: var(--ink-3); }
.wgain b { display: block; font-family: var(--f-display); font-size: clamp(30px, 8vw, 44px); font-weight: 750; letter-spacing: -.03em; line-height: 1.05; color: var(--good); font-variant-numeric: tabular-nums; }
.wgain .wpct { font-family: var(--f-display); font-size: clamp(17px, 4.6vw, 22px); font-weight: 700; padding: 6px 14px; border-radius: 999px; background: var(--good-bg); color: var(--good); font-variant-numeric: tabular-nums; }
.wgain.neg b { color: var(--bad); }
.wgain.neg .wpct { background: var(--bad-bg); color: var(--bad); }
.wbar { position: relative; padding-top: 22px; }
.wtrack { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: var(--paper-2); gap: 2px; }
.wtrack i { display: block; height: 100%; min-width: 3px; }
.wmark { position: absolute; top: 0; bottom: -4px; width: 0; border-left: 2px solid var(--ink); }
.wmark.r em { right: auto; left: 6px; }
.wmark em { position: absolute; top: 0; right: 6px; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink); white-space: nowrap; line-height: 1; }
.wlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.wlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.wlegend b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 650; }
.wif { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: var(--paper-2); font-size: 14px; color: var(--ink-2); }
.wif .ic { flex: none; margin-top: 2px; color: var(--st-sell); }
.wif b { color: var(--ink); white-space: nowrap; }
.wcurve-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 20px 0 6px; font-size: 14px; }
.wcurve-h span { color: var(--ink-3); font-size: 13px; }
.wcurve-h b.pos, .wcurve-h span b.pos { color: var(--good); } .wcurve-h span b.neg { color: var(--bad); }
.whow { margin-top: 8px; border-top: 1px solid var(--line-2); padding-top: 6px; }
.whow summary { cursor: pointer; font-size: 13.5px; font-weight: 650; color: var(--ink-2); min-height: 36px; display: flex; align-items: center; }
.whow .eq { margin-top: 6px; }
.whow .eq .sub { border-top: 1px solid var(--line-2); padding-top: 8px; margin-top: 2px; }
.whow .note { margin-top: 10px; }
.wtbl td.neg { color: var(--bad); }
.wtbl { margin-top: 12px; }
.camp-card b.pos, .eq .pos { color: var(--good); } .camp-card b.neg, .eq .neg { color: var(--bad); }
.kcap { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 4px 2px -8px; }
.anamore > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--r-panel); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); }
.anamore > summary::-webkit-details-marker { display: none; }
.anamore > summary b { display: block; font-size: 15.5px; }
.anamore > summary small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.anamore[open] > summary { margin-bottom: 18px; }
.anamore > .panel, .anamore > .grid2 { margin-bottom: 18px; }
/* Analyse : ce qui a été acheté et dépensé */
.bgrid { display: grid; gap: 22px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bblock { min-width: 0; }
.bhead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.bhead .bub { width: 28px; height: 28px; border-radius: 9px; }
.bhead b { flex: 1; min-width: 0; font-size: 15px; }
.bhead .bt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.bblock .note { margin-top: 10px; }
.bmore { margin-top: 10px; }
.bmore summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; }
.bmore .bars { margin-top: 8px; }
.k { background: var(--sheet); padding: 14px 16px; min-width: 0; }
.k small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.k b { display: block; font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k span { display: block; font-size: 12.5px; color: var(--ink-3); }
.k b.neg { color: var(--bad); } .k b.pos { color: var(--good); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { fill: var(--ink-3); font: 500 11px var(--f-ui); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .base { stroke: var(--line); stroke-width: 1; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--on-ink); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-lg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip b { font-weight: 700; }
.verdict { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.verdict b { color: var(--ink); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.bar .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.bar .vl { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; }
.bar .vl small { color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.bar .tr { grid-column: 1 / -1; height: 8px; border-radius: 0 4px 4px 0; background: transparent; }
.bar .tr i { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--c, var(--st-sell)); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.tbl td.r, .tbl th.r { text-align: right; }
.scrollx { overflow-x: auto; }

/* ---------- caisse ---------- */
.accs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.acc { padding: 16px; border-radius: var(--r-panel); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); display: flex; flex-direction: column; gap: 6px; text-align: left; border: 0; }
.acc small { color: var(--ink-3); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.acc b { font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.acc b.neg { color: var(--bad); }
.eq { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.eq div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-variant-numeric: tabular-nums; }
.eq div.tot { border-top: 1.5px solid var(--ink); margin-top: 4px; padding-top: 10px; font-weight: 700; font-size: 16px; }

/* ---------- feuilles (saisie) ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--sheet); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--shadow-lg); animation: rise .26s cubic-bezier(.2, .9, .3, 1); padding-bottom: env(safe-area-inset-bottom, 0px); }
@keyframes rise { from { transform: translateY(40px); opacity: .6; } }
@media (min-width: 720px) { .scrim { align-items: center; padding: 24px; } .sheet { border-radius: var(--r-sheet); max-height: 88vh; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; flex: none; }
@media (min-width: 720px) { .sheet .grab { display: none; } }
.sh-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px 10px; flex: none; }
.sh-head .bub { width: 40px; height: 40px; }
.sh-head h2 { font-size: 20px; flex: 1; min-width: 0; }
.sh-head p { font-size: 13px; color: var(--ink-3); }
.sh-body { padding: 4px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.sh-foot { flex: none; padding: 12px 18px 14px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; background: var(--sheet); border-radius: 0 0 var(--r-sheet) var(--r-sheet); }
.sh-foot .tot { flex: 1; min-width: 0; }
.sh-foot .tot small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.sh-foot .tot b { display: block; font-family: var(--f-display); font-size: 24px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .flabel { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.inp { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: var(--r-ctl); background: var(--sheet-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.inp:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.inp input, .inp select, .inp textarea { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; outline: none; min-height: 46px; font-size: 16px; }
.inp textarea { padding: 12px 0; min-height: 70px; resize: vertical; }
.inp .u { color: var(--ink-3); font-size: 14px; font-weight: 600; white-space: nowrap; }
.inp.big input { font-family: var(--f-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 380px) { .three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 142px), 1fr)); gap: 8px; }
.pick { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 0; background: var(--sheet-2); box-shadow: inset 0 0 0 1.5px var(--line-2); text-align: left; min-width: 0; position: relative; }
.pick:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.pick b { font-size: 14px; font-weight: 650; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pick small { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); background: var(--sheet); }
.pick .cnt { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
.pick.add { align-items: center; justify-content: center; flex-direction: row; gap: 6px; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); background: transparent; border: 0; font-weight: 600; font-size: 14px; min-height: 56px; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--sheet-2); }
.line .nm { font-weight: 650; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line .ctl { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; flex-wrap: wrap; }
.line .ctl .inp { min-height: 40px; flex: 1 1 90px; min-width: 0; }
.line .ctl .inp input { min-height: 38px; font-size: 15px; }
.line .lt { font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; border-radius: 999px; background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--line); flex: none; }
.stepper button { width: 38px; height: 38px; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.stepper input { width: 52px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; outline: none; }
.note { font-size: 13px; color: var(--ink-3); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.alert .ic { margin-top: 1px; }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.good { background: var(--good-bg); color: var(--good); }
.alert b { display: block; }
.alert span { color: inherit; }
.switch { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line-2); }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; flex: none; margin: 2px 0 0; transition: background .2s ease; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s ease; }
.switch input:checked { background: var(--st-cash); }
.switch input:checked::after { transform: translateX(18px); }
.switch b { display: block; font-size: 15px; }
.switch small { display: block; font-size: 13px; color: var(--ink-3); }
/* Réglages : des tiroirs sur une colonne */
.drawers { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 880px; }
.drawer { background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); overflow: hidden; }
.drawer > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 68px; }
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary:hover { background: var(--hover); }
.drawer > summary .bub { width: 40px; height: 40px; border-radius: 13px; }
.drawer .dt { flex: 1; min-width: 0; }
.drawer .dt b { display: block; font-family: var(--f-display); font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.drawer .dt small { display: block; font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .chev { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--ink-3); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.drawer[open] .chev { transform: rotate(90deg); color: var(--ink); }
.drawer[open] > summary { border-bottom: 1px solid var(--line-2); }
.drawer .dbody { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.drawer[open] .dbody { animation: drawerIn .28s ease both; }
@keyframes drawerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.drawer .row-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.helpstrip .hs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.helpstrip .hs-top p { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.helpstrip .switch { padding-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .drawer[open] .dbody { animation: none; } .drawer .chev { transition: none; } }
/* Réglages : vos outils, expliqués */
.tgroups { display: grid; gap: 4px 32px; grid-template-columns: minmax(0, 1fr); }

.tgroup h3 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 12px 0 2px; }
.tool { border-top: 1px solid var(--line-2); padding-bottom: 8px; }
.tgroup h3 + .tool { border-top: 0; }
.tool .switch { padding: 12px 0 6px; align-items: center; }
.tool .switch + .switch { border-top: 0; }
.tool .switch .bub { width: 34px; height: 34px; border-radius: 10px; }
.tool .switch .bub .ic { width: 18px; height: 18px; }
.tool.on .switch .bub { background: color-mix(in srgb, var(--st-cash) 16%, var(--sheet)); color: var(--st-cash); }
.tool .switch > span:last-child { min-width: 0; }
.tool-more { margin-left: 102px; font-size: 13.5px; color: var(--ink-2); }
.tool-more summary { cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 13px; list-style: none; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.tool-more summary::-webkit-details-marker { display: none; }
.tool-more summary::after { content: "›"; transition: transform .15s ease; display: inline-block; }
.tool-more[open] summary::after { transform: rotate(90deg); }
.tool-more p { margin: 4px 0 6px; line-height: 1.45; }
.tool-note { margin: 2px 0 4px 102px; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: flex-start; }
.tool-note .ic { flex: none; margin-top: 1px; }
@media (max-width: 420px) { .tool-more, .tool-note { margin-left: 56px; } .tool .switch .bub { display: none; } }
.kvs { display: flex; flex-direction: column; }
.kvs div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.kvs div span:first-child { color: var(--ink-3); }
.kvs div span:last-child { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btnrow .btn { flex: 1 1 140px; }

/* menu d'actions du bouton + */
.verbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.verb { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; min-height: 104px; border-radius: 18px; border: 0; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; position: relative; overflow: hidden; }
.verb:hover { box-shadow: inset 0 0 0 1.5px var(--c); }
.verb .bub { background: var(--c); }
.verb > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.verb b { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.2; }
.verb small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.3; }
.verb.lead-verb { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 84px; background: color-mix(in srgb, var(--c) 10%, var(--sheet)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 35%, transparent); }
.verb.lead-verb .bub { width: 50px; height: 50px; border-radius: 16px; }
.verb.lead-verb .bub .ic { width: 24px; height: 24px; }
.verb.lead-verb b { font-size: 18px; }

.minor { display: flex; gap: 8px; flex-wrap: wrap; }
.minor .btn { flex: 1 1 auto; }

/* notifications */
.toasts { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
@media (min-width: 980px) { .toasts { bottom: 28px; } }
.toasts.top { top: calc(env(safe-area-inset-top, 0px) + 14px); bottom: auto; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-lg); font-size: 14.5px; font-weight: 550; animation: rise .25s ease; }
.toast .g { flex: 1; }
.toast.bad { background: var(--bad); color: #fff; }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: inherit; font-weight: 700; border-radius: 999px; padding: 7px 12px; font-size: 13.5px; }

/* ---------- accueil public ---------- */
.wel { min-height: 100vh; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); padding-block: 0 40px; }
.wel-in { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 44px; }
.wtop { display: flex; align-items: center; gap: 12px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 40px; height: 40px; flex: none; }
.brand b { font-family: var(--f-display); font-size: 22px; font-weight: 800; letter-spacing: -.035em; display: block; line-height: 1; }
.brand small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.wtop .sp { flex: 1; }
.hero { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; padding-top: 6px; }
@media (min-width: 940px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.hero h1 { font-size: clamp(38px, 7.4vw, 66px); font-weight: 800; line-height: .98; letter-spacing: -.045em; max-width: 11em; }
.hero .lead { font-size: clamp(16px, 2.1vw, 18.5px); line-height: 1.55; color: var(--ink-2); max-width: 34em; margin-top: 18px; }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero .ctas .btn { min-height: 52px; padding: 0 24px; font-size: 16px; }
.hero-visual { position: relative; }
.hero-visual .cycle-card { box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-2); }
.hero-visual .tag { position: absolute; top: -12px; left: 18px; z-index: 2; }
.wsec h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 750; letter-spacing: -.03em; }
.wsec > p { color: var(--ink-2); margin-top: 8px; font-size: 16px; max-width: 40em; }
.tpls { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 22px; }
.tpl { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; border: 0; }
.tpl .hd { display: flex; align-items: center; gap: 12px; }
.tpl .bub { width: 44px; height: 44px; border-radius: 14px; }
.tpl b { font-size: 17px; font-weight: 700; font-family: var(--f-display); letter-spacing: -.01em; }
.tpl p { font-size: 14px; color: var(--ink-2); }
.flowline { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.flowline span { display: inline-flex; align-items: center; gap: 5px; }
.flowline span i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tpl .ft { margin-top: auto; padding-top: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tpl .ft small { font-size: 12.5px; color: var(--ink-3); }
.steps3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin-top: 22px; counter-reset: s; }
.step3 { padding: 18px; border-radius: 20px; background: var(--paper-2); }
.step3 .n { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 700; font-family: var(--f-display); margin-bottom: 12px; }
.step3 b { display: block; font-size: 17px; margin-bottom: 4px; }
.step3 p { font-size: 14.5px; color: var(--ink-2); }
.plans { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 20px; }
.plan { padding: 18px; border-radius: 20px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.plan.long { box-shadow: inset 0 0 0 2px var(--ink); }
.plan .dur { font-weight: 650; color: var(--ink-2); }
.plan .price { font-family: var(--f-display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 15px; font-weight: 700; margin-left: 4px; }
.plan .per { font-size: 13.5px; color: var(--ink-3); }
.wgrid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 940px) { .wgrid { grid-template-columns: minmax(0, 1fr) 400px; } .wgrid .auth-aside { position: sticky; top: 20px; } }
.authcard { background: var(--sheet); border-radius: 24px; padding: 22px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); display: flex; flex-direction: column; gap: 14px; }
.authcard form { display: flex; flex-direction: column; gap: 12px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: var(--paper-2); }
.tabs2 button { border: 0; background: transparent; min-height: 40px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--ink-2); }
.tabs2 button[aria-selected="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: 999px; border: 0; background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 650; }
.err-text { color: var(--bad); font-size: 14px; font-weight: 550; }
.wfoot { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13.5px; color: var(--ink-3); padding-top: 22px; border-top: 1px solid var(--line); }
.wfoot a, .wfoot button { color: var(--ink-2); }
.gate { max-width: 560px; margin: 0 auto; padding: 18px max(18px, env(safe-area-inset-right, 0px)) 40px max(18px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; }
.gate .status-ico { width: 60px; height: 60px; border-radius: 20px; background: var(--paper-2); display: grid; place-items: center; }
.gate .status-ico .ic { width: 28px; height: 28px; }
.copyline { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 14px; background: var(--paper-2); font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.copyline span { flex: 1; }
.splash { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; }
.splash .mark { width: 64px; height: 64px; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mini-tpls { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 18px; }
.mini-tpl { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 16px; border: 0; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; min-width: 0; }
.mini-tpl:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.mini-tpl .bub { width: 40px; height: 40px; }
.mini-tpl .g { flex: 1; min-width: 0; }
.mini-tpl b { display: block; font-size: 15px; font-weight: 650; }
.mini-tpl small { display: block; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* onboarding : choix du modèle */
.onb { max-width: 920px; margin: 0 auto; padding: 24px max(18px, env(safe-area-inset-right, 0px)) 48px max(18px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 22px; }
.onb h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 800; letter-spacing: -.035em; }
.tpl[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--ink); }

/* ---------- administration ---------- */
.adm-users { display: flex; flex-direction: column; gap: 10px; }
.urow { padding: 14px 16px; border-radius: 16px; background: var(--sheet-2); border: 0; width: 100%; text-align: left; color: inherit; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; transition: box-shadow .15s ease; }
.urow:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.urow .who, .urow .meta { grid-column: 1; }
.urow .go { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: 14px; color: var(--ink-2); }
.urow .who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.urow .who b { font-size: 15px; word-break: break-all; }
.urow .meta { font-size: 13px; color: var(--ink-3); }
.urow .ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.urow .ctl select, .urow .ctl input { min-height: 40px; border-radius: 10px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--sheet); padding: 0 10px; font-size: 14px; }
.urow .ctl input { width: 150px; }
.urow .ctl .nacts { min-height: 40px; padding-left: 10px; gap: 4px; }
.urow .ctl .nacts input { width: 44px; box-shadow: none; padding: 0 6px; text-align: center; background: transparent; }
.plan-edit { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.plan-edit .box { padding: 12px; border-radius: 14px; background: var(--sheet-2); display: flex; flex-direction: column; gap: 8px; }
.plan-edit input, .plan-edit select { min-height: 40px; border-radius: 10px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--sheet); padding: 0 10px; width: 100%; }
.plan-edit .duo { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }

/* bandeau démo */
.demo-band { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border-radius: 999px; background: var(--info-bg); color: var(--info); font-size: 13.5px; font-weight: 600; }
.demo-band .g { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-band .btn { min-height: 34px; }
.demo-band .iconbtn { width: 34px; height: 34px; color: inherit; }

.jbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.jbar + .jbar { margin-top: -4px; }
.jsearch { flex: 1; min-width: 200px; min-height: 42px; }
.jcamp { min-height: 40px; max-width: 260px; }
.jcamp select { min-height: 38px; font-size: 14px; }
.jdates { display: flex; gap: 8px; flex-wrap: wrap; }
.jdates .inp { min-height: 40px; }
.jdates input { min-height: 38px; font-size: 14px; }
.jtot { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line-2); border-radius: var(--r-panel); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.jtot > div { background: var(--sheet); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jtot small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.jtot b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jtot b.pos { color: var(--good); } .jtot b.neg { color: var(--bad); }
.meter { height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--st-cash); border-radius: inherit; }
.camp-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.camp-card.closed { opacity: .92; }
.camp-acts { flex: 1 1 100%; }
.ctbl td, .ctbl th { padding: 7px 6px; font-size: 13px; }
.ctbl td.r, .ctbl th.r { white-space: nowrap; }
.ctbl th { font-size: 11.5px; }
@media (max-width: 420px) { .ctbl td:first-child { max-width: 104px; } .ctbl td, .ctbl th { padding: 6px 4px; font-size: 12.5px; } .ctbl .pill { padding: 2px 6px; font-size: 11px; } .ccost { padding: 10px 8px; } .camp-card { padding-inline: 12px; } }
.ctbl tr.tot td { font-weight: 700; border-top: 1px solid var(--line); }
.ccost .tbl { background: var(--sheet); border-radius: 10px; }
.ccost { flex: 1 1 100%; min-width: 0; margin-top: 4px; padding: 12px; border-radius: 14px; background: var(--paper-2); display: flex; flex-direction: column; gap: 10px; }
.ccost .flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ccost .flow span { display: flex; flex-direction: column; }
.ccost .flow small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ccost .flow b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ccost .chip { background: var(--sheet); min-height: 32px; font-size: 13px; font-weight: 500; }
.ccost .note { margin: 0; }
.gbtn.big { min-height: 56px; font-size: 16px; justify-content: center; }
.mail-link { align-self: center; font-size: 13.5px; color: var(--ink-3); }
.mailform { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.dock a.tabs-btn { cursor: pointer; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 18px; border: 0; background: var(--paper-2); color: var(--ink); text-align: left; min-height: 116px; }
.tile:hover, .tile.on { box-shadow: inset 0 0 0 1.5px var(--line); background: var(--sheet); }
.tile b { font-size: 15.5px; }
.tile small { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.subcard { padding: 14px; border-radius: 16px; background: var(--paper-2); display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.subcard .note { margin: 0; }
.sugg { margin-top: 8px; }
.sugg .chip { min-height: 32px; font-size: 13px; padding: 0 12px; }

/* ---------- grand écran : fiches en panneau latéral, palette de commandes ---------- */
@media (min-width: 980px) {
  .scrim.side { align-items: stretch; justify-content: flex-end; padding: 0; background: color-mix(in srgb, var(--scrim) 45%, transparent); }
  .scrim.side .sheet { width: min(520px, 46vw); max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 26px 0 0 26px; animation: sideIn .28s cubic-bezier(.2, .9, .3, 1); }
  .scrim.side .sheet .sh-body { flex: 1; }
}
@keyframes sideIn { from { transform: translateX(48px); opacity: .4; } }
.pal-scrim { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--scrim) 70%, transparent); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .15s ease; }
.pal { width: min(680px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--sheet); border-radius: 22px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); overflow: hidden; animation: palIn .2s cubic-bezier(.2, .9, .3, 1); }
@keyframes palIn { from { transform: translateY(-10px) scale(.985); opacity: 0; } }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.pal-in .ic { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 18px var(--f-ui); }
.pal-in input::placeholder { color: var(--ink-3); }
.pal kbd { font: 600 11.5px var(--f-ui); padding: 2px 7px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); box-shadow: inset 0 -1px 0 var(--line); }
.pal-list { overflow-y: auto; padding: 6px 8px 8px; }
.pal-g { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 12px 10px 4px; }
.pal-it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.pal-it .bub { width: 34px; height: 34px; border-radius: 10px; }
.pal-it .bub .ic { width: 17px; height: 17px; }
.pal-it .g { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pal-it b { font-size: 15px; font-weight: 650; }
.pal-it small { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-it.on { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line); }
.pal-none { padding: 22px 12px; color: var(--ink-3); font-size: 14px; }
.pal-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.pal-foot span { display: inline-flex; gap: 4px; align-items: center; }

/* =====================================================================
   AIDE : tuto pas à pas (projecteur + carte) et « Les mots de Varotra »
   Le projecteur assombrit tout sauf l'élément expliqué ; il ne bloque
   pas les touches : on peut essayer pendant le tuto.
   ===================================================================== */
.tuto-spot { position: fixed; z-index: 45; pointer-events: none; border-radius: 18px; box-shadow: 0 0 0 9999px var(--scrim), 0 0 0 3px var(--st-cash); transition: left .32s cubic-bezier(.2, .8, .3, 1), top .32s cubic-bezier(.2, .8, .3, 1), width .32s cubic-bezier(.2, .8, .3, 1), height .32s cubic-bezier(.2, .8, .3, 1); }
.tuto-spot::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; box-shadow: 0 0 0 3px var(--st-cash); animation: tutoPulse 1.8s ease-out infinite; }
.tuto-spot.full { box-shadow: 0 0 0 9999px var(--scrim); }
.tuto-spot.full::after { display: none; }
@keyframes tutoPulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
.tuto-card { position: fixed; z-index: 46; background: var(--sheet); color: var(--ink); border-radius: 20px; padding: 14px 16px 14px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); transition: left .32s cubic-bezier(.2, .8, .3, 1), top .32s cubic-bezier(.2, .8, .3, 1); animation: rise .26s cubic-bezier(.2, .9, .3, 1); }
.tuto-card.off, .tuto-spot.off { visibility: hidden; }
.tuto-top { display: flex; align-items: center; justify-content: space-between; margin: -4px -8px 2px 0; }
.tuto-n { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-3); letter-spacing: .01em; }
.tuto-n .ic { color: var(--st-cash); }
.tuto-card h3 { font-family: var(--f-display); font-size: 19px; line-height: 1.2; margin: 0 0 6px; }
.tuto-card p { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.tuto-card .tuto-hint { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: var(--info-bg); color: var(--ink); font-size: 13.5px; }
.tuto-act { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.tuto-act.end { justify-content: flex-end; flex-wrap: wrap; }
.tuto-act .btn[disabled] { opacity: .35; }
.tuto-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; min-width: 0; }
.tuto-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line); transition: width .2s ease, background .2s ease; }
.tuto-dots i.on { width: 18px; background: var(--st-cash); }
.tuto-nav { box-shadow: 0 0 0 2px var(--st-cash) !important; border-radius: 12px; }
.dock a.tuto-nav { color: var(--ink); }
.tuto-offer { position: fixed; z-index: 44; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-h) + 14px + env(safe-area-inset-bottom, 0px)); width: min(calc(100vw - 24px), 400px); display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px; background: var(--sheet); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: offerIn .35s ease; }
@keyframes offerIn { from { opacity: 0; } }
.tuto-offer .bub { background: var(--st-cash); }
.tuto-offer b { font-family: var(--f-display); font-size: 16.5px; }
.tuto-offer p { font-size: 14px; color: var(--ink-2); margin: 3px 0 10px; line-height: 1.45; }
.tuto-offer .btnrow { margin: 0 0 6px; }
.tuto-offer .link { font-size: 13px; color: var(--ink-3); }
@media (min-width: 980px) { .tuto-offer { left: auto; right: 28px; transform: none; bottom: 28px; } }
.tuto-btn { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; text-align: left; }
.tuto-btn:hover { background: var(--hover); color: var(--ink); }
.tuto-btn .ic { color: var(--st-cash); }
.tuto-btn .faint { margin-left: auto; font-size: 12px; font-weight: 500; }
.tuto-ico .ic { color: var(--st-cash); }
.top .tuto-ico { width: 36px; height: 36px; }
.top .actbtn { flex: 0 1 auto; min-width: 0; }
@media (max-width: 380px) { .top { gap: 6px; } }
.gl-btn { width: 30px; height: 30px; vertical-align: middle; margin-left: 2px; color: var(--ink-3); }
.cycle-top { flex-wrap: wrap; row-gap: 6px; }
.cycle-top h2 { display: inline-flex; align-items: center; white-space: nowrap; }
.cycle-top .seg { margin-left: auto; }
.node.r .lbl, .node.l .lbl { white-space: normal; width: max-content; max-width: min(112px, 27vw); }
.gloss section + section { margin-top: 18px; }
.gloss h3 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 6px; }
.gloss h3 i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.gl { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.gl:last-child { border-bottom: 0; }
.gl .bub { width: 34px; height: 34px; flex: none; }
.gl .bub .ic { width: 18px; height: 18px; }
.gl b { font-size: 15px; }
.gl p { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.gl .gl-ex { margin-top: 6px; padding: 7px 10px; border-radius: 10px; background: var(--paper-2); color: var(--ink); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =====================================================================
   PAGE D'ACCUEIL PUBLIQUE
   Une idée par section, une image par idée. L'élément fort : la courbe
   de l'argent en tête de page (sorti, rentré, point mort), dessinée une
   fois au chargement. Le reste reste calme : visite guidée en trois
   temps, un exemple à la fois, une seule offre avec choix de durée.
   ===================================================================== */
.wel2 { min-height: 100vh; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); padding-block: 0 28px; display: flex; flex-direction: column; gap: clamp(64px, 10vw, 120px); max-width: 1200px; margin: 0 auto; }
.w2top { display: flex; align-items: center; gap: 8px; padding-block: 14px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); margin-inline: -8px; padding-inline: 8px; }
.w2top .sp { flex: 1; }
.w2nav { display: none; gap: 4px; margin-right: 6px; }
.w2nav a { text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; }
.w2nav a:hover { color: var(--ink); background: var(--hover); }
@media (min-width: 760px) { .w2nav { display: flex; } }

/* tête de page */
.w2hero { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center; margin-top: -24px; }
@media (min-width: 980px) { .w2hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; margin-top: 0; } }
.w2hero h1 { font-size: clamp(46px, 11vw, 64px); font-weight: 800; line-height: .94; letter-spacing: -.055em; max-width: 8em; }
@media (min-width: 980px) { .w2hero h1 { font-size: clamp(64px, 6.2vw, 86px); max-width: 6.6em; } }
.w2hero .lead { font-size: clamp(16.5px, 2vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 31em; margin-top: 22px; }
.w2hero .ctas, .w2end .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.w2hero .ctas .btn, .w2end .ctas .btn { min-height: 54px; padding: 0 26px; font-size: 16px; }
.w2hero-v { position: relative; min-width: 0; }
.w2hero-v::before { content: ""; position: absolute; inset: 8% 4% -6% 10%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--st-cash) 26%, transparent), transparent); filter: blur(30px); opacity: .55; pointer-events: none; }
.hcard { position: relative; background: var(--sheet); border-radius: 28px; padding: 20px 20px 16px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-2); }
.hcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hcard-top b { display: block; font-family: var(--f-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.hcard-top small { display: block; font-size: 12.5px; color: var(--ink-3); }
.hk { text-align: right; }
.hk b { font-family: var(--f-display); font-size: clamp(30px, 6vw, 42px) !important; font-weight: 800 !important; letter-spacing: -.04em !important; line-height: 1; color: var(--st-cash); font-variant-numeric: tabular-nums; }
.hcard-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.hcard-foot i { display: inline-block; width: 12px; height: 3px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.hcard-foot .zone i { height: 10px; width: 10px; border-radius: 3px; }
.hcard-foot .z1 { background: color-mix(in srgb, var(--st-buy) 28%, transparent); }
.hcard-foot .z2 { background: color-mix(in srgb, var(--st-cash) 40%, transparent); }

/* titres de section */
.w2sec { display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 80px; }
.w2h h2 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.w2h p { color: var(--ink-2); font-size: 16.5px; margin-top: 8px; }

/* visite guidée */
.tour { background: var(--sheet); border-radius: 28px; box-shadow: inset 0 0 0 1px var(--line-2); padding: 10px; }
.tt-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tt { display: flex; align-items: center; gap: 10px; padding: 12px 14px 16px; border: 0; background: transparent; border-radius: 18px; text-align: left; position: relative; color: var(--ink-3); min-width: 0; }
.tt .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 14px; background: var(--paper-2); color: var(--ink-2); flex: none; }
.tt b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt[aria-selected="true"] { color: var(--ink); background: var(--sheet-2); }
.tt[aria-selected="true"] .n { background: var(--ink); color: var(--on-ink); }
.tt .bar { position: absolute; left: 14px; right: 14px; bottom: 7px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.tt .bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 3px; }
.tt[aria-selected="true"] .bar i { width: 100%; }
.tt.run .bar i { animation: tourfill 6s linear both; }
@keyframes tourfill { from { width: 0; } to { width: 100%; } }
@media (max-width: 520px) { .tt { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 10px 16px; } .tt b { font-size: 14px; } }
.tp { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); padding: 20px 12px 16px; align-items: center; }
@media (min-width: 860px) { .tp { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; padding: 26px 26px 22px; } }
.tp-t h3 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.tp-t p { margin-top: 10px; color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 30em; }
.tp-v { min-width: 0; display: grid; place-items: center; min-height: 260px; padding: 18px; border-radius: 22px; background: var(--paper); }

/* étape 1 : le menu + */
.mock { width: min(100%, 340px); background: var(--sheet); border-radius: 24px; padding: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 10px; }
.mock-h { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.mverb { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--line-2); min-width: 0; }
.mverb .bub { width: 32px; height: 32px; border-radius: 10px; background: var(--c); }
.mverb .bub .ic { width: 17px; height: 17px; }
.mverb b { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.mverb.lead { background: color-mix(in srgb, var(--c) 12%, var(--sheet)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 40%, transparent); padding: 14px; }
.mverb.lead .bub { width: 40px; height: 40px; border-radius: 12px; }
.mverb.lead b { font-size: 16px; }
.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mtoast { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; }

/* étape 2 : du lait au pot */
.chain { position: relative; display: grid; gap: 14px; width: min(100%, 440px); }
.chain::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 3px; border-radius: 3px; background: linear-gradient(var(--st-buy), var(--st-make), var(--st-stock), var(--st-sell)); }
.cnode { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 0; }
.cnode .bub { width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px var(--paper); }
.cnode small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.cnode b { display: block; font-family: var(--f-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cnode:last-child b { color: var(--good); }

/* étape 3 : décider */
.decide { width: min(100%, 420px); background: var(--sheet); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; }
.dk small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.dk b { display: block; font-family: var(--f-display); font-size: 44px; font-weight: 800; letter-spacing: -.045em; line-height: 1; color: var(--good); font-variant-numeric: tabular-nums; }
.dk span { font-size: 13px; color: var(--ink-2); }
.dbars { display: flex; flex-direction: column; gap: 10px; }
.dbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13.5px; }
.dbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dbar b { font-variant-numeric: tabular-nums; }
.dbar i { grid-column: 1 / -1; display: block; height: 8px; border-radius: 0 4px 4px 0; background: var(--st-sell); }
.dfoot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line-2); }

/* exemples */
.ex { display: flex; flex-direction: column; gap: 14px; }
.ex-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.ex-chips::-webkit-scrollbar { display: none; }
.ex-chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 650; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.ex-chips button .dot { width: 9px; height: 9px; border-radius: 50%; }
.ex-chips button[aria-selected="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.ex-card { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); padding: 20px; border-radius: 26px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); align-items: center; }
@media (min-width: 860px) { .ex-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 28px; padding: 24px 28px; } .ex-card .ex-head, .ex-card .ex-kpis { grid-column: 1; } .ex-card .ex-spark { grid-column: 2; grid-row: 1 / span 2; } .ex-card .btn { grid-column: 3; grid-row: 1 / span 2; } }
.ex-head { display: flex; align-items: center; gap: 12px; }
.ex-head .bub { width: 44px; height: 44px; border-radius: 14px; }
.ex-head b { display: block; font-family: var(--f-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.ex-head small { display: block; font-size: 13px; color: var(--ink-3); }
.ex-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ex-kpis small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-kpis b { display: block; font-family: var(--f-display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-spark small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.ex-spark svg { display: block; }

/* l'offre */
.pcard { width: min(100%, 560px); align-self: center; background: var(--sheet); border-radius: 28px; padding: 22px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-2); display: flex; flex-direction: column; gap: 16px; }
.pc-seg { align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-seg button { justify-content: center; }
.pc-seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.pc-seg button[aria-pressed="true"] small { color: inherit; opacity: .8; }
.pc-seg small { color: var(--good); font-weight: 700; margin-left: 2px; }
.pc-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pc-price b { font-family: var(--f-display); font-size: clamp(54px, 12vw, 72px); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.pc-price span { font-size: 16px; font-weight: 650; color: var(--ink-2); }
.pc-per { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.pc-per b { color: var(--good); }
.pc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.pc-list li { display: flex; gap: 10px; align-items: flex-start; }
.pc-list .ic { color: var(--good); margin-top: 2px; }
.pcard .btn { min-height: 52px; font-size: 16px; }

/* dernier appel */
.w2end { text-align: center; padding: clamp(40px, 7vw, 72px) 20px; border-radius: 32px; background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.w2end::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%; background: radial-gradient(closest-side, color-mix(in srgb, var(--st-cash) 45%, transparent), transparent); opacity: .5; pointer-events: none; }
.w2end h2 { position: relative; font-size: clamp(30px, 5.6vw, 56px); font-weight: 800; letter-spacing: -.045em; line-height: 1; max-width: 13em; margin: 0 auto; }
.w2end .ctas { justify-content: center; position: relative; }
.w2end .btn { background: var(--on-ink); color: var(--ink); }
.w2end .btn-ghost { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--on-ink) 40%, transparent); }

/* connexion dans une feuille */
.auth-scrim .sheet { max-width: 460px; }
.auth-scrim .sh-body { padding: 8px 6px 6px; }
.auth-scrim .authcard { box-shadow: none; padding: 14px 16px 18px; }
.auth-x { position: absolute; top: 10px; right: 10px; z-index: 2; }

/* =====================================================================
   AMBIANCE ET NAVIGATION (v1.7)
   Tana au coucher du soleil, la nuit avec ses lumières : la même image
   que « Tous mes commerces » sur dinamick.com. Elle se fond dans le fond
   de page ; les chiffres restent sur des cartes unies. La nuit, une
   guirlande de petites lampes scintille en haut de l'écran.
   Couleur de la marque : la terre cuite de l'icône Varotra.
   ===================================================================== */
:root { --hero-day: url(../img/tana-jour.webp); --hero-night: url(../img/tana-nuit.webp); --accent: #B8432C; --accent-ink: #FFFFFF; --accent-soft: rgba(184, 67, 44, .10); --hero: var(--hero-day); --veil-top: rgba(238, 241, 236, .05); --veil-mid: rgba(238, 241, 236, .55); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #F08A6E; --accent-ink: #1A0D08; --accent-soft: rgba(240, 138, 110, .14); --hero: var(--hero-night); --veil-top: rgba(14, 21, 18, .0); --veil-mid: rgba(14, 21, 18, .5); }
}
:root[data-theme="dark"] { --accent: #F08A6E; --accent-ink: #1A0D08; --accent-soft: rgba(240, 138, 110, .14); --hero: var(--hero-night); --veil-top: rgba(14, 21, 18, .0); --veil-mid: rgba(14, 21, 18, .5); }

.shell { position: relative; }
.amb { position: absolute; left: 0; right: 0; top: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.amb-tana { height: 460px; }
.amb-tana .photo { position: absolute; inset: 0; background: var(--hero) 62% 36% / cover no-repeat;
  -webkit-mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .9) 38%, rgba(0, 0, 0, .4) 70%, transparent 100%); mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .9) 38%, rgba(0, 0, 0, .4) 70%, transparent 100%); }
.amb-tana .veil { position: absolute; inset: 0; background: linear-gradient(180deg, var(--veil-top) 0%, var(--veil-mid) 62%, var(--paper) 100%); }
.body { position: relative; z-index: 1; }
.main { position: relative; z-index: 1; }

/* la guirlande : seulement la nuit */
.lights { position: absolute; left: 0; right: 0; top: -4px; height: 52px; display: none; }
.lights i { position: absolute; inset: 0; background-repeat: repeat-x; background-size: 240px 52px; background-position: 12px 0; }
.lights .wire { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='52' viewBox='0 0 240 52'%3E%3Cpath d='M0 6 Q120 46 240 6' fill='none' stroke='%233b3a36' stroke-width='1.6'/%3E%3Crect x='28.0' y='13.8' width='4' height='5' rx='1' fill='%234a4842'/%3E%3Crect x='73.0' y='22.2' width='4' height='5' rx='1' fill='%234a4842'/%3E%3Crect x='118.0' y='25.0' width='4' height='5' rx='1' fill='%234a4842'/%3E%3Crect x='163.0' y='22.2' width='4' height='5' rx='1' fill='%234a4842'/%3E%3Crect x='208.0' y='13.8' width='4' height='5' rx='1' fill='%234a4842'/%3E%3Ccircle cx='30.0' cy='22.8' r='4.4' fill='%23FFE7B0'/%3E%3Ccircle cx='29.0' cy='21.8' r='2' fill='%23FFF8E6'/%3E%3Ccircle cx='75.0' cy='31.2' r='4.4' fill='%23FFE7B0'/%3E%3Ccircle cx='74.0' cy='30.2' r='2' fill='%23FFF8E6'/%3E%3Ccircle cx='120.0' cy='34.0' r='4.4' fill='%23FFE7B0'/%3E%3Ccircle cx='119.0' cy='33.0' r='2' fill='%23FFF8E6'/%3E%3Ccircle cx='165.0' cy='31.2' r='4.4' fill='%23FFE7B0'/%3E%3Ccircle cx='164.0' cy='30.2' r='2' fill='%23FFF8E6'/%3E%3Ccircle cx='210.0' cy='22.8' r='4.4' fill='%23FFE7B0'/%3E%3Ccircle cx='209.0' cy='21.8' r='2' fill='%23FFF8E6'/%3E%3C/svg%3E"); }
.lights .g1 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='52' viewBox='0 0 240 52'%3E%3Cdefs%3E%3CradialGradient id='a'%3E%3Cstop offset='0' stop-color='%23FFD27A' stop-opacity='.95'/%3E%3Cstop offset='.3' stop-color='%23FFB547' stop-opacity='.5'/%3E%3Cstop offset='1' stop-color='%23FF9F2E' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='30.0' cy='22.8' r='17' fill='url(%23a)'/%3E%3Ccircle cx='120.0' cy='34.0' r='17' fill='url(%23a)'/%3E%3Ccircle cx='210.0' cy='22.8' r='17' fill='url(%23a)'/%3E%3C/svg%3E"); animation: twinkle 4.2s ease-in-out infinite; }
.lights .g2 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='52' viewBox='0 0 240 52'%3E%3Cdefs%3E%3CradialGradient id='a'%3E%3Cstop offset='0' stop-color='%23FFD27A' stop-opacity='.95'/%3E%3Cstop offset='.3' stop-color='%23FFB547' stop-opacity='.5'/%3E%3Cstop offset='1' stop-color='%23FF9F2E' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='75.0' cy='31.2' r='17' fill='url(%23a)'/%3E%3Ccircle cx='165.0' cy='31.2' r='17' fill='url(%23a)'/%3E%3C/svg%3E"); animation: twinkle 4.2s ease-in-out -2.1s infinite; }
@keyframes twinkle { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lights { display: block; } }
:root[data-theme="dark"] .lights { display: block; }

/* l'en-tête (téléphone) laisse voir l'image tant qu'on est en haut */
html[data-amb="tana"]:not(.scrolled) .top { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-amb="tana"] .top .sync, html[data-amb="tana"] .top .tuto-ico { background: color-mix(in srgb, var(--sheet) 88%, transparent); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .35); }
html[data-amb="tana"] .main { padding-top: 96px; }
html[data-amb="tana"] .main > .vhead h1 { text-shadow: 0 1px 18px color-mix(in srgb, var(--paper) 70%, transparent); }

/* ---------- navigation : sobre, une seule couleur pour ce qui est choisi ---------- */
.nav-ic { display: grid; place-items: center; }
.dock { background: color-mix(in srgb, var(--sheet) 90%, transparent); }
.dock a .nav-ic { width: 46px; height: 30px; border-radius: 999px; transition: background .25s ease, color .25s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.dock a[aria-current="page"] { color: var(--ink); }
.dock a[aria-current="page"] .nav-ic { background: var(--accent-soft); color: var(--accent); transform: translateY(-2px); }
.dock a[aria-current="page"] span::after { content: none; }
.plus:active { transform: scale(.94); }

@media (min-width: 980px) {
  .shell { grid-template-columns: 276px minmax(0, 1fr); }
  /* le rail flotte, en verre dépoli, au-dessus de l'image */
  .rail { position: sticky; z-index: 2; top: 12px; height: calc(100vh - 24px); height: calc(100dvh - 24px); margin: 12px 0 12px 12px; padding: 14px 12px 14px; border-right: 0; border-radius: 26px;
    background: color-mix(in srgb, var(--sheet) 74%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.25); backdrop-filter: blur(22px) saturate(1.25);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), 0 24px 60px -36px rgba(0, 0, 0, .55); }
  .rail .actbtn { background: color-mix(in srgb, var(--sheet) 92%, transparent); }
  .rail nav { gap: 2px; }
  /* toutes les pages ont le même poids : une liste calme, dans l'ordre du cercle de l'argent */
  .rail { gap: 10px; }
  .rail nav a { min-height: 40px; gap: 12px; padding: 0 10px; border-radius: 12px; color: var(--ink-2); font-size: 14.5px; }
  .rail nav a .nav-ic { width: 28px; height: 28px; border-radius: 9px; color: var(--ink-3); transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
  .rail nav a .nav-ic .ic { width: 18px; height: 18px; }
  .rail nav a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
  .rail nav a[aria-current="page"] { background: var(--sheet); color: var(--ink); box-shadow: 0 8px 18px -14px rgba(0, 0, 0, .45); }
  .rail nav a[aria-current="page"] .nav-ic { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
  .rail nav .sep { display: block; height: 1px; background: var(--line-2); margin: 8px 10px; }
  .rail .ncap { display: block; margin: 12px 10px 4px; font: 700 10.5px var(--f-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
  /* le cercle de l'argent : un fil relie ses pages, de la caisse au comptoir */
  .rail .ncycle { position: relative; display: flex; flex-direction: column; gap: 2px; }
  .rail .ncycle::before { content: ""; position: absolute; left: 23.5px; top: 20px; bottom: 20px; width: 1.5px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
  .rail .ncycle a .nav-ic { position: relative; background: var(--sheet); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 11%, transparent); }
  .rail .ncycle a[aria-current="page"] .nav-ic { background: var(--accent); box-shadow: none; }
  .rail nav a.nsetup { margin-bottom: 4px; background: var(--accent-soft); color: var(--ink); }
  .rail nav a.nsetup .nav-ic { background: var(--accent); color: var(--accent-ink); }
  .npill { margin-left: auto; font: 700 11.5px var(--f-ui); padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--sheet)); color: var(--accent); }
  /* le bouton + : l'action de la page, avec son nom ; puis la recherche, discrète */
  .rail .nsearch { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--sheet) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink-3); font: 600 13.5px var(--f-ui); cursor: pointer; }
  .rail .nsearch:hover { color: var(--ink); }
  .rail .nsearch .nav-ic .ic { width: 17px; height: 17px; }
  .rail .nsearch kbd { margin-left: auto; font: 600 11px var(--f-ui); padding: 2px 7px; border-radius: 6px; background: var(--paper-2); color: var(--ink-3); }
}

/* chaque icône a son geste, quand on ouvre sa page ou qu'on la survole */
[data-nav][aria-current="page"] .nav-ic .ic, .rail nav a:hover .nav-ic .ic { animation-duration: .6s; animation-timing-function: cubic-bezier(.3, 1.5, .5, 1); }
[data-nav="pouls"][aria-current="page"] .ic, .rail nav a[data-nav="pouls"]:hover .ic { animation-name: icBeat; }
[data-nav="stock"][aria-current="page"] .ic, .rail nav a[data-nav="stock"]:hover .ic, [data-nav="admin"][aria-current="page"] .ic, .rail nav a[data-nav="admin"]:hover .ic { animation-name: icHop; }
[data-nav="journal"][aria-current="page"] .ic, .rail nav a[data-nav="journal"]:hover .ic { animation-name: icSlide; }
[data-nav="analyse"][aria-current="page"] .ic, .rail nav a[data-nav="analyse"]:hover .ic { animation-name: icGrow; transform-origin: 50% 85%; }
[data-nav="clients"][aria-current="page"] .ic, .rail nav a[data-nav="clients"]:hover .ic { animation-name: icBob; }
[data-nav="caisse"][aria-current="page"] .ic, .rail nav a[data-nav="caisse"]:hover .ic { animation-name: icShake; }
[data-nav="campagnes"][aria-current="page"] .ic, .rail nav a[data-nav="campagnes"]:hover .ic { animation-name: icWave; transform-origin: 20% 90%; }
[data-nav="comptoir"][aria-current="page"] .ic, .rail nav a[data-nav="comptoir"]:hover .ic, [data-nav="fab"][aria-current="page"] .ic, .rail nav a[data-nav="fab"]:hover .ic { animation-name: icHop; }
[data-nav="depart"][aria-current="page"] .ic, .rail nav a[data-nav="depart"]:hover .ic { animation-name: icSlide; }
[data-nav="reglages"][aria-current="page"] .ic, .rail nav a[data-nav="reglages"]:hover .ic { animation-name: icSpin; }
@keyframes icBeat { 0% { transform: scale(1); } 30% { transform: scale(1.25); } 55% { transform: scale(.92); } 100% { transform: scale(1); } }
@keyframes icHop { 0% { transform: translateY(0); } 35% { transform: translateY(-5px) scale(1.05, .95); } 65% { transform: translateY(1px) scale(.96, 1.04); } 100% { transform: none; } }
@keyframes icSlide { 0% { transform: translateX(-4px); opacity: .4; } 100% { transform: none; opacity: 1; } }
@keyframes icGrow { 0% { transform: scaleY(.35); } 100% { transform: none; } }
@keyframes icBob { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-10deg); } 65% { transform: rotate(7deg); } }
@keyframes icShake { 0%, 100% { transform: none; } 25% { transform: translateX(-2px) rotate(-6deg); } 50% { transform: translateX(2px) rotate(5deg); } 75% { transform: translateX(-1px); } }
@keyframes icWave { 0%, 100% { transform: none; } 30% { transform: skewY(-9deg); } 65% { transform: skewY(6deg); } }
@keyframes icSpin { 0% { transform: rotate(-60deg); } 100% { transform: rotate(0); } }

/* ---------- l'éventail (téléphone) : toutes les pages en demi-cercle au-dessus du dock ----------
   « Plus » l'ouvre ; un appui long sur le dock l'ouvre aussi, et l'on glisse jusqu'à la page voulue. */
.fan, .fan * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.fan { position: fixed; inset: 0; z-index: 60; touch-action: none; background: radial-gradient(130% 70% at 50% 100%, rgba(6, 10, 14, .82), rgba(6, 10, 14, .45) 70%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fanIn .2s ease-out; }
@keyframes fanIn { from { opacity: 0; } to { opacity: 1; } }
.fan-it { position: absolute; left: var(--x); top: var(--y); width: 62px; height: 62px; margin: -31px 0 0 -31px; border: 0; padding: 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-2); background: var(--sheet); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), 0 10px 24px -10px rgba(0, 0, 0, .8); font: 650 9px var(--f-ui); letter-spacing: -.01em; animation: fanOut .42s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 22ms); transition: transform .14s ease, background .14s ease, color .14s ease; }
.fan-it .ic { width: 21px; height: 21px; }
.fan-it.cur { box-shadow: inset 0 0 0 2px var(--accent), 0 10px 24px -10px rgba(0, 0, 0, .8); color: var(--ink); }
.fan-it.on { transform: scale(1.38); background: var(--accent); color: var(--accent-ink); z-index: 2; }
@keyframes fanOut { from { left: 50%; top: var(--cy); transform: scale(.3); opacity: 0; } to { opacity: 1; } }
.fan-lbl { position: absolute; left: 50%; transform: translate(-50%, -50%); font: 700 20px var(--f-display); letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); white-space: nowrap; pointer-events: none; }
.fan-hint { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12.5px; color: rgba(255, 255, 255, .7); white-space: nowrap; pointer-events: none; }
.fan-help { position: absolute; left: 50%; top: max(18px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; gap: 8px; }
.fan-help .btn { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.dock nav { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Réglages : choisir son ambiance */
.ambpick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ambopt { display: flex; flex-direction: column; gap: 4px; padding: 0 0 12px; border: 0; border-radius: 16px; overflow: hidden; background: var(--sheet-2); box-shadow: inset 0 0 0 1.5px var(--line-2); text-align: left; color: inherit; }
.ambopt b { padding: 0 12px; font-size: 14.5px; }
.ambopt small { padding: 0 12px; font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.ambopt[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.ambopt .sw { display: block; height: 70px; margin-bottom: 6px; }
.sw-tana { background: linear-gradient(180deg, transparent 40%, var(--sheet-2)), var(--hero) 62% 40% / cover no-repeat; }
.sw-sobre { background: linear-gradient(180deg, var(--paper), var(--paper-2)); }

@media (prefers-reduced-motion: reduce) {
  .lights .g1, .lights .g2 { animation: none; opacity: .85; }
  [data-nav] .ic { animation: none !important; }
  .dock a .nav-ic, .rail nav a.ntile::before { transition: none; }
  .fan, .fan-it { animation: none; }
}

/* moins de couleurs autour des chiffres : la marque, et rien d'autre, pour ce qui est choisi */
.drawer > summary .bub { background: var(--paper-2) !important; color: var(--ink-2); transition: background .2s ease, color .2s ease; }
.drawer[open] > summary .bub { background: var(--accent) !important; color: var(--accent-ink); }
.lens-modes button[aria-pressed="true"] .li { background: var(--accent); color: var(--accent-ink); }
.ccard[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }

/* Administration : l'image de fond, jour et nuit */
.bgslots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bgslot { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bgprev { aspect-ratio: 16 / 9; border-radius: 14px; background-size: cover; background-position: 62% 36%; box-shadow: inset 0 0 0 1px var(--line-2); }
.bgslot b { font-size: 15px; }
.bgslot small { color: var(--ink-3); font-size: 12.5px; }
.bgslot .btnrow { gap: 6px; }
@media (max-width: 560px) { .bgslots { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   v1.8 : LA MISE EN ROUTE, LE QUOTIDIEN, LE BOUTON + DE CHAQUE PAGE
   ===================================================================== */
/* le bouton + du téléphone dit ce qu'il fait, sous lui, comme les autres onglets */
.dock .plus { display: flex; flex-direction: column; align-items: center; gap: 5px; width: auto; height: auto; margin-top: -30px; background: none; border-radius: 0; color: var(--ink-2); font: 600 11.5px var(--f-ui); }
.dock .plus::before { content: none; }
.dock .plus .pl { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(from -90deg, var(--st-cash), var(--st-buy), var(--st-make), var(--st-stock), var(--st-sell), var(--st-cash)); box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .55); }
.dock .plus .pl::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink); }
.dock .plus .pl .ic { position: relative; width: 28px; height: 28px; stroke: var(--on-ink); stroke-width: 2.4; }
.dock .plus .nav-t { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.dock .plus:active .pl { transform: scale(.94); }
.dock .plus:hover { transform: none; }

/* le dernier rang d'une liste : le seul endroit où l'on ajoute ce qu'elle contient */
.addrow { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; margin-top: 6px; padding: 0 12px; border: 1.5px dashed color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 14px; background: transparent; color: var(--ink-2); font: 600 14px var(--f-ui); cursor: pointer; }
.addrow:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.accs .acc-add { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; border: 1.5px dashed color-mix(in srgb, var(--ink) 16%, transparent); background: transparent; box-shadow: none; color: var(--ink-2); font: 600 14px var(--f-ui); }
.accs .acc-add:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* les feuilles de choix (Mouvement d'argent, Achat) : de courts groupes */
.vcap { margin: 4px 2px 8px; font: 700 11px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.vcap ~ .verbs { margin-bottom: 14px; }

/* le comptoir : les articles en tuiles, les plus vendus d'abord */
.ctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ctile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 104px; padding: 14px 14px 12px; border: 0; border-radius: 18px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 24px -20px rgba(0, 0, 0, .5); color: var(--ink); text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; }
.ctile b { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ctile .pr { margin-top: auto; font: 700 16px var(--f-display); letter-spacing: -.01em; }
.ctile small { color: var(--ink-3); font-size: 12.5px; }
.ctile:hover { box-shadow: inset 0 0 0 1.5px var(--accent), 0 14px 28px -20px rgba(0, 0, 0, .55); }
.ctile:active { transform: scale(.97); }
.ctile.out { opacity: .55; }
@media (max-width: 420px) { .ctiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* la mise en route : un chemin, une étape après l'autre */
.swrap { max-width: 860px; }
.sbar { display: flex; align-items: center; gap: 12px; margin: 14px 0 16px; }
.sbar .meter { flex: 1; }
.sbar span { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.sbar b { font: 700 17px var(--f-display); color: var(--ink); }
.setup { position: relative; list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.setup::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.sstep { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px; padding: 14px 16px 14px 0; border-radius: 20px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); }
.snum { position: relative; justify-self: center; display: grid; place-items: center; width: 32px; height: 32px; margin-top: 1px; border-radius: 50%; background: var(--paper-2); color: var(--ink-2); font: 700 14px var(--f-ui); box-shadow: 0 0 0 5px var(--sheet); }
.sstep.done .snum { background: var(--good, #1F8A5B); color: #fff; }
.sstep.cur { box-shadow: inset 0 0 0 2px var(--accent), 0 18px 40px -28px rgba(0, 0, 0, .55); }
.sstep.cur .snum { background: var(--accent); color: var(--accent-ink); }
.sstep.todo { opacity: .78; }
.shead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sbody h3 { margin: 4px 0 2px; font-size: 16.5px; }
.sbody p { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }
.sbody .ssum { color: var(--ink); font-weight: 600; }
.sbody .btnrow { margin-top: 2px; gap: 8px; }
.sbody .btnrow .btn { flex: 0 0 auto; }
.sstep.done .sbody p:not(.ssum) { display: none; }
.sfinish { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sfinish h2 { margin: 0 0 4px; }
.sfinish p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 60ch; }
.sfinish.ready { box-shadow: inset 0 0 0 2px var(--accent); }
.starter .meter { margin-top: 10px; }

/* Réglages : le nom de chaque page */
.sh3 { margin: 18px 0 6px; font-size: 15px; }
.pnames { display: flex; flex-direction: column; gap: 8px; }
.pname { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; }
.pname .bub { width: 36px; height: 36px; }

/* l'éventail : dehors le cercle de l'argent, dedans l'accueil et le suivi */
.fan-it.in { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 10px; }
.fan-it.in .ic { width: 18px; height: 18px; }
.fan-cap { position: absolute; left: 50%; transform: translateX(-50%); font: 700 11px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .62); white-space: nowrap; pointer-events: none; }
/* téléphone : les comptes deux par deux, le montant reste lisible */
@media (max-width: 560px) {
  .accs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .accs .acc b { font-size: 21px; }
  .accs .acc-add { min-height: 84px; }
}
/* le nom du + peut tenir sur deux lignes, jamais coupé */
/* accueil public : un bouton + par page */
.mrow { gap: 10px; }
.mrow b { flex: 1; }
.mrow .mplus { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px 5px 7px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font: 650 12px var(--f-ui); white-space: nowrap; }
.mrow .mplus .ic { width: 13px; height: 13px; stroke: var(--on-ink); }
/* l'éventail passe devant une notification en cours */
.fan { z-index: 75; }
/* v1.9 : le + n'existe que sur les pages qui créent ; ailleurs sa place reste, vide, pour que le rail ne saute pas */
.dock nav.noplus { grid-template-columns: repeat(4, 1fr); }

/* =====================================================================
   v1.9 : UNE PAGE, UN USAGE
   ===================================================================== */
/* Produits : une carte par article ; ce qui rapporte le plus d'abord ; toucher ouvre sa fiche */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pcard { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 128px; padding: 14px 14px 12px; border: 0; border-radius: 18px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 24px -20px rgba(0, 0, 0, .5); color: var(--ink); text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; }
.pcard:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent), 0 14px 28px -20px rgba(0, 0, 0, .55); }
.pcard:active { transform: scale(.98); }
.pcard .ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pcard .ph b { font-size: 15px; line-height: 1.25; }
.pcard .pp { font: 700 18px var(--f-display); letter-spacing: -.01em; }
.pcard .pf { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pcard .pf small { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.mbars { flex: 0 0 auto; }
@media (max-width: 560px) { .pcards { grid-template-columns: 1fr; } .pcard { min-height: 0; } }
.pcards + .addrow { margin-top: 10px; }

/* les fiches : trois chiffres, un graphique, puis le détail */
.ifigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ifigs > div { padding: 10px 12px; border-radius: 14px; background: var(--paper-2); }
.ifigs small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.ifigs b { display: block; font: 700 20px var(--f-display); letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ifigs b.neg { color: var(--bad); }
.ifigs span { color: var(--ink-3); font-size: 12px; }
.wchart { display: block; width: 100%; height: 130px; margin-top: 6px; }
.wchart .wl { font: 600 10px var(--f-ui); fill: var(--ink-3); }
.wchart .wv { font: 700 11px var(--f-ui); fill: var(--ink); }
.accline { margin-top: 6px; }

/* Accueil : rien à faire, c'est dit calmement */
.todo-panel.calm .note { display: flex; align-items: center; gap: 8px; margin: 0; }


/* =====================================================================
   v2.0 : LA VITRINE — un en-tête par page, des cartes, pas de vide
   ===================================================================== */
/* l'en-tête de page : titre et phrase ; à droite, les gestes et le + (ordinateur) ; dessous, ses chiffres */
.phead { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "pt pa" "pf pf"; gap: 14px 18px; align-items: end; }
.phead .pt { grid-area: pt; min-width: 0; }
.phead h1 { font-size: 30px; letter-spacing: -.02em; }
.phead .pt p { color: var(--ink-2); margin-top: 4px; font-size: 14.5px; max-width: 72ch; }
.phead .pa { grid-area: pa; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.phead .pfigs { grid-area: pf; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; max-width: 920px; }
.pfig { padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--sheet) 80%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), 0 12px 26px -22px rgba(0, 0, 0, .5); min-width: 0; }
.pfig small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfig b { display: block; font: 700 21px var(--f-display); letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfig span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfig.good b { color: var(--good); }
.pfig.warn b { color: var(--warn); }
.pfig.bad b { color: var(--bad); }
html[data-amb="tana"] .main > .phead h1, html[data-amb="tana"] .main > .phead .pt p { text-shadow: 0 1px 16px color-mix(in srgb, var(--paper) 80%, transparent); }
.ic-s.inl { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
/* le + de la page (ordinateur) : le geste de la page, à côté de ce qu'il crée */
.pplus { display: none; }
@media (min-width: 980px) {
  .phead h1 { font-size: 34px; }
  .pplus { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 10px 0 6px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink); font: 650 14.5px var(--f-ui); cursor: pointer; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7); transition: transform .15s ease; }
  .pplus > .ic { width: 34px; height: 34px; padding: 8px; border-radius: 50%; box-sizing: border-box; stroke-width: 2.4; background: radial-gradient(circle, var(--ink) 58%, transparent 60%), conic-gradient(from -90deg, var(--st-cash), var(--st-buy), var(--st-make), var(--st-stock), var(--st-sell), var(--st-cash)); }
  .pplus kbd { font: 600 11px var(--f-ui); padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
  .pplus:hover { transform: translateY(-1px); }
  .pplus:active { transform: scale(.97); }
  html[data-amb="tana"] .main { padding-top: 118px; }
}
@media (max-width: 979px) {
  .phead { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pt" "pa" "pf"; gap: 10px; }
  .phead .pa { justify-content: flex-start; }
  .phead .pa:empty { display: none; }
  .phead .pfigs { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
  .phead .pfigs::-webkit-scrollbar { display: none; }
  .pfig { flex: 0 0 auto; min-width: 150px; }
}
/* la campagne où vont les achats : un petit badge qui mène à sa fiche */
.campchip { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; padding: 3px 10px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--sheet)); color: var(--ink); font: 600 13px var(--f-ui); cursor: pointer; vertical-align: 1px; }
.campchip .ic { width: 13px; height: 13px; color: var(--accent); }
.actbtn small .ic { width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; color: var(--accent); }

/* les listes deviennent des cartes : chacune a sa place, rien ne s'étire d'un bord à l'autre */
.panel.bare { background: transparent; box-shadow: none; padding: 0; }
.rows.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.rows.cardgrid .row { background: var(--sheet); border-radius: 18px; padding: 14px 14px; min-height: 76px; box-shadow: inset 0 0 0 1px var(--line-2), 0 12px 26px -24px rgba(0, 0, 0, .55); transition: box-shadow .2s ease, transform .15s ease; }
.rows.cardgrid .row + .row::before { content: none; }
.rows.cardgrid .row:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent), 0 14px 28px -22px rgba(0, 0, 0, .55); }
.rows.cardgrid .row:active { transform: scale(.985); }
.panel.bare > .addrow, .panel.bare .rows + .addrow { margin-top: 10px; }
.lead-note { margin: 0 0 10px; }
.sechead { margin: 26px 2px 12px; }
.sechead h2 { font-size: 19px; }
.sechead p { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }

/* comptes : le solde des 30 derniers jours, en un trait */
.acc { min-height: 132px; }
.acc .aspark { display: block; margin-top: auto; height: 34px; opacity: .9; }
.acc .aspark svg { display: block; }
.acc .aspark.empty { height: auto; font-size: 12.5px; color: var(--ink-3); }
.accs .acc-add { background: color-mix(in srgb, var(--sheet) 72%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink); align-items: center; justify-content: center; text-align: center; }
.accs .acc-add .ic { width: 22px; height: 22px; }

/* Analyse : « Nouvelle campagne » au bout des campagnes */
.ccard-new { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 16%, transparent); box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--ink) 18%, transparent); }
.ccard-new .cplus { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); grid-row: 1; }
.ccard-new .cplus .ic { width: 13px; height: 13px; }

/* Accueil : « À faire » prend la hauteur du cercle ; ce qui reste dit calmement que tout est à jour */
.todo-panel { display: flex; flex-direction: column; }
.todo-foot { margin-top: auto; padding: 18px 12px 4px; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13.5px; }
.todo-foot .ic { color: var(--good); }
.todo-panel.calm { justify-content: flex-start; }
.todo-panel.calm .calm-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 28px 12px; color: var(--ink-2); }
.todo-panel.calm .calm-mid .ok { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--good) 14%, var(--sheet)); color: var(--good); }
.todo-panel.calm .calm-mid .ok .ic { width: 26px; height: 26px; }

/* la zone principale ne doit pas étirer ce qui est fait pour être compact */
.main > .seg { align-self: flex-start; }
.main > .phead + .seg { margin-top: 4px; }
/* les gestes secondaires de l'en-tête, lisibles sur l'image */
.phead .pa .btn-ghost { background: color-mix(in srgb, var(--sheet) 78%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }

/* les articles (matières) en cartes : nom et quantité en haut, coût dessous */
.items.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.items.cardgrid .item { background: var(--sheet); border-radius: 18px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line-2), 0 12px 26px -24px rgba(0, 0, 0, .55); align-content: start; }
.items.cardgrid .item + .item::before { content: none; }
.items.cardgrid .item:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent), 0 14px 28px -22px rgba(0, 0, 0, .55); }
.items.cardgrid .item .meta, .items.cardgrid .item .side { font-size: 12.5px; }
.panel.bare > .sechead:first-child { margin-top: 0; }

/* Produits : la carte respire ; stock et ventes à gauche, les 8 semaines à droite */
.pcard .pf small { max-width: 60%; }
.pcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* Accueil sur grand écran : le cercle en grand, ses étapes à côté ; « À faire » en cartes dessous */
.cs-list { display: none; }
@media (min-width: 1100px) {
  .pulse { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .cycle-card.wide { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "top top" "ring cap" "ring list"; gap: 6px 34px; padding: 18px 26px 22px 18px; align-items: start; }
  .cycle-card.wide .cycle-top { grid-area: top; }
  .cycle-card.wide .cycle { grid-area: ring; max-width: 420px; align-self: center; }
  .cycle-card.wide .node .lbl { display: none; }
  .cycle-card.wide .cycle-cap { grid-area: cap; text-align: left; margin: 26px 0 8px; padding: 0; max-width: none; font-size: 18px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
  .cycle-card.wide .cycle-cap b { color: var(--ink); }
  .cs-list { grid-area: list; display: flex; flex-direction: column; gap: 2px; }
  .cs-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; width: 100%; cursor: pointer; }
  .cs-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
  .cs-row + .cs-row { box-shadow: inset 0 1px 0 var(--line-2); }
  .cs-row .bub { width: 34px; height: 34px; border-radius: 11px; color: #fff; }
  .cs-row .bub .ic { width: 17px; height: 17px; }
  .cs-row .g { flex: 1; min-width: 0; }
  .cs-row .g b { display: block; font-size: 15px; font-weight: 650; }
  .cs-row .g small { display: block; font-size: 12.5px; color: var(--ink-3); }
  .cs-row .v { font: 700 17px var(--f-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* À faire : une rangée de cartes */
  .todo-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; background: transparent; box-shadow: none; padding: 0; }
  .todo-panel > .panel-h { grid-column: 1 / -1; margin: 6px 2px 0; }
  .todo-panel > .panel-h h2 { font-size: 19px; }
  .todo-panel .todo { margin: 0; padding: 14px; border-radius: 18px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2), 0 12px 26px -24px rgba(0, 0, 0, .55); min-height: 84px; }
  .todo-panel .todo:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent), 0 14px 28px -22px rgba(0, 0, 0, .55); }
  .todo-panel > .link, .todo-panel > .todo-foot { grid-column: 1 / -1; }
  .todo-panel > .todo-foot { padding: 0 4px; }
  .todo-panel.calm { display: block; }
  .todo-panel.calm .calm-mid { flex-direction: row; justify-content: flex-start; text-align: left; padding: 16px 18px; border-radius: 18px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-2); gap: 14px; }
  .todo-panel.calm .calm-mid .ok { width: 42px; height: 42px; flex: none; }
  .todo-panel.calm .calm-mid small { display: block; }
  .starter { max-width: none; }
}
/* Caisse : la courbe de la caisse, tous comptes ensemble */
.treso .tchart { display: block; width: 100%; height: 200px; margin-top: 8px; }
.treso .tlegend { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.treso .tlegend b { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .treso .tchart { height: 150px; } .treso .tlegend span:nth-child(2), .treso .tlegend span:nth-child(3) { flex-basis: 100%; order: 3; } }
/* les cartes laissent leur petite ligne passer à la ligne plutôt que de la couper */
.rows.cardgrid .row .g small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
