

:root {

  --font-body:    'Segoe UI', 'Segoe UI Variable', system-ui, -apple-system, sans-serif;
  --font-display: var(--font-body);
  --font-num:     var(--font-body);

  --ink:           #3A3F44;
  --ink-soft:      #5E6368;
  --ink-muted:     #6E7379;
  --surface:       #FFFFFF;
  --surface-alt:   #FAFBFC;
  --surface-sunk:  #E9EBEF;
  --border:        #E3E5EA;
  --border-strong: #CFD3DB;

  --accent:       #DFB9A4;
  --accent-hover: #CFA48D;
  --accent-press: #BF9078;
  --accent-ink:   #4A3428;   
  --accent-pale:  #F6EAE2;
  --accent-line:  #B98565;   
  --accent-text:  #A9714F;   
  --accent-grad:  none;

  --brand:       var(--accent);
  --brand-hover: var(--accent-hover);
  --brand-press: var(--accent-press);
  --brand-pale:  var(--accent-pale);
  --brand-text:  var(--accent-text);
  --accent-soft: var(--accent-line);

  --neutral-warm:      #E7DED3;
  --neutral-warm-line: #D6C7B6;
  --neutral-warm-text: #6B563F;
  --copper:       var(--accent-line);
  --copper-hover: var(--accent-press);
  --copper-pale:  var(--neutral-warm);
  --copper-text:  var(--accent-text);

  --focus-ring: var(--ink);

  
  --navy:        var(--ink);
  --navy-soft:   var(--ink-soft);
  --navy-pale:   var(--surface-alt);
  --grey-bg:     var(--surface-alt);
  --grey-card:   var(--surface);
  --grey-border: var(--border);
  --grey-mid:    var(--ink-muted);
  --grey-txt:    var(--ink-muted);
  --ocre:        var(--ink-soft);
  --ocre-pale:   var(--surface-alt);
  --ocre-mid:    var(--ink-muted);
  --sienna:      var(--ink);
  --sienna-pale: var(--surface-alt);
  --blue-light:  var(--ink-muted);
  --blue-pale:   var(--surface-alt);

  
  --ok:          #3E6149;
  --ok-pale:     #DEE9E0;
  --bad:         #7C463C;
  --bad-pale:    #F0DCD8;
  --neutral:     #5E6368;
  --neutral-pale:#E9EBEF;

  --success:     var(--ok);
  --success-pale:var(--ok-pale);
  --red:         var(--bad);
  --red-pale:    var(--bad-pale);
  --warn:        #6E5A2E;
  --warn-pale:   #F0E7D3;


  --ink-solid: #3A3F44;
  --ok-solid:  #3E6149;
  --red-solid: #7C463C;

  --score-a:      #3E6149;
  --score-a-pale: #DEE9E0;
  --score-b:      #6F8F5A;
  --score-b-pale: #E6EEDF;
  --score-c:      #A98A3E;
  --score-c-pale: #F2E9D3;
  --score-d:      #B5703D;
  --score-d-pale: #F3E1D0;
  --score-e:      #7C463C;
  --score-e-pale: #F0DCD8;

  
  --radius-sm:  4px;   
  --radius-md:  5px;   
  --radius-lg:  6px;   
  --radius-xl:  8px;   
  --radius-2xl: 10px;  

  --shadow-sm: 0 1px 3px rgba(58,63,68,.08);
  --shadow-md: 0 6px 20px rgba(58,63,68,.08);
  --shadow-lg: 0 16px 40px rgba(58,63,68,.10);
  --shadow-nav: none;

  
  --icon-stroke: 2.5;
  --icon-xs: 14px;  
  --icon-sm: 16px;  
  --icon-md: 20px;  
  --icon-lg: 24px;  

  --accent-text-warm: var(--ink);

  --sidebar-width: 248px;
  --sidebar-width-collapsed: 72px;

  --logo-ink:    #2E2A27;
  --logo-accent: #E3A57D;
}

:root[data-theme="dark"] {
  --ink:           #E9EAEC;
  --ink-soft:      #C3C6CB;
  --ink-muted:     #9498A0;
  --surface:       #1C1E21;
  --surface-alt:   #26292D;
  --surface-sunk:  #2E3136;
  --border:        #34373C;
  --border-strong: #464A51;

  --logo-ink:      #FFFFFF;

  --accent:       #DFB9A4;
  --accent-hover: #E8C7B4;
  --accent-press: #CFA48D;
  --accent-ink:   #2A1D16;
  --accent-pale:  #3A2E28;
  --accent-line:  #C99977;
  --accent-text:  #E3A57D;
  --accent-grad:  none;

  --neutral-warm:      #3D3229;
  --neutral-warm-line: #544435;
  --neutral-warm-text: #E8C9A8;

  --ok:          #7FBF98;
  --ok-pale:     #1E3328;
  --bad:         #E08A79;
  --bad-pale:    #3A2420;
  --neutral:     #A8ACB1;
  --neutral-pale:#2C2F33;

  --warn:        #D9B872;
  --warn-pale:   #3A3020;

  --score-a:      #7FBF98;
  --score-a-pale: #1E3328;
  --score-b:      #9EC17F;
  --score-b-pale: #273A22;
  --score-c:      #D9B872;
  --score-c-pale: #3A3020;
  --score-d:      #E0966A;
  --score-d-pale: #3D2A1E;
  --score-e:      #E08A79;
  --score-e-pale: #3A2420;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 6px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
}

html, body, input, select, textarea, button { font-family: var(--font-body); }

.amount, .money, td.num, .ref {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1; letter-spacing:0;
}

a               { color: var(--accent-text); text-underline-offset: 2px; }
a:hover         { color: var(--ink); }
::selection     { background: var(--neutral-warm); color: var(--ink); }

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:var(--font-body); background:var(--surface); color:var(--ink); min-height:100vh; font-size:14px; line-height:1.55; -webkit-font-smoothing:antialiased; transition:background .2s ease, color .2s ease; }

h1, h2, h3, .modal-top h2, .section-head h2, .sc-head h2, .section-title,
.t-name, .u-name, .tenant-name, .bc-name, .rev-tenant {
  font-family: var(--font-display);
}

.kpi-val, .t-total, .m-total, .h-amount, .modal-amount-value,
.t-loyer, .stat-card .s-val, .bar-val, .rev-data-val, .dash-alert-count,
.day-input {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.btn, .badge, .role-chip, .date-tab, .month-chip, .modal-amount-label,
.rev-count, .bc-count, .toggle-btn, .form-group label, .dash-activity-title,
.history-table th, .period-label, .batch-section-title, .filter-label,
.t-table th, .m-table th {
  font-family: var(--font-body);
}

:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }

.sidebar {
  position:fixed; top:0; left:0; bottom:0; width:var(--sidebar-width); z-index:200;
  background:var(--surface); border-right:1px solid var(--border);
  display:flex; flex-direction:column; transition:width .18s ease;
  font-family:'Segoe UI', system-ui, -apple-system, sans-serif;
}
.sidebar-brand { display:flex; align-items:center; gap:12px; padding:18px 20px; }
.sidebar-toggle-btn { margin-left:auto; flex-shrink:0; transition:transform .18s ease; }
.brand-logo { display:block; width:auto; height:24px; flex-shrink:0; }
.brand-icon { display:none; width:40px; height:40px; flex-shrink:0; }
.sidebar-brand-text { display:flex; flex-direction:column; gap:7px; line-height:1.3; min-width:0; }
.sidebar-brand-text .brand-logo { height:23px; }
.sidebar-brand-tag { font-size:12.5px; font-weight:600; color:var(--grey-txt); }

.sidebar-links { flex:1; overflow-y:auto; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.sidebar-links a {
  display:flex; align-items:center; gap:10px;
  color:var(--grey-txt); text-decoration:none; font-size:13.5px; font-weight:600;
  padding:10px 12px; border-radius:0 var(--radius-md) var(--radius-md) 0;
  border-left:3px solid transparent; transition:background .15s, color .15s, border-color .15s;
}
.sidebar-links a:hover { background:var(--surface-alt); color:var(--ink); }
.sidebar-links a.active { background:var(--neutral-warm); color:var(--neutral-warm-text); border-left-color:var(--neutral-warm-text); font-weight:700; }
.sidebar-links a .icon { flex-shrink:0; }
.nav-sep { display:none; }
@media (min-width:861px) {
  .nav-sep { display:block; height:1px; margin:6px 12px; background:var(--border); flex-shrink:0; }
}
.nav-badge {
  margin-left:auto; background:var(--red-solid); color:#fff; font-size:11px; font-weight:700;
  line-height:1; min-width:18px; height:18px; border-radius:var(--radius-sm);
  display:inline-flex; align-items:center; justify-content:center; padding:0 5px;
}

.session-icon-btn {
  display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px;
  border-radius:var(--radius-lg); border:1px solid var(--border); background:var(--surface);
  color:var(--ink-soft); cursor:pointer; text-decoration:none; flex-shrink:0;
  transition:background .15s, color .15s;
}
.session-icon-btn:hover { background:var(--surface-alt); color:var(--ink); }

.theme-icon-dark { display:none; }
:root[data-theme="dark"] .theme-icon-light { display:none; }
:root[data-theme="dark"] .theme-icon-dark { display:inline-flex; }

.session-avatar-link { display:inline-flex; text-decoration:none; flex-shrink:0; }
.session-avatar {
  width:34px; height:34px; border-radius:var(--radius-xl); display:flex; align-items:center;
  justify-content:center; font-family:var(--font-display); font-size:13px; font-weight:700;
  color:var(--ink); background:var(--surface-alt); border:1px solid var(--border); flex-shrink:0;
}
.session-avatar.admin   { background:var(--accent-pale); color:var(--accent-text); border-color:rgba(185,133,101,.25); }
.session-avatar.lecteur { color:var(--grey-txt); }
.session-avatar-img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }

.sidebar-session { padding:14px 12px 16px; border-top:1px solid var(--border); }
.sidebar-session-label {
  display:block; font-size:11px; font-weight:700; color:var(--grey-txt);
  text-transform:uppercase; letter-spacing:.7px; padding:0 4px 10px;
}
.sidebar-session-user {
  display:flex; align-items:center; gap:10px; padding:6px 4px; margin-bottom:8px;
  border-radius:var(--radius-md); text-decoration:none; transition:background .15s;
}
.sidebar-session-user:hover { background:var(--surface-alt); }
.sidebar-session-name {
  flex:1; min-width:0; font-size:13px; font-weight:700; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.sidebar-session-actions { display:flex; gap:8px; padding:0 4px; }

.icon { flex-shrink:0; stroke-width:var(--icon-stroke); vertical-align:-3px; }
.icon-xs { width:var(--icon-xs); height:var(--icon-xs); }
.icon-sm { width:var(--icon-sm); height:var(--icon-sm); }
.icon-md { width:var(--icon-md); height:var(--icon-md); }
.icon-lg { width:var(--icon-lg); height:var(--icon-lg); }

.mobile-topbar-toggle {
  display:none;
  position:fixed; top:12px; left:12px; z-index:210;
  flex-direction:column; justify-content:center; align-items:center; gap:4px;
  width:44px; height:44px; padding:8px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm);
  cursor:pointer; box-shadow:var(--shadow-sm);
}
.mobile-topbar-toggle span { display:block; height:2px; width:20px; background:var(--ink); border-radius:2px; transition:transform .18s, opacity .18s; }
.mobile-topbar-toggle[aria-expanded="true"] span:nth-child(1) { transform:translateY(6px) rotate(45deg); }
.mobile-topbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity:0; }
.mobile-topbar-toggle[aria-expanded="true"] span:nth-child(3) { transform:translateY(-6px) rotate(-45deg); }
.sidebar-scrim { display:none; position:fixed; inset:0; background:rgba(58,63,68,.4); z-index:199; }

.impersonation-banner {
  display:flex; align-items:center; justify-content:center; gap:16px; flex-wrap:wrap;
  padding:10px 16px; background:var(--warn-pale); color:var(--warn);
  border-bottom:1px solid rgba(110,90,46,.3); font-size:13px; font-weight:600; text-align:center;
}
.impersonation-banner form { margin:0; }
body.impersonating .sidebar { top:42px; }
body.impersonating .mobile-topbar-toggle { top:54px; }

@media (max-width:860px) {
  .mobile-topbar-toggle { display:flex; }
  .sidebar-toggle-btn { display:none; }
  .sidebar {
    transform:translateX(-100%); transition:transform .2s ease;
    box-shadow:var(--shadow-lg); top:0; height:100vh; width:264px;
  }
  .sidebar.open { transform:translateX(0); }
  .sidebar-scrim.open { display:block; }
  .sidebar-brand { padding-top:60px; }
  body.impersonating .sidebar { height:calc(100vh - 42px); }
}

.main-area { margin-left:var(--sidebar-width); transition:margin-left .18s ease; }

.container { max-width:1800px; margin:0 auto; padding:32px 40px 48px; }
@media (max-width:860px) { .main-area { margin-left:0; } .container { padding:68px 24px 48px; } }

@media (min-width:861px) {
  :root[data-sidebar="collapsed"] .sidebar { width:var(--sidebar-width-collapsed); }
  :root[data-sidebar="collapsed"] .main-area { margin-left:var(--sidebar-width-collapsed); }
  :root[data-sidebar="collapsed"] .sidebar-brand-text,
  :root[data-sidebar="collapsed"] .sidebar-session-label,
  :root[data-sidebar="collapsed"] .sidebar-session-name,
  :root[data-sidebar="collapsed"] .nav-badge,
  :root[data-sidebar="collapsed"] .nav-label { display:none; }
  :root[data-sidebar="collapsed"] .sidebar-brand { flex-direction:column; justify-content:center; gap:10px; padding:16px 8px; }
  :root[data-sidebar="collapsed"] .brand-icon { display:block; }
  :root[data-sidebar="collapsed"] .sidebar-toggle-btn { margin-left:0; transform:rotate(180deg); }
  :root[data-sidebar="collapsed"] .sidebar-links a { justify-content:center; gap:0; padding:10px 8px; }
  :root[data-sidebar="collapsed"] .sidebar-session-user { justify-content:center; }
}
@media (max-width:600px) { .container { padding:68px 16px 36px; } }

.page-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:26px; flex-wrap:wrap; gap:12px; }
.page-header h1 { font-size:25px; font-weight:700; color:var(--ink); letter-spacing:-.5px; margin-bottom:4px; }
.page-header h1 em { font-style:normal; font-weight:700; color:var(--ink); }
.page-header p { color:var(--grey-txt); font-size:13.5px; }
.dash-greeting { color:var(--accent-text); font-size:14px; font-weight:700; margin-bottom:2px; }


.flash { padding:12px 16px; border-radius:var(--radius-md); margin-bottom:18px; font-size:13.5px; font-weight:600; display:flex; align-items:center; gap:8px; }
.flash-success { background:var(--success-pale); color:var(--success); border:1px solid rgba(62,97,73,.2); }
.flash-error   { background:var(--red-pale); color:var(--red); border:1px solid rgba(124,70,60,.2); }
.flash-info    { background:var(--navy-pale); color:var(--navy-soft); border:1px solid rgba(58,63,68,.15); }
.flash-warn    { background:var(--warn-pale); color:var(--warn); border:1px solid rgba(110,90,46,.2); }

.btn {
  display:inline-flex; align-items:center; gap:6px; border:none; border-radius:999px;
  padding:10px 20px; font-size:13px; font-weight:600; font-family:var(--font-body); cursor:pointer;
  transition:background .15s, box-shadow .15s, transform .1s, border-color .15s, color .15s;
  text-decoration:none; letter-spacing:.1px; box-shadow:var(--shadow-sm);
}
.btn:active { transform:scale(.97); }
.btn-primary { background:var(--surface); color:var(--ink); border:1.5px solid var(--border-strong); }
.btn-primary:hover { border-color:var(--ink); background:var(--surface-alt); }
.btn-ocre { background:var(--ocre); color:#fff; }
.btn-ocre:hover { background:var(--ink-soft); box-shadow:var(--shadow-sm); }
.btn-accent { background:var(--accent); color:var(--accent-ink); }
.btn-accent:hover { background:var(--accent-hover); box-shadow:var(--shadow-sm); }
.btn-outline { background:var(--surface); color:var(--ink); border:1.5px solid var(--border-strong); }
.btn-outline:hover { border-color:var(--ink); background:var(--surface-alt); }
.btn-danger { background:transparent; color:var(--red); border:1.5px solid rgba(124,70,60,.25); }
.btn-danger:hover { background:var(--red-pale); border-color:var(--red); }
.btn-ghost { background:var(--surface-alt); color:var(--grey-txt); border:1px solid var(--border); }
.btn-ghost:hover { background:var(--border); color:var(--ink); }
.btn-filter { background:var(--ink-solid); color:#fff; }
.btn-filter:hover { background:var(--ink-soft); }
.btn-sm { padding:7px 15px; font-size:12px; }
.btn-lg { padding:15px 28px; font-size:14.5px; gap:9px; }
.btn:disabled { opacity:.45; cursor:not-allowed; transform:none; }

.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-group { display:flex; flex-direction:column; gap:6px; }
.form-group.full { grid-column:1/-1; }
.form-group label { font-family:var(--font-body); font-size:11px; font-weight:700; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.7px; }
.form-group input, .form-group select {
  border:1.5px solid var(--grey-border); border-radius:var(--radius-sm);
  padding:10px 13px; font-size:14px; font-family:var(--font-body); font-weight:500;
  background:var(--grey-bg); color:var(--ink); width:100%;
  transition:border-color .15s, box-shadow .15s; outline:none;
}
.form-group input:focus, .form-group select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(185,133,101,.15); background:var(--grey-card); }
.form-group input[type="password"] { letter-spacing:3px; }
.form-group textarea {
  border:1.5px solid var(--grey-border); border-radius:var(--radius-sm);
  padding:10px 13px; font-size:14px; font-family:var(--font-body); font-weight:500;
  background:var(--grey-bg); color:var(--ink); width:100%; resize:vertical;
  transition:border-color .15s, box-shadow .15s; outline:none;
}
.form-group textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(185,133,101,.15); background:var(--grey-card); }
.hint { font-size:11.5px; color:var(--grey-txt); margin-top:3px; line-height:1.5; }
.form-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; padding-top:16px; border-top:1px solid var(--grey-border); }
.check-row { display:flex; align-items:center; gap:10px; }
.check-row input { width:17px; height:17px; accent-color:var(--ocre); cursor:pointer; }
.check-row label { font-family:var(--font-body); font-size:14px; font-weight:500; color:var(--ink); text-transform:none; letter-spacing:0; cursor:pointer; }
.pw-strength { height:4px; border-radius:2px; margin-top:6px; transition:all .3s; background:var(--grey-border); }
.pw-weak   { background:var(--red); width:33%; }
.pw-medium { background:var(--warn); width:66%; }
.pw-strong { background:var(--success); width:100%; }

@media (max-width:600px) {
  .form-grid { grid-template-columns:1fr; }
}

.modal-overlay { display:none; position:fixed; inset:0; background:rgba(15,19,32,.55); z-index:500; align-items:center; justify-content:center; backdrop-filter:blur(4px); padding:16px; }
.modal-overlay.open { display:flex; }
.modal { background:var(--grey-card); border-radius:var(--radius-xl); width:520px; max-width:100%; max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-lg); animation:popIn .18s ease; }
@keyframes popIn { from{opacity:0;transform:scale(.97) translateY(4px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal-top { background:var(--surface-alt); border-bottom:1px solid var(--border); padding:22px 28px 18px; }
.modal-top h2 { font-size:18px; font-weight:700; color:var(--ink); letter-spacing:-.3px; margin-bottom:3px; display:flex; align-items:center; gap:8px; }
.modal-top .modal-sub { font-size:13px; color:var(--grey-txt); }
.modal-body { padding:22px 28px 26px; }
@media (max-width:480px) {
  .modal-top { padding:18px 20px 16px; }
  .modal-body { padding:18px 20px 22px; }
}

.modal-amount-block { background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px 18px; display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; gap:10px; flex-wrap:wrap; }
.modal-amount-label { font-size:11px; font-weight:700; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.8px; }
.modal-amount-value { font-size:28px; font-weight:800; color:var(--ink); letter-spacing:-.5px; }
.modal-check { display:flex; align-items:center; gap:12px; padding:13px 16px; background:var(--surface-alt); border:1.5px solid var(--border); border-radius:var(--radius-md); margin-bottom:22px; cursor:pointer; }
.modal-check input { width:17px; height:17px; cursor:pointer; accent-color:var(--ink); flex-shrink:0; }
.modal-check label { font-size:13.5px; font-weight:600; color:var(--ink); cursor:pointer; flex:1; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; }

.modal.is-generating { position:relative; overflow:hidden; }
.gen-overlay { display:none; position:absolute; inset:0; z-index:5; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:24px; text-align:center; background:color-mix(in srgb, var(--grey-card) 97%, transparent); }
.modal.is-generating .gen-overlay { display:flex; animation:fadeIn .2s ease; }
.gen-spinner { width:44px; height:44px; border-radius:50%; border:3px solid var(--border); border-top-color:var(--accent-text); animation:genSpin .9s linear infinite; }
.gen-titre { font-size:15px; font-weight:700; color:var(--ink); }
.gen-etape { font-size:13px; color:var(--grey-txt); min-height:1.4em; }
.gen-barre { width:180px; height:4px; border-radius:999px; background:var(--border); overflow:hidden; }
.gen-barre span { display:block; width:40%; height:100%; border-radius:999px; background:var(--accent); animation:genBarre 1.4s ease-in-out infinite; }
@keyframes genSpin { to { transform:rotate(360deg); } }
@keyframes genBarre { from { transform:translateX(-100%); } to { transform:translateX(250%); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) {
  .gen-spinner { animation-duration:2.4s; }
  .gen-barre span { animation-duration:3s; }
}

.doc-modal { width:min(920px, 100%); display:flex; flex-direction:column; }
.doc-modal .modal-top { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.doc-modal .modal-body { padding:0; background:var(--surface-alt); }
.doc-frame { display:block; width:100%; height:min(72vh, 900px); border:0; background:#fff; }
.doc-mobile { display:none; padding:28px 20px; text-align:center; color:var(--grey-txt); font-size:14px; }
.doc-modal .modal-actions { padding:14px 20px; border-top:1px solid var(--border); }
@media (max-width:860px) {
  .doc-frame { display:none; }
  .doc-mobile { display:block; }
}

.toast-container { position:fixed; bottom:20px; right:20px; left:20px; z-index:9999; display:flex; flex-direction:column; align-items:flex-end; gap:8px; pointer-events:none; }
.toast { pointer-events:auto; padding:13px 20px; border-radius:var(--radius-md); font-size:13.5px; font-weight:600; box-shadow:var(--shadow-lg); animation:slideUp .25s ease; display:flex; align-items:center; gap:10px; max-width:360px; width:100%; }
.toast-success { background:var(--ink-solid); color:#fff; border-left:4px solid var(--ocre); }
.toast-error { background:var(--surface); color:var(--sienna); border:1px solid var(--sienna-pale); border-left:4px solid var(--sienna); }
.toast-warn { background:var(--surface); color:var(--warn); border:1px solid var(--warn-pale); border-left:4px solid var(--warn); }
@keyframes slideUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
table { width:100%; border-collapse:collapse; }

.list-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-2xl); overflow:hidden; box-shadow:var(--shadow-sm); }

.detail-section { padding:20px; border-top:1px solid var(--border); }
.detail-section:first-child { border-top:none; }
.detail-section h3 { font-size:13px; font-weight:700; color:var(--ink); margin:0 0 14px; text-transform:uppercase; letter-spacing:.6px; }
.photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; }
.photo-thumb { position:relative; border-radius:var(--radius-sm); overflow:hidden; aspect-ratio:4/3; border:1px solid var(--border); background:var(--surface-alt); }
.photo-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.photo-thumb form { position:absolute; top:6px; right:6px; margin:0; }
.photo-thumb .btn-danger {
  width:26px; height:26px; padding:0; border-radius:50%;
  background:var(--red-solid); color:#fff; border:2px solid var(--surface);
  display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-md);
}
.photo-thumb .btn-danger:hover { opacity:.85; background:var(--red-solid); }
.photo-thumb img.photo-zoomable { cursor:zoom-in; transition:filter .15s; }
.photo-thumb img.photo-zoomable:hover { filter:brightness(.92); }

.lightbox-content { position:relative; max-width:92vw; max-height:92vh; }
.lightbox-content img { display:block; max-width:92vw; max-height:92vh; object-fit:contain; border-radius:var(--radius-md); box-shadow:var(--shadow-lg); }
.lightbox-close {
  position:absolute; top:-14px; right:-14px; width:32px; height:32px; border-radius:50%;
  background:var(--ink-solid); color:#fff; border:2px solid var(--surface); cursor:pointer;
  display:flex; align-items:center; justify-content:center; padding:0;
}
.lightbox-close:hover { opacity:.85; }

.back-to-top {
  position:fixed; bottom:80px; right:24px; width:44px; height:44px; border-radius:50%;
  background:var(--accent); color:var(--accent-ink); border:none; cursor:pointer; z-index:300;
  display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-md);
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .18s ease, transform .18s ease, visibility .18s, background .15s;
}
.back-to-top.visible { opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top:hover { background:var(--accent-hover); }

.aide { position:fixed; right:24px; bottom:24px; z-index:300; }
.aide-bouton { display:inline-flex; align-items:center; gap:8px; height:44px; padding:0 18px 0 14px; border:none; border-radius:999px; background:var(--accent); color:var(--accent-ink); font:inherit; font-size:14px; font-weight:700; cursor:pointer; box-shadow:var(--shadow-md); transition:background .15s; }
.aide-bouton:hover { background:var(--accent-hover); }
.aide-bouton:focus-visible, .aide-fermer:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
.aide.is-open .aide-bouton { background:var(--accent-press); }
.aide-panneau { position:absolute; right:0; bottom:56px; width:min(380px, calc(100vw - 32px)); max-height:min(70vh, 560px); display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-2xl); box-shadow:var(--shadow-lg); overflow:hidden; }
.aide-panneau[hidden] { display:none; }
.aide-tete { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--border); font-size:15px; color:var(--ink); }
.aide-fermer { display:flex; align-items:center; justify-content:center; width:32px; height:32px; border:none; border-radius:50%; background:none; color:var(--ink-muted); cursor:pointer; }
.aide-fermer:hover { background:var(--surface-alt); color:var(--ink); }
.aide-form { padding:14px 16px 10px; }
.aide-form label { display:block; font-size:12px; font-weight:700; color:var(--ink-soft); margin-bottom:6px; }
.aide-saisie { display:flex; gap:8px; }
.aide-saisie input { flex:1; min-width:0; height:40px; box-sizing:border-box; border:1.5px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--surface); color:var(--ink); font:inherit; font-size:14px; padding:0 12px; }
.aide-saisie input:focus { outline:none; border-color:var(--accent-line); box-shadow:0 0 0 3px var(--accent-pale); }
.aide-saisie .btn { height:40px; }
.aide-resultats { flex:1; overflow-y:auto; padding:0 16px 6px; }
.aide-message { font-size:13px; color:var(--ink-muted); line-height:1.55; margin:6px 0 10px; }
.aide-res { border:1px solid var(--border); border-radius:var(--radius-lg); margin-bottom:8px; background:var(--surface-alt); }
.aide-res summary { list-style:none; cursor:pointer; padding:10px 12px; font-size:13.5px; font-weight:700; color:var(--ink); }
.aide-res summary::-webkit-details-marker { display:none; }
.aide-res[open] summary { border-bottom:1px solid var(--border); }
.aide-res p { margin:0; padding:10px 12px 4px; font-size:13px; line-height:1.6; color:var(--ink-soft); white-space:pre-line; }
.aide-lien { display:inline-block; margin:2px 12px 12px; font-size:13px; font-weight:700; color:var(--accent-text); }
.aide-pied { margin:0; padding:10px 16px 14px; border-top:1px solid var(--border); font-size:12.5px; color:var(--ink-muted); }
.aide-pied a { color:var(--accent-text); font-weight:700; }
.aide-masquer-ligne { border-top:none; padding-top:0; }
.aide-masquer { padding:0; border:none; background:none; font:inherit; font-weight:700; color:var(--ink-muted); text-decoration:underline; cursor:pointer; }
.aide-masquer:hover { color:var(--ink); }
.aide-reafficher { display:none; }
.aide-cacher { position:absolute; top:-8px; right:-8px; width:22px; height:22px; padding:0; border:1px solid var(--border); border-radius:50%; background:var(--surface); color:var(--ink-muted); box-shadow:var(--shadow-sm); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .15s; }
.aide-cacher:hover { color:var(--ink); }
.aide:hover .aide-cacher, .aide:focus-within .aide-cacher { opacity:1; pointer-events:auto; }
.aide.is-open .aide-cacher { display:none; }
@media (hover:none) {
  .aide-cacher { opacity:1; pointer-events:auto; }
}
:root[data-aide="masquee"] .aide-bouton, :root[data-aide="masquee"] .aide-cacher { display:none; }
:root[data-aide="masquee"] .aide-reafficher { display:inline-flex; }
.form-group .aide-actif { display:flex; align-items:center; gap:8px; margin-top:26px; text-transform:none; letter-spacing:0; font-size:13.5px; font-weight:600; color:var(--ink); cursor:pointer; }
.aide-actif input { width:16px; height:16px; margin:0; accent-color:var(--ink-solid); }

.dock { display:none; }
@media (max-width:860px) {
  .dock {
    display:block; position:fixed; left:8px; right:8px; height:64px; z-index:190;
    bottom:calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .dock-skin { position:absolute; inset:0; width:100%; height:100%; overflow:visible; filter:drop-shadow(0 6px 14px rgba(58,63,68,.14)); }
  .dock-fill { fill:var(--surface); stroke:var(--border); stroke-width:1; }
  .dock-items { position:relative; display:flex; height:100%; padding:0 18px; }
  .dock-item {
    position:relative; flex:1; display:flex; align-items:center; justify-content:center;
    background:none; border:none; color:var(--ink-muted); text-decoration:none; cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .dock-item .icon { transition:opacity .15s; }
  .dock-item.active .icon { opacity:0; }
  .dock-label {
    position:absolute; left:0; right:0; bottom:9px; text-align:center;
    font-size:11px; font-weight:700; color:var(--accent-text); opacity:0; transition:opacity .15s;
  }
  .dock-item.active .dock-label { opacity:1; }
  .dock-bead {
    position:absolute; top:-21px; left:0; width:50px; height:50px; border-radius:50%;
    display:flex; align-items:center; justify-content:center; z-index:2;
    background:var(--accent); color:var(--accent-ink); box-shadow:0 4px 12px rgba(185,133,101,.4);
    cursor:grab; touch-action:none; user-select:none; will-change:transform;
  }
  .dock-bead.grabbing { cursor:grabbing; }
  .mobile-topbar-toggle { display:none; }
  .container { padding-bottom:112px; }
  .back-to-top { bottom:calc(162px + env(safe-area-inset-bottom, 0px)); right:16px; }
  .aide { right:16px; bottom:calc(106px + env(safe-area-inset-bottom, 0px)); }
  .aide-bouton { width:44px; padding:0; justify-content:center; }
  .aide-bouton-texte { display:none; }
  .toast-container { bottom:calc(92px + env(safe-area-inset-bottom, 0px)); }
}
.tag-row { display:flex; flex-wrap:wrap; gap:8px; }
.tag-pill { display:inline-flex; align-items:center; gap:8px; background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-md); padding:5px 6px 5px 12px; font-size:12.5px; font-weight:600; color:var(--ink); }
.tag-pill form { margin:0; }
.tag-pill .btn-icon-sm { background:none; border:none; color:var(--grey-txt); cursor:pointer; padding:2px; display:flex; }
.tag-pill .btn-icon-sm:hover { color:var(--red); }
.tenant-row, .user-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 22px; border-bottom:1px solid var(--border); transition:background .15s;
  gap:14px; flex-wrap:wrap;
}
.tenant-row:last-child, .user-row:last-child { border-bottom:none; }
.tenant-row:hover, .user-row:hover { background:var(--surface-alt); }

.group-header {
  display:flex; align-items:center; justify-content:space-between;
  background:var(--surface-alt); color:var(--ink); font-weight:700; font-size:12.5px;
  padding:10px 22px; border-bottom:1px solid var(--border);
  text-transform:uppercase; letter-spacing:.4px;
}
.group-header:first-child { border-top:none; }
.group-count { font-family:var(--font-body); font-weight:600; color:var(--grey-txt); text-transform:none; letter-spacing:0; font-size:12px; }

.t-avatar, .u-avatar { width:38px; height:38px; border-radius:var(--radius-xl); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:13px; font-weight:700; color:var(--ink); flex-shrink:0; margin-right:14px; background:var(--surface-alt); border:1px solid var(--border); }
.u-avatar.admin    { background:var(--accent-pale); color:var(--accent-text); border-color:rgba(185,133,101,.25); }
.u-avatar.bailleur { background:var(--surface-alt); color:var(--ink); }
.u-avatar.lecteur  { background:var(--surface-alt); color:var(--grey-txt); }
.t-info-wrap, .u-info-wrap { display:flex; align-items:center; flex:1; min-width:0; }
.t-name, .u-name { font-weight:700; font-size:14.5px; color:var(--ink); margin-bottom:3px; }
.t-meta, .u-meta { font-size:12px; color:var(--grey-txt); line-height:1.6; }
.inactive-badge, .inactive-chip { background:var(--red-pale); color:var(--red); padding:2px 9px; border-radius:var(--radius-sm); font-size:11px; font-weight:700; border:1px solid rgba(124,70,60,.2); margin-left:8px; }
.t-actions, .u-actions { display:flex; gap:8px; flex-shrink:0; }

.role-chip { padding:4px 12px; border-radius:var(--radius-sm); font-size:12px; font-weight:600; }
.role-admin    { background:var(--accent-pale); color:var(--accent-text); border:1px solid rgba(185,133,101,.3); }
.role-bailleur { background:var(--surface-alt); color:var(--ink); border:1px solid var(--border); }
.role-lecteur  { background:var(--surface-alt); color:var(--grey-txt); border:1px solid var(--border); }

@media (max-width:640px) {
  .tenant-row, .user-row { flex-direction:column; align-items:stretch; padding:16px 18px; }
  .group-header { padding:10px 18px; }
  .t-info-wrap, .u-info-wrap { width:100%; }
  .t-actions, .u-actions { width:100%; }
  .t-actions .btn, .u-actions .btn, .t-actions form, .u-actions form { flex:1; }
  .t-actions form button, .u-actions form button { width:100%; }
}

.empty-state { text-align:center; padding:52px 24px; color:var(--grey-txt); font-size:14px; }
.empty-state a { color:var(--accent-text); font-weight:700; text-decoration:none; }
.empty-icon { font-size:40px; margin-bottom:12px; }
.empty-state-icon {
  width:52px; height:52px; margin:0 auto 16px; border-radius:var(--radius-xl);
  background:var(--surface-alt); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color:var(--grey-mid);
}
.empty-state-title { font-weight:700; color:var(--ink); font-size:14.5px; margin-bottom:4px; }
.empty-state-sub { font-size:13px; color:var(--grey-txt); }

.info-box {
  background:var(--surface-alt); border:1px solid var(--border);
  border-left:4px solid var(--ink-soft); border-radius:var(--radius-md);
  padding:14px 18px; font-size:13px; color:var(--ink-soft); line-height:1.7;
  margin-bottom:22px; display:flex; gap:12px; align-items:flex-start;
}
.info-box .icon { font-size:18px; flex-shrink:0; margin-top:1px; }
.info-box a { color:var(--ink); font-weight:700; }
.info-box.warn {
  background:var(--warn-pale); border-color:rgba(110,90,46,.25);
  border-left-color:var(--warn); color:#8a5a0a; display:block;
}

.section { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-2xl); overflow:hidden; box-shadow:var(--shadow-sm); margin-bottom:18px; }
.section-head { background:var(--surface-alt); padding:14px 22px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--border); }
.section-head .s-icon { font-size:17px; }
.section-head h2 { font-size:14px; font-weight:700; color:var(--ink); letter-spacing:-.1px; }
.section-body { padding:20px 22px; }
.save-bar { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-2xl); padding:16px 22px; display:flex; justify-content:flex-end; align-items:center; gap:12px; flex-wrap:wrap; box-shadow:var(--shadow-sm); }
.save-hint { font-size:12.5px; color:var(--grey-txt); }

.dash-alert-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; }
.dash-alert-card { background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-lg); padding:18px 20px; }
.dash-alert-count { font-family:var(--font-num); font-variant-numeric:tabular-nums; font-size:28px; font-weight:800; color:var(--ink); line-height:1; }
.dash-alert-label { font-size:12.5px; color:var(--grey-txt); margin-top:6px; font-weight:600; }
.dash-alert-items { margin-top:12px; padding-top:12px; border-top:1px solid var(--border); font-size:12.5px; color:var(--ink-soft); line-height:1.9; }
.dash-alert-link { display:inline-block; margin-top:12px; font-size:12.5px; font-weight:700; color:var(--accent-text); text-decoration:none; }
.dash-activity-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:24px; }
.dash-activity-title { font-family:var(--font-body); font-size:12.5px; font-weight:700; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.6px; margin-bottom:10px; }


.tenant-avatar { width:42px; height:42px; background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-xl); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:14px; font-weight:700; color:var(--ink); letter-spacing:-.3px; }
.card-body { padding:14px 20px 20px; }
.tenant-name { font-size:15.5px; font-weight:700; color:var(--ink); margin-bottom:6px; letter-spacing:-.2px; }
.dashboard-divider { border:none; border-top:1px solid var(--border); margin:26px 0; }

.rev-section-title { font-family:var(--font-display); font-size:16px; font-weight:700; color:var(--navy); margin-bottom:14px; padding-bottom:8px; border-bottom:2px solid var(--grey-border); display:flex; align-items:center; gap:10px; }
.rev-count { background:var(--ink-solid); color:#fff; padding:2px 10px; border-radius:var(--radius-sm); font-size:12px; font-weight:700; }
.rev-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; margin-bottom:36px; }
.rev-card { background:var(--grey-card); border:1px solid var(--grey-border); border-radius:var(--radius-2xl); overflow:hidden; box-shadow:var(--shadow-sm); transition:box-shadow .18s; }
.rev-card:hover { box-shadow:var(--shadow-md); }
.rev-card-top { padding:14px 18px 12px; display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.rev-card-top.attente { background:var(--warn-pale); border-bottom:1px solid rgba(110,90,46,.2); }
.rev-card-top.validee { background:var(--success-pale); border-bottom:1px solid rgba(62,97,73,.15); }
.rev-card-top.rejetee { background:var(--surface-alt); border-bottom:1px solid var(--border); }
.rev-tenant { font-size:15px; font-weight:700; color:var(--navy); margin-bottom:2px; }
.rev-addr { font-size:12px; color:var(--grey-txt); }
.badge-statut { padding:4px 12px; border-radius:var(--radius-sm); font-size:11.5px; font-weight:700; white-space:nowrap; }
.badge-attente { background:var(--warn-pale); color:var(--warn); border:1px solid rgba(110,90,46,.3); }
.rev-body { padding:14px 18px 16px; }
.rev-grid-data { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
.rev-data-label { font-size:10.5px; font-weight:700; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.8px; margin-bottom:3px; }
.rev-data-val { font-size:14px; font-weight:700; color:var(--navy); }
.rev-data-val.nouveau { color:var(--success); font-size:16px; }
.rev-data-val.missing { color:var(--grey-mid); font-style:italic; font-weight:400; font-size:12px; }
.rev-data-val.diff { font-size:12px; color:var(--success); font-weight:600; }
.rev-actions { display:flex; gap:8px; flex-wrap:wrap; }
.rev-actions form { flex:1; min-width:120px; }

.section-header { display:flex; align-items:center; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.section-title { font-size:17px; font-weight:700; color:var(--navy); letter-spacing:-.3px; }
.section-count { background:var(--navy-pale); color:var(--navy-soft); padding:2px 11px; border-radius:var(--radius-sm); font-size:12px; font-weight:700; border:1px solid rgba(58,63,68,.12); }
.history-wrap { background:var(--grey-card); border:1px solid var(--grey-border); border-radius:var(--radius-2xl); overflow:hidden; box-shadow:var(--shadow-sm); }
.history-table thead { background:var(--navy-pale); border-bottom:2px solid var(--grey-border); }
.history-table th { text-align:left; padding:11px 16px; font-family:var(--font-body); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--navy-soft); white-space:nowrap; }
.history-table td { padding:13px 16px; font-size:13px; border-bottom:1px solid var(--grey-border); vertical-align:middle; }
.history-table tr:last-child td { border-bottom:none; }
.history-table tbody tr:hover td { background:var(--grey-bg); }

table th.num, table td.num { text-align:right; }
.h-name { font-weight:700; color:var(--navy); font-size:13px; white-space:nowrap; }
.h-addr { font-size:11.5px; color:var(--grey-txt); margin-top:2px; }
.h-period { display:inline-block; background:var(--ocre-pale); color:var(--sienna); padding:4px 11px; border-radius:var(--radius-sm); font-size:12px; font-weight:700; border:1px solid rgba(94,99,104,.2); white-space:nowrap; }
.h-amount { font-weight:700; font-size:14px; color:var(--navy); white-space:nowrap; }
.h-datetime { line-height:1.6; white-space:nowrap; }
.h-date { font-size:12.5px; font-weight:700; color:var(--navy); }
.h-time { font-size:12px; font-weight:600; color:var(--ocre); }
.h-time-missing { font-size:11px; color:var(--grey-mid); font-style:italic; }
.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 11px; border-radius:var(--radius-sm); font-size:12px; font-weight:700; white-space:nowrap; }
.badge-sent { background:var(--success-pale); color:var(--success); }
.badge-local { background:var(--grey-bg); color:var(--grey-txt); border:1px solid var(--grey-border); }
.badge-auto { background:var(--neutral-warm); color:var(--neutral-warm-text); margin-left:6px; }
.badge-prorata { background:var(--neutral-warm); color:var(--neutral-warm-text); margin-left:6px; }
.email-status { display:inline-flex; align-items:center; justify-content:center; }
.email-status-sent { color:var(--success); }
.email-status-local { color:var(--grey-mid); }
.action-btns { display:flex; gap:6px; }

.dash-tabs { display:flex; gap:26px; margin-bottom:18px; border-bottom:1px solid var(--border); overflow-x:auto; -webkit-overflow-scrolling:touch; }
.dash-tab { background:none; border:none; cursor:pointer; padding:0 0 12px; margin-bottom:-1px; font-family:var(--font-body); font-size:13.5px; font-weight:700; color:var(--ink-muted); border-bottom:2px solid transparent; transition:color .15s, border-color .15s; flex-shrink:0; white-space:nowrap; }
.dash-tab:hover { color:var(--ink); }
.dash-tab.active { color:var(--accent-text); border-color:var(--accent-line); }
.dash-tab-panel { display:none; }
.dash-tab-panel.active { display:block; }
@media (max-width:640px) { .dash-tabs { gap:18px; } }

.hrow-list { background:var(--grey-card); border:1px solid var(--grey-border); border-radius:var(--radius-2xl); overflow:hidden; box-shadow:var(--shadow-sm); }
.hrow { display:flex; align-items:center; gap:16px; padding:14px 18px; border-bottom:1px solid var(--grey-border); }
.hrow:last-child { border-bottom:none; }
.hrow:hover { background:var(--grey-bg); }
.hrow-date { flex-shrink:0; width:48px; text-align:center; background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-md); padding:5px 0; }
.hrow-date-month { display:block; font-family:var(--font-body); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; color:var(--accent-text); }
.hrow-date-day { display:block; font-family:var(--font-num); font-size:16px; font-weight:800; color:var(--ink); }
.hrow-main { flex:1; min-width:0; }
.hrow-title { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-weight:700; color:var(--ink); font-size:13.5px; }
.hrow-sub { font-size:11.5px; color:var(--ink-muted); margin-top:2px; }
.hrow-meta { flex-shrink:0; text-align:right; }
.hrow-amount { font-family:var(--font-num); font-weight:800; font-size:15px; color:var(--ink); white-space:nowrap; }
.hrow-status { display:flex; align-items:center; justify-content:flex-end; gap:4px; font-size:11px; font-weight:700; margin-top:4px; white-space:nowrap; }
.hrow-status.sent { color:var(--ok); }
.hrow-status.local { color:var(--ink-muted); }
.hrow-actions { display:flex; gap:6px; flex-shrink:0; }
.hrow-list-quittances .hrow-mid { flex:0 0 190px; min-width:0; }
.hrow-list-quittances .hrow-mid-label { font-size:12px; color:var(--ink-muted); }
.hrow-list-quittances .hrow-mid-badges { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.hrow-list-quittances .hrow-mid-badges:empty { display:none; }
.hrow-list-quittances .hrow-meta { min-width:96px; }
@media (min-width:861px) {
  .hrow-list-quittances .hrow { display:grid; grid-template-columns:48px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .6fr) auto; gap:20px; }
  .hrow-list-quittances .hrow-mid { flex:none; }
  .hrow-list-quittances .hrow-meta { text-align:left; min-width:0; }
  .hrow-list-quittances .hrow-status { justify-content:flex-start; }
}
@media (max-width:640px) {
  .hrow { flex-wrap:wrap; }
  .hrow-meta { order:3; text-align:left; margin-left:64px; }
  .hrow-actions { order:4; margin-left:64px; }
}
@media (max-width:860px) {
  .hrow-list-quittances .hrow-mid { flex-basis:150px; }
}
@media (max-width:640px) {
  .hrow-list-quittances .hrow-main { flex:1 1 calc(100% - 64px); }
  .hrow-list-quittances .hrow-mid { order:2; flex:1 1 120px; margin-left:64px; }
  .hrow-list-quittances .hrow-meta { order:3; flex:0 0 auto; min-width:0; margin-left:0; text-align:right; }
  .hrow-list-quittances .hrow-actions { order:4; flex:1 1 100%; margin-left:64px; }
}

.batch-section { margin-bottom:18px; }
.batch-section-title { font-family:var(--font-body); font-size:11px; font-weight:700; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.8px; margin-bottom:10px; }
.months-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.month-chip { display:flex; align-items:center; justify-content:center; padding:7px 4px; border-radius:var(--radius-sm); cursor:pointer; border:1.5px solid var(--grey-border); font-size:12px; font-weight:700; color:var(--grey-txt); background:var(--grey-bg); transition:all .15s; user-select:none; }
.month-chip.checked { background:var(--navy-pale); color:var(--navy); border-color:var(--blue-light); }
.month-chip input { display:none; }
.batch-toggle { display:flex; gap:6px; margin-bottom:10px; }
.toggle-btn { font-size:11px; font-weight:700; padding:4px 10px; border-radius:999px; border:1px solid var(--grey-border); background:var(--grey-bg); color:var(--grey-txt); cursor:pointer; }
.toggle-btn:hover { background:var(--grey-border); }
.date-mode-tabs { display:flex; gap:0; margin-bottom:12px; border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); overflow:hidden; }
.date-tab { flex:1; padding:8px; text-align:center; font-size:12.5px; font-weight:700; color:var(--grey-txt); background:var(--grey-bg); cursor:pointer; border:none; transition:all .15s; }
.date-tab.active { background:var(--ink-solid); color:#fff; }
.date-tab-content { display:none; }
.date-tab-content.active { display:block; }
.progress-bar-wrap { background:var(--grey-border); border-radius:6px; height:8px; margin:10px 0; overflow:hidden; }
.progress-bar-fill { height:100%; background:linear-gradient(90deg,var(--blue-light),var(--navy)); border-radius:6px; width:0%; transition:width .3s; }
.batch-log { max-height:140px; overflow-y:auto; font-size:12px; background:var(--grey-bg); border-radius:var(--radius-sm); padding:10px 12px; border:1px solid var(--grey-border); line-height:1.8; }
.log-ok   { color:var(--success); }
.log-err  { color:var(--red); }
.log-ok, .log-err { display:flex; align-items:center; gap:6px; }
.log-info { color:var(--grey-txt); }
.tenant-select { border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); padding:8px 12px; font-size:13.5px; font-family:var(--font-body); font-weight:600; background:var(--grey-bg); color:var(--navy); width:100%; outline:none; }
.tenant-select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(185,133,101,.15); }
.day-input { border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); padding:8px 12px; font-size:14px; font-family:var(--font-num); font-variant-numeric:tabular-nums; font-weight:700; background:var(--grey-bg); color:var(--navy); width:80px; outline:none; text-align:center; }
.day-input:focus { border-color:var(--blue-light); }

@media (max-width:420px) {
  .months-grid { grid-template-columns:repeat(3,1fr); }
}


.tunnel-steps { display:flex; gap:4px; margin-bottom:20px; border-bottom:1px solid var(--border); padding-bottom:14px; }
.tunnel-step { flex:1 1 auto; text-align:center; white-space:nowrap; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; color:var(--ink-muted); padding:0 4px 8px; border-bottom:2px solid transparent; }
.tunnel-step.active { color:var(--accent-text); border-color:var(--accent-line); }
@media (max-width:520px) {
  .tunnel-steps { gap:2px; }
  .tunnel-step { flex:0 0 auto; padding:0 8px 8px; font-size:10px; letter-spacing:0; }
  .tunnel-step.active { flex:1 1 auto; }
  .tunnel-step:not(.active) .tunnel-label { display:none; }
}
.tunnel-panel { display:none; }
.tunnel-panel.active { display:block; }

.tenant-pick-list { max-height:280px; overflow-y:auto; display:flex; flex-direction:column; gap:6px; border:1px solid var(--border); border-radius:var(--radius-md); padding:8px; background:var(--surface-alt); }
.tenant-pick-row { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:var(--radius-sm); cursor:pointer; background:var(--surface); border:1.5px solid transparent; transition:border-color .15s, background .15s; }
.tenant-pick-row:has(input:checked) { border-color:var(--accent-line); background:var(--accent-pale); }
.tenant-pick-row input { width:16px; height:16px; accent-color:var(--accent-line); cursor:pointer; flex-shrink:0; }
.tenant-pick-name { font-size:13.5px; font-weight:700; color:var(--ink); }
.tenant-pick-meta { font-size:11.5px; color:var(--grey-txt); margin-top:1px; }
.ta-status-badge { display:flex; align-items:center; gap:5px; font-size:11px; font-weight:700; color:var(--neutral-warm-text); background:var(--neutral-warm); border-radius:var(--radius-sm); padding:4px 8px; white-space:nowrap; }
.ta-disable-btn { border:none; background:none; color:var(--neutral-warm-text); font-size:14px; line-height:1; cursor:pointer; padding:0 0 0 2px; font-weight:700; }
.ta-disable-btn:hover { color:var(--red); }

.calendar-day-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.calendar-day { border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); background:var(--grey-bg); color:var(--grey-txt); font-size:12.5px; font-weight:700; padding:8px 0; cursor:pointer; transition:all .15s; }
.calendar-day:hover { border-color:var(--accent-line); }
.calendar-day.selected { background:var(--accent); color:var(--accent-ink); border-color:var(--accent-line); }

.stats-row { display:flex; gap:14px; margin-bottom:28px; flex-wrap:wrap; }
.stat-card { background:var(--grey-card); border:1px solid var(--grey-border); border-radius:var(--radius-2xl); padding:16px 20px; flex:1; min-width:160px; box-shadow:var(--shadow-sm); }
.stat-card .s-val { font-size:27px; font-weight:800; color:var(--navy); letter-spacing:-1px; }
.stat-card .s-label { font-size:12px; font-weight:600; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.8px; margin-top:4px; }
.stat-card.warn .s-val { color:var(--warn); }
.stat-card.ok .s-val { color:var(--success); }

.filter-bar { background:var(--grey-card); border:1px solid var(--grey-border); border-radius:var(--radius-md); padding:14px 20px; display:flex; align-items:center; gap:14px; margin-bottom:28px; flex-wrap:wrap; box-shadow:var(--shadow-sm); }
.filter-label { font-family:var(--font-body); font-size:11px; font-weight:700; color:var(--grey-txt); text-transform:uppercase; letter-spacing:1px; white-space:nowrap; }
.filter-bar select { border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); padding:7px 12px; font-size:13.5px; font-family:var(--font-body); font-weight:600; background:var(--grey-bg); color:var(--navy); cursor:pointer; transition:border-color .15s; outline:none; }
.filter-bar select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(185,133,101,.15); }
.filter-sep { width:1px; height:24px; background:var(--grey-border); }

.kpi-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:16px; margin-bottom:32px; }
.kpi-card { background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-2xl); padding:20px 22px; position:relative; overflow:hidden; transition:background .2s, border-color .2s; }
.kpi-icon { color:var(--grey-txt); margin-bottom:10px; transition:color .2s; }
.kpi-val { font-size:29px; font-weight:800; letter-spacing:-1px; color:var(--ink); line-height:1; margin-bottom:6px; transition:color .2s; }
.kpi-label { font-size:12px; font-weight:600; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.8px; transition:color .2s; }

.kpi-card:hover { background:var(--neutral-warm); border-color:var(--neutral-warm-line); }
.kpi-card:hover .kpi-icon, .kpi-card:hover .kpi-val, .kpi-card:hover .kpi-label { color:var(--neutral-warm-text); }

.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:24px; }
@media (max-width:800px) { .grid-2 { grid-template-columns:1fr; } }

.section-card { background:var(--grey-card); border:1px solid var(--grey-border); border-radius:var(--radius-2xl); overflow:hidden; box-shadow:var(--shadow-sm); }
.section-card.full { grid-column:1/-1; }
.sc-head { background:var(--navy-pale); padding:14px 20px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--grey-border); }
.sc-head h2 { font-size:14px; font-weight:700; color:var(--navy); }
.sc-body { padding:20px; }

.chart-bars { display:flex; align-items:flex-end; gap:6px; height:180px; padding:0 4px; }
.bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; min-width:0; }
.bar-outer { width:100%; max-width:30px; background:repeating-linear-gradient(135deg, var(--border) 0 2px, transparent 2px 6px); border-radius:999px; position:relative; overflow:hidden; }

.bar-fill { position:absolute; bottom:0; left:0; right:0; height:0; background:var(--neutral-warm); border-radius:999px; transition:height .8s cubic-bezier(.2,.8,.2,1) calc(var(--i, 0) * 45ms + .15s); }
.bar-fill.active { background:var(--neutral-warm-text); }
.anim-root.is-in .bar-fill { height:var(--h); }
.bar-col[data-tip] { outline:none; cursor:default; }
.cmp-tooltip { position:fixed; top:0; left:0; z-index:700; background:var(--ink-solid); color:#fff; font-size:11.5px; font-weight:600; line-height:1.4; padding:6px 10px; border-radius:var(--radius-lg); white-space:pre; pointer-events:none; opacity:0; transition:opacity .15s; box-shadow:var(--shadow-md); }
.cmp-tooltip.visible { opacity:1; }
.bar-col[data-tip]:hover .bar-fill:not(.active), .bar-col[data-tip]:focus-visible .bar-fill:not(.active) { background:var(--neutral-warm-line); }
.bar-val { font-size:10px; font-weight:700; color:var(--navy); white-space:nowrap; }
.bar-label { font-size:10px; font-weight:600; color:var(--grey-txt); white-space:nowrap; }
.bar-nb { font-size:9px; color:var(--grey-mid); }
.chart-legend { display:flex; gap:16px; margin-top:14px; justify-content:center; flex-wrap:wrap; }
.legend-item { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--grey-txt); font-weight:600; }
.legend-dot { width:10px; height:10px; border-radius:3px; }

.t-table th, .m-table th { text-align:left; padding:9px 14px; font-family:var(--font-body); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--grey-txt); border-bottom:2px solid var(--grey-border); white-space:nowrap; }
.t-table td, .m-table td { padding:12px 14px; font-size:13px; border-bottom:1px solid var(--grey-border); vertical-align:middle; }
.t-table tr:last-child td, .m-table tr:last-child td { border-bottom:none; }
.t-table tr:hover td { background:var(--grey-bg); }
.t-name { font-weight:700; color:var(--navy); white-space:nowrap; }
.t-total, .m-total { font-weight:700; font-size:15px; color:var(--navy); white-space:nowrap; }
.t-bar-wrap { width:120px; height:6px; background:var(--grey-bg); border-radius:4px; overflow:hidden; }
.t-bar-fill { height:100%; background:linear-gradient(90deg,var(--blue-light),var(--navy)); border-radius:4px; }
.taux-chip { display:inline-block; padding:3px 10px; border-radius:var(--radius-sm); font-size:11.5px; font-weight:700; white-space:nowrap; }
.taux-full  { background:var(--success-pale); color:var(--success); }
.taux-part  { background:var(--ocre-pale); color:var(--sienna); }
.taux-none  { background:var(--grey-bg); color:var(--grey-mid); border:1px solid var(--grey-border); }
.m-table .best td { background:var(--surface-alt); }
.m-table tr:hover td { background:var(--neutral-warm); }
.m-table tr:hover .m-name { color:var(--neutral-warm-text); }
.m-name { font-weight:700; color:var(--navy); white-space:nowrap; transition:color .15s; }
.m-zero { color:var(--grey-mid); font-style:italic; }

.score-badge { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:50%; font-weight:800; font-size:15px; color:#fff; flex-shrink:0; }
.score-badge.score-a { background:var(--score-a); }
.score-badge.score-b { background:var(--score-b); }
.score-badge.score-c { background:var(--score-c); }
.score-badge.score-d { background:var(--score-d); }
.score-badge.score-e { background:var(--score-e); }
.score-badge.score-none { background:var(--surface-alt); color:var(--grey-mid); border:1px solid var(--grey-border); font-size:16px; }

.score-bar { display:inline-flex; align-items:center; gap:3px; }
.score-bar-letter { display:flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:6px; font-weight:800; font-size:11px; color:#fff; opacity:.4; transition:opacity .15s, width .15s, height .15s, font-size .15s; }
.score-bar-letter.active { opacity:1; width:30px; height:30px; font-size:14px; box-shadow:var(--shadow-sm); }
.score-bar-letter.a { background:var(--score-a); }
.score-bar-letter.b { background:var(--score-b); }
.score-bar-letter.c { background:var(--score-c); }
.score-bar-letter.d { background:var(--score-d); }
.score-bar-letter.e { background:var(--score-e); }

.rentabilite-row { display:flex; align-items:center; gap:16px; padding:14px 18px; border-bottom:1px solid var(--grey-border); }
.rentabilite-row:last-child { border-bottom:none; }
.rentabilite-info { flex:1; min-width:0; }
.rentabilite-nom { font-weight:700; color:var(--navy); margin-bottom:2px; }
.rentabilite-detail { font-size:12px; color:var(--grey-txt); }
.rentabilite-detail .neg { color:var(--red); font-weight:700; }
.rentabilite-detail .pos { color:var(--success); font-weight:700; }

.gauge { position:relative; width:100%; max-width:150px; margin:0 0 6px; }
.gauge-svg { display:block; width:100%; height:auto; overflow:visible; }
.gauge-bg, .gauge-fill { fill:none; stroke-width:12; stroke-linecap:round; }
.gauge-bg { stroke:url(#gauge-hatch); }
.gauge-svg pattern line { stroke:var(--border-strong); }
.gauge-fill { stroke:var(--neutral-warm); stroke-dasharray:100; stroke-dashoffset:100; transition:stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1) .2s; }
.anim-root.is-in .gauge-fill { stroke-dashoffset:calc(100 - var(--pct)); }
.gauge-val { position:absolute; left:0; right:0; bottom:0; text-align:center; font-size:20px; font-weight:800; color:var(--ink); line-height:1; }

.t-table tr[data-drawer], .rentabilite-row[data-drawer] { cursor:pointer; }
.t-table tr[data-drawer]:focus-visible, .rentabilite-row[data-drawer]:focus-visible { outline:2px solid var(--focus-ring); outline-offset:-2px; }
.rentabilite-row[data-drawer]:hover { background:var(--surface-alt); }

.drawer-overlay { position:fixed; inset:0; background:rgba(58,63,68,.38); opacity:0; visibility:hidden; transition:opacity .25s, visibility .25s; z-index:600; }
.drawer-overlay.open { opacity:1; visibility:visible; }
.drawer { position:fixed; top:0; right:0; bottom:0; width:min(440px, 100vw); background:var(--surface); border-left:1px solid var(--border); box-shadow:var(--shadow-lg); transform:translateX(100%); visibility:hidden; transition:transform .3s cubic-bezier(.2,.8,.2,1), visibility .3s; z-index:601; display:flex; flex-direction:column; }
.drawer.open { transform:none; visibility:visible; }
.drawer-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 22px; border-bottom:1px solid var(--border); background:var(--surface-alt); }
.drawer-head h2 { font-size:17px; font-weight:800; color:var(--ink); }
.drawer-sub { font-size:12.5px; color:var(--ink-muted); margin-top:2px; }
.drawer-close { flex-shrink:0; width:34px; height:34px; border-radius:50%; border:1px solid var(--border-strong); background:var(--surface); color:var(--ink); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.drawer-close:hover { background:var(--surface-alt); }
.drawer-body { padding:20px 22px; overflow-y:auto; flex:1; display:flex; flex-direction:column; gap:20px; }
.drawer-kpis { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.drawer-kpi { background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-lg); padding:12px 14px; min-width:0; }
.drawer-kpi-label { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--ink-muted); }
.drawer-kpi-val { font-size:20px; font-weight:800; color:var(--ink); margin-top:3px; white-space:nowrap; }
.drawer-kpi-val.pos { color:var(--success); }
.drawer-kpi-val.neg { color:var(--red); }
.drawer-section h3 { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--ink-muted); margin-bottom:6px; }
.drawer-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:8px 0; border-bottom:1px solid var(--border); font-size:13px; color:var(--ink); }
.drawer-row:last-child { border-bottom:none; }
.drawer-row > span:first-child { color:var(--ink-muted); }
.drawer-foot { padding:16px 22px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; }
body.drawer-open { overflow:hidden; }

.cal-layout { display:grid; grid-template-columns:minmax(0, 1.25fr) minmax(0, 1fr); gap:20px; align-items:start; }
.cal-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.cal-title { font-size:15px; font-weight:800; color:var(--ink); text-transform:capitalize; }
.cal-nav { display:flex; gap:6px; }
.cal-nav button { width:32px; height:32px; border-radius:50%; border:1px solid var(--border-strong); background:var(--surface); color:var(--ink); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.cal-nav button:hover { background:var(--surface-alt); }
.cal-grid { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:4px; }
.cal-dow { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--ink-muted); text-align:center; padding:4px 0; }
.cal-day { position:relative; aspect-ratio:1 / 1; min-height:44px; border:1px solid transparent; border-radius:var(--radius-lg); background:var(--surface-alt); color:var(--ink); font-size:13px; font-weight:600; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding-top:6px; gap:4px; font-family:inherit; }
.cal-day.is-out { background:transparent; color:var(--ink-muted); opacity:.5; }
.cal-day:hover { border-color:var(--border-strong); }
.cal-day.is-today { border-color:var(--accent-line); }
.cal-day.is-selected { background:var(--accent-pale); border-color:var(--accent-line); }
.cal-dots { display:flex; gap:3px; flex-wrap:wrap; justify-content:center; }
.cal-dot { width:7px; height:7px; border-radius:50%; background:var(--ink-muted); }
.cal-dot.tone-ok { background:var(--ok-solid); }
.cal-dot.tone-bad { background:var(--red-solid); }
.cal-dot.tone-warn { background:var(--warn); }
.cal-dot.tone-accent { background:var(--accent-line); }
.cal-dot.tone-muted { background:var(--ink-muted); }
.cal-legend { display:flex; flex-wrap:wrap; gap:14px; margin-top:14px; font-size:12px; color:var(--ink-muted); font-weight:600; }
.cal-legend span { display:inline-flex; align-items:center; gap:6px; }
.cal-list-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--ink-muted); margin-bottom:8px; }
.cal-event { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--border); }
.cal-event:last-child { border-bottom:none; }
.cal-event-date { flex-shrink:0; width:42px; text-align:center; }
.cal-event-day { display:block; font-size:18px; font-weight:800; color:var(--ink); line-height:1; }
.cal-event-month { display:block; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--ink-muted); margin-top:2px; }
.cal-event-title { font-size:13.5px; font-weight:700; color:var(--ink); }
.cal-event-sub { font-size:12px; color:var(--ink-muted); margin-top:2px; }
.cal-chip { display:inline-block; padding:2px 8px; border-radius:var(--radius-sm); font-size:11px; font-weight:700; margin-left:6px; background:var(--surface-sunk); color:var(--ink-soft); vertical-align:middle; }
.cal-chip.tone-bad { background:var(--bad-pale); color:var(--bad); }
.cal-chip.tone-warn { background:var(--warn-pale); color:var(--warn); }
.cal-chip.tone-ok { background:var(--ok-pale); color:var(--ok); }
.cal-empty { font-size:13px; color:var(--ink-muted); padding:18px 0; }
@media (max-width:860px) { .cal-layout { grid-template-columns:minmax(0, 1fr); } }
@media (prefers-reduced-motion:reduce) {
  .bar-fill, .gauge-fill, .drawer, .drawer-overlay { transition:none; }
}

.hm [hidden], .hm-palette-overlay[hidden], .hm-palette-item[hidden], .hm-palette-group[hidden], .hm-palette-empty[hidden] { display:none !important; }

.hm { margin-bottom:8px; }
.hm-section { margin-bottom:28px; }
.hm-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.hm-section-head h2 { font-size:16px; font-weight:800; color:var(--ink); }
.hm-count { display:inline-block; padding:2px 8px; border-radius:var(--radius-sm); background:var(--surface-sunk); color:var(--ink-soft); font-size:11.5px; font-weight:700; margin-left:8px; }

.hm-split-main:focus-visible, .hm-split-caret:focus-visible, .hm-search:focus-visible, .hm-menu-item:focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; }
.hm-action-icon { flex-shrink:0; width:40px; height:40px; border-radius:var(--radius-xl); background:var(--accent-pale); color:var(--accent-text); display:inline-flex; align-items:center; justify-content:center; }
.hm-action-text { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.hm-action-title { font-size:14px; font-weight:800; line-height:1.25; }
.hm-action-desc { font-size:12px; color:var(--ink-muted); line-height:1.3; }

.hm-todo-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:12px; }
.hm-todo-item { display:flex; align-items:center; gap:12px; padding:14px 16px; background:var(--surface); border:1px solid var(--border); border-left:3px solid var(--border-strong); border-radius:var(--radius-xl); }
.hm-todo-item.tone-warn { border-left-color:var(--warn); }
.hm-todo-item.tone-bad { border-left-color:var(--red-solid); }
.hm-todo-icon { flex-shrink:0; color:var(--warn); display:inline-flex; }
.hm-todo-item.tone-bad .hm-todo-icon { color:var(--red); }
.hm-todo-item.tone-info { border-left-color:var(--accent); }
.hm-todo-item.tone-info .hm-todo-icon { color:var(--accent-text); }
.hm-todo-main { flex:1; min-width:0; }
.hm-todo-title { font-size:13.5px; font-weight:800; color:var(--ink); }
.hm-todo-sub { font-size:12px; color:var(--ink-muted); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.hm-track { height:6px; border-radius:999px; background:var(--surface-sunk); overflow:hidden; width:100%; }
.hm-track-fill { display:block; height:100%; width:0; border-radius:999px; background:var(--accent-line); transition:width 1s cubic-bezier(.2,.8,.2,1) .15s; }
.anim-root.is-in .hm-track-fill { width:calc(var(--pct) * 1%); }


.hm-tenants { display:flex; flex-direction:column; gap:8px; }
.hm-tenants-2col { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.hm-tenant { display:grid; grid-template-columns:40px minmax(0, 1fr) auto auto auto; align-items:center; gap:14px; padding:12px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-xl); transition:border-color .15s, box-shadow .15s; }
.hm-tenant:hover { border-color:var(--accent-line); box-shadow:var(--shadow-sm); }
.hm-avatar { width:40px; height:40px; border-radius:var(--radius-xl); background:var(--accent-pale); color:var(--accent-ink); display:inline-flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; flex-shrink:0; }
.hm-tenant-name { font-size:14px; font-weight:800; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hm-tenant-sub { font-size:12px; color:var(--ink-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hm-tenant-loyer { font-size:14px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
.hm-chip { display:inline-block; padding:3px 10px; border-radius:var(--radius-sm); font-size:11.5px; font-weight:700; white-space:nowrap; background:var(--neutral-pale); color:var(--neutral); }
.hm-tenant-actions { grid-column:2 / -1; grid-row:2; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.hm-tenant-actions form { margin:0; }
.hm-chip.tone-ok { background:var(--ok-pale); color:var(--ok); }
.hm-chip.tone-warn { background:var(--warn-pale); color:var(--warn); }
.hm-chip.tone-bad { background:var(--bad-pale); color:var(--bad); }
.hm-chip.tone-accent { background:var(--accent-pale); color:var(--accent-text); }
.hm-chip.tone-muted { background:var(--neutral-pale); color:var(--neutral); }

.hm-cmd { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:22px; }
.hm-split { position:relative; display:inline-flex; }
.hm-split-main { display:inline-flex; align-items:center; gap:9px; padding:14px 22px; border:none; border-radius:999px 0 0 999px; background:var(--accent); color:var(--accent-ink); font-family:inherit; font-size:14.5px; font-weight:800; cursor:pointer; transition:background .15s; }
.hm-split-caret { display:inline-flex; align-items:center; padding:0 14px; border:none; border-left:1px solid rgba(74,52,40,.25); border-radius:0 999px 999px 0; background:var(--accent); color:var(--accent-ink); cursor:pointer; transition:background .15s; }
.hm-split-main:hover, .hm-split-caret:hover { background:var(--accent-hover); }
.hm-menu { position:absolute; top:calc(100% + 8px); left:0; width:min(360px, 90vw); padding:6px; background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius-2xl); box-shadow:var(--shadow-lg); z-index:80; }
.hm-menu-item { display:flex; align-items:center; gap:12px; width:100%; padding:10px 12px; border:none; background:none; border-radius:var(--radius-lg); text-align:left; font-family:inherit; color:var(--ink); cursor:pointer; }
.hm-menu-item:hover { background:var(--surface-alt); }
.hm-search { flex:1; min-width:240px; display:flex; align-items:center; gap:10px; padding:12px 16px; border:1px solid var(--border-strong); border-radius:999px; background:var(--surface); color:var(--ink-muted); font-family:inherit; font-size:13.5px; text-align:left; cursor:text; transition:border-color .15s; }
.hm-search:hover { border-color:var(--ink-muted); }
.hm-search-text { flex:1; }
.hm-search kbd, .hm-palette-input kbd { font-family:inherit; font-size:11px; font-weight:700; color:var(--ink-muted); background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-sm); padding:2px 6px; }

.hm-stats { display:grid; grid-template-columns:minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.4fr); gap:16px; margin-bottom:28px; }
.hm-stats-4 { grid-template-columns:minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr); }
.hm-card-soutien { justify-content:space-between; }
.hm-card-soutien .btn { align-self:flex-start; }
.hm-card { display:flex; flex-direction:column; gap:6px; padding:18px 20px; background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-2xl); min-width:0; }
.hm-card-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--ink-muted); }
.hm-card-value { font-size:30px; font-weight:800; line-height:1.1; color:var(--ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
.hm-card-sub { font-size:12.5px; color:var(--ink-muted); }
.hm-card .hm-track { margin-top:6px; }
.hm-card-gauge .gauge { margin:2px auto 4px; }
.hm-card-gauge .hm-card-sub { text-align:center; }
.hm-spark { display:grid; grid-template-columns:repeat(12, minmax(0, 1fr)); gap:6px; align-items:end; margin-top:6px; }
.hm-spark-col { display:flex; flex-direction:column; align-items:center; gap:4px; outline:none; }
.hm-spark-well { position:relative; display:flex; align-items:flex-end; width:100%; max-width:18px; height:64px; border-radius:999px; overflow:hidden; background:repeating-linear-gradient(135deg, var(--border) 0 2px, transparent 2px 6px); }
.hm-spark-fill { display:block; width:100%; height:0; border-radius:999px; background:var(--neutral-warm); transition:height .8s cubic-bezier(.2,.8,.2,1) calc(var(--i, 0) * 45ms + .15s); }
.anim-root.is-in .hm-spark-fill { height:var(--h); }
.hm-spark-col.is-current .hm-spark-fill { background:var(--neutral-warm-text); }
.hm-spark-col:hover .hm-spark-fill, .hm-spark-col:focus-visible .hm-spark-fill { background:var(--neutral-warm-line); }
.hm-spark-col.is-current:hover .hm-spark-fill { background:var(--neutral-warm-text); }
.hm-spark-label { font-size:10px; font-weight:700; color:var(--ink-muted); }

.hm-palette-overlay { position:fixed; inset:0; z-index:650; background:rgba(58,63,68,.38); display:flex; justify-content:center; align-items:flex-start; padding-top:12vh; }
.hm-palette { width:min(600px, 92vw); max-height:70vh; display:flex; flex-direction:column; overflow:hidden; background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius-2xl); box-shadow:var(--shadow-lg); }
.hm-palette-input { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--border); color:var(--ink-muted); }
.hm-palette-input input { flex:1; border:none; outline:none; background:transparent; font-family:inherit; font-size:15px; color:var(--ink); }
.hm-palette-list { overflow-y:auto; padding:8px; }
.hm-palette-group { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--ink-muted); padding:10px 10px 4px; }
.hm-palette-item { display:flex; align-items:center; gap:12px; width:100%; padding:10px 12px; border:none; background:none; border-radius:var(--radius-lg); text-align:left; font-family:inherit; color:var(--ink); cursor:pointer; }
.hm-palette-item:hover, .hm-palette-item.is-active { background:var(--accent-pale); }
.hm-palette-empty { padding:22px; text-align:center; font-size:13px; color:var(--ink-muted); }


@media (max-width:1100px) {
  .hm-stats { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .hm-card-spark { grid-column:1 / -1; }
  .hm-tenants-2col { grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:860px) {
  .hm-search { min-width:100%; order:2; }
  .hm-search kbd { display:none; }
}
@media (max-width:640px) {
  .hm-stats { grid-template-columns:minmax(0, 1fr); }
  .hm-tenant { grid-template-columns:40px minmax(0, 1fr) auto; row-gap:6px; }
  .hm-tenant-loyer { grid-column:3; grid-row:1; }
  .hm-tenant .hm-chip { grid-column:2; grid-row:2; justify-self:start; }
  .hm-tenant .btn { grid-column:3; grid-row:2; }
  .hm-tenant .hm-tenant-actions { grid-column:2 / -1; grid-row:3; justify-content:flex-start; }
  .hm-todo-grid { grid-template-columns:minmax(0, 1fr); }
}
@media (prefers-reduced-motion:reduce) {
  .hm-track-fill, .hm-spark-fill { transition:none; }
}

.ls [hidden] { display:none !important; }
.ls-cmd { margin-bottom:20px; }
.ls-cmd form { display:inline-flex; }
.purge-tout, .purge-choix { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:var(--ink-soft); cursor:pointer; white-space:nowrap; }
.ls-add:disabled { opacity:.45; cursor:not-allowed; }
.ls-add { display:inline-flex; align-items:center; gap:8px; padding:14px 24px; border:none; border-radius:999px; background:var(--accent); color:var(--accent-ink); font-family:inherit; font-size:14.5px; font-weight:800; cursor:pointer; transition:background .15s; white-space:nowrap; }
.ls-add:hover { background:var(--accent-hover); }
a.ls-add { text-decoration:none; }
a.ls-add { text-decoration:none; }
.ls-add:focus-visible, .ls-more:focus-visible, .ls-menu-item:focus-visible, .ls-seg button:focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; }
.ls-search { flex:1; min-width:240px; display:flex; align-items:center; gap:10px; padding:11px 16px; border:1px solid var(--border-strong); border-radius:999px; background:var(--surface); color:var(--ink-muted); transition:border-color .15s; }
.ls-search:focus-within { border-color:var(--ink-muted); }
.ls-search input { flex:1; min-width:0; padding:0; border:none; outline:none; background:transparent; box-shadow:none; font-family:inherit; font-size:13.5px; color:var(--ink); }
.ls-search kbd { font-family:inherit; font-size:11px; font-weight:700; color:var(--ink-muted); background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-sm); padding:2px 6px; }
.ls-select { display:inline-flex; align-items:center; gap:10px; padding:8px 8px 8px 18px; border:1px solid var(--border-strong); border-radius:999px; background:var(--surface); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--ink-muted); }
.ls-select:focus-within { border-color:var(--ink-muted); }
.ls-select select { width:auto; max-width:220px; padding:4px 8px; border:none; outline:none; background:transparent; box-shadow:none; font-family:inherit; font-size:13.5px; font-weight:700; text-transform:none; letter-spacing:0; color:var(--ink); }
.ls-seg { display:inline-flex; gap:2px; padding:3px; margin-bottom:18px; background:var(--surface-sunk); border-radius:999px; flex-wrap:wrap; }
.ls-seg button, .ls-seg a { border:none; background:none; font-family:inherit; font-size:12.5px; font-weight:700; color:var(--ink-soft); padding:6px 14px; border-radius:999px; cursor:pointer; text-decoration:none; }
.ls-seg button:hover, .ls-seg a:hover { color:var(--ink); }
.ls-seg button.is-active, .ls-seg a.is-active { background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); }
.ls-seg a:focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; }
.ls-help { margin-bottom:20px; background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-xl); }
.ls-help summary, .ls-panel summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px; padding:12px 16px; font-size:13px; font-weight:700; color:var(--ink-soft); }
.ls-help summary::-webkit-details-marker, .ls-panel summary::-webkit-details-marker { display:none; }
.ls-help summary svg:last-child, .ls-panel summary svg:last-child { margin-left:auto; transition:transform .2s; }
.ls-help[open] summary svg:last-child, .ls-panel[open] summary svg:last-child { transform:rotate(180deg); }
.ls-help-body { padding:0 16px 14px; font-size:13px; line-height:1.6; color:var(--ink-soft); }
.ls-panel { margin-bottom:12px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-xl); }
.ls-panel-body { padding:4px 16px 16px; border-top:1px solid var(--border); padding-top:16px; }
.ls-list { display:flex; flex-direction:column; gap:8px; margin-bottom:28px; }
.ls-group-head { display:flex; align-items:center; gap:8px; margin:22px 0 10px; font-size:13px; font-weight:800; color:var(--ink-soft); }
.ls-group-head:first-child { margin-top:0; }
.ls-row { position:relative; display:grid; grid-template-columns:44px minmax(0, 1fr) auto auto; align-items:center; gap:14px; padding:14px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-xl); transition:border-color .15s, box-shadow .15s; }
.ls-row:hover { border-color:var(--accent-line); box-shadow:var(--shadow-sm); }
.ls-row:target { outline:2px solid var(--accent); outline-offset:-2px; }
.ls-row[data-href] { cursor:pointer; }
.ls-row.is-muted { background:var(--surface-alt); }
.ls-row .hm-avatar { width:44px; height:44px; }
.ls-main { min-width:0; }
.ls-name { display:block; font-size:14.5px; font-weight:800; color:var(--ink); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
a.ls-name:hover { color:var(--accent-text); }
.ls-sub { font-size:12px; color:var(--ink-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:1px; }
.ls-chips { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }
.ls-chips .hm-chip { display:inline-flex; align-items:center; gap:5px; }
.ls-chip-x { border:none; background:none; padding:0 0 0 2px; font-size:14px; line-height:1; font-weight:800; color:inherit; cursor:pointer; opacity:.7; }
.ls-chip-x:hover { opacity:1; }
.ls-metric { text-align:right; white-space:nowrap; }
.ls-metric-val { font-size:16px; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
.ls-metric-val.pos { color:var(--success); }
.ls-metric-val.neg { color:var(--red); }
.ls-metric-label { font-size:11px; color:var(--ink-muted); margin-top:1px; }
.ls-metrics { display:flex; align-items:flex-start; gap:28px; }
.ls-metrics > div { text-align:right; }
.ls-actions { display:flex; align-items:center; gap:8px; }
.ls-actions form { display:inline-flex; }
.ls-extra { grid-column:2 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; padding-top:12px; border-top:1px dashed var(--border); font-size:12.5px; color:var(--ink-muted); }
.ls-extra strong { color:var(--ink); font-weight:700; font-variant-numeric:tabular-nums; }
.ls-extra form { display:inline-flex; align-items:center; gap:6px; }
.ls-extra input[type=file] { font-size:11.5px; max-width:200px; }
.ls-more-wrap { position:relative; }
.ls-more { width:34px; height:34px; border-radius:50%; border:1px solid var(--border-strong); background:var(--surface); color:var(--ink); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.ls-more:hover { background:var(--surface-alt); }
.ls-menu { position:absolute; right:0; top:calc(100% + 6px); min-width:230px; padding:6px; background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius-2xl); box-shadow:var(--shadow-lg); z-index:80; }
.ls-menu form { display:block; }
.ls-menu-item { display:flex; align-items:center; gap:10px; width:100%; padding:9px 12px; border:none; background:none; border-radius:var(--radius-lg); font-family:inherit; font-size:13px; font-weight:600; color:var(--ink); text-align:left; text-decoration:none; cursor:pointer; }
.ls-menu-item:hover { background:var(--surface-alt); }
.ls-menu-item.is-danger { color:var(--red); }
.ls-menu-item.is-danger:hover { background:var(--red-pale); }
.ls-menu-field { display:flex; align-items:center; gap:8px; padding:6px 8px; }
.ls-menu-field select { flex:1; min-width:0; }
.ls-empty-filter { padding:30px 20px; text-align:center; font-size:13.5px; color:var(--ink-muted); }
@media (min-width:1101px) {
  .ls-row { grid-template-columns:44px minmax(0, 1fr) minmax(110px, max-content) auto; column-gap:20px; }
  .ls-main:has(> .ls-chips) { display:grid; grid-template-columns:minmax(0, 1.3fr) minmax(0, 1fr); column-gap:24px; align-items:center; }
  .ls-main > * { grid-column:1; }
  .ls-main > .ls-sub { white-space:normal; }
  .ls-main > .ls-chips { grid-column:2; grid-row:1 / span 2; margin-top:0; }
  .ls-main > .ls-chips.ls-vacance { grid-column:1 / -1; grid-row:auto; margin-top:8px; }
}
@media (max-width:1100px) {
  .ls-row { grid-template-columns:44px minmax(0, 1fr) auto; row-gap:12px; }
  .ls-metric { grid-column:3; grid-row:1; }
  .ls-actions { grid-column:2 / -1; flex-wrap:wrap; }
}
@media (max-width:760px) {
  .ls-row { grid-template-columns:44px minmax(0, 1fr); row-gap:12px; }
  .ls-metric { grid-column:1 / -1; grid-row:auto; text-align:left; display:flex; align-items:baseline; gap:8px; }
  .ls-metrics { flex-wrap:wrap; gap:12px 24px; }
  .ls-metrics > div { text-align:left; }
  .ls-actions { grid-column:1 / -1; flex-wrap:wrap; }
  .ls-extra { grid-column:1 / -1; }
  .ls-search { min-width:100%; order:2; }
  .ls-search kbd { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .ls-row, .ls-add { transition:none; }
}

.content-nav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.content-nav a { text-decoration:none; }
.content-section { border:1px solid var(--border); border-radius:var(--radius-md); margin-bottom:14px; overflow:hidden; }
.content-section summary { cursor:pointer; list-style:none; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; background:var(--surface-alt); }
.content-section summary::-webkit-details-marker { display:none; }
.content-section summary .cs-title { font-family:var(--font-body); font-weight:700; font-size:13px; color:var(--ink); text-transform:uppercase; letter-spacing:.7px; }
.content-section summary .cs-chevron { color:var(--grey-txt); transition:transform .15s; flex-shrink:0; }
.content-section[open] summary .cs-chevron { transform:rotate(180deg); }
.content-section summary .cs-preview { font-size:11.5px; font-weight:600; color:var(--accent-text); text-transform:none; letter-spacing:0; margin-left:auto; }
.content-section-body { padding:16px; }
.content-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.content-grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }
.content-mini-card { border:1px solid var(--border); border-radius:var(--radius-md); padding:12px 14px; background:var(--surface); }
.content-mini-card .cmc-title { font-size:10.5px; font-weight:700; color:var(--grey-txt); text-transform:uppercase; letter-spacing:.7px; margin-bottom:8px; }
@media (max-width:768px) { .content-grid-2, .content-grid-3 { grid-template-columns:1fr; } }

.dep-years { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.dep-year { padding:5px 14px; border-radius:999px; border:1px solid var(--border); font-size:13px; font-weight:600; color:var(--ink-soft); text-decoration:none; }
.dep-year.active { background:var(--accent); border-color:var(--accent-line); color:var(--accent-ink); }
.dep-head { flex-wrap:wrap; }
.dep-head-actions { margin-left:auto; display:flex; flex-wrap:wrap; gap:6px; }
.dep-modal-actions .dep-danger { margin-right:auto; color:var(--red); }
.dep-modal [hidden] { display:none !important; }
.dep-cat-row { padding:12px 0; border-bottom:1px solid var(--border); display:flex; flex-direction:column; gap:8px; }
.dep-cat-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.dep-cat-form input, .dep-cat-form select { flex:1; min-width:160px; }
.dep-cat-form .dep-danger { color:var(--red); }
.dep-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:12px; margin-bottom:20px; }
.dep-card { display:flex; flex-direction:column; gap:4px; padding:14px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-xl); box-shadow:var(--shadow-sm); min-width:0; }
.dep-card-label { font-size:12.5px; font-weight:600; color:var(--ink-soft); line-height:1.3; }
.dep-card-amount { font-size:22px; font-weight:800; letter-spacing:-.4px; color:var(--ink); }
.dep-card-meta { font-size:12px; color:var(--grey-txt); }
.dep-card-bar { height:5px; border-radius:999px; background:var(--surface-alt); overflow:hidden; margin-top:6px; }
.dep-card-bar i { display:block; height:100%; background:var(--accent); border-radius:999px; }
.dep-card-total { background:var(--accent); border-color:var(--accent-line); }
.dep-card-total .dep-card-label, .dep-card-total .dep-card-amount, .dep-card-total .dep-card-meta { color:var(--accent-ink); }
.dep-table { min-width:760px; width:100%; }
.dep-table th { white-space:nowrap; }
.dep-cell { min-width:120px; max-width:200px; overflow-wrap:anywhere; }
.dep-libelle { min-width:160px; max-width:300px; overflow-wrap:anywhere; }
.dep-meta { display:block; max-width:280px; margin-top:2px; font-size:12px; font-weight:400; color:var(--grey-txt); text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.th-sort { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; gap:6px; font:inherit; letter-spacing:inherit; text-transform:inherit; color:inherit; padding:2px 0; }
.th-sort::after { content:'↕'; font-size:11px; opacity:.35; }
.th-sort:hover::after, .th-sort:focus-visible::after { opacity:.8; }
.th-sort:focus-visible { outline:2px solid var(--accent-line); outline-offset:2px; border-radius:4px; }
th[aria-sort="ascending"] .th-sort::after { content:'↑'; opacity:1; }
th[aria-sort="descending"] .th-sort::after { content:'↓'; opacity:1; }
th.num .th-sort { justify-content:flex-end; }
button.dep-card { font:inherit; text-align:left; cursor:pointer; color:inherit; width:100%; transition:border-color .12s ease, box-shadow .12s ease; }
button.dep-card:hover { border-color:var(--accent-line); }
button.dep-card:focus-visible { outline:2px solid var(--accent-line); outline-offset:2px; }
.dep-card.is-active { border-color:var(--accent-text); box-shadow:0 0 0 2px var(--accent-line); }
.dep-delta { font-size:11.5px; font-weight:600; color:var(--grey-txt); }
.dep-delta.is-up { color:var(--warn); }
.dep-delta.is-down { color:var(--success); }
.dep-card-total .dep-delta { color:var(--accent-ink); }
.dep-block-title { font-size:13px; font-weight:700; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.6px; margin:4px 0 10px; }
.dep-filtres { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:4px 0 8px; }
.dep-recherche { flex:1 1 240px; min-width:200px; }
.dep-check { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--ink-soft); cursor:pointer; white-space:nowrap; }
.dep-resume-filtre { min-height:20px; font-size:13px; font-weight:600; color:var(--ink); margin-bottom:8px; }
.dep-cols { position:relative; }
.dep-cols summary { cursor:pointer; list-style:none; }
.dep-cols summary::-webkit-details-marker { display:none; }
.dep-cols-panel { position:absolute; right:0; top:calc(100% + 6px); z-index:20; display:flex; flex-direction:column; gap:8px; padding:12px 14px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); box-shadow:var(--shadow-md); min-width:170px; }
.dep-lot { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 14px; margin-bottom:10px; background:var(--surface-alt); border:1px solid var(--accent-line); border-radius:var(--radius-md); }
.dep-lot[hidden] { display:none; }
.dep-lot select { min-width:200px; }
.dep-lot .dep-danger { color:var(--red); }
.dep-sel { width:34px; text-align:center; }
.dep-badge-sans { display:inline-block; margin-left:6px; padding:1px 8px; border-radius:6px; font-size:11px; font-weight:600; background:var(--warn-pale); color:var(--warn); white-space:nowrap; }
.dep-table.hide-col-bien .col-bien, .dep-table.hide-col-categorie .col-categorie, .dep-table.hide-col-fournisseur .col-fournisseur, .dep-table.hide-col-periode .col-periode, .dep-table.hide-col-notes .col-notes { display:none; }
.dep-table:not(.hide-col-periode) .dep-meta-periode, .dep-table:not(.hide-col-notes) .dep-meta-notes { display:none; }
.dep-table tr[hidden] { display:none; }.dep-filtres [hidden], .dep-resume-filtre[hidden] { display:none !important; }
.dep-table th, .dep-table .th-sort { font-weight:800; }
.dep-table .h-name { font-weight:400; color:var(--ink); }
.dep-filtres { background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius-md); padding:12px 14px; margin:4px 0 12px; }
.dep-filtres input[type="search"], .dep-filtres select { height:40px; box-sizing:border-box; border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); background-color:var(--surface); color:var(--ink); font-family:var(--font-body); font-size:13.5px; font-weight:500; padding:0 13px; outline:none; transition:border-color .15s, box-shadow .15s; }
.dep-filtres input[type="search"]::placeholder { color:var(--grey-txt); font-weight:400; }
.dep-filtres input[type="search"]:focus, .dep-filtres select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(185,133,101,.15); }
.dep-filtres input[type="search"] { padding-left:38px; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23929aa6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>"); background-repeat:no-repeat; background-position:13px center; background-size:16px; }
.dep-filtres input[type="search"]::-webkit-search-cancel-button { cursor:pointer; }
.dep-filtres select { appearance:none; -webkit-appearance:none; cursor:pointer; font-weight:600; padding-right:36px; flex:0 1 230px; min-width:150px; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23929aa6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 13px center; background-size:12px; }
.dep-filtres .dep-check { height:40px; box-sizing:border-box; padding:0 13px; background:var(--surface); border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); font-weight:600; color:var(--ink); }
.dep-filtres .dep-check input { accent-color:var(--ink-solid); width:16px; height:16px; margin:0; cursor:pointer; }
.dep-filtres .dep-check:has(input:checked) { border-color:var(--accent-line); background:var(--accent); color:var(--accent-ink); }
.dep-filtres .btn { height:40px; box-sizing:border-box; }
.dec-filtres select { flex:0 1 220px; }
.dec-alertes { border-color:var(--warn); background:var(--warn-pale); }
.dec-table td, .dec-table th { padding-top:9px; padding-bottom:9px; }
.dec-table .dec-ligne { width:64px; color:var(--accent-text); font-weight:700; }
.dec-table tr.dec-total_recettes td, .dec-table tr.dec-total_charges td { font-weight:700; background:var(--surface-alt); }
.dec-table tr.dec-resultat td { font-weight:800; background:var(--ink-solid); color:#fff; }
.dec-table tr.dec-resultat td.dec-ligne { color:#fff; }
.dec-table tr.dec-vide td { color:var(--grey-txt); }
.dec-badge { display:inline-block; margin-left:8px; padding:1px 8px; border-radius:6px; font-size:11px; font-weight:600; background:var(--warn-pale); color:var(--warn); white-space:nowrap; }
.dep-cat-form input, .dep-cat-form select { height:40px; box-sizing:border-box; border:1.5px solid var(--grey-border); border-radius:var(--radius-sm); background-color:var(--surface); color:var(--ink); font-family:var(--font-body); font-size:13.5px; font-weight:500; padding:0 13px; outline:none; transition:border-color .15s, box-shadow .15s; }
.dep-cat-form input:focus, .dep-cat-form select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(185,133,101,.15); }
.dep-cat-form select { appearance:none; -webkit-appearance:none; cursor:pointer; font-weight:600; padding-right:36px; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23929aa6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 13px center; background-size:12px; }
.dep-cat-form .btn { height:40px; box-sizing:border-box; }

.news-modal { width:560px; }
.news-modal .modal-body { padding-bottom:0; }
.news-list { list-style:none; margin:0 0 4px; padding:0; display:flex; flex-direction:column; gap:14px; }
.news-item { display:flex; gap:14px; align-items:flex-start; }
.news-icon { flex:0 0 38px; height:38px; border-radius:var(--radius-md); background:var(--accent); color:var(--accent-ink); display:flex; align-items:center; justify-content:center; }
.news-text strong { display:block; color:var(--ink); font-size:14.5px; margin-bottom:2px; }
.news-text p { margin:0 0 4px; font-size:13.5px; color:var(--grey-txt); line-height:1.45; }
.news-text a { font-size:13px; font-weight:600; color:var(--accent-text); text-decoration:none; }
.news-text a:hover { text-decoration:underline; }
.news-actions { display:flex; justify-content:flex-end; position:sticky; bottom:0; background:var(--grey-card); border-top:1px solid var(--border); margin:0 -28px; padding:14px 28px 20px; }

.commune-hote { position: relative; }
.commune-liste {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  margin: 4px 0 0; padding: 4px; list-style: none;
  max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
}
.commune-liste[hidden] { display: none; }
.commune-liste li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-md);
  font-size: 14px; color: var(--ink); cursor: pointer;
}
.commune-liste li:hover, .commune-liste li[aria-selected="true"] { background: var(--surface-alt); }
.commune-liste .commune-cp { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-muted); }