/* Variante « Orange Banque Alimentaire » (chargée après style.css, seulement si choisie dans Apparence).
   Une seule touche forte : l'orange du logo (#F07D00) en bloc de marque et en boutons d'action ;
   tout le reste reste calme : feuilles blanches, filets fins, chiffres alignés dans la police de l'interface. */
html.theme-ba{
  --orange:#F07D00;           /* orange du logo BA74 */
  --orange-fonce:#A44E00;     /* orange lisible sur blanc (liens, onglets actifs) */
  --orange-pale:#FFF1E2;      /* fond des éléments actifs */
  --bg:#F3F4F6; --sheet:#fff; --ink:#1E2932; --muted:#5B6672; --rule:#E1E4E8; --field:#fff;
  --side:#fff; --side-ink:#1E2932; --side-muted:#6B7580; --side-active:var(--orange-pale);
  --accent:var(--orange); --accent-ink:#231200; --accent-soft:var(--orange-pale);
  --info:#245C8F; --info-soft:#E6EFF8;
  --ok:#1B6E43; --ok-soft:#E2F2E8; --warn:#8A5200; --warn-soft:#FCEFD8; --bad:#A92B25; --bad-soft:#FBE4E2;
  --f-ui:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
  --r:8px;
}
@media (prefers-color-scheme: dark){html.theme-ba{
  --orange:#F28A1E; --orange-fonce:#F6A04A; --orange-pale:#3A2410;
  --bg:#14181D; --sheet:#1B2026; --ink:#E8EBEF; --muted:#9BA5B1; --rule:#2B323B; --field:#161B21;
  --side:#1B2026; --side-ink:#E8EBEF; --side-muted:#8B96A3; --side-active:#2A2016;
  --accent-ink:#1A0D00; --info:#8DB8E8; --info-soft:#1A2A3C;
  --ok:#62C693; --ok-soft:#163224; --warn:#E7A84F; --warn-soft:#352814; --bad:#F08079; --bad-soft:#3A1C1A;
  color-scheme:dark}}

html.theme-ba body{font:14.5px/1.55 var(--f-ui);font-variant-numeric:tabular-nums}
html.theme-ba a{color:var(--info)}

/* barre latérale : blanche, séparée du contenu par la bande orange du logo */
html.theme-ba .side{border-right:5px solid var(--orange);padding:16px 12px}
html.theme-ba .side .brand{display:grid;grid-template-columns:36px 1fr;column-gap:9px;align-items:center;padding:2px 4px 16px;border-bottom:1px solid var(--rule);margin-bottom:10px}
html.theme-ba .side .brand img{grid-row:span 2;border-radius:6px;width:36px;height:36px}
html.theme-ba .side .brand b{font-size:16px;font-weight:700;letter-spacing:-.02em;white-space:nowrap}
html.theme-ba .side .brand>*{min-width:0}
html.theme-ba .side .brand span{font-size:12px;color:var(--side-muted);line-height:1.3}
html.theme-ba .side a{color:var(--side-ink);font-weight:500;border-radius:6px;padding:7px 10px;line-height:1.35}
html.theme-ba .side a:hover{background:var(--bg)}
html.theme-ba .side a.on{background:var(--orange-pale);color:var(--orange-fonce);font-weight:650;box-shadow:inset 3px 0 0 var(--orange)}
html.theme-ba .side .grp{text-transform:none;letter-spacing:0;font-size:12px;font-weight:650;color:var(--side-muted);padding:16px 10px 4px}
html.theme-ba .side .bottom{border-top:1px solid var(--rule)}
html.theme-ba .side .bottom button{color:var(--side-ink)}
html.theme-ba .side a.portail{color:var(--side-muted)}
@media (max-width:860px){html.theme-ba .side{border-right:0;border-bottom:4px solid var(--orange)}}

/* titres et libellés : casse normale, pas de capitales espacées */
html.theme-ba h1{font-size:24px;font-weight:700;letter-spacing:-.015em}
html.theme-ba h2{font-size:16px;font-weight:650}
html.theme-ba .eyebrow{text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:600;color:var(--muted)}

/* feuilles et tableaux */
html.theme-ba .sheet{border-color:var(--rule);border-radius:10px;box-shadow:0 1px 0 rgba(30,41,50,.04)}
html.theme-ba .sheet>.hd{padding:13px 18px}
html.theme-ba .sheet>.bd{padding:15px 18px}
html.theme-ba table{font-size:13.5px}
html.theme-ba th{text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:650;color:var(--muted);padding:10px 12px;border-bottom:1px solid var(--rule)}
html.theme-ba td{padding:9px 12px;border-bottom-color:var(--rule)}
html.theme-ba tbody tr:hover td{background:color-mix(in srgb,var(--orange-pale) 55%,transparent)}
html.theme-ba tfoot td{border-top:2px solid var(--ink)}
/* montants : police de l'interface en chiffres tabulaires, plus de police machine à écrire */
html.theme-ba .mono,html.theme-ba .num{font-family:var(--f-ui);font-variant-numeric:tabular-nums}
html.theme-ba td.num,html.theme-ba td .num{font-weight:500}

/* chiffres clés */
html.theme-ba .kpi .v,html.theme-ba .comp-kpis .v{font:700 26px var(--f-ui);letter-spacing:-.02em;font-variant-numeric:tabular-nums}

/* onglets */
html.theme-ba .tabs a{color:var(--muted)}
html.theme-ba .tabs a.on{color:var(--ink);border-bottom-color:var(--orange)}

/* boutons : l'action principale prend l'orange du logo, texte foncé pour rester lisible */
html.theme-ba button,html.theme-ba .btn{border-radius:8px;font-weight:600}
html.theme-ba .primary{background:var(--orange);border-color:var(--orange);color:var(--accent-ink)}
html.theme-ba .primary:hover{background:color-mix(in srgb,var(--orange) 88%,#000);border-color:color-mix(in srgb,var(--orange) 88%,#000)}
html.theme-ba .link{color:var(--info)}
html.theme-ba :focus-visible{outline:2px solid var(--orange-fonce);outline-offset:2px}

/* statuts */
html.theme-ba .chip{font-size:12px;font-weight:650;padding:2px 9px}

/* messages */
html.theme-ba .flash{border-radius:8px;border-left:4px solid var(--info)}
html.theme-ba .flash.ok{border-left-color:var(--ok)} html.theme-ba .flash.bad{border-left-color:var(--bad)} html.theme-ba .flash.warn{border-left-color:var(--warn)}

/* pages de connexion : pictogramme du logo au-dessus de la carte, liseré orange */
html.theme-ba body.plain{background:var(--bg)}
html.theme-ba .auth::before{content:"";display:block;width:64px;height:64px;margin:0 auto 16px;background:url(picto-ba.png) center/contain no-repeat;border-radius:10px}
html.theme-ba .auth .sheet{border-top:5px solid var(--orange)}
