/* REBOT² — interface privée. Sombre, noir bleuté éclairci, une seule couleur d'accent.
   Aucune ressource externe : polices du système. */
:root {
  --bg: #060a13; --panel: #0a1120; --panel-2: #0c1322; --raised: #101a2e; --active: #132447;
  --line: #16223a; --line-2: #26365a; --text: #e8eef8; --soft: #b9c6dc; --muted: #9aa9c2; --faint: #8696b3;
  --accent: #5b9bff; --action: #ff6b4a; --renforce: #ffc44d; --fiscal: #4fd1e8; --land: #1a2742; --dim: #33466e;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: #8db8ff; } a:hover { color: #c2d9ff; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #8db8ff; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; background: var(--raised); padding: 8px 12px; border-radius: 8px; z-index: 5; }
.noscript { padding: 40px; color: var(--renforce); }

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.rail { flex: 1 0 216px; max-width: 264px; padding: 28px 16px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 28px; }
.brand { padding: 0 12px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; } .brand-name span { color: var(--accent); }
.brand-sub, .label { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--soft); text-decoration: none; }
.nav a:hover { background: var(--raised); }
.nav a[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 600; }
.freshness { margin-top: auto; padding: 14px 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12.5px; }
.freshness strong { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.led { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.led.ok { background: var(--accent); } .led.warn { background: var(--renforce); } .led.bad { background: var(--action); }

main { flex: 999 1 560px; min-width: 0; padding: 32px 40px 56px; display: flex; flex-direction: column; gap: 24px; outline: none; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.head h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.head p { color: var(--muted); font-size: 15px; max-width: 660px; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 0 1 300px; }
.field input { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); }
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.strip { display: flex; flex-wrap: wrap; gap: 8px 36px; padding: 16px 20px; border-radius: 12px; }
.stat { display: flex; align-items: baseline; gap: 10px; color: var(--soft); }
.stat b { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--text); }
.stat.big b { font-size: 26px; letter-spacing: -0.02em; } .stat.big { color: var(--muted); }
.sw { width: 10px; height: 10px; border-radius: 2px; flex: none; align-self: center; background: var(--land); }
.sw.action { background: var(--action); } .sw.renforce { background: var(--renforce); } .sw.fiscal { background: var(--fiscal); } .sw.dim { background: var(--dim); }
.sw.none { border: 1px solid #2a3a5c; }
.notice { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--soft); }
.notice.warn { border-color: #6b5320; color: var(--renforce); }

.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.map { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px 6px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--soft); display: inline-flex; align-items: center; gap: 8px; }
.chip span { font-family: var(--mono); font-size: 12px; opacity: 0.8; }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.map svg { display: block; width: 100%; height: auto; padding: 4px 10px 0; }
.land { cursor: pointer; transition: fill 0.18s ease; stroke: var(--bg); stroke-width: 0.5; stroke-linejoin: round; }
.land:hover { filter: brightness(1.35); }
.land.sel { stroke: #fff; stroke-width: 1.6; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 18px 16px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); margin-top: auto; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted); }
.side { flex: 1 1 300px; max-width: 420px; min-width: 0; background: var(--panel-2); padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.side h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.side h3, .section-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.side-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); cursor: pointer; font-size: 18px; line-height: 1; }
.badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line-2); font-weight: 600; }
.motifs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.motifs li { padding: 10px 12px; border-radius: 8px; background: var(--raised); display: flex; flex-direction: column; gap: 2px; }
.motifs li span { color: var(--soft); } .motifs li strong { font-weight: 600; }
.block { display: flex; flex-direction: column; gap: 10px; }
.block.rule { padding-top: 14px; border-top: 1px solid var(--line); }
.muted { color: var(--muted); } .soft { color: var(--soft); } .mono { font-family: var(--mono); }
.src { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.src:last-child { border-bottom: 0; }
.src-top { display: flex; justify-content: space-between; gap: 12px; }
.src small { color: var(--muted); font-size: 12.5px; }

.list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.scroll { max-height: 440px; overflow: auto; }
.rows { min-width: 640px; display: flex; flex-direction: column; }
.row { display: grid; gap: 16px; align-items: center; text-align: left; min-height: 48px; padding: 8px 20px; border: 0; border-bottom: 1px solid #111b30; background: transparent; cursor: pointer; width: 100%; }
.row:hover { background: #12203a; } .row.sel, .row[aria-expanded="true"] { background: var(--active); }
.row.country { grid-template-columns: 56px minmax(150px, 1.1fr) minmax(190px, 1fr) minmax(220px, 2fr); }
.row.text { grid-template-columns: minmax(170px, 0.9fr) minmax(260px, 2.4fr) 110px 110px; cursor: default; }
.row.text:hover { background: transparent; }
.row.duty { grid-template-columns: 28px minmax(280px, 3fr) 120px 170px; }
.row .id { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.row .name { font-weight: 600; } .row .lvl { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); }
.row .more { color: var(--muted); font-size: 13px; }
.pending { display: inline-flex; align-items: center; gap: 8px; color: var(--renforce); font-size: 13px; }
.pending i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--renforce); }
.done { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; }
.done i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.detail { padding: 4px 20px 18px 64px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid #111b30; }
.detail p { color: var(--soft); max-width: 780px; }
.theme { padding: 14px 20px 6px; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.04em; text-transform: uppercase; }
.bar { height: 6px; border-radius: 3px; background: var(--line); } .bar i { display: block; height: 6px; border-radius: 3px; background: var(--accent); }
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; padding: 18px 20px; border-radius: 12px; }
.progress .grow { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; color: var(--soft); font-size: 13px; }
.months { min-width: 720px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.month { display: flex; flex-direction: column; gap: 8px; }
.month div { height: 56px; border-radius: 8px; background: #0e1729; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.month span { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; letter-spacing: 0.04em; }
.reminder { width: 14px; height: 14px; border-radius: 50%; border: 1.5px dashed var(--renforce); }
.pad { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.kv { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 10px 24px; padding: 18px 20px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.empty { padding: 28px 20px; color: var(--muted); }
@media (max-width: 720px) { main { padding: 24px 16px 40px; } .rail { max-width: none; border-right: 0; border-bottom: 1px solid var(--line); } .freshness { margin-top: 0; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; } .detail { padding-left: 20px; } }
@media (prefers-reduced-motion: reduce) { .land { transition: none; } }
.account { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; font-size: 13px; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; padding: 32px 28px; display: flex; flex-direction: column; gap: 22px; }
.login-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-card .field { flex: none; }
.primary { height: 46px; border-radius: 10px; border: 0; background: var(--text); color: var(--bg); font-weight: 600; cursor: pointer; }
.primary:hover { background: #fff; }
.login-error { color: var(--renforce); min-height: 20px; font-size: 13.5px; }
.learned { display: flex; flex-direction: column; gap: 4px; padding: 14px 20px; border-bottom: 1px solid #111b30; }
.learned:last-child { border-bottom: 0; }
.learned-top { display: flex; align-items: baseline; gap: 14px; }
.learned .id { font-family: var(--mono); font-size: 12px; color: var(--faint); flex: none; }
