/* ═════════════════════════════════════════════════════════════════════════
   Registre des placements — design system
   Papier chaud, encre ardoise, accent cuivre. Chiffres en tabulaire.
   ═════════════════════════════════════════════════════════════════════════ */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #F4F2ED;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --surface-3: #F1EDE5;
  --border: #E5E0D5;
  --border-strong: #D3CBBB;
  --text: #17222D;
  --text-2: #55616C;
  --text-3: #8B9299;
  --accent: #A8763E;
  --accent-strong: #8A5F2E;
  --accent-weak: #F4EADB;
  --pos: #3C7558; --pos-weak: #E4EFE8;
  --neg: #AE4A41; --neg-weak: #F7E5E2;
  --warn: #A86F1A; --warn-weak: #FAEFD9;
  --info: #3B6687; --info-weak: #E4EDF4;
  --sidebar: #16212C; --sidebar-text: #B9C4CD; --sidebar-muted: #6E7E8B; --sidebar-hover: #1F2D3A; --sidebar-active: #263646;
  --shadow-sm: 0 1px 2px rgba(23,34,45,.05);
  --shadow: 0 1px 2px rgba(23,34,45,.04), 0 4px 16px rgba(23,34,45,.06);
  --shadow-lg: 0 12px 40px rgba(23,34,45,.18);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E151C; --surface: #151F29; --surface-2: #1A2531; --surface-3: #202D3A;
    --border: #253340; --border-strong: #33444F;
    --text: #E6EBEF; --text-2: #A2AEB8; --text-3: #6F7D88;
    --accent: #D3A167; --accent-strong: #E4BC88; --accent-weak: #2E2416;
    --pos: #6DB58E; --pos-weak: #15291F; --neg: #E07B70; --neg-weak: #2D1816;
    --warn: #E0A84E; --warn-weak: #2C2212; --info: #79A9CF; --info-weak: #14222E;
    --sidebar: #0A1016; --sidebar-hover: #131C25; --sidebar-active: #1A2633;
    --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E151C; --surface: #151F29; --surface-2: #1A2531; --surface-3: #202D3A;
  --border: #253340; --border-strong: #33444F;
  --text: #E6EBEF; --text-2: #A2AEB8; --text-3: #6F7D88;
  --accent: #D3A167; --accent-strong: #E4BC88; --accent-weak: #2E2416;
  --pos: #6DB58E; --pos-weak: #15291F; --neg: #E07B70; --neg-weak: #2D1816;
  --warn: #E0A84E; --warn-weak: #2C2212; --info: #79A9CF; --info-weak: #14222E;
  --sidebar: #0A1016; --sidebar-hover: #131C25; --sidebar-active: #1A2633;
  --shadow-sm: none; --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, .tab { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
svg[viewBox="0 0 24 24"] { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--sidebar); color: var(--sidebar-text); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 20px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: #223241; color: #C8935A; display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; stroke: none; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 17px; color: #F3F0EA; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--sidebar-muted); letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px;
  color: var(--sidebar-text); text-decoration: none; font-weight: 500; font-size: 13.5px;
}
.nav a svg { width: 18px; height: 18px; opacity: .75; flex: none; }
.nav a:hover { background: var(--sidebar-hover); color: #fff; }
.nav a[aria-current="page"] { background: var(--sidebar-active); color: #fff; }
.nav a[aria-current="page"] svg { opacity: 1; color: #D3A167; }
.nav .badge { margin-left: auto; background: #3A2B17; color: #E8B76E; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; }
.nav-sep { height: 1px; background: #223140; margin: 10px 6px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.fresh { background: #1C2935; border-radius: 9px; padding: 11px 12px; font-size: 12px; line-height: 1.4; }
.fresh .lbl { color: var(--sidebar-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.fresh b { color: #EEF1F3; font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: #6DB58E; } .dot.warn { background: #E0A84E; } .dot.bad { background: #E07B70; }
.theme-toggle { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--sidebar-muted); padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.theme-toggle:hover { background: var(--sidebar-hover); color: #fff; }
.theme-toggle svg { width: 17px; height: 17px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-moon { display: block; } :root[data-theme="dark"] .i-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-moon { display: block; } :root:not([data-theme="light"]) .i-sun { display: none; } }

.main { min-width: 0; padding: 0 28px 48px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 24px 0 16px; }
.topbar h1 { font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
.topbar p { margin: 4px 0 0; font-size: 13px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; height: 38px; width: 320px; box-shadow: var(--shadow-sm); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.search svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 13.5px; }
.search kbd { font: 11px var(--font); color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.filterbar {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 0 12px; background: var(--bg); border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--text-2);
  white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip svg { width: 14px; height: 14px; }
.chip.on { background: var(--accent-weak); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-strong); }
.chip .count { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; height: 26px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.filter-spacer { flex: 1; }
.linkbtn { background: none; border: 0; color: var(--accent-strong); font-weight: 500; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.linkbtn:hover { background: var(--accent-weak); }
.active-tags { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.active-tags:empty { display: none; }
.tag-x { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--surface-3); color: var(--text-2); border-radius: 99px; padding: 3px 4px 3px 10px; border: 0; }
.tag-x b { color: var(--text); font-weight: 500; }
.tag-x span.x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.tag-x:hover span.x { background: var(--border); }

/* ── Popover (multi-select) ─────────────────────────────────────────────── */
.popover {
  position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); min-width: 260px; max-width: 340px; padding: 6px; max-height: 420px; overflow: auto;
}
.popover .opt { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.popover .opt:hover { background: var(--surface-3); }
.popover .opt.dim { opacity: .45; }
.popover .opt .v { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.popover .opt input { margin: 0; accent-color: var(--accent); width: 15px; height: 15px; }
.popover .opt .sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 7px; vertical-align: 0; }
.popover .pop-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 4px; padding: 6px 4px 2px; }

/* ── Cards / grid ───────────────────────────────────────────────────────── */
.view:focus { outline: none; }
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt { margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-h h2 { font-size: 14.5px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.card-h .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.card-b { padding: 14px 18px 18px; }
.card-b.flush { padding: 8px 0 0; }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }

/* KPI */
.kpi { padding: 16px 18px; position: relative; }
.kpi .lbl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi .val { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .val small { font-size: 14px; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.kpi .foot { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi .bar { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 10px; overflow: hidden; display: flex; }
.kpi .bar span { display: block; height: 100%; }
.kpi.hero { background: var(--sidebar); color: #EEF1F3; border-color: transparent; }
.kpi.hero .lbl { color: #9FB0BD; } .kpi.hero .foot { color: #8295A3; } .kpi.hero .val small { color: #8295A3; }
.info-i { width: 15px; height: 15px; border-radius: 50%; border: 1px solid currentColor; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; opacity: .55; cursor: help; font-style: normal; }

/* Gauge */
.gauge { display: flex; gap: 3px; margin-top: 11px; }
.gauge i { flex: 1; height: 5px; border-radius: 2px; background: var(--surface-3); }
.gauge-sm { display: inline-flex; gap: 2px; vertical-align: middle; }
.gauge-sm i { width: 7px; height: 9px; border-radius: 2px; background: var(--surface-3); }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px; white-space: nowrap; line-height: 1.5; }
.pill.pos { background: var(--pos-weak); color: var(--pos); }
.pill.neg { background: var(--neg-weak); color: var(--neg); }
.pill.warn { background: var(--warn-weak); color: var(--warn); }
.pill.info { background: var(--info-weak); color: var(--info); }
.pill.neutral { background: var(--surface-3); color: var(--text-2); }
.pill.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-2); }
.sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }

/* Legend table next to donut */
.split { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 8px 22px; align-items: center; }
.chart { width: 100%; height: 280px; }
.legend { display: flex; flex-direction: column; }
.lg-row { display: grid; grid-template-columns: 1fr auto 52px; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; cursor: pointer; border: 0; background: none; text-align: left; width: 100%; }
.lg-row:hover { background: var(--surface-2); }
.lg-row.sel { background: var(--accent-weak); }
.lg-row.faded { opacity: .4; }
.lg-name { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; font-weight: 500; }
.lg-name span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-val { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); }
.lg-pct { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-3); text-align: right; }
.lg-bar { grid-column: 1 / -1; height: 3px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-top: -2px; }
.lg-bar span { display: block; height: 100%; border-radius: 3px; }
.hint { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.hint svg { width: 14px; height: 14px; }

/* Vigilance list */
.vig { display: flex; flex-direction: column; gap: 8px; }
.vig-item { display: grid; grid-template-columns: 30px 1fr; gap: 11px; padding: 11px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.vig-item .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.vig-item .ic svg { width: 16px; height: 16px; }
.vig-item.neg .ic { background: var(--neg-weak); color: var(--neg); }
.vig-item.warn .ic { background: var(--warn-weak); color: var(--warn); }
.vig-item.info .ic { background: var(--info-weak); color: var(--info); }
.vig-item.pos .ic { background: var(--pos-weak); color: var(--pos); }
.vig-item .t { font-weight: 600; font-size: 13px; }
.vig-item .d { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.vig-item button.linkbtn { padding: 2px 0; margin-top: 3px; font-size: 12.5px; }
.vig-item button.linkbtn:hover { background: none; text-decoration: underline; }
.threshold { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.threshold input[type=range] { accent-color: var(--accent); width: 110px; }

/* Holder small multiples */
.holders { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.holder { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--surface-2); cursor: pointer; text-align: left; transition: border-color .15s, transform .15s; }
.holder:hover { border-color: var(--border-strong); }
.holder.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.holder-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.holder-h b { font-size: 14px; }
.holder-h .num { font-size: 14px; font-weight: 600; }
.holder-body { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; margin-top: 8px; }
.holder .mini { width: 110px; height: 110px; }
.holder ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.holder li { display: grid; grid-template-columns: 9px 1fr auto; gap: 7px; align-items: center; }
.holder li span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.holder li .num { color: var(--text); }
.holder-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* Tables */
.table-wrap { overflow: auto; max-width: 100%; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.t th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .04em; padding: 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t th .th { display: flex; align-items: center; gap: 4px; padding: 10px 12px; width: 100%; background: none; border: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit; }
table.t th.r .th { justify-content: flex-end; }
table.t th button.th:hover { color: var(--text); }
table.t th .arr { opacity: .3; width: 12px; height: 12px; }
table.t th[aria-sort] .arr { opacity: 1; color: var(--accent); }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t tbody tr.grp td { background: var(--surface-3); font-weight: 600; cursor: default; font-size: 12.5px; position: sticky; top: 37px; z-index: 1; }
table.t td.r, table.t th.r { text-align: right; }
table.t td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t .sup { font-weight: 550; color: var(--text); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
table.t .sup2 { font-size: 12px; color: var(--text-3); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
table.t tfoot td { font-weight: 600; background: var(--surface-2); border-bottom: 0; position: sticky; bottom: 0; }
.cls { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.flag { display: inline-flex; font-size: 11px; color: var(--warn); background: var(--warn-weak); border-radius: 4px; padding: 0 5px; margin-left: 6px; font-weight: 500; white-space: nowrap; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.toolbar .grow { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; }
.btn:hover { border-color: var(--border-strong); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--text); color: var(--surface); border-color: var(--text); }
.btn.primary:hover { opacity: .9; }
select.sel { height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 0 8px; font-size: 13px; }
.bar-in { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-in .b { width: 46px; height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar-in .b span { display: block; height: 100%; background: var(--accent); }

/* Empty */
.empty { padding: 48px 20px; text-align: center; color: var(--text-2); }
.empty svg { width: 36px; height: 36px; color: var(--text-3); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }

/* ── Drawer ─────────────────────────────────────────────────────────────── */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10,16,22,.38); z-index: 40; backdrop-filter: blur(1px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--bg); z-index: 50;
  box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .22s ease; overflow-y: auto; display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.dr-head { background: var(--sidebar); color: #EEF1F3; padding: 18px 22px 20px; position: sticky; top: 0; z-index: 3; }
.dr-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dr-nav .grp { display: flex; gap: 4px; align-items: center; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.06); border: 0; color: #C8D2DA; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.icon-btn svg { width: 17px; height: 17px; }
.dr-pos { font-size: 12px; color: #8295A3; margin: 0 6px; font-variant-numeric: tabular-nums; }
.dr-title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.25; }
.dr-meta { font-size: 13px; color: #9FB0BD; margin-top: 4px; }
.dr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dr-tags .pill.neutral { background: rgba(255,255,255,.08); color: #D5DDE3; }
.dr-body { padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 14px; }
.dr-sec h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 0 0 8px; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.fact { background: var(--surface); padding: 11px 13px; min-width: 0; }
.fact .l { font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; }
.fact .v { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact .v.big { font-size: 18px; color: var(--accent-strong); }
.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.45; align-items: flex-start; }
.note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.note.neg { background: var(--neg-weak); color: var(--neg); }
.note.warn { background: var(--warn-weak); color: var(--warn); }
.note.info { background: var(--info-weak); color: var(--info); }
.note.pos { background: var(--pos-weak); color: var(--pos); }
.note.neutral { background: var(--surface-3); color: var(--text-2); }
.notes { display: flex; flex-direction: column; gap: 6px; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.mini-list { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mini-list button { display: grid; grid-template-columns: 1fr auto; gap: 12px; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; border-bottom: 1px solid var(--border); align-items: center; }
.mini-list button:last-child { border-bottom: 0; }
.mini-list button:hover { background: var(--surface-2); }
.mini-list .n { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .s { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; margin-top: 1px; }

/* Bullet chart (produits structurés) */
.bullet { position: relative; height: 46px; margin: 6px 0 2px; }
.bullet .track { position: absolute; left: 0; right: 0; top: 18px; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.bullet .zone-neg { position: absolute; top: 0; bottom: 0; left: 0; background: color-mix(in srgb, var(--neg) 18%, transparent); }
.bullet .zone-warn { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--warn) 18%, transparent); }
.bullet .mk { position: absolute; top: 12px; width: 2px; height: 22px; background: var(--text-2); }
.bullet .mk.init { background: var(--text); }
.bullet .mk label { position: absolute; top: -13px; transform: translateX(-50%); font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.bullet .mk label.below { top: 24px; }
.bullet .cur { position: absolute; top: 15px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--surface); transform: translateX(-50%); box-shadow: 0 0 0 1px var(--border-strong); }
.sp-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.sp-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sp-name { font-weight: 600; font-size: 14.5px; }
.sp-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.sp-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.sp-stats .l { font-size: 11.5px; color: var(--text-3); }
.sp-stats .v { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.timeline span { display: block; height: 100%; background: var(--text-3); }

/* Données */
.drop { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 30px 20px; text-align: center; background: var(--surface-2); transition: all .15s; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-weak); }
.drop svg { width: 30px; height: 30px; color: var(--accent); }
.drop b { display: block; margin: 8px 0 3px; font-size: 14px; }
.qlist { display: flex; flex-direction: column; }
.qitem { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.qitem:last-child { border-bottom: 0; }
.qitem svg { width: 17px; height: 17px; margin-top: 1px; }
.qitem.warning svg { color: var(--warn); } .qitem.info svg { color: var(--info); }
.qitem .t { font-weight: 600; font-size: 13px; }
.qitem .d { font-size: 12.5px; color: var(--text-2); }
.qitem .rows { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.todo { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.todo:last-child { border-bottom: 0; }
.todo .t { font-weight: 600; font-size: 13px; } .todo .d { font-size: 12.5px; color: var(--text-2); }

/* Banner, toasts, modal */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; background: var(--warn-weak); color: var(--warn); font-size: 13px; border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner .grow { flex: 1; color: var(--text); }
.banner .grow b { color: var(--text); }
.banner .btn { border-color: transparent; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow-lg); animation: tin .2s ease; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.tooltip-rich { position: fixed; z-index: 90; background: var(--text); color: var(--surface); font-size: 12px; padding: 7px 10px; border-radius: 7px; max-width: 280px; pointer-events: none; line-height: 1.45; }

.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .chart { height: 250px; }
  .g-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 6px; overflow-x: auto; }
  .brand { padding: 0 6px 0 0; }
  .brand > div:last-child, .sidebar-foot .fresh, .theme-toggle span, .nav-sep { display: none; }
  .nav { flex-direction: row; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .nav a .lbl { display: none; }
  .nav a[aria-current="page"] .lbl { display: inline; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; }
  .filterbar { top: 52px; }
  .main { padding: 0 16px 40px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .g-kpi, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .kpi .val { font-size: 22px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hide-sm { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .sidebar, .filterbar, .topbar-actions, .drawer, .drawer-backdrop { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ── Ajustements ─────────────────────────────────────────────────────── */
.drawer:not(.open) { visibility: hidden; }
.card-h .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
table.t td { white-space: nowrap; }
table.t td:first-child { white-space: normal; }
.main > * { min-width: 0; }
.drop { display: block; }
.drop .muted { display: block; }
a.btn { text-decoration: none; color: inherit; }

/* ── Modules prototype ───────────────────────────────────────────────── */
:root { --demo: #6E55A3; --demo-weak: #EEE9F7; }
:root[data-theme="dark"] { --demo: #B9A2E6; --demo-weak: #251D36; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --demo: #B9A2E6; --demo-weak: #251D36; } }
.pill.demo { background: var(--demo-weak); color: var(--demo); cursor: help; }
.pill.hyp { background: var(--info-weak); color: var(--info); cursor: help; }
.note.demo-note { background: var(--demo-weak); color: var(--demo); margin-bottom: 16px; }
.note.demo-note b { color: inherit; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font-weight: 550; font-size: 14px; color: var(--text-2); white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.toolbar-plain { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-plain .grow { flex: 1; }
.inp { height: 30px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); padding: 0 8px; width: 110px; font-size: 13px; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.hyp-box { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.hyp-box summary { cursor: pointer; font-size: 13px; font-weight: 550; color: var(--text-2); }
.hyp-box table.t td { padding: 6px 12px; }
.proj-k { padding: 10px 0; border-bottom: 1px solid var(--border); }
.proj-k:last-child { border-bottom: 0; }
.fee-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 80px 54px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.fee-row .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fee-row .b { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.fee-row .b span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.fee-row b, .fee-row .faint { text-align: right; }
table.t tbody tr.row-sel td { background: var(--accent-weak); }
.demo-toggle { justify-content: flex-start; }
.sw-track { width: 30px; height: 17px; border-radius: 99px; background: #2C3B48; position: relative; flex: none; transition: background .15s; }
.sw-knob { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #8A99A6; transition: all .15s; }
.demo-toggle.on .sw-track { background: #6E55A3; }
.demo-toggle.on .sw-knob { left: 15px; background: #fff; }
@media (max-width: 1100px) {
  #schWrap, #projWrap, #stWrap, #feeWrap, #ovEvoWrap { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 860px) {
  .demo-toggle span:last-child { display: none; }
  .fee-row { grid-template-columns: minmax(0, 1fr) 80px 54px; }
  .fee-row .b { display: none; }
}
.sch-kpis { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 8px; }
.sch-kpis .v { font-size: 22px; font-weight: 650; margin-top: 2px; }
.sch-kpis .faint { font-size: 12px; }
.toolbar-plain > * { min-width: 0; }
.toolbar-plain .seg { max-width: 100%; overflow-x: auto; }
.g-kpi4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g-kpi4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .g-kpi4 { grid-template-columns: minmax(0, 1fr); } }
.method { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.method-h { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.method-h svg { width: 15px; height: 15px; color: var(--info); }
.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.method-grid b { display: block; font-size: 12px; margin-bottom: 2px; }
.method-grid span { font-size: 12px; color: var(--text-2); line-height: 1.45; }
@media (max-width: 1100px) { .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .method-grid { grid-template-columns: minmax(0, 1fr); } }
.play-btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
.play-btn svg { width: 12px; height: 12px; }
.view.enter .card { animation: rise .45s ease both; }
.view.enter .grid > .card:nth-child(2) { animation-delay: .05s; } .view.enter .grid > .card:nth-child(3) { animation-delay: .1s; }
.view.enter .grid > .card:nth-child(4) { animation-delay: .15s; } .view.enter .grid > .card:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.lg-bar span, .kpi .bar span, .bar-in .b span, .fee-row .b span, .timeline span { animation: grow .9s cubic-bezier(.2,.7,.2,1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.live-hint { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.live-hint.paused .live-dot { animation: none; background: var(--text-3); }

@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
/* Matrices (heatmaps) */
table.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12px; }
table.heat th { font-weight: 550; color: var(--text-2); font-size: 11.5px; padding: 4px 6px; text-align: center; white-space: nowrap; }
table.heat tbody th { text-align: left; }
table.heat td { text-align: center; padding: 7px 4px; border-radius: 6px; background: var(--surface-2); min-width: 64px; line-height: 1.25; }
table.heat td b { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text); }
table.heat td span { font-size: 11px; color: var(--text-3); }
table.heat td.on { cursor: pointer; transition: transform .12s, box-shadow .12s; }
table.heat td.on:hover { transform: scale(1.04); box-shadow: 0 0 0 2px var(--accent); }
table.heat td.hflag { box-shadow: inset 0 0 0 2px var(--neg); }
table.heat .tot { background: transparent; }
table.heat th.tot { color: var(--text-3); }
table.heat { border-spacing: 2px; }
table.heat td { min-width: 50px; padding: 6px 3px; }
table.heat td.dark b, table.heat td.dark span { color: #fff; }
table.heat .tot { min-width: 58px; }
table.heat th { white-space: normal; }
.heat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); }
@media (max-width: 1100px) { .heat-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1500px) { .heat-row { grid-template-columns: minmax(0, 1fr); } }
.reading { margin-top: 10px; font-size: 13px; line-height: 1.55; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.reading b { color: var(--text); }

/* ── Filtres : annuler / effacer ─────────────────────────────────────── */
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-clear { background: var(--accent-weak); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-strong); font-weight: 600; }
.btn-clear:hover { border-color: var(--accent); }
/* ── Pop-up données anciennes ────────────────────────────────────────── */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(10,16,22,.45); display: grid; place-items: center; padding: 16px; animation: tin .2s ease; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); max-width: 460px; width: 100%; padding: 26px 26px 22px; text-align: center; }
.modal-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--warn-weak); color: var(--warn); display: grid; place-items: center; margin: 0 auto 12px; }
.modal-ic svg { width: 24px; height: 24px; }
.modal h2 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 0 0 8px; }
.modal p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.modal p b { color: var(--text); }
.modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
/* ── Matrices colorées ───────────────────────────────────────────────── */
table.heat td.on { color: var(--text); }
table.heat td.dark b, table.heat td.dark span { color: #fff; }
table.heat td.empty { background: var(--surface-2); }
table.heat td.sel { box-shadow: 0 0 0 3px var(--text); }
table.heat th.corner { font-size: 10.5px; color: var(--text-3); font-weight: 500; text-align: left; }
table.heat tfoot td.tot, table.heat tfoot th { border-top: 2px solid var(--border-strong); padding-top: 8px; }
table.heat th.tot-l { text-align: left; color: var(--text-2); }
.heat-legend { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.heat-legend i { flex: 1; max-width: 260px; height: 8px; border-radius: 4px; }
.heat-detail { margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; animation: tin .2s ease; }
.hd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }

/* ── Compte connecté ─────────────────────────────────────────────────── */
.user-box { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 8px; border-radius: 9px; color: var(--sidebar-text); text-align: left; }
.user-btn:hover { background: var(--sidebar-hover); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2B3D4E; color: #E8C79A; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who b { font-size: 13px; color: #EEF1F3; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: 11px; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 70; }
.user-menu button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 7px; font-size: 13px; color: var(--text); text-align: left; }
.user-menu button:hover { background: var(--surface-3); }
.user-menu svg { width: 16px; height: 16px; color: var(--text-2); }
/* ── Formulaires en fenêtre ──────────────────────────────────────────── */
.modal.form-modal { text-align: left; max-width: 480px; padding: 22px 24px; max-height: calc(100vh - 32px); overflow: auto; }
.modal.form-modal.wide { max-width: 620px; }
.fm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.fm-head h2 { margin: 0; font-size: 20px; }
.icon-btn-l { width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; color: var(--text-2); display: grid; place-items: center; }
.icon-btn-l:hover { background: var(--surface-3); color: var(--text); }
.icon-btn-l svg { width: 18px; height: 18px; }
.fm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 550; }
.fm-field .inp-lg, .modal .inp-lg { height: 40px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 11px; font-size: 14px; background: var(--surface); width: 100%; font-weight: 400; }
.modal .inp-lg:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.modal .inp-lg:disabled { background: var(--surface-3); color: var(--text-2); }
.fm-sec { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 600; margin: 10px 0 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; cursor: pointer; }
.check:hover { border-color: var(--border-strong); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check b { display: block; font-size: 13.5px; font-weight: 600; }
.check small { display: block; font-size: 12px; color: var(--text-2); margin-top: 1px; }
.check.compact { padding: 6px 9px; margin: 0; align-items: center; font-size: 13px; }
.check.compact input { margin-top: 0; }
.muted-check { opacity: .65; cursor: default; }
.holder-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 200px; overflow: auto; }
.fm-actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.fm-actions .grow { flex: 1; }
.btn-danger-ghost { color: var(--neg); border-color: transparent; background: none; }
.btn-danger-ghost:hover { background: var(--neg-weak); border-color: transparent; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.link-box { display: flex; gap: 8px; }
.link-box .inp-lg { font-family: ui-monospace, monospace; font-size: 12px !important; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 600px) { .fm-grid { grid-template-columns: 1fr; } }
/* ── Bouton Retour ──────────────────────────────────────────────────── */
.back-btn { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; height: 30px; padding: 0 12px 0 8px; border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-weak); color: var(--accent-strong); font-size: 13px; font-weight: 600; animation: tin .2s ease; }
.back-btn:hover { border-color: var(--accent); }
.back-btn svg { width: 15px; height: 15px; }

