/* Layout : barre latérale vert profond + zone de travail sur fond papier ; cartes blanches, chiffres en colonnes tabulaires. */
:root {
  --bg: #F3F1EC; --surface: #FFFFFF; --surface-2: #F8F7F3; --surface-3: #EEEBE4;
  --ink: #1A201D; --ink-2: #4A514C; --muted: #646B66; --line: #E3DFD6; --line-2: #EEEBE4; --field: #CFC9BD;
  --side: #15302A; --side-ink: #E7EEEA; --side-muted: #A9BCB4; --side-active: #25473F; --side-line: #23433B;
  --accent: #1C6555; --on-accent: #FFFFFF; --accent-ink: #185A4C; --accent-soft: #E3EFEA; --accent-line: #9CC4B7;
  --good: #1B6B34; --good-bg: #E2F0E5; --warn: #8F5200; --warn-bg: #FBEBD0; --bad: #A12A1F; --bad-bg: #F9E0DC;
  --agence: #2E4A78; --agence-bg: #E4EAF4; --perso: #8A4B10; --perso-bg: #F7EAD9; --auto: #5C4B8A; --auto-bg: #ECE8F6;
  --dot-good: #5FB67A; --dot-warn: #E0A23C; --dot-bad: #E0776B;
  --s1: #0f8a6c; --s2: #d0782a; --s3: #4c6fb5; --s4: #b08a12; --s5: #b0578f; --s6: #6f8f2f; --s7: #6e5bc4; --s8: #c4473a; --s1-light: #9fd3c2;
  --grid: #ECE9E2; --axis: #C9C4B8; --scrim: rgba(18, 26, 23, 0.45);
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.06), 0 10px 30px rgba(20, 30, 25, 0.10);
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1513; --surface: #171F1C; --surface-2: #1C2622; --surface-3: #22302B;
    --ink: #E7EDE9; --ink-2: #BAC6BF; --muted: #95A39B; --line: #2A3631; --line-2: #232E2A; --field: #3B4944;
    --side: #11271F; --side-ink: #E1ECE6; --side-muted: #9DB4AA; --side-active: #1D4136; --side-line: #1C372E; --side-edge: #2A3631;
    --accent: #5CC2A5; --on-accent: #0B1411; --accent-ink: #7FD6BC; --accent-soft: #1B3A32; --accent-line: #2F6B5C;
    --good: #7BD39A; --good-bg: #16331F; --warn: #F0B45A; --warn-bg: #3A2A10; --bad: #F2978C; --bad-bg: #3D1C18;
    --agence: #A9C1EE; --agence-bg: #1C2A40; --perso: #EDB983; --perso-bg: #3A2814; --auto: #C8BCF3; --auto-bg: #2A2442;
    --dot-good: #7BD39A; --dot-warn: #F0B45A; --dot-bad: #F2978C;
    --s1: #1f9b7c; --s2: #c9772e; --s3: #6a8ad0; --s4: #b08a1c; --s5: #c46aa1; --s6: #76963a; --s7: #8b78de; --s8: #d65a4a; --s1-light: #2f6b5c;
    --grid: #25302C; --axis: #3C4A45; --scrim: rgba(0, 0, 0, 0.6);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1513; --surface: #171F1C; --surface-2: #1C2622; --surface-3: #22302B;
  --ink: #E7EDE9; --ink-2: #BAC6BF; --muted: #95A39B; --line: #2A3631; --line-2: #232E2A; --field: #3B4944;
  --side: #11271F; --side-ink: #E1ECE6; --side-muted: #9DB4AA; --side-active: #1D4136; --side-line: #1C372E; --side-edge: #2A3631;
  --accent: #5CC2A5; --on-accent: #0B1411; --accent-ink: #7FD6BC; --accent-soft: #1B3A32; --accent-line: #2F6B5C;
  --good: #7BD39A; --good-bg: #16331F; --warn: #F0B45A; --warn-bg: #3A2A10; --bad: #F2978C; --bad-bg: #3D1C18;
  --agence: #A9C1EE; --agence-bg: #1C2A40; --perso: #EDB983; --perso-bg: #3A2814; --auto: #C8BCF3; --auto-bg: #2A2442;
  --dot-good: #7BD39A; --dot-warn: #F0B45A; --dot-bad: #F2978C;
  --s1: #1f9b7c; --s2: #c9772e; --s3: #6a8ad0; --s4: #b08a1c; --s5: #c46aa1; --s6: #76963a; --s7: #8b78de; --s8: #d65a4a; --s1-light: #2f6b5c;
  --grid: #25302C; --axis: #3C4A45; --scrim: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .tbl td, .tbl th { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ------------------------------------------------ structure */
.app { display: flex; min-height: 100%; }
.side { width: 244px; flex-shrink: 0; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--side-edge, transparent); /* mode sombre : menu vert profond, séparé de la page par un trait */
  padding: 20px 12px 16px; position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: #DCEBE4; color: #15302A; display: grid; place-items: center; flex-shrink: 0; }
.brand b { display: block; font-size: 15px; color: #FFFFFF; }
.brand span { font-size: 12px; color: var(--side-muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 8px;
  color: var(--side-ink); font-weight: 500; cursor: pointer; width: 100%; }
.nav button:hover { background: rgba(255, 255, 255, 0.05); }
.nav button[aria-current="page"] { background: var(--side-active); color: #FFFFFF; font-weight: 600; }
.nav button svg { color: var(--side-muted); }
.nav button[aria-current="page"] svg { color: #FFFFFF; }
.nav .sub { min-height: 34px; padding-left: 40px; font-size: 13px; font-weight: 400; }
.nav .sub .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.nav .sub .val { margin-left: auto; font-size: 12px; color: var(--side-muted); font-variant-numeric: tabular-nums; }
.nav .add { color: var(--side-muted); font-size: 13px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--side-line); display: flex; flex-direction: column; gap: 6px; }
.side-note { font-size: 12px; color: var(--side-muted); padding: 0 8px; line-height: 1.4; }
/* lien vers la FAQ du site (nouvel onglet) */
.side-help { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: 8px; color: var(--side-ink); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.side-help:hover { background: rgba(255, 255, 255, 0.05); }
.side-help:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -2px; }
.side-help svg { color: var(--side-muted); flex-shrink: 0; }
.side-help svg:last-child { margin-left: auto; }
.main { flex: 1; min-width: 0; padding: 28px 36px 56px; }
.wrap { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: none; }
.drawer-scrim { display: none; }
@media (max-width: 999px) {
  /* panneau par-dessus la page : hauteur de l'écran et défilement (align-self de l'ordinateur annulé : il donnait au panneau la
     hauteur de son contenu, et le bas du menu sortait de l'écran sans pouvoir défiler, 21/10/2026) ; marge pour la barre d'accueil
     des iPhone ; le défilement du menu n'entraîne pas la page */
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; height: auto; align-self: auto; transform: translateX(-105%); transition: transform 0.2s ease;
    padding-top: calc(20px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .drawer-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 39; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--side); color: #FFFFFF;
    padding: 10px 16px; }
  .topbar .icon-btn { color: #FFFFFF; }
  .topbar .icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
  .topbar b { font-size: 15px; }
  .main { padding: 18px 16px 48px; }
}

/* ------------------------------------------------ en-têtes */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs button { all: unset; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h2.sec { margin: 0; font-size: 18px; font-weight: 600; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) { .page-head h1 { font-size: 28px; } }

/* ------------------------------------------------ cartes, KPI */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-h { padding: 18px 22px 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card-h p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kpi .l { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.kpi .v { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.kpi .v small { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.kpi .s { font-size: 12.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.grid2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: minmax(0, 1fr); } .grid3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) { .grid2.even { grid-template-columns: minmax(0, 1fr); } }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* biens */
.bien-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.bien-card { all: unset; box-sizing: border-box; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 17px; display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.bien-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.bien-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bien-card .kind { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.ico-box { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; }
.bien-card .name { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.2; }
.bien-card .addr { font-size: 13px; color: var(--muted); }
.bien-card .figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.bien-card .figs .l { font-size: 12px; color: var(--muted); }
.bien-card .figs .big { font-size: 26px; font-weight: 600; line-height: 1.1; }
.bien-card .figs .mid { font-size: 18px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.bien-card .foot { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 10px; }
.bien-card .foot span { display: flex; align-items: center; gap: 7px; }

/* ------------------------------------------------ boutons, badges, champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; line-height: 1; text-decoration: none; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--field); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--accent-ink); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: transparent; color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.danger-solid { background: var(--bad); color: #FFFFFF; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.bad { color: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1;
  background: var(--surface-3); color: var(--ink-2); }
.badge.good { background: var(--good-bg); color: var(--good); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.import { background: var(--accent-soft); color: var(--accent-ink); } .badge.agence { background: var(--agence-bg); color: var(--agence); } .badge.perso { background: var(--perso-bg); color: var(--perso); } .badge.auto { background: var(--auto-bg); color: var(--auto); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.code { display: inline-flex; align-items: center; height: 22px; padding: 0 6px; border: 1px solid var(--field); border-radius: 5px; background: var(--surface-2); color: var(--ink-2);
  font-family: var(--mono); font-size: 12px; font-weight: 500; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); }
.inp { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; }
textarea.inp { padding: 10px 12px; min-height: 80px; resize: vertical; }
select.inp { padding-right: 32px; }
.inp:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.inp.invalid { border-color: var(--bad); }
.suffix { position: relative; }
.suffix .inp { padding-right: 46px; }
.suffix span { position: absolute; right: 12px; top: 0; height: 40px; display: flex; align-items: center; font-size: 13px; color: var(--muted); pointer-events: none; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-3); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--ink-2); border-radius: 6px; min-height: 32px; padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice button { all: unset; box-sizing: border-box; cursor: pointer; border: 1px solid var(--field); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); }
.choice button b { font-size: 14px; }
.choice button span { font-size: 12.5px; color: var(--muted); }
.choice button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.check label b { display: block; font-weight: 500; }
.check label span { font-size: 12.5px; color: var(--muted); }
.cgv-checks { display: grid; gap: 10px; }
.cgv-check label { font-size: 13.5px; line-height: 1.45; }
.cgv-check label span { display: block; margin-top: 2px; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 999px; border: 0; background: var(--field); padding: 0; cursor: pointer; flex-shrink: 0; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.switch[aria-checked="true"]::after { left: 18px; }
/* boutons de choix (biens des rapports, modèles de saisie automatique) : choisi = vert plein avec une coche (25/10/2026) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--accent-line); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip .chip-note { font-weight: 500; opacity: 0.75; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* en-têtes de colonnes triables et filtrables (tableau des opérations), menu de filtre */
.col-h-in { display: inline-flex; align-items: center; gap: 2px; }
.tbl th.r .col-h-in { justify-content: flex-end; width: 100%; }
.col-tri { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; font: inherit; color: inherit; border-radius: 4px; }
.col-tri:hover { color: var(--accent-ink); }
.col-tri:focus-visible, .col-filtre:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.col-fl { font-size: 9px; min-width: 9px; color: var(--accent-ink); }
.col-filtre { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; color: var(--muted); opacity: .75; }
.col-filtre:hover { background: var(--surface-3); opacity: 1; }
.col-filtre.on { color: var(--on-accent); background: var(--accent); opacity: 1; }
.col-menu { position: fixed; z-index: 60; width: 320px; max-height: min(460px, 70vh); display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); text-align: left; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink); }
.col-menu-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px 14px; font-size: 14px; }
.col-menu-b { padding: 4px 14px 10px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.col-menu-list { display: flex; flex-direction: column; gap: 1px; }
.col-menu-l { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 13.5px; cursor: pointer; border-radius: 5px; }
.col-menu-l:hover { background: var(--surface-2); }
.col-menu-l > span:not(.n) { flex: 1; min-width: 0; }
.col-menu-l .n { color: var(--muted); font-size: 12px; }
.col-menu-l.tout { font-weight: 600; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; margin-bottom: 2px; }
.col-menu-l.mois { padding-left: 26px; }
.col-menu-an > summary { list-style: none; cursor: pointer; }
.col-menu-an > summary::-webkit-details-marker { display: none; }
.col-menu-plage { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.col-menu-plage label, .col-menu-txt { display: flex; align-items: center; gap: 8px; }
.col-menu-plage .inp, .col-menu-txt .inp { flex: 1; min-width: 0; }
.col-menu-f { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.col-menu-f .grow { flex: 1; }
/* étiquettes des filtres actifs (clic : retrait du filtre) */
.chips.tags { gap: 6px; }
.tags .chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 11px; border-radius: 999px; font-size: 13px;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); }
.tags .chip:hover { border-color: var(--accent); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .col-menu { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 80vh; border-radius: 14px 14px 0 0; }
}
.filters .inp { width: auto; min-width: 150px; }
/* trait gris en ombre intérieure : le soulignement de l'onglet actif le recouvre sans déborder (pas d'ascenseur vertical) */
.tabs { display: flex; gap: 22px; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; }
.tabs button { all: unset; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 1px 7px; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.banner.info { background: var(--agence-bg); border-color: transparent; }
.banner.warn { background: var(--warn-bg); border-color: transparent; }
.banner.bad { background: var(--bad-bg); border-color: transparent; } .banner.bad > svg { color: var(--bad); }
.banner.accent { background: var(--accent-soft); border-color: transparent; }
.banner svg { flex-shrink: 0; margin-top: 1px; }
.banner > div { flex: 1; min-width: 0; }
.solde-ecarts { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }

/* ------------------------------------------------ tableaux */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl .nowrap { white-space: nowrap; }
.tbl .sub { display: block; font-size: 12.5px; color: var(--muted); }
.tbl tr.section td { background: var(--surface-2); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-ink); padding-top: 8px; padding-bottom: 8px; }
.tbl tr.total td { background: var(--surface-2); font-weight: 700; }
.tbl tr.result td { background: var(--accent-soft); font-weight: 700; }
.tbl tr.muted-row td { color: var(--muted); }
.tbl td.cell-btn { padding: 4px 8px; }
.cell-link { all: unset; cursor: pointer; padding: 4px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.cell-link:hover { background: var(--accent-soft); }
.cell-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* rapports : montants cliquables alignés sur les autres chiffres ; fenêtre du détail d'un montant (29/10/2026) */
.monthly td.r .cell-link, .rentabilite td.r .cell-link { margin-right: -6px; }
.detail-montant { margin: 0 0 14px; color: var(--ink-2); }
.detail-montant:focus { outline: none; }
.detail-montant + .flush-table { margin-top: 0; }
.tbl.compact td, .tbl.compact th { padding: 7px 8px; font-size: 12.5px; }
.pos { color: var(--good); font-weight: 500; }
.amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 13px; color: var(--ink-2); gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------ graphiques */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart text { font-family: var(--font); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.tip { position: absolute; z-index: 5; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 11px 13px;
  display: flex; flex-direction: column; gap: 6px; pointer-events: none; font-size: 12.5px; color: var(--ink-2); }
.tip b { color: var(--ink); font-size: 13px; }
.tip .row { display: flex; align-items: center; gap: 8px; }
.tip .row .v { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bars .row { display: flex; flex-direction: column; gap: 5px; }
.bars .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.bars .top span:last-child { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bars .track { height: 8px; border-radius: 4px; background: var(--surface-3); }
.bars .fill { height: 8px; border-radius: 4px; transition: width 0.4s cubic-bezier(0.33, 1, 0.68, 1); }
/* animation des listes de barres (29/10/2026) : une ligne nouvelle part de zéro ; l'atténuation des lignes non choisies en fondu */
.bars .fill.neuf { animation: barre-neuve 0.4s cubic-bezier(0.33, 1, 0.68, 1); }
@keyframes barre-neuve { from { width: 0; } }
/* barres cliquables (rapports, 25/10/2026) */
.bars.pick { gap: 4px; }
.bars.pick .row { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 5px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; }
.bars.pick .row:hover { background: var(--surface-2); }
.bars.pick .row { transition: opacity 0.3s, background-color 0.15s; }
.bars.pick .row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bars.pick.has-sel .row:not(.sel) { opacity: 0.45; }
.bars.pick .row.sel { background: var(--accent-soft); }
/* rapports : une seule ligne, courbe des mois (2/3) et carte des postes ou des biens (1/3) à la même hauteur ; la liste
   défile dans la carte (hauteur nulle au départ : la courbe fixe la hauteur de la ligne) */
.rapport-visuels { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.rapport-cote .card-h h3 { white-space: nowrap; }
.rapport-liste { flex: 1 1 0; min-height: 0; height: 0; overflow-x: hidden; overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.rapport-pied { display: flex; justify-content: flex-end; }
.choix-biens { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
@media (max-width: 900px) {
  .rapport-visuels { grid-template-columns: minmax(0, 1fr); }
  .rapport-liste { flex: none; height: auto; max-height: 360px; }
}
.progress { height: 8px; border-radius: 4px; background: var(--surface-3); }
.progress > div { height: 8px; border-radius: 4px; background: var(--s3); }

/* ------------------------------------------------ listes simples */
.kv { display: flex; flex-direction: column; gap: 9px; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.kv > div span:first-child { color: var(--ink-2); font-size: 13.5px; }
.kv > div span:last-child { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.kv > div.tot { border-top: 1px solid var(--line); padding-top: 9px; }
.kv > div.tot span { font-weight: 600; color: var(--ink); }
.todo { display: flex; flex-direction: column; }
.todo button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line-2); }
.todo button:last-child { border-bottom: 0; }
/* point ignorable (assurance PNO) : la ligne et son bouton « Ignorer » côte à côte */
.todo-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line-2); }
.todo-row > button:first-child { flex: 1; min-width: 0; border-bottom: 0; }
.todo-row:last-child { border-bottom: 0; }
.todo .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.todo .ic.warn { background: var(--warn-bg); color: var(--warn); } .todo .ic.bad { background: var(--bad-bg); color: var(--bad); } .todo .ic.info { background: var(--agence-bg); color: var(--agence); }
.todo b { display: block; font-size: 14px; }
.todo span.s { font-size: 12.5px; color: var(--muted); }
.steps { display: flex; flex-direction: column; gap: 10px; counter-reset: st; }
.steps li { list-style: none; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { counter-increment: st; content: counter(st); width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty b { color: var(--ink); font-size: 15px; }
.welcome { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.welcome h2 { font-family: var(--serif); font-weight: 500; font-size: 28px; margin: 0 0 8px; line-height: 1.15; }
.welcome p { margin: 0; color: var(--ink-2); max-width: 60ch; }
@media (max-width: 800px) { .welcome { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------ fenêtres */
.modal-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); width: 100%; max-width: 640px; display: flex; flex-direction: column; }
.modal.wide { max-width: 980px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h2 { margin: 0; font-size: 18px; font-weight: 600; }
.modal-b { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-f .left { margin-right: auto; }
.fs { display: flex; flex-direction: column; gap: 12px; }
.fs-t { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--accent-ink); text-transform: uppercase; }
@media (max-width: 640px) { .modal-scrim { padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); } .modal { border-radius: 0; min-height: 100%; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg);
  padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; max-width: calc(100% - 32px); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
/* enregistrement en cours (31/10/2026) : roue dans le bouton, indicateur dans le menu et, sur téléphone, en bas de l'écran */
.btn-spin { width: 15px; height: 15px; border-color: currentColor; border-top-color: transparent; opacity: 0.85; flex: none; }
@media (prefers-reduced-motion: reduce) { .btn-spin, .enreg .spinner { animation: spin 1.6s linear infinite !important; } }
.btn.busy { cursor: progress; }
.cout-avec { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.cout-avec b { font-variant-numeric: tabular-nums; }
/* rapports, onglet Synthèse (administrateurs) : cases cliquables vers l'analyse du bien */
.synthese td .cell-link { white-space: nowrap; }
.synthese .badge { margin-left: 4px; }
.synthese .ecart-sous { color: var(--warn); font-weight: 600; }
/* pastilles d'appréciation à symbole (Synthèse des rapports, 01/11/2026) */
.pastille-niv { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; margin-left: 6px;
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle; flex: none; }
.pastille-niv.bon { background: var(--good-bg); color: var(--good); }
.pastille-niv.moyen { background: var(--surface-3, #ECEAE4); color: var(--muted); }
.pastille-niv.eleve { background: var(--warn-bg); color: var(--warn); }
.pastille-niv.neutre { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.synthese .niv-etiq { display: inline-flex; align-items: center; margin-right: 10px; font-size: 12.5px; color: var(--ink-2); }
.synthese .niv-etiq .pastille-niv { margin-left: 4px; }
.niv-legende .pastille-niv { margin: 0 2px 0 8px; }
.side-note .enreg { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.side-note .enreg .spinner { width: 12px; height: 12px; border-width: 2px; }
.enreg-pastille { display: none; }
@media (max-width: 1000px) {
  .enreg-pastille { display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom)); padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
  .enreg-pastille .spinner { width: 14px; height: 14px; border-color: var(--surface); border-top-color: transparent; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 40px 0; }
.drop { border: 1.5px dashed var(--field); border-radius: 12px; padding: 22px; display: flex; gap: 16px; align-items: center; background: var(--surface-2); flex-wrap: wrap; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------ compléments de l'appli */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-col .main { flex: 1; }
.notice { margin-bottom: 16px; }
.nav .sub .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-note { display: flex; gap: 8px; align-items: flex-start; }
.side-note svg { margin-top: 2px; }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1280px) { .kpis-5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.metas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 11px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.meta svg { color: var(--muted); }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.note svg { margin-top: 1px; }
.drop { position: relative; }
.drop-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.drop-t { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.drop-t b { font-size: 14px; word-break: break-word; }
.drop-t span { font-size: 12.5px; color: var(--muted); }
.welcome-card { padding: 28px 30px; }
.welcome-side { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.steps { margin: 0; padding: 0; }
/* bien démarrer : choix de la situation, puis étapes avec leur bouton */
.sit-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.sit { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.sit span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.sit:hover { border-color: var(--accent); }
.sit[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.demarrer-etapes { gap: 14px; }
.demarrer-etapes li.fait::before { content: "✓"; background: var(--good-bg); color: var(--good); }
.demarrer-etapes li.fait b { color: var(--muted); font-weight: 600; }
.demarrer-etapes li.prochaine > div { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin: -6px 0; flex: 1; }
.step-act, .step-acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* champ montré depuis le guide (route.focus) : surbrillance brève */
/* champ montré depuis le guide : fond vert pâle qui s'estompe, puis retour au fond de la case */
.flash { animation: flash 2.6s ease-out; }
@keyframes flash { 0%, 55% { background-color: var(--accent-soft); } }
.step-act { margin-top: 8px; }
.steps li > div { padding-top: 2px; }
.count-pill { display: inline-block; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-3); border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: 2px; }
.todo-bien { font-weight: 400; color: var(--muted); }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.inline-check input { accent-color: var(--accent); }
.bien-card .figs .mid .per { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.bien-card .figs .big.none { color: var(--muted); }
.calc { min-height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--field); font-weight: 600; font-variant-numeric: tabular-nums; }
.err-text { font-size: 12.5px; color: var(--bad); }
.rev-add { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.rev-pending { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 640px) { .rev-add { grid-template-columns: minmax(0, 1fr); } }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; align-items: start; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid.three { grid-template-columns: minmax(0, 1fr); } }
.checklist { display: flex; flex-direction: column; }
.check-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.check-item:last-child { border-bottom: 0; }
.check-item .ck { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex-shrink: 0; }
.check-item.done .ck { background: var(--good-bg); color: var(--good); }
.check-item b { display: block; font-size: 14px; }
.check-item.done b { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.check-item .s { font-size: 12.5px; color: var(--muted); }
.ident { display: flex; align-items: center; gap: 12px; }
.ident > div { display: flex; flex-direction: column; min-width: 0; }
.ident b { font-size: 14px; }
.ident span { font-size: 12.5px; color: var(--muted); }
.ico-box.blue { background: var(--agence-bg); color: var(--agence); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.progress-l { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.grid-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
@media (max-width: 700px) { .grid-kv { grid-template-columns: minmax(0, 1fr); } }
.card-pad { padding: 0 22px; display: flex; flex-direction: column; gap: 10px; }
.card-pad:empty { display: none; }
.card.flush > .card-pad:last-child { padding-bottom: 18px; }
.review { max-height: 64vh; overflow: auto; border-top: 1px solid var(--line-2); }
.review .inp { min-height: 32px; padding: 0 8px; font-size: 12.5px; min-width: 118px; }
.review select.inp { padding-right: 24px; }
.review thead th { position: sticky; top: 0; z-index: 1; }
.review-pager { border-top: 1px solid var(--line-2); }
.review-pager .pages { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review .rv-date { min-width: 0; width: 120px; }
.review .rv-lib { min-width: 140px; width: 100%; }
.review .rv-montant { display: flex; gap: 6px; justify-content: flex-end; }
.review .rv-montant .suffix .inp { min-width: 0; width: 104px; text-align: right; padding-right: 24px; }
.review .rv-montant .suffix span { height: 32px; right: 9px; font-size: 12.5px; }
/* sens visible : recette en vert, dépense en rouge (clair et sombre) */
.review .rv-montant { align-items: center; }
.review .rv-sens { width: 30px; height: 32px; flex-shrink: 0; border-radius: 8px; border: 1px solid; font: inherit; font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer; }
.review .rv-montant.in .rv-sens { color: var(--good); background: var(--good-bg); border-color: var(--good); }
.review .rv-montant.out .rv-sens { color: var(--bad); background: var(--bad-bg); border-color: var(--bad); }
.review .rv-sens:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.review .rv-montant.in .suffix .inp { color: var(--good); }
.review .rv-montant.out .suffix .inp { color: var(--bad); }
.review .rv-montant .suffix .inp { font-weight: 600; }
.done-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.done-box > div:nth-child(2) { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.done-box b { font-size: 15px; }
.ok-ic { color: var(--good); display: grid; place-items: center; }
.rejected { padding: 12px 22px 16px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line-2); }
.rejected summary { cursor: pointer; font-weight: 600; }
.rejected ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search .inp { padding-left: 34px; min-width: 200px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.tbl .lib { min-width: 220px; }
.tbl .type-cell { font-size: 13px; color: var(--ink-2); min-width: 150px; }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.tbl.ops td:last-child { padding-right: 8px; }
.regime-choice button { gap: 4px; }
.regime-choice button:disabled { cursor: not-allowed; opacity: 0.6; }
.regime-choice b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.big-num { font-size: 22px !important; font-weight: 600; color: var(--ink) !important; font-variant-numeric: tabular-nums; margin-top: 4px; }
.t2044 td:nth-child(2) { min-width: 240px; }
.cases { display: flex; flex-direction: column; }
.cases > div { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cases > div:last-child { border-bottom: 0; }
/* étiquettes des filtres actifs au-dessus d'un tableau (tri et filtres par colonne, 24/10/2026) */
.tab-filtres { padding: 10px 16px 0; }
.card:not(.flush) > .tab-filtres, .stack > .tab-filtres { padding: 0; }
.tab-filtres .chips { flex: 1; }
/* analyse d'un bien (administrateurs, 24/10/2026) */
.tbl tr.warn-row td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.analyse-expl summary { cursor: pointer; }
/* volets de l'onglet Analyse (25/10/2026) */
.volets-barre { display: flex; justify-content: flex-end; }
.volet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.volet-h { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 14px 18px; cursor: pointer; border-radius: var(--radius); }
.volet-h:hover { background: var(--surface-2); }
.volet-h:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.volet-h > svg { color: var(--muted); flex-shrink: 0; }
.volet-t { font-size: 15px; font-weight: 600; flex: 1; min-width: 160px; }
.volet-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.volet.ouvert .volet-h { border-bottom: 1px solid var(--line-2); border-radius: var(--radius) var(--radius) 0 0; }
.volet-c { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.volet-c > .tbl-wrap { margin: 0 -18px; }
.volet-c .credit-t { font-size: 14px; font-weight: 600; margin: 0; }
/* coût du crédit (fiche du bien › Crédit, 25/10/2026) */
.cout-credit p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; }
.cout-tuiles { margin-bottom: 12px; }
.cout-tuile-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cout-tuile .s { line-height: 1.45; }
@media (max-width: 560px) { .kpis.cout-tuiles { grid-template-columns: minmax(0, 1fr); } }
.cout-credit p.cout-alerte { padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); }
button.lien { all: unset; cursor: pointer; color: var(--accent-ink); text-decoration: underline; font-size: 13px; }
button.lien:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* aide à la saisie de la ville (24/10/2026) */
.ville-cp { position: relative; }
/* fenêtre du bien en onglets (25/10/2026) */
.bien-onglets { margin: -4px 0 14px; }
.tabs .count.err { color: var(--bad); background: var(--bad-bg); }
.ville-cp .suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.ville-cp .suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; font: inherit; color: var(--ink); cursor: pointer; }
.ville-cp .suggest button:hover, .ville-cp .suggest button:focus-visible { background: var(--line-2); }
.marche-barre { position: relative; height: 14px; margin: 6px 0 14px; border-radius: 7px; background: var(--line-2); }
.marche-barre .zone { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--good-bg); border: 1px solid var(--good); }
.marche-barre .pred { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--good); }
.marche-barre .moi { position: absolute; top: -5px; width: 14px; height: 24px; margin-left: -7px; border-radius: 4px; background: var(--accent, #1f6f43); box-shadow: 0 0 0 2px var(--surface); }
.analyse-expl ul { margin: 6px 0 4px 18px; padding: 0; display: grid; gap: 4px; }
/* badge « Import » cliquable (vers l'import de la ligne) et origine d'une opération importée */
.badge-lien { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.badge-lien:hover .badge, .badge-lien:focus-visible .badge { text-decoration: underline; text-underline-offset: 2px; }
.origine-import { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.origine-import .actions { display: flex; gap: 6px; }
/* synthèse de la déclaration : cases regroupées par formulaire */
.cases-bloc h4 { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cases-grid { gap: 28px; margin-bottom: 6px; }
.cases span { font-size: 13.5px; color: var(--ink-2); }
.cases b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-input { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.monthly td:first-child, .monthly th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.monthly th:first-child { background: var(--surface-2); }
.monthly tr.section td:first-child { background: var(--surface-2); }
.monthly tr.total td:first-child { background: var(--surface-2); }
.monthly tr.result td:first-child { background: var(--accent-soft); }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.danger-zone > div { display: flex; flex-direction: column; }
.flush-table { margin: -20px -22px; }
/* liste à confirmer (montants estimés) : colonnes réduites, défile dans la fenêtre (27/10/2026) */
.liste-defilante { max-height: calc(100vh - 230px); overflow-y: auto; }
.modal-f .left { margin-right: auto; }
.choice button { color: var(--ink); }
@media (max-width: 999px) { .side { width: 272px; } }
@media (max-width: 600px) {
  .filters .inp, .search .inp { min-width: 0; width: 100%; }
  .filters > * { flex: 1 1 140px; }
  .page-head .actions { width: 100%; }
  .welcome-card { padding: 20px; }
  .cases > div { grid-template-columns: 48px minmax(0, 1fr); }
  .cases b { grid-column: 2; }
}
.actions .inp { width: auto; }
.tbl td > .cell-link:first-child { margin-left: -6px; }
@media (min-width: 1000px) { .app { background: linear-gradient(to right, var(--side) 244px, transparent 244px); } }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 32px; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.modal-h { position: sticky; top: 0; z-index: 2; background: var(--surface); border-radius: 14px 14px 0 0; }
.modal-f { position: sticky; bottom: 0; z-index: 2; background: var(--surface); border-radius: 0 0 14px 14px; }
@media (max-width: 640px) {
  .modal-h, .modal-f { border-radius: 0; }
  .kpis, .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 13px; }
  .kpi .v { font-size: 21px; }
  .kpi .s { font-size: 12px; }
  .main { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) { .kpis-5 > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.space-switch { display: flex; gap: 2px; padding: 3px; margin: 0 4px 14px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); }
.space-switch button { flex: 1; border: 0; background: transparent; color: var(--side-muted); border-radius: 6px; min-height: 30px; padding: 0 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.space-switch button:hover { color: var(--side-ink); }
.space-switch button[aria-pressed="true"] { background: var(--side-active); color: #FFFFFF; }
.topbar-tag { margin-left: auto; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }

/* ------------------------------------------------ démarrage, accès au compte */
.boot-msg { padding: 40px; font: 15px system-ui, sans-serif; color: var(--muted); }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: max(24px, env(safe-area-inset-top, 0px)) 16px max(24px, env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 28px 28px 26px; display: flex; flex-direction: column; gap: 16px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.auth-brand .brand-mark { background: var(--side); color: var(--side-ink); }
.auth-card h1 { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.15; margin: 4px 0 0; }
.auth-sub { margin: -6px 0 0; color: var(--ink-2); }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form label { font-weight: 600; font-size: 13.5px; }
.auth-form .inp { min-height: 44px; font-size: 15px; }
.auth-form .err { font-size: 12.5px; color: var(--bad); }
.auth-form .btn { margin-top: 6px; min-height: 44px; justify-content: center; }
.auth-note { margin: 0; font-size: 13px; color: var(--muted); }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-mail { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; }
.auth-mail svg { margin-top: 1px; }
.auth-foot { font-size: 13.5px; color: var(--ink-2); }
.suspended { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.suspended .main { flex: 0 1 720px; }
.auth-brand { color: inherit; text-decoration: none; align-self: flex-start; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt small { font-size: 12px; color: var(--muted); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13px; }
.auth-links a { color: var(--muted); }
.auth-links a:hover { color: var(--accent-ink); }
.link { border: 0; background: none; padding: 0; color: var(--accent-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 480px) { .auth-card { padding: 22px 18px; } .auth-card h1 { font-size: 24px; } }

/* ------------------------------------------------ compte dans le menu, paramètres */
.side-account { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 8px; }
.side-account .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--side-active); color: #FFFFFF; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
button.avatar { border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.side-account button.avatar:hover { outline: 2px solid var(--side-muted); outline-offset: 2px; }
.side-account .who { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.side-account .who b { font-size: 13px; color: var(--side-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-account .who span { font-size: 12px; color: var(--side-muted); }
.side-icon { border: 0; background: transparent; color: var(--side-muted); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.side-icon:hover { background: var(--side-active); color: #FFFFFF; }
.pref-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 4px 0 12px; }
.pref-row > div { display: flex; flex-direction: column; gap: 3px; }

/* ------------------------------------------------ administration */
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-search { min-width: 220px; }
.admin-tbl td { vertical-align: middle; }
.admin-tbl .acc { font-weight: 600; word-break: break-all; }
.admin-tbl .sub { display: block; font-size: 12px; color: var(--warn); margin-top: 2px; }
.admin-tbl .inp { min-width: 150px; }
.admin-tbl .cfg { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
@media (max-width: 640px) { .admin-search { min-width: 0; width: 100%; } }

/* abonnement : nombre de biens et formule */
.sub-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 20px 32px; align-items: start; }
@media (max-width: 760px) { .sub-grid { grid-template-columns: 1fr; } }
.stepper { display: inline-flex; align-items: center; gap: 14px; }
.step { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--field); background: var(--surface); font-size: 20px; cursor: pointer; }
.step:disabled { opacity: 0.4; cursor: default; }
.step-n { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.step-n b { font-size: 26px; line-height: 1.1; }
.plan-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.plan-opt.on { border: 2px solid var(--accent); padding: 11px 13px; background: var(--accent-soft); }
.sub-prix { margin: 0; font-size: 16px; }
/* suivi des loyers */
.loyers-etat { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--good-bg); color: var(--good); }
.loyers-etat.warn { background: var(--warn-bg); color: var(--warn); } .loyers-etat.bad { background: var(--bad-bg); color: var(--bad); }
.loyers-etat b { font-weight: 600; }
.q-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.tbl.quittances tr.sel td { background: var(--accent-soft); }
.bien-card .badge-lien { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.bien-card .badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav .sub .nav-alert { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #FFFFFF; background: var(--warn); flex-shrink: 0; }
.nav .sub .nav-alert.bad { background: var(--bad); }
/* administration : adresse sur deux lignes, tronquée */
.acc-cell { max-width: 220px; line-height: 1.25; }
.acc-l, .acc-d { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-d { font-size: 12px; color: var(--muted); }
.acc-open { all: unset; box-sizing: border-box; display: block; cursor: pointer; color: var(--accent-ink); border-radius: 4px; }
.acc-open:hover .acc-l { text-decoration: underline; text-underline-offset: 2px; }
.acc-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* administration : fiche d'un compte */
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .acct-grid { grid-template-columns: minmax(0, 1fr); } }
.acct-grid > .card, .acct-wide { margin: 0; }
.acct-wide { grid-column: 1 / -1; }
.page-head h1 { overflow-wrap: anywhere; }
/* bien archivé : consultation seulement (boutons de modification masqués) */
.ro [data-edit] { display: none !important; }
.ro .switch { pointer-events: none; opacity: 0.55; }
.acct-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.acc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.acc-tags:empty { display: none; }
/* parrainage */
.ref-code b { font-family: var(--mono); font-size: 22px; letter-spacing: 0.06em; }
.ref-link { display: flex; gap: 8px; align-items: center; }
.ref-link .inp { flex: 1; min-width: 0; }
