/* ============================================================
   GAYA 3 · Gestion — maquette CRM immobilier (SCI GAYA 3)
   Web design by RETRP — https://retrp-marketing.fr
   ============================================================ */

:root {
  color-scheme: light;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --bg: #F3F4F0;
  --surface: #FFFFFF;
  --surface-2: #F8F9F6;
  --surface-3: #EEF0EB;
  --line: #E5E8E1;
  --line-2: #D3D8CF;
  --ink: #121A2B;
  --ink-2: #4A5468;
  --ink-3: #7B8599;

  --nav: #0E1726;
  --nav-2: #16213A;
  --nav-3: #1E2B47;
  --nav-ink: #D5DCE8;
  --nav-ink-2: #7E8BA6;

  --accent: #128C6A;
  --accent-2: #2BB08A;
  --accent-ink: #0B6B50;
  --accent-soft: #E3F3EC;
  --accent-line: #BFE4D3;

  --ok: #128C6A;      --ok-soft: #E3F3EC;   --ok-ink: #0B6B50;
  --warn: #B7791F;    --warn-soft: #FBF0D9; --warn-ink: #8A5A12;
  --danger: #B42318;  --danger-soft: #FBE7E4; --danger-ink: #8E1B12;
  --info: #3B5BDB;    --info-soft: #E7EBFB; --info-ink: #2C45B3;
  --work: #C2410C;    --work-soft: #FCE9DF; --work-ink: #9A3309;

  /* chart palette — validated (dataviz) */
  --c1: #128C6A; --c2: #D1561F; --c3: #3B5BDB; --c4: #D4A017; --c5: #C0397F;
  --bar-top: #9FB4C8; --bar-bot: #7E95AB;
  --grid: #E8EBE5;

  --shadow-1: 0 1px 2px rgba(18, 26, 43, .06), 0 1px 1px rgba(18, 26, 43, .03);
  --shadow-2: 0 10px 30px -14px rgba(18, 26, 43, .22), 0 2px 6px -2px rgba(18, 26, 43, .06);
  --shadow-3: 0 24px 60px -20px rgba(18, 26, 43, .35);

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px;
  --sb-w: 268px; --sb-wc: 80px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F141D; --surface: #161C27; --surface-2: #1B2230; --surface-3: #212A3A;
    --line: #27303F; --line-2: #343E50;
    --ink: #E8ECF2; --ink-2: #A9B3C3; --ink-3: #74809A;
    --nav: #0A0F18; --nav-2: #121927; --nav-3: #1A2334; --nav-ink: #D5DCE8; --nav-ink-2: #76839F;
    --accent: #1E9E79; --accent-2: #3CC49A; --accent-ink: #6FDAB8; --accent-soft: #163229; --accent-line: #1F4A3B;
    --ok: #1E9E79; --ok-soft: #163229; --ok-ink: #7BDDBB;
    --warn: #D8A040; --warn-soft: #332A17; --warn-ink: #F0C878;
    --danger: #E0564A; --danger-soft: #3A1E1C; --danger-ink: #F79A91;
    --info: #6A86F0; --info-soft: #1E2540; --info-ink: #A9B8F8;
    --work: #DC6A3A; --work-soft: #3A2419; --work-ink: #F4A47E;
    --c1: #1E9E79; --c2: #DC6A3A; --c3: #6A86F0; --c4: #BC8418; --c5: #CF4F80;
    --bar-top: #4E617C; --bar-bot: #3A4A61; --grid: #222B39;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 10px 30px -14px rgba(0, 0, 0, .6); --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .7);
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
small { font-size: 12px; }
strong { font-weight: 700; }
svg.ic { width: 18px; height: 18px; flex: 0 0 auto; }
svg.ic.flip { transform: rotate(180deg); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.pos { color: var(--ok-ink); }
.neg { color: var(--danger-ink); }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.only-mobile { display: none !important; }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s ease; }
body.sb-collapsed .app { grid-template-columns: var(--sb-wc) minmax(0, 1fr); }
.content { min-width: 0; }

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--nav); color: var(--nav-ink); padding: 20px 14px 18px;
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(18, 140, 106, .18), transparent 60%);
  overflow: hidden;
}
.brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 22px; }
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-mark { width: 36px; height: 36px; flex: 0 0 auto; box-shadow: 0 6px 18px -6px rgba(18, 140, 106, .7); border-radius: 9px; }
.logo-text { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.logo-name { font-family: var(--font-display); font-size: 24px; letter-spacing: .02em; color: #fff; line-height: 1; }
.logo-sub { font-size: 12px; color: var(--nav-ink-2); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sb-close { display: none; color: var(--nav-ink-2); }
.nav ul { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--nav-ink-2); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; position: relative;
}
.nav a:hover { background: var(--nav-2); color: var(--nav-ink); }
.nav a.active { background: var(--nav-3); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); }
.nav a .ic { width: 19px; height: 19px; opacity: .85; }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 7px; line-height: 16px; }
.sb-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.org { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); transition: background .15s; }
.org:hover { background: rgba(255, 255, 255, .08); }
.org-av { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: linear-gradient(135deg, #2BB08A, #128C6A); color: #fff; flex: 0 0 auto; }
.org-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.org-txt strong { font-size: 13px; color: #fff; }
.org-txt small { color: var(--nav-ink-2); font-size: 11.5px; }
.credits { font-size: 10.5px; color: var(--nav-ink-2); line-height: 1.45; padding: 0 6px; letter-spacing: .01em; }
.credits strong { color: var(--nav-ink); font-weight: 700; }
.credits a:hover strong { color: #fff; }
.chip.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.page-foot a:hover strong { color: var(--ink); }

body.sb-collapsed .sidebar { padding-inline: 12px; }
body.sb-collapsed .lbl { display: none; }
body.sb-collapsed .brand { justify-content: center; padding-inline: 0; }
body.sb-collapsed .nav a { justify-content: center; padding: 11px 0; }
body.sb-collapsed .nav a.active::before { left: -12px; }
body.sb-collapsed .nav-badge { position: absolute; top: 6px; right: 6px; padding: 0 5px; }
body.sb-collapsed .org { justify-content: center; padding: 8px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 32px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.crumb { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--ink); }
.crumb .ic { width: 14px; height: 14px; color: var(--ink-3); }
.search {
  margin-left: auto; min-width: 0; display: flex; align-items: center; gap: 8px; width: min(420px, 100%); height: 38px;
  padding: 0 10px 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-ic .ic { width: 16px; height: 16px; color: var(--ink-3); display: block; }
.search input { flex: 1 1 0; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 13.5px; }
.search input::placeholder { color: var(--ink-3); }
.search kbd { font: 600 11px var(--font-ui); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; background: var(--surface-2); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink-2);
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; position: relative; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.icon-btn.has-dot::after { content: ''; position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }
.user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 12px; transition: background .15s; margin-left: 4px; }
.user:hover { background: var(--surface); }
.user-txt { display: flex; flex-direction: column; line-height: 1.2; }
.user-txt strong { font-size: 13px; }
.user-txt small { color: var(--ink-3); font-size: 11.5px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; color: #fff; background: linear-gradient(135deg, #16213A, #3B5BDB); letter-spacing: .02em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  font-weight: 700; font-size: 13.5px; white-space: nowrap; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn .ic { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px rgba(18, 140, 106, .8), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-primary:hover { background: var(--accent-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary:hover { background: var(--accent-2); color: #06201A; } }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-2); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm .ic { width: 14px; height: 14px; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.link .ic { width: 14px; height: 14px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- main / page head ---------- */
.main { padding: 28px 32px 56px; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eyebrow .pill { text-transform: none; letter-spacing: 0; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.1; letter-spacing: -.01em; }
h1 em { font-style: italic; color: var(--ink-3); }
.sub { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h2 { font-size: 15px; font-weight: 800; letter-spacing: -.005em; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; flex-wrap: wrap; }
.card-h .muted { font-size: 12.5px; margin-top: 2px; }
.card-b { padding: 4px 20px 20px; }
.card-f { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.card-f .btn:last-child { margin-left: auto; }
.grid { display: grid; gap: 20px; }
.g-dash { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-8 { grid-column: span 8; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.g-bank { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-bottom: 20px; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 18px 14px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi::after { content: ''; position: absolute; inset: auto -30px -40px auto; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); opacity: .7; pointer-events: none; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-l { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kpi-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.kpi-ic .ic { width: 16px; height: 16px; }
.kpi-v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 12px; }
.kpi-v small { font-size: 15px; font-weight: 700; color: var(--ink-3); letter-spacing: 0; }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; position: relative; z-index: 1; }
.kpi-d { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.kpi-d.up { color: var(--ok-ink); } .kpi-d.down { color: var(--danger-ink); }
.spark { width: 88px; height: 26px; flex: 0 0 auto; overflow: visible; }
.spark .sp-line { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark .sp-area { fill: var(--accent); opacity: .1; }
.spark .sp-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.spark.neg .sp-line, .spark.neg .sp-dot { stroke: var(--danger); } .spark.neg .sp-dot { fill: var(--danger); } .spark.neg .sp-area { fill: var(--danger); }

/* ---------- strip (summary row) ---------- */
.strip { display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 18px; box-shadow: var(--shadow-1); overflow-x: auto; }
.strip > div { flex: 1 0 auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); min-width: 120px; }
.strip > div:last-child { border-right: 0; }
.strip small { color: var(--ink-3); font-weight: 600; font-size: 11.5px; letter-spacing: .02em; }
.strip strong { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }

/* ---------- toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chips-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chips-l .ic { width: 14px; height: 14px; }
.select { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13px; transition: border-color .15s; }
.select:hover { border-color: var(--line-2); }
.select .ic { width: 15px; height: 15px; color: var(--ink-3); }
.select select { border: 0; background: transparent; outline: 0; font-weight: 600; font-size: 13px; color: var(--ink); padding-right: 4px; max-width: 220px; }
.chip-link { font-size: 12.5px; font-weight: 700; color: var(--ink-3); padding: 0 6px; }
.chip-link:hover { color: var(--ink); }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.view-ctl, .seg-ctl { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); }
.view-ctl a, .seg-ctl a { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); transition: all .15s; white-space: nowrap; }
.view-ctl a.on, .seg-ctl a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.tabpane { display: none; }
.tabpane.on { display: block; animation: fadeUp .35s ease both; }

/* ---------- pills / tags / avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-ok { background: var(--ok-soft); color: var(--ok-ink); }
.p-vac { background: var(--warn-soft); color: var(--warn-ink); }
.p-warn { background: var(--warn-soft); color: var(--warn-ink); }
.p-work { background: var(--work-soft); color: var(--work-ink); }
.p-notice { background: var(--info-soft); color: var(--info-ink); }
.p-late { background: var(--danger-soft); color: var(--danger-ink); }
.p-neutral { background: var(--surface-3); color: var(--ink-3); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 800; margin-left: 4px; }
.av { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 800; color: #fff; flex: 0 0 auto; letter-spacing: .02em; }
.av.sm { width: 32px; height: 32px; font-size: 11.5px; }
.av.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 16px; }
.av.c0 { background: var(--surface-3); color: var(--ink-3); }
.av.c1 { background: linear-gradient(135deg, #2BB08A, #0E6B50); }
.av.c2 { background: linear-gradient(135deg, #E67A4A, #B2461A); }
.av.c3 { background: linear-gradient(135deg, #6A86F0, #3144B8); }
.av.c4 { background: linear-gradient(135deg, #E3B341, #A77A0F); }
.av.c5 { background: linear-gradient(135deg, #D86AA0, #9A2C66); }
.av.c6 { background: linear-gradient(135deg, #4E6E8E, #253B52); }

/* ---------- DPE ---------- */
.dpe { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; font-weight: 800; font-size: 12.5px; color: #fff; }
.dpe-a { background: #2E8B3A; } .dpe-b { background: #5BB03A; } .dpe-c { background: #B9C83A; color: #2A3A05; } .dpe-d { background: #F1D23B; color: #4A3B00; }
.dpe-e { background: #EFA43A; color: #3D2300; } .dpe-f { background: #E5672D; } .dpe-g { background: #D1322B; }
.dpe-na { background: var(--surface-3); color: var(--ink-3); font-size: 11px; font-weight: 700; }
.dpe-scale { display: flex; gap: 4px; margin-top: 10px; }
.dpe-step { flex: 1; height: 38px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; color: #fff; opacity: .35; transition: opacity .2s; font-size: 14px; }
.dpe-step.cur { opacity: 1; flex: 1.6; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); outline: 3px solid var(--surface); outline-offset: -3px; }
.dpe-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.dpe-nums small, .hero-kpis small, .bal-row small, .stats-row small { display: block; color: var(--ink-3); font-weight: 600; font-size: 11.5px; }
.dpe-nums strong, .stats-row strong { font-size: 15px; font-weight: 800; }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--ink-3); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td.num { white-space: nowrap; }
.tbl td.num small { display: block; font-weight: 500; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; padding: 12px 16px; font-size: 13px; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-main > div { display: flex; flex-direction: column; min-width: 0; }
a.cell-main { flex-direction: column; align-items: flex-start; gap: 0; }
a.cell-main:hover strong { color: var(--accent-ink); }
.cell-main strong { font-weight: 700; line-height: 1.3; }
.cell-main small { color: var(--ink-3); line-height: 1.3; }
td .cell-main .doc-ic { width: 34px; height: 34px; }
td a.cell-main .doc-ic + div { flex-direction: column; }
td > a.cell-main:has(.doc-ic) { flex-direction: row; align-items: center; gap: 12px; }
.contact-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tbl td > small { display: block; }
.tbl td .t-nowrap { white-space: nowrap; }
.contact-cell span, .contact span { display: inline-flex; align-items: center; gap: 6px; }
.contact-cell .ic, .contact .ic { width: 13px; height: 13px; color: var(--ink-3); }
.tx-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.tx-ic .ic { width: 15px; height: 15px; }
.tx-ic.pos { background: var(--ok-soft); color: var(--ok-ink); }
.tx-ic.neg { background: var(--surface-3); color: var(--ink-2); }
.pager { justify-content: space-between; }
.pg { display: flex; gap: 4px; }

/* ---------- chart card ---------- */
.chart-wrap { padding: 0 20px 8px; overflow-x: auto; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .tick, .chart .xl { fill: var(--ink-3); font-size: 11px; font-family: var(--font-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .bar path { fill: url(#barg); transition: opacity .15s; }
.chart .bar.cur path { fill: url(#barg-cur); }
.chart .bar .tip { opacity: 0; transition: opacity .15s; pointer-events: none; }
.chart .bar .tip rect { fill: var(--ink); }
.chart .bar .tip text { font-family: var(--font-ui); fill: var(--bg); }
.chart .bar .tip .tip-l { font-size: 10px; font-weight: 600; opacity: .75; }
.chart .bar .tip .tip-v { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart .bar:hover .tip { opacity: 1; }
.chart .bar:hover path { opacity: .85; }
.chart .end-lbl { fill: var(--ink); font-size: 12px; font-weight: 800; font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats-row > div { display: flex; flex-direction: column; gap: 2px; }

/* donut */
.donut-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding-top: 6px; }
.donut { width: 188px; height: 188px; flex: 0 0 auto; align-self: center; }
.donut .seg { transition: stroke-width .15s; }
.donut .seg:hover { stroke-width: 24; }
.s1 { stroke: var(--c1); background: var(--c1); } .s2 { stroke: var(--c2); background: var(--c2); } .s3 { stroke: var(--c3); background: var(--c3); } .s4 { stroke: var(--c4); background: var(--c4); } .s5 { stroke: var(--c5); background: var(--c5); }
.donut .dn-v { fill: var(--ink); font-size: 20px; font-weight: 800; font-family: var(--font-ui); letter-spacing: -.02em; }
.donut .dn-l { fill: var(--ink-3); font-size: 11px; font-weight: 600; font-family: var(--font-ui); }
.legend { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }
.legend li:first-child { border-top: 0; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend .lg-l { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .lg-n { color: var(--ink-3); font-size: 12px; min-width: 52px; text-align: right; }
.legend .lg-v { font-weight: 800; min-width: 44px; text-align: right; }

/* échéances */
.ech-list, .vlist, .alerts { display: flex; flex-direction: column; }
.ech { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 20px; border-top: 1px solid var(--line); transition: background .12s; }
.ech:hover, .vrow:hover, .alert:hover { background: var(--surface-2); }
.ech-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 46px; border-radius: 10px; line-height: 1; background: var(--surface-3); color: var(--ink-2); }
.ech-date strong { font-size: 16px; font-weight: 800; }
.ech-date span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; opacity: .8; }
.ech-date.danger { background: var(--danger-soft); color: var(--danger-ink); } .ech-date.warn { background: var(--warn-soft); color: var(--warn-ink); }
.ech-date.info { background: var(--info-soft); color: var(--info-ink); } .ech-date.work { background: var(--work-soft); color: var(--work-ink); }
.ech-date.notice { background: var(--info-soft); color: var(--info-ink); } .ech-date.ok { background: var(--ok-soft); color: var(--ok-ink); }
.ech-txt, .vtxt, .al-txt { display: flex; flex-direction: column; min-width: 0; }
.ech-txt strong, .vtxt strong, .al-txt strong { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ech-txt small, .vtxt small, .al-txt small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ech-amt { font-weight: 800; font-size: 13px; white-space: nowrap; }

/* virements list */
.vrow { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "av txt amt" "av txt date"; column-gap: 12px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--line); }
.vrow .av { grid-area: av; } .vrow .vtxt { grid-area: txt; }
.vamt { grid-area: amt; font-weight: 800; font-size: 13.5px; white-space: nowrap; text-align: right; }
.vdate { grid-area: date; color: var(--ink-3); text-align: right; font-size: 11.5px; }

/* alerts */
.alert { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.alert .btn { grid-column: 2; justify-self: start; }
.al-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.al-ic .ic { width: 16px; height: 16px; }
.alert.danger .al-ic { background: var(--danger-soft); color: var(--danger-ink); } .alert.warn .al-ic { background: var(--warn-soft); color: var(--warn-ink); }
.alert.info .al-ic { background: var(--info-soft); color: var(--info-ink); } .alert.work .al-ic { background: var(--work-soft); color: var(--work-ink); }
.al-txt strong { white-space: normal; } .al-txt small { white-space: normal; }

/* ---------- property cards ---------- */
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.prop { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s, border-color .2s; }
.prop:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.ph { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--nav); }
.ph-svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.prop:hover .ph-svg { transform: scale(1.04); }
.ph-type { position: absolute; left: 12px; top: 12px; padding: 4px 9px; border-radius: 7px; background: rgba(10, 15, 24, .55); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px); letter-spacing: .02em; }
.ph-st { position: absolute; right: 12px; top: 12px; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .5); }
.prop-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.prop-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.prop-addr { font-size: 15px; font-weight: 800; letter-spacing: -.005em; }
.prop-id { font-size: 11px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.prop-city { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 12.5px; font-weight: 500; flex-wrap: wrap; }
.prop-city .ic { width: 13px; height: 13px; }
.prop-city .dot { opacity: .6; }
.prop-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prop-meta dt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.prop-meta dd { font-size: 13.5px; font-weight: 800; margin-top: 2px; white-space: nowrap; }
.prop-foot { display: flex; align-items: center; gap: 10px; }
.prop-loc { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- bien detail ---------- */
.hero-bien { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: stretch; margin-bottom: 22px; }
.hero-ph { position: relative; min-height: 280px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-2); }
.hero-ph .ph-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-txt { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; }
.hero-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 8px 0 12px; }
.hero-kpis > div { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.hero-kpis strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; font-weight: 700; font-size: 13.5px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; display: inline-flex; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.kv { display: flex; flex-direction: column; }
.kv > div { display: grid; grid-template-columns: minmax(140px, 36%) minmax(0, 1fr); gap: 16px; padding: 11px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { font-weight: 600; }
.tenant { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 18px; }
.t-name { font-size: 17px; font-weight: 800; display: block; }
.contact { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.doc-list, .notes, .quitt-list, .rec-list { display: flex; flex-direction: column; }
.doc { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); transition: background .12s; }
.doc:hover { background: var(--surface-2); }
.doc-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger-ink); flex: 0 0 auto; }
.doc-ic .ic { width: 17px; height: 17px; }
.doc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-txt strong { font-size: 13.5px; } .doc-txt small { color: var(--ink-3); }
.notes li { padding: 14px 20px; border-top: 1px solid var(--line); }
.note-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.note-h small { color: var(--ink-3); margin-left: auto; }
.notes p { color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }

/* ---------- loyers grid ---------- */
.grid-wrap { max-height: none; }
.grid-tbl th.mcol { text-align: center; padding: 10px 6px; min-width: 52px; }
.grid-tbl th.mcol span { display: block; text-transform: none; font-size: 12px; color: var(--ink-2); }
.grid-tbl th.mcol small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .04em; margin-top: 1px; }
.grid-tbl th.cur, .grid-tbl td.cur { background: var(--accent-soft); }
.grid-tbl td.mcell { text-align: center; padding: 10px 6px; }
.grid-tbl td.mtot { font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: center; white-space: nowrap; }
.sticky-col { position: sticky; left: 0; z-index: 3; background: var(--surface); min-width: 220px; box-shadow: 1px 0 0 var(--line); }
.tbl th.sticky-col { z-index: 4; background: var(--surface-2); }
.tbl tbody tr:hover .sticky-col { background: var(--surface-2); }
.tbl tfoot .sticky-col { background: var(--surface-2); }
.st { position: relative; display: inline-block; width: 26px; height: 26px; border-radius: 8px; vertical-align: middle; transition: transform .12s, box-shadow .12s; }
.st:hover { transform: scale(1.12); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.st-p { background: var(--ok); }
.st-p::after { content: ''; position: absolute; left: 8px; top: 5px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.st-l { background: var(--warn); }
.st-l::after { content: ''; position: absolute; left: 11px; top: 6px; width: 2px; height: 9px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 0 transparent; }
.st-l::before { content: ''; position: absolute; left: 11px; top: 17px; width: 2px; height: 2px; background: #fff; border-radius: 2px; }
.st-i { background: var(--danger); }
.st-i::before, .st-i::after { content: ''; position: absolute; left: 12px; top: 6px; width: 2px; height: 14px; background: #fff; border-radius: 2px; }
.st-i::before { transform: rotate(45deg); } .st-i::after { transform: rotate(-45deg); }
.st-v { background: var(--surface-3); border: 1.5px dashed var(--line-2); }
.st-t { background: repeating-linear-gradient(135deg, var(--work-soft) 0 4px, var(--surface) 4px 8px); border: 1.5px solid var(--work); }
.st-n { background: transparent; }
.st-n::after { content: ''; position: absolute; left: 9px; top: 12px; width: 8px; height: 2px; background: var(--line-2); border-radius: 2px; }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; font-weight: 600; color: var(--ink-2); align-items: center; }
.st-legend li { display: inline-flex; align-items: center; gap: 6px; }
.st-legend .st { width: 16px; height: 16px; border-radius: 5px; transform: none !important; box-shadow: none !important; }
.st-legend .st::before, .st-legend .st::after { transform: scale(.6) rotate(0); transform-origin: 50% 50%; left: 4px; top: 1px; }
.st-legend .st-p::after { transform: scale(.6) rotate(45deg); left: 5px; top: 0; }
.st-legend .st-i::before { transform: scale(.6) rotate(45deg); left: 7px; top: 1px; } .st-legend .st-i::after { transform: scale(.6) rotate(-45deg); left: 7px; top: 1px; }
.st-legend .st-l::after { left: 7px; top: 2px; height: 7px; transform: none; } .st-legend .st-l::before { left: 7px; top: 11px; transform: none; }
.st-legend .st-n::after { left: 4px; top: 7px; transform: none; }

/* ---------- bank ---------- */
.balance { padding: 22px 24px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.balance::before { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 68%); pointer-events: none; }
.hero-num { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0 6px; position: relative; }
.bal-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); position: relative; }
.bal-row strong { font-size: 15px; font-weight: 800; white-space: nowrap; }
.bal-next { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger-ink); position: relative; }
.bal-next > span { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .5); flex: 0 0 auto; }
.bal-next .ic { width: 15px; height: 15px; }
.bal-next div { display: flex; flex-direction: column; min-width: 0; } .bal-next strong { font-size: 13px; } .bal-next small { opacity: .85; }
.meter { height: 8px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.meter-l { margin: 8px 0 14px; font-size: 12.5px; }
.rec { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rec > div { display: flex; flex-direction: column; min-width: 0; }
.rec strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rec small { color: var(--ink-3); }
.rec .num { font-weight: 800; white-space: nowrap; }

/* ---------- documents ---------- */
.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.docs-side { padding: 10px; position: sticky; top: 84px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: background .12s, color .12s; }
.side-nav a .ic { width: 16px; height: 16px; color: var(--ink-3); }
.side-nav a span:nth-child(2) { flex: 1; }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.on { background: var(--accent-soft); color: var(--accent-ink); } .side-nav a.on .ic { color: var(--accent-ink); } .side-nav a.on .count { background: var(--surface); }
.storage { margin: 12px 4px 4px; padding: 14px 12px 10px; border-top: 1px solid var(--line); }
.storage small { display: block; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; } .storage p { font-size: 12px; margin-top: 8px; }
.docs-main { display: flex; flex-direction: column; min-width: 0; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; margin-bottom: 18px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); color: var(--ink-2); font-weight: 600; text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .ic { width: 22px; height: 22px; color: var(--accent-ink); margin-bottom: 4px; } .dropzone a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; } .dropzone small { color: var(--ink-3); font-weight: 500; }

/* ---------- paramètres ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; grid-column: span 2; }
.field.half { grid-column: span 1; }
.field span { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.field input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 13.5px; outline: 0; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.quote { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); font-weight: 600; margin-top: 8px; }
.tgl-list .tgl { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.tgl > div { display: flex; flex-direction: column; min-width: 0; } .tgl strong { font-size: 13.5px; } .tgl small { color: var(--ink-3); }
.switch { position: relative; width: 44px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::after { transform: translateX(18px); }
.bank-card { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 16px; }
.bank-card > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .bank-card small { color: var(--ink-3); } .bank-card .mono { font-size: 12px; }
.bank-logo { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: #0E1726; color: #fff; font-weight: 800; font-size: 22px; flex: 0 0 auto; font-family: var(--font-display); }
.chk { position: relative; width: 20px; height: 20px; flex: 0 0 auto; }
.chk input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.chk span { position: absolute; inset: 0; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); }
.chk input:checked + span { background: var(--accent); border-color: var(--accent); }
.chk input:checked + span::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.quitt-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.quitt-list li:first-child { border-top: 0; }
.quitt-list li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; } .quitt-list small { color: var(--ink-3); }
.page-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 15, 24, .45); backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-box { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); border: 1px solid var(--line); animation: pop .25s cubic-bezier(.2, .8, .2, 1) both; }
.modal-box.wide { width: min(680px, 100%); }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.modal-h h2 { font-size: 17px; }
.modal-b { padding: 6px 20px 18px; overflow: auto; }
.modal-f { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-f .btn-primary { margin-left: auto; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); transition: all .15s; }
.choice:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.choice .ic { width: 20px; height: 20px; color: var(--accent-ink); margin-bottom: 4px; } .choice strong { font-size: 13.5px; } .choice small { color: var(--ink-3); font-size: 11.5px; line-height: 1.3; }
.notif-list .notif { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.notif-list .notif:first-child { border-top: 0; }
.notif-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.notif-ic .ic { width: 16px; height: 16px; }
.notif-ic.danger { background: var(--danger-soft); color: var(--danger-ink); } .notif-ic.warn { background: var(--warn-soft); color: var(--warn-ink); } .notif-ic.info { background: var(--info-soft); color: var(--info-ink); } .notif-ic.ok { background: var(--ok-soft); color: var(--ok-ink); }
.notif strong { font-size: 13.5px; } .notif p { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

/* ---------- motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
.page-head { animation: fadeUp .5s ease both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- sidebar drawer / responsive ---------- */
.sb-overlay { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(10, 15, 24, .5); backdrop-filter: blur(2px); }

@media (max-width: 1400px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-8 { grid-column: span 12; } .span-4 { grid-column: span 6; } .span-5 { grid-column: span 6; } .span-3 { grid-column: span 12; }
  .alert { grid-template-columns: 34px minmax(0, 1fr) auto; } .alert .btn { grid-column: auto; align-self: center; }
  .hero-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .user-txt { display: none; }
  .search { width: min(300px, 100%); }
  .g-2, .g-bank { grid-template-columns: minmax(0, 1fr); }
  .hero-bien { grid-template-columns: minmax(0, 1fr); } .hero-ph { min-height: 220px; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); } .docs-side { position: static; }
  .side-nav { display: flex; flex-wrap: wrap; gap: 4px; } .side-nav li a .count { margin-left: 6px; } .storage { display: none; }
}
@media (max-width: 1023px) {
  .only-mobile { display: inline-grid !important; } .only-desktop { display: none !important; }
  .app, body.sb-collapsed .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: min(300px, 86vw); height: 100dvh; transform: translateX(-104%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-3); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-overlay { display: block; }
  body.sb-open { overflow: hidden; }
  .sb-close { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
  .sb-close:hover { background: var(--nav-2); color: #fff; }
  body.sb-collapsed .lbl { display: initial; } body.sb-collapsed .logo-text { display: flex; } body.sb-collapsed .org-txt { display: flex; }
  body.sb-collapsed .nav a { justify-content: flex-start; padding: 10px 12px; }
  body.sb-collapsed .brand { justify-content: space-between; padding-inline: 6px; }
  .topbar { padding: 0 20px; gap: 10px; }
  .main { padding: 22px 20px 48px; }
  .crumb { display: none; }
  .search { margin-left: 0; flex: 1; }
}
@media (max-width: 767px) {
  body { font-size: 13.5px; }
  h1 { font-size: 28px; }
  .kpis, .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 14px 14px 12px; } .kpi-v { font-size: 24px; } .spark { width: 64px; }
  .g-dash { gap: 14px; } .span-4, .span-5 { grid-column: span 12; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart { min-width: 600px; }
  .topbar .icon-btn.has-dot { display: none; }
    .btn-primary span, .top-actions .btn span { display: none; } .top-actions .btn { width: 38px; padding: 0; justify-content: center; }
  .page-head .actions .btn span { display: inline; } .login-btn span { display: inline; }
  .page-head .actions .btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .props { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .prop-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form { grid-template-columns: minmax(0, 1fr); } .field.half { grid-column: span 1; }
  .kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 16px; }
  .card-h, .card-b { padding-inline: 16px; } .card-f { padding-inline: 16px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 16px; } .tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
  .ech, .vrow, .alert, .doc, .notes li, .tgl-list .tgl { padding-inline: 16px; }
  .ech-amt { display: none; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-num { font-size: 36px; }
  .bal-row { grid-template-columns: minmax(0, 1fr); gap: 8px; } .bal-row > div { display: flex; justify-content: space-between; align-items: baseline; }
  .dpe-nums { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .strip > div { min-width: 104px; padding: 12px 14px; } .strip strong { font-size: 16px; }
  .toolbar .view-ctl { width: 100%; } .toolbar .view-ctl a { flex: 1; text-align: center; }
  .sticky-col { min-width: 170px; }
  .modal { padding: 0; align-items: flex-end; } .modal-box { max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
}
@media (max-width: 420px) {
  .kpis, .kpis.k4 { grid-template-columns: minmax(0, 1fr); }
  .top-actions .user { padding: 2px; } .search kbd { display: none; }
  .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1; justify-content: center; }
  .legend li { grid-template-columns: 10px minmax(0, 1fr) auto; } .legend .lg-n { display: none; }
}


/* ============================================================
   Connexion (index.html)
   ============================================================ */
.login-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); min-height: 100vh; }
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }

.login-panel { position: relative; background: radial-gradient(1200px 600px at -10% -10%, #1E2B47 0%, transparent 60%), linear-gradient(160deg, var(--nav-2) 0%, var(--nav) 100%); color: var(--nav-ink); overflow: hidden; }
.login-panel::after { content: ''; position: absolute; inset: auto -120px -160px auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(43,176,138,.22) 0%, rgba(43,176,138,0) 70%); pointer-events: none; }
.login-panel__inner { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100%; padding: clamp(28px, 4vw, 56px) clamp(24px, 5vw, 72px); box-sizing: border-box; }
.login-logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.login-logo .logo-mark { width: 40px; height: 40px; }
.login-logo .logo-text { display: inline-flex; align-items: baseline; gap: 6px; }
.login-logo .logo-name { font-family: var(--font-display); font-size: 1.55rem; letter-spacing: .01em; }
.login-logo .logo-sub { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--nav-ink-2); }
.login-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.08; margin: clamp(40px, 7vh, 90px) 0 18px; color: #fff; max-width: 14ch; }
.login-title em { font-style: italic; color: var(--accent-2); }
.login-lead { font-size: 1.02rem; line-height: 1.65; color: var(--nav-ink); opacity: .85; max-width: 46ch; margin: 0 0 34px; }
.login-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 28px; justify-content: start; }
.login-stats li { display: grid; gap: 4px; padding-left: 14px; border-left: 2px solid rgba(43,176,138,.55); }
.login-stats strong { font-size: 1.45rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.login-stats span { font-size: .8rem; color: var(--nav-ink-2); }
.login-art { margin-top: auto; padding-top: 40px; }
.login-art__svg { width: 100%; max-width: 560px; height: auto; display: block; }
.login-credit { margin: 28px 0 0; font-size: .74rem; color: var(--nav-ink-2); }
.login-credit a { color: inherit; text-decoration: none; }
.login-credit strong { color: var(--accent-2); font-weight: 700; }

.login-form-wrap { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px); background: var(--bg); }
.login-card { width: min(440px, 100%); box-sizing: border-box; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); padding: clamp(26px, 3.4vw, 40px); display: grid; gap: 18px; animation: fadeUp .55s cubic-bezier(.2,.7,.2,1) both; }
.login-card__head h2 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; margin: 6px 0 6px; letter-spacing: -.01em; }
.login-card__head p { margin: 0; color: var(--ink-3); font-size: .92rem; }
.login-kicker { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); }
.login-field { display: grid; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.login-field input { width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: inherit; font-size: .95rem; transition: border-color .15s, box-shadow .15s, background .15s; }
.login-field input::placeholder { color: var(--ink-3); font-weight: 400; }
.login-field input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.login-pass { position: relative; display: block; }
.login-pass input { padding-right: 48px; }
.login-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.login-eye svg { width: 18px; height: 18px; }
.login-eye:hover { background: var(--surface-3); color: var(--ink); }
.login-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .84rem; }
.login-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); cursor: pointer; }
.login-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.login-link { color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.login-link:hover { text-decoration: underline; }
.login-error { margin: -6px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger-ink); font-size: .84rem; font-weight: 600; border: 1px solid rgba(180,35,24,.18); }
.login-btn { height: 50px; width: 100%; justify-content: center; gap: 10px; font-size: .98rem; border-radius: var(--r); position: relative; }
.login-btn .ic { width: 18px; height: 18px; transition: transform .2s; }
.login-btn:hover .ic { transform: translateX(3px); }
.login-btn.is-loading { pointer-events: none; opacity: .85; }
.login-card.shake { animation: shake .4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.login-demo { margin-top: 4px; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); border: 1px dashed var(--accent-line); display: grid; gap: 8px; }
.login-demo__lbl { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); }
.login-demo__row { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; color: var(--ink-2); }
.login-demo__row code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; font-weight: 700; color: var(--accent-ink); background: var(--surface); border: 1px solid var(--accent-line); border-radius: 6px; padding: 3px 10px; }
.login-foot { margin: 0; text-align: center; font-size: .74rem; color: var(--ink-3); }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-panel { min-height: auto; }
  .login-panel__inner { padding-bottom: 32px; }
  .login-title { margin-top: 28px; }
  .login-art { display: none; }
  .login-stats { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .login-form-wrap { align-items: start; }
}
@media (max-width: 480px) {
  .login-stats { grid-template-columns: 1fr 1fr; }
  .login-row { flex-direction: column; align-items: flex-start; }
}

/* Déconnexion (barre latérale) */
.sb-bottom .logout { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--nav-ink-2); text-decoration: none; font-size: .84rem; font-weight: 600; transition: background .15s, color .15s; }
.sb-bottom .logout .ic { width: 18px; height: 18px; flex: none; }
.sb-bottom .logout:hover { background: var(--nav-3); color: #fff; }
.sb-collapsed .sb-bottom .logout { justify-content: center; padding: 9px 0; }
