:root { --bg:#0f1218; --carte:#181d27; --bord:#262d3a; --txt:#e8ebf0; --doux:#8b95a7; --accent:#4f8cff; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--txt); font:15px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; }
header { padding:16px 16px 4px; max-width:1100px; margin:auto; }
h1 { margin:0; font-size:22px; }
main { max-width:1100px; margin:auto; padding:8px 16px 40px; }
section { margin:14px 0; }
.muted { color:var(--doux); font-size:13px; }
a { color:var(--accent); }

#sieges { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; }
.parti { background:var(--carte); border:1px solid var(--bord); border-top:4px solid var(--c); border-radius:8px; padding:10px 12px; }
.parti .n { font-size:34px; font-weight:700; line-height:1.1; }
.parti .nom { font-size:13px; color:var(--doux); min-height:2.6em; }
.parti .sub { font-size:12px; color:var(--doux); }
.barre { grid-column:1/-1; position:relative; height:22px; display:flex; background:var(--carte); border-radius:6px; overflow:hidden; border:1px solid var(--bord); }
.barre div { height:100%; }
.barre .maj { position:absolute; top:0; bottom:0; width:2px; background:#fff; }
.vide { grid-column:1/-1; background:var(--carte); border:1px dashed var(--bord); border-radius:8px; padding:18px; text-align:center; color:var(--doux); }

#q { width:100%; padding:12px 14px; font-size:16px; border-radius:8px; border:1px solid var(--bord); background:var(--carte); color:var(--txt); }
#q:focus { outline:2px solid var(--accent); }
#resultats-recherche .r { display:flex; justify-content:space-between; gap:8px; padding:9px 12px; background:var(--carte); border:1px solid var(--bord); border-top:0; cursor:pointer; }
#resultats-recherche .r:hover { background:#202737; }

.tabs { display:flex; gap:6px; margin-top:6px; }
.tabs button { background:var(--carte); color:var(--txt); border:1px solid var(--bord); padding:8px 18px; border-radius:8px; font-size:15px; cursor:pointer; }
.tabs button.actif { background:var(--accent); border-color:var(--accent); }
#carte { height:62vh; min-height:360px; margin-top:8px; border-radius:8px; border:1px solid var(--bord); background:#0b0e13; }
.leaflet-container { background:#0b0e13; font:inherit; }

table { width:100%; border-collapse:collapse; margin-top:8px; }
th, td { padding:8px 10px; border-bottom:1px solid var(--bord); text-align:left; }
th { color:var(--doux); font-weight:500; font-size:13px; cursor:pointer; position:sticky; top:0; background:var(--bg); }
th.num, td.num { text-align:right; white-space:nowrap; }
tbody tr { cursor:pointer; }
tbody tr:hover { background:var(--carte); }
.pastille { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; background:var(--c); }
.tag { font-size:11px; border:1px solid var(--bord); border-radius:4px; padding:1px 5px; color:var(--doux); margin-left:4px; }
.tag.elu { color:#4ade80; border-color:#4ade80; }

#detail { position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:1000; display:flex; justify-content:flex-end; }
#detail[hidden] { display:none; }
.panneau { background:var(--bg); width:min(560px,100%); height:100%; overflow:auto; padding:18px; border-left:1px solid var(--bord); position:relative; }
#fermer { position:absolute; right:12px; top:10px; background:none; border:0; color:var(--txt); font-size:20px; cursor:pointer; }
.panneau h2 { margin:0 0 4px; font-size:22px; padding-right:30px; }
.prog { height:8px; background:var(--carte); border-radius:4px; overflow:hidden; margin:6px 0 12px; }
.prog div { height:100%; background:var(--accent); }
.stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.stats div { background:var(--carte); border:1px solid var(--bord); border-radius:8px; padding:8px 10px; }
.stats b { display:block; font-size:18px; }
.cand { background:var(--carte); border:1px solid var(--bord); border-left:4px solid var(--c); border-radius:8px; padding:9px 12px; margin:8px 0; }
.cand .l1 { display:flex; justify-content:space-between; gap:8px; font-weight:600; }
.cand .b { height:6px; background:var(--bord); border-radius:3px; margin-top:6px; }
.cand .b div { height:100%; background:var(--c); border-radius:3px; }

.etoile { background:none; border:0; color:var(--doux); font-size:18px; line-height:1; cursor:pointer; padding:0 4px; }
.etoile.on { color:#f5c518; }
#favoris h2 { font-size:16px; margin:0 0 8px; }
#favoris-liste { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:10px; }
.fav { background:var(--carte); border:1px solid var(--bord); border-radius:8px; padding:10px 12px; cursor:pointer; }
.fav:hover { background:#202737; }
.fav .t { display:flex; justify-content:space-between; align-items:center; gap:8px; font-weight:600; margin-bottom:6px; }
.fav .k { margin:5px 0; font-size:13px; }
.fav .k .l { display:flex; justify-content:space-between; gap:8px; }
.fav .k .b { height:4px; background:var(--bord); border-radius:2px; margin-top:3px; }
.fav .k .b div { height:100%; background:var(--c); border-radius:2px; }

@media (max-width:600px) { .parti .n { font-size:28px; } th:nth-child(4), td:nth-child(4) { display:none; } }

footer { text-align:center; color:var(--doux); font-size:13px; padding:16px 16px 28px; border-top:1px solid var(--bord); max-width:1100px; margin:0 auto; }
