/* 24/09 (F1–F4) — écran Finance : barre unique, une rangée de tuiles, tableau sur toute la hauteur, bande de totaux en bas.
   Mise en page « seules les données défilent » : .page-content.gp-plein (posée par loadFinance, retirée par showView). */
.page-content.gp-plein > #view-finance.active{ display:flex; flex-direction:column; height:100%; min-height:0; }
#view-finance{ position:relative; }
#view-finance .fin-bar{ flex:0 0 auto; display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:0 0 8px; }
#view-finance .fin-seg{ display:flex; gap:2px; padding:2px; border-radius:9px; background:var(--surface-2, #ececf0); }
#view-finance .fin-seg button{ height:28px; padding:0 11px; border:0; border-radius:7px; background:transparent; color:var(--text, #1c1c1e);
  font:inherit; font-size:12.5px; cursor:pointer; white-space:nowrap; }
#view-finance .fin-seg button.on{ background:var(--surface, #fff); font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.14); }
#view-finance .fin-btn, #view-finance .fin-primary{ height:30px; padding:0 11px; border-radius:8px; font:inherit; font-size:12.5px; font-weight:500;
  cursor:pointer; display:inline-flex; align-items:center; gap:5px; white-space:nowrap; box-sizing:border-box; }
#view-finance .fin-btn{ border:1px solid var(--border-md, #d1d1d6); background:var(--surface, #fff); color:var(--text, #1c1c1e); }
#view-finance .fin-btn.on{ border-color:var(--blue, #0a66d6); background:color-mix(in srgb, var(--blue, #0a66d6) 12%, var(--surface, #fff)); color:var(--blue, #0a58c2); }
#view-finance .fin-primary{ border:0; background:var(--blue, #0a66d6); color:#fff; font-weight:600; }
#view-finance .fin-mois input{ border:0; background:transparent; font:inherit; color:inherit; padding:0; outline:none; }
#view-finance .fin-actions{ display:flex; align-items:center; gap:8px; margin-left:auto; flex-wrap:wrap; }
#view-finance .fin-count{ color:var(--text-muted, #6e6e73); font-size:12px; font-variant-numeric:tabular-nums; }
#view-finance .fin-kpis{ flex:0 0 auto; display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:8px; padding:0 0 8px; }
#view-finance .fin-kpis[hidden]{ display:none; }
#view-finance .fin-kpi{ background:var(--surface, #fff); border-radius:10px; padding:6px 12px; box-shadow:0 0 0 1px var(--border, #e3e3e8);
  display:flex; flex-direction:column; justify-content:center; gap:1px; min-width:0; }
#view-finance .fin-kpi span{ font-size:11px; color:var(--text-muted, #6e6e73); font-weight:500; }
#view-finance .fin-kpi b{ font-size:17px; font-weight:600; font-variant-numeric:tabular-nums; color:var(--text, #1c1c1e); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#view-finance .fin-kpi small{ font-size:10.5px; color:var(--text-muted, #6e6e73); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#view-finance #finance-content{ flex:1 1 auto; min-height:0; overflow:auto; }
#view-finance #finance-content.fin-content--table{ display:flex; flex-direction:column; overflow:hidden; }
#view-finance .fin-trans{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
#view-finance .fin-table-zone{ flex:1 1 auto; min-height:0; overflow:auto; background:var(--surface, #fff); border-radius:10px 10px 0 0; box-shadow:0 0 0 1px var(--border, #e3e3e8); }
/* F1/F4 : totaux SOUS le tableau, jamais par-dessus les lignes */
#view-finance .fin-totaux{ flex:0 0 44px; display:flex; align-items:center; gap:18px; padding:0 16px; background:var(--surface-2, #f7f7f9);
  border-top:2px solid var(--border-md, #c7c7cc); border-radius:0 0 10px 10px; box-shadow:0 0 0 1px var(--border, #e3e3e8);
  font-variant-numeric:tabular-nums; color:var(--text-muted, #6e6e73); font-size:12.5px; white-space:nowrap; overflow-x:auto; }
#view-finance .fin-totaux b{ color:var(--text, #1c1c1e); font-weight:600; }
#view-finance .fin-totaux .fin-tot-titre{ color:var(--text, #1c1c1e); font-weight:600; }
#view-finance .fin-totaux .fin-ttc{ font-size:15px; font-weight:700; }
#view-finance .fin-grow{ flex:1 1 auto; }
#view-finance .fin-spinner{ text-align:center; padding:1rem; }
/* panneaux « Filtres ▾ » / « Importer ▾ » : flottants, ne prennent pas de place quand ils sont fermés */
#view-finance .fin-pop{ position:absolute; z-index:40; min-width:320px; max-width:560px; padding:12px; border-radius:12px;
  background:var(--surface, #fff); color:var(--text, #1c1c1e); box-shadow:0 10px 30px rgba(0,0,0,.18), 0 0 0 1px var(--border, #e3e3e8);
  display:flex; flex-direction:column; gap:8px; font-size:12.5px; }
#view-finance .fin-pop[hidden]{ display:none; }
#view-finance .fin-pop label{ display:flex; flex-direction:column; gap:3px; color:var(--text-muted, #6e6e73); font-size:11.5px; }
#view-finance .fin-pop-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
#view-finance .fin-pop-large{ grid-column:1 / -1; }
#view-finance .fin-pop-note{ font-size:11px; color:var(--text-muted, #6e6e73); }
#view-finance .fin-pop .form-input, #view-finance .fin-pop .form-select{ padding:5px 8px; font-size:12.5px; }
@media (max-width: 1200px){ #view-finance .fin-kpis{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
/* préprod : le bandeau « PRÉPROD — données de test » (fixe, en bas à droite) ne doit pas cacher le total TTC */
html:has(#preprod-mark) #view-finance .fin-totaux{ padding-right:220px; }   /* #preprod-mark : injecté par nginx en préprod seulement */
/* largeurs de colonnes respectées (comme #inter-list-container) */
#view-finance #fin-trans-table table.gt{ table-layout:fixed; }
