/* ============================================================
   Thème « Menthe & indigo »
   ============================================================ */
:root {
  color-scheme: light;
  --page: #f2f6f9;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #eef1f8;
  --border: rgba(30, 27, 75, 0.08);
  --border-strong: rgba(30, 27, 75, 0.16);
  --heading: #1e1b4b;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #8b93a7;
  --grid: #edf0f6;
  --axis: #d3d9e6;

  --rail: #1e1b4b;
  --rail-ink: #a5b4fc;
  --mint: #34d399;
  --mint-strong: #10b981;
  --mint-ink: #064e3b;
  --hero-bg: #1e1b4b;
  --hero-muted: #a5b4fc;

  /* Couleurs des séries (enveloppes, lignes) */
  --s1: #3b82f6; --s2: #f59e0b; --s3: #10b981; --s4: #8b5cf6;
  --s5: #ec4899; --s6: #06b6d4; --s7: #f97316; --s8: #64748b;
  /* Tuiles pastel : fond + encre de la même famille */
  --t1: #dbeafe; --t1-ink: #1e3a8a;
  --t2: #fef3c7; --t2-ink: #78350f;
  --t3: #d1fae5; --t3-ink: #064e3b;
  --t4: #ede9fe; --t4-ink: #4c1d95;
  --t5: #fce7f3; --t5-ink: #831843;
  --t6: #cffafe; --t6-ink: #164e63;
  --t7: #ffedd5; --t7-ink: #7c2d12;
  --t8: #e2e8f0; --t8-ink: #1e293b;
  --t-neg: #ffe4e6; --t-neg-ink: #881337;

  --pos: #34d399;
  --neg: #fb7185;
  --line: #10b981;
  --ref: #6366f1;
  --good: #047857;
  --bad: #e11d48;
  --warn-bg: #fef3c7;
  --warn-text: #78350f;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-ink: #ffffff;
  --focus: #6366f1;
  --shadow: 0 1px 2px rgba(30, 27, 75, 0.04), 0 10px 28px rgba(30, 27, 75, 0.06);
  --radius: 22px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0b0c1d; --surface: #15172e; --surface-2: #1b1e3a; --surface-3: #252848;
    --border: rgba(255, 255, 255, 0.08); --border-strong: rgba(255, 255, 255, 0.16);
    --heading: #eef0ff; --text: #eef0ff; --text-2: #b4b8d6; --muted: #7c80a3;
    --grid: #22254a; --axis: #33365e;
    --rail: #101130; --hero-bg: #262270;
    --t1: #172554; --t1-ink: #bfdbfe; --t2: #3b2a06; --t2-ink: #fde68a;
    --t3: #052e22; --t3-ink: #a7f3d0; --t4: #2e1065; --t4-ink: #ddd6fe;
    --t5: #500724; --t5-ink: #fbcfe8; --t6: #083344; --t6-ink: #a5f3fc;
    --t7: #431407; --t7-ink: #fed7aa; --t8: #1e293b; --t8-ink: #cbd5e1;
    --t-neg: #4c0519; --t-neg-ink: #fecdd3;
    --line: #34d399; --ref: #818cf8;
    --good: #34d399; --bad: #fb7185;
    --warn-bg: #3b2a06; --warn-text: #fde68a;
    --accent: #6366f1; --accent-hover: #818cf8; --focus: #818cf8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0b0c1d; --surface: #15172e; --surface-2: #1b1e3a; --surface-3: #252848;
  --border: rgba(255, 255, 255, 0.08); --border-strong: rgba(255, 255, 255, 0.16);
  --heading: #eef0ff; --text: #eef0ff; --text-2: #b4b8d6; --muted: #7c80a3;
  --grid: #22254a; --axis: #33365e;
  --rail: #101130; --hero-bg: #262270;
  --t1: #172554; --t1-ink: #bfdbfe; --t2: #3b2a06; --t2-ink: #fde68a;
  --t3: #052e22; --t3-ink: #a7f3d0; --t4: #2e1065; --t4-ink: #ddd6fe;
  --t5: #500724; --t5-ink: #fbcfe8; --t6: #083344; --t6-ink: #a5f3fc;
  --t7: #431407; --t7-ink: #fed7aa; --t8: #1e293b; --t8-ink: #cbd5e1;
  --t-neg: #4c0519; --t-neg-ink: #fecdd3;
  --line: #34d399; --ref: #818cf8;
  --good: #34d399; --bad: #fb7185;
  --warn-bg: #3b2a06; --warn-text: #fde68a;
  --accent: #6366f1; --accent-hover: #818cf8; --focus: #818cf8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.45;
  background: var(--page); color: var(--text); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--heading); letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 650; color: var(--text-2); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.secondary { color: var(--text-2); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.up { color: var(--good); }
.down { color: var(--bad); }
.nowrap { white-space: nowrap; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ===== Structure : barre d'icônes + contenu ===== */
.app { display: grid; grid-template-columns: 92px minmax(0, 1fr); min-height: 100vh; }
.rail {
  background: var(--rail); position: sticky; top: 0; height: 100vh; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 14px;
}
.rail .logo {
  width: 46px; height: 46px; border-radius: 15px; margin-bottom: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, #34d399, #22d3ee); color: #064e3b;
}
.rail .logo svg.i { width: 26px; height: 26px; stroke-width: 2.4; }
.rail .nav { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail a, .rail button {
  width: 80px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0;
  color: var(--rail-ink); font: inherit; font-size: 11px; font-weight: 600; text-decoration: none;
  background: none; border: 0; cursor: pointer; border-radius: 14px;
}
.rail .ico { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: #c7d2fe; transition: background 0.15s; }
.rail a:hover .ico, .rail button:hover .ico { background: rgba(255, 255, 255, 0.13); }
.rail a.active { color: #ffffff; }
.rail a.active .ico { background: var(--mint); color: var(--mint-ink); }
.rail .lbl { max-width: 78px; overflow: hidden; text-align: center; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rail .bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.main { padding: 26px 32px 64px; max-width: 1380px; width: 100%; min-width: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar .subtitle { color: var(--text-2); margin-top: 4px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.quote-status {
  display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; font-weight: 600;
  background: var(--surface); padding: 7px 12px; border-radius: 99px; box-shadow: var(--shadow);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.live { background: var(--mint-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 30%, transparent); }
.dot.err { background: var(--neg); }
.spin { display: inline-block; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Boutons & champs ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.mint { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.icon-btn { background: none; border: 0; padding: 5px 7px; border-radius: 8px; color: var(--muted); cursor: pointer; font: inherit; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 12px; height: 40px; padding: 0 12px; width: 100%;
}
textarea { height: auto; min-height: 64px; padding: 8px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; background: var(--surface); }
label.field { display: block; font-size: 12px; font-weight: 650; color: var(--text-2); }
label.field > :is(input, select, textarea, .input-row) { margin-top: 6px; }
label.field > input, label.field > select, label.field > textarea { display: block; }
label.field .hint { font-weight: 400; color: var(--muted); }
.input-row { display: flex; gap: 6px; }
.input-row .btn { height: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ===== Période ===== */
.filters { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 14px; }
.chips { display: inline-flex; background: var(--surface); border-radius: 14px; padding: 4px; gap: 2px; box-shadow: var(--shadow); }
.chip {
  border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--text-2);
  padding: 7px 13px; border-radius: 10px; cursor: pointer;
}
.chip:hover { color: var(--text); background: var(--surface-3); }
.chip.active { background: var(--hero-bg); color: #ffffff; }
.period-note { font-size: 13px; color: var(--text-2); }
.period-note strong { color: var(--text); font-weight: 700; }

/* ===== Haut de page : carte indigo + tuiles pastel ===== */
.top-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.hero {
  background: var(--hero-bg); color: #ffffff; border-radius: 26px; padding: 24px 26px 18px;
  position: relative; overflow: hidden; min-height: 240px; display: flex; flex-direction: column;
}
.hero::before {
  content: ""; position: absolute; width: 300px; height: 300px; right: -90px; bottom: -150px; border-radius: 50%;
  background: radial-gradient(rgba(52, 211, 153, 0.55), transparent 68%); pointer-events: none;
}
.hero > * { position: relative; }
.hero-label { color: var(--hero-muted); font-weight: 650; font-size: 13px; }
.hero-value { font-size: 48px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; margin: 6px 0 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 12.5px; background: rgba(255, 255, 255, 0.10); color: #e0e7ff; }
.badge.pos { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.badge.neg { background: rgba(251, 113, 133, 0.16); color: #fda4af; }
.hero-spark { margin-top: auto; padding-top: 14px; }

.ptiles { display: grid; gap: 12px; align-content: stretch; }
.ptile {
  border-radius: 22px; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  text-decoration: none; transition: transform 0.12s;
}
a.ptile:hover { transform: translateY(-1px); text-decoration: none; }
.ptile .lbl { font-weight: 700; font-size: 13px; opacity: 0.85; }
.ptile .val { font-size: 23px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ptile .side { text-align: right; font-weight: 750; font-size: 14px; }
.ptile .side small { display: block; font-weight: 600; font-size: 12px; opacity: 0.8; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.tile { background: var(--surface); border-radius: 20px; padding: 15px 18px; box-shadow: var(--shadow); }
.tile-label { color: var(--text-2); font-size: 12px; font-weight: 650; }
.tile-value { font-size: 22px; font-weight: 780; margin-top: 4px; letter-spacing: -0.01em; color: var(--heading); }
.tile-value .up, .tile-value .down { font-weight: 780; }
.tile-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ===== Cartes ===== */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.grid > *, .tiles > *, .top-grid > * { min-width: 0; }
.notice { background: var(--warn-bg); color: var(--warn-text); border-radius: 14px; padding: 11px 16px; font-size: 13px; margin-bottom: 16px; font-weight: 550; }

/* ===== Tableaux ===== */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-weight: 650; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 8px 10px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap;
}
td { padding: 11px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tr.total td { font-weight: 750; border-top: 1px solid var(--axis); border-bottom: 0; color: var(--heading); }
tr.subtle td { color: var(--text-2); }
td .name { font-weight: 650; color: var(--heading); }
td .meta { color: var(--muted); font-size: 12px; }
td.notes { min-width: 240px; }
td.label-cell { white-space: nowrap; }
.row-actions { white-space: nowrap; text-align: right; width: 1%; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag.err { background: var(--t-neg); color: var(--t-neg-ink); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: 9px; vertical-align: -1px; }
.pct-pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-weight: 700; font-size: 12px; }
.pct-pill.up { background: var(--t3); color: var(--t3-ink); }
.pct-pill.down { background: var(--t-neg); color: var(--t-neg-ink); }
.price-btn {
  background: none; border: 0; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; font: inherit; color: inherit; font-weight: 650;
  cursor: pointer; font-variant-numeric: tabular-nums; border-bottom: 1px dashed var(--axis);
}
.price-btn:hover { background: var(--surface-3); }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-tools select, .table-tools input { width: auto; min-width: 150px; height: 34px; font-size: 13px; }
.more { text-align: center; margin-top: 12px; }

/* ===== Graphiques ===== */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--font); }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .end-label { fill: var(--heading); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.chart .end-label-sub { fill: var(--text-2); font-size: 11px; }
.chart .bar-label { fill: var(--heading); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart .cat-label { fill: var(--text-2); font-size: 12.5px; font-weight: 600; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .mark { transition: opacity 0.12s; }
.chart .mark.dim { opacity: 0.35; }
.chart .empty { fill: var(--muted); font-size: 13px; }
.chart .donut-total { fill: var(--heading); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart .donut-sub { fill: var(--muted); font-size: 11.5px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .key-line { width: 16px; height: 3px; border-radius: 3px; display: inline-block; }
.legend .key-rect { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(30, 27, 75, 0.18);
  padding: 9px 12px; font-size: 12px; min-width: 160px; white-space: nowrap;
}
.tooltip .tt-title { color: var(--text-2); margin-bottom: 5px; font-weight: 650; }
.tooltip .tt-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 1px 0; }
.tooltip .tt-row .k { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.tooltip .tt-row .k i { width: 12px; height: 3px; border-radius: 3px; display: inline-block; }
.tooltip .tt-row .v { font-weight: 750; color: var(--heading); font-variant-numeric: tabular-nums; }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-wrap svg { width: 170px; height: 170px; flex: none; }
.donut-legend { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.donut-legend .row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; padding: 6px 8px; border-radius: 10px; }
.donut-legend .row:hover { background: var(--surface-2); }
.donut-legend .row i { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.donut-legend .row .n { color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .row .v { font-weight: 750; color: var(--heading); font-variant-numeric: tabular-nums; }
.donut-legend .row .p { color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }

/* ===== Fenêtres modales ===== */
dialog {
  border: 0; border-radius: 24px; padding: 0; width: min(620px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(15, 12, 60, 0.35);
}
dialog::backdrop { background: rgba(20, 18, 60, 0.45); backdrop-filter: blur(2px); }
dialog form { padding: 24px 26px; }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; align-items: center; }

/* ===== Connexion ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--rail); }
.login { width: min(410px, 100%); }
.login .card { padding: 30px; border-radius: 28px; }
.login .logo-big { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; background: linear-gradient(135deg, #34d399, #22d3ee); color: #064e3b; }
.login .logo-big svg.i { width: 30px; height: 30px; stroke-width: 2.4; }
.login h1 { margin: 16px 0 6px; }
.login p { color: var(--text-2); margin: 0 0 18px; }
.login form { display: flex; flex-direction: column; gap: 14px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--hero-bg); color: #ffffff; padding: 11px 18px; border-radius: 14px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
}
.toast.error { background: var(--bad); }
.loading { opacity: 0.6; transition: opacity 0.15s; }
.empty-state { color: var(--muted); padding: 24px 0; text-align: center; }

/* ===== Tablette / mobile ===== */
@media (max-width: 1100px) {
  .top-grid { grid-template-columns: minmax(0, 1fr); }
  .ptiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row;
    justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .rail .logo, .rail .bottom { display: none; }
  .rail .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .rail a { width: auto; flex: 1; }
  .rail .ico { width: 38px; height: 38px; border-radius: 13px; }
  .main { padding: 18px 14px 96px; }
  .hero-value { font-size: 38px; }
  .form-grid { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex !important; }
}
.mobile-only { display: none !important; }
@media print {
  .rail, .actions, .filters, .row-actions { display: none !important; }
  .app { display: block; }
}
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); }
.check input { width: auto; height: auto; }
.card .tile { box-shadow: none; background: var(--surface-2); }
.resale { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.resale-price { font-size: 42px; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.resale-vs { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.resale-table td { padding: 7px 4px; }
.resale-sim { background: var(--surface-2); border-radius: 18px; padding: 16px 18px; }
.resale-sim input { background: var(--surface); }
@media (max-width: 1100px) { .resale { grid-template-columns: minmax(0, 1fr); } }
a.notice.offbal { display: block; text-decoration: none; margin: 16px 0 0; background: var(--surface); color: var(--text-2); box-shadow: var(--shadow); }
a.notice.offbal:hover { color: var(--text); }
.house-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.house-inputs .hint { display: block; margin-top: 1px; }
.hc-verdict { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; margin-top: 14px; font-size: 14px; }
.tax-actions { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; }
.tax-actions li::marker { color: var(--mint-strong); }
.alert-list { display: grid; gap: 8px; }
.alert-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.alert-text { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.alert-text:hover { text-decoration: none; }
.alert-text:hover b { text-decoration: underline; }
.alert-text span { color: var(--text-2); font-size: 12.5px; }
.rail .ico { position: relative; }
.alert-dot { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--s2); color: #1e1b4b; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rail); }
.alert-dot.danger { background: var(--neg); color: #fff; }
.todo-list { display: grid; gap: 8px; }
.todo-row { display: grid; grid-template-columns: 78px minmax(160px, 1fr) 150px 120px auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.todo-row input { height: 34px; background: var(--surface); }
.todo-row .tag { justify-self: start; }
.todo-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-label span { color: var(--text-2); font-size: 12px; }
@media (max-width: 900px) { .todo-row { grid-template-columns: 1fr 1fr; } .todo-row .tag { justify-self: start; grid-column: 1 / -1; } .todo-label { grid-column: 1 / -1; } .todo-row input { width: 100%; } }
[hidden] { display: none !important; }
.todo-list + .more { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
/* Boutons Modifier / Supprimer : toujours visibles, collés à droite si le tableau défile */
.table-wrap td.row-actions { position: sticky; right: 0; background: var(--surface); }
.row-actions .icon-btn { color: var(--text-2); background: var(--surface-2); margin-left: 4px; }
.row-actions .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.proj summary { cursor: pointer; margin: 10px 0 6px; color: var(--text-2); }
.proj summary:hover { color: var(--text); }
.sale-costs .form-grid { margin-top: 6px; }
.sale-costs .hint { display: block; font-weight: 400; }
#sim-fees[readonly] { opacity: .85; cursor: default; }
.tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin: 20px 0 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .chip { white-space: nowrap; flex: 0 0 auto; }
.tab-panel > .card:first-child, .tab-panel > .filters:first-child { margin-top: 0; }
.tab-panel > .tiles:first-child { margin-top: 0; }
.tab-panel > .grid:first-child { margin-top: 0; }
.steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; }
.otp-key { font-size: 15px; letter-spacing: .06em; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); user-select: all; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.recovery-codes code { font-size: 15px; text-align: center; padding: 8px; border-radius: 10px; background: var(--surface-2); letter-spacing: .05em; user-select: all; }
