:root { --fond:#faf8f5; --texte:#27313a; --doux:#6b7780; --trait:#e2ddd5; --accent:#3f6f6a; --accent-fonce:#2d5551; --ok:#2e7d4f; --ko:#b3402f; --carte:#fff; }
@media (prefers-color-scheme: dark) {
  :root { --fond:#171b1e; --texte:#e7e9ea; --doux:#98a3ab; --trait:#2d3439; --accent:#6fb3aa; --accent-fonce:#8cc9c0; --ok:#6fcf97; --ko:#ef8a7c; --carte:#1f2427; }
}
* { box-sizing: border-box; }
body { margin:0; font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif; background:var(--fond); color:var(--texte); }
main { max-width:1000px; margin:0 auto; padding:16px; }
h1 { font-size:1.5rem; margin:.5rem 0 1rem; } h2 { font-size:1.15rem; margin:1.5rem 0 .5rem; }
a { color:var(--accent-fonce); }
.barre { display:flex; flex-wrap:wrap; gap:8px 16px; justify-content:space-between; align-items:center; padding:10px 16px; background:var(--carte); border-bottom:1px solid var(--trait); }
.barre nav { display:flex; flex-wrap:wrap; gap:4px 16px; } .barre nav a { text-decoration:none; font-weight:600; }
button, .bouton { font:inherit; padding:.5rem 1rem; border:0; border-radius:8px; background:var(--accent); color:#fff; cursor:pointer; text-decoration:none; display:inline-block; }
button.lien, .lien { background:none; color:var(--doux); padding:.25rem; text-decoration:underline; }
.secondaire { background:none; color:var(--accent-fonce); border:1px solid var(--accent); }
form label { display:block; font-weight:600; margin:.9rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], select { width:100%; max-width:420px; font:inherit; padding:.55rem .7rem; border:1px solid var(--trait); border-radius:8px; background:var(--carte); color:var(--texte); }
.choix { display:flex; flex-wrap:wrap; gap:8px; } .choix label { font-weight:500; margin:0; padding:.5rem .9rem; border:1px solid var(--trait); border-radius:8px; background:var(--carte); cursor:pointer; display:flex; gap:.4rem; align-items:center; }
.choix input:checked + span { font-weight:700; }
.flash { padding:.6rem .9rem; border-radius:8px; } .flash.ok { background:color-mix(in srgb,var(--ok) 15%,transparent); } .flash.ko { background:color-mix(in srgb,var(--ko) 15%,transparent); }
.erreurs { color:var(--ko); }
table { width:100%; border-collapse:collapse; background:var(--carte); border:1px solid var(--trait); border-radius:8px; overflow:hidden; }
th, td { padding:.5rem .6rem; text-align:left; border-bottom:1px solid var(--trait); vertical-align:top; } th { font-size:.85rem; color:var(--doux); }
td.num, th.num { text-align:right; font-variant-numeric:tabular-nums; }
.defile { overflow-x:auto; }
tr.non_honore td { background:color-mix(in srgb,var(--ko) 10%,transparent); }
.badge { font-size:.8rem; padding:.1rem .5rem; border-radius:99px; border:1px solid var(--trait); white-space:nowrap; }
.badge.paye { color:var(--ok); border-color:var(--ok); } .badge.non_honore { color:var(--ko); border-color:var(--ko); }
.grille { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:1rem 0; }
.carte { background:var(--carte); border:1px solid var(--trait); border-radius:12px; padding:12px 16px; } .carte b { display:block; font-size:1.5rem; } .carte span { color:var(--doux); font-size:.85rem; }
.nav-mois { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:1rem; }
.actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:1rem 0; }
.doux { color:var(--doux); }
.graphique { width:100%; height:auto; background:var(--carte); border:1px solid var(--trait); border-radius:12px; }
.graphique text { fill:var(--doux); font-size:11px; } .graphique .barre-ca { fill:var(--accent); } .graphique .val { fill:var(--texte); }
@media print { .barre, .actions, .nav-mois a, .flash { display:none; } body { background:#fff; color:#000; } }
