:root {
  --bg: #f6f7f4;
  --panel: #fff;
  --text: #1c211b;
  --muted: #646b60;
  --line: #dfe4da;
  --accent: #2f6f4e;
  --accent-strong: #174832;
  --warn: #9a5b10;
  --danger: #a3332c;
  --unit-farfadets: #65bc98;
  --unit-louveteaux: #f18700;
  --unit-scouts: #0071aa;
  --unit-pionniers: #d63313;
  --unit-compagnons: #007153;
  --unit-cadres: #cca5e5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.topbar { align-items: center; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; gap: 16px; min-height: 56px; padding: 0 20px; position: sticky; top: 0; z-index: 2; }
.brand { color: var(--accent-strong); font-weight: 700; }
.navlinks { display: flex; flex: 1; gap: 12px; overflow-x: auto; }
.navlinks a { color: var(--muted); font-size: 14px; }
.page { margin: 0 auto; max-width: 1120px; padding: 24px 20px 48px; }
.page-header { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 28px; line-height: 1.15; margin: 0 0 4px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.metric { font-size: 30px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button, .icon-button { align-items: center; background: var(--accent); border: 0; border-radius: 6px; color: white; cursor: pointer; display: inline-flex; gap: 8px; justify-content: center; min-height: 38px; padding: 8px 12px; }
.button.secondary { background: #e9eee5; color: var(--text); }
.icon-button { height: 38px; padding: 0; width: 38px; }
.badge { background: #eef2ea; border-radius: 999px; color: var(--muted); display: inline-block; font-size: 12px; padding: 4px 8px; }
.badge.warn { background: #fff4d8; color: var(--warn); }
.badge.danger { background: #ffe4e1; color: var(--danger); }
.unit-chip { align-items: center; background: color-mix(in srgb, var(--unit-color, var(--line)) 34%, white); border-radius: 999px; color: var(--text); display: inline-flex; font-size: 12px; font-weight: 600; gap: 6px; padding: 4px 9px; white-space: nowrap; }
.unit-chip::before { background: var(--unit-color, var(--line)); border: 1px solid rgb(0 0 0 / 12%); border-radius: 50%; content: ""; flex: 0 0 9px; height: 9px; width: 9px; }
[data-unit="Farfadets"] { --unit-color: var(--unit-farfadets); }
[data-unit="Louveteaux"] { --unit-color: var(--unit-louveteaux); }
[data-unit="Scouts"] { --unit-color: var(--unit-scouts); }
[data-unit="Pionniers"] { --unit-color: var(--unit-pionniers); }
[data-unit="Compagnons"] { --unit-color: var(--unit-compagnons); }
[data-unit="Cadres"] { --unit-color: var(--unit-cadres); }
.table tr[data-unit] { background: color-mix(in srgb, var(--unit-color) 18%, white); box-shadow: inset 3px 0 0 var(--unit-color); }
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea { background: white; border: 1px solid var(--line); border-radius: 6px; min-height: 40px; padding: 8px 10px; width: 100%; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-width: 380px; padding: 24px; width: 100%; }
.spaced { margin-top: 16px; }
.table-wrapper { overflow-x: auto; }
.table { border-collapse: collapse; width: 100%; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.table th { color: var(--muted); font-size: 13px; font-weight: 600; }
.row-actions { display: flex; gap: 6px; }
@media (max-width: 720px) { .topbar { align-items: flex-start; flex-wrap: wrap; padding: 12px 16px; } .navlinks { order: 3; width: 100%; } .page { padding: 18px 14px 36px; } .page-header { display: grid; } }
