:root {
  --fond: #0f172a;
  --carte: #1e293b;
  --carte-2: #273449;
  --trait: #334155;
  --texte: #f1f5f9;
  --texte-2: #94a3b8;
  --pour: #22c55e;
  --contre: #ef4444;
  --abstention: #cbd5e1;
  --accent: #e2e8f0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}
[hidden] { display: none !important; }
.barre {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: rgba(15, 23, 42, .94);
  border-bottom: 1px solid var(--trait);
}
.lien-nom { background: none; border: 0; color: var(--texte); font-family: inherit; font-weight: 800; font-size: 18px; letter-spacing: .02em; padding: 4px 0; cursor: pointer; }
.compte { color: var(--texte-2); font-size: 14px; }
main { max-width: 560px; margin: 0 auto; padding: 16px; }
.ecran { }
@keyframes apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ecran { animation: none; } }
h1 { font-size: 30px; line-height: 1.15; margin: 18px 0 10px; }
h2 { font-size: 21px; line-height: 1.25; margin: 8px 0; }
.sous-titre { font-size: 18px; margin: 30px 0 12px; }
.accroche { font-size: 18px; color: var(--accent); margin: 0 0 18px; }
.points { list-style: none; padding: 0; margin: 0 0 24px; }
.points li { padding: 10px 0 10px 28px; border-bottom: 1px solid var(--trait); position: relative; }
.points li::before { content: "✓"; position: absolute; left: 4px; color: var(--pour); font-weight: 700; }
.btn {
  display: block; width: 100%; min-height: 52px; border-radius: 14px; border: 2px solid transparent;
  font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1.2; cursor: pointer; padding: 12px 16px; margin: 10px 0;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.principal { background: var(--texte); color: var(--fond); }
.secondaire { background: transparent; color: var(--texte); border-color: var(--trait); }
.lien { background: none; color: var(--texte-2); min-height: 44px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: #fca5a5; }
.vie-privee { margin-top: 22px; padding: 12px 14px; border-radius: 12px; background: var(--carte); color: var(--accent); font-size: 14px; }
.source-pied { color: var(--texte-2); font-size: 13px; margin-top: 14px; }

.progression { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.progression-texte { color: var(--texte-2); font-size: 14px; font-variant-numeric: tabular-nums; min-width: 54px; }
.jauge { flex: 1; height: 6px; background: var(--trait); border-radius: 6px; overflow: hidden; }
.jauge-plein { height: 100%; width: 0; background: var(--texte); transition: width .25s ease; }
.carte { background: var(--carte); border-radius: 18px; padding: 18px 16px; border: 1px solid var(--trait); }
.etiquettes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.etiquette { background: var(--carte-2); color: var(--accent); border-radius: 99px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.etiquette.discrete { background: none; color: var(--texte-2); padding-left: 0; }
.etape { color: var(--texte-2); font-size: 14px; margin: 0 0 10px; }
.explication { font-size: 17px; margin: 0 0 12px; }
.note { color: var(--texte-2); font-size: 13.5px; }
.source { color: var(--texte-2); font-size: 12.5px; margin: 10px 0 0; border-top: 1px solid var(--trait); padding-top: 10px; }
.source a, .source-pied a, .detail-source a { color: var(--texte-2); }
.question { font-weight: 700; font-size: 18px; margin: 18px 0 4px; text-align: center; }
.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choix .btn { margin: 0; }
.vote.pour { background: var(--pour); color: #052e16; }
.vote.contre { background: var(--contre); color: #fff; }
.vote.abstention { background: var(--abstention); color: var(--fond); }
.vote.passer { background: transparent; color: var(--texte-2); border-color: var(--trait); }
.vote.choisi { outline: 3px solid #fff; outline-offset: 2px; }
.choix.motion .passer { grid-column: span 2; }
.nav-bas { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.nav-bas .btn { width: auto; margin: 0; }

.resume { color: var(--texte-2); margin-top: 0; }
.tete { background: var(--carte); border-radius: 18px; padding: 16px; border-left: 8px solid var(--texte); }
.tete .petit { color: var(--texte-2); font-size: 14px; margin: 0 0 4px; }
.tete .grand { font-size: 22px; font-weight: 800; margin: 0; }
.classement { list-style: none; padding: 0; margin: 0; }
.classement li { margin: 0 0 12px; }
.ligne-groupe { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; margin-bottom: 4px; }
.ligne-groupe .nom { font-weight: 700; }
.ligne-groupe .nom small { font-weight: 400; color: var(--texte-2); display: block; font-size: 12.5px; }
.ligne-groupe .pct { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barre-pct { height: 12px; background: var(--carte-2); border-radius: 8px; overflow: hidden; }
.barre-pct div { height: 100%; border-radius: 8px; }

.axe { position: relative; height: 76px; margin: 8px 4px 0; }
.axe-barre { position: absolute; left: 0; right: 0; top: 34px; height: 8px; border-radius: 8px; background: var(--carte-2); }
.axe-marques .m { position: absolute; top: 30px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--fond); }
.axe-marques .m span { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--texte-2); white-space: nowrap; }
.axe-marques .m.haut span { top: -18px; }
.axe-vous { position: absolute; top: 0; height: 76px; width: 0; transition: left .4s ease; }
.axe-vous::before { content: ""; position: absolute; left: -2px; top: 14px; width: 4px; height: 50px; background: #fff; border-radius: 3px; }
.axe-vous span { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--fond); font-size: 12px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.axe-legende { display: flex; justify-content: space-between; color: var(--texte-2); font-size: 12.5px; margin-top: 10px; }

.legende-votes { color: var(--texte-2); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 10px; }
.pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-left: 6px; }
.pastille.pour { background: var(--pour); }
.pastille.contre { background: var(--contre); }
.pastille.abstention { background: var(--abstention); }
.pastille.partage { background: repeating-linear-gradient(45deg, var(--pour) 0 4px, var(--contre) 4px 8px); }
.pastille.absent { background: transparent; border: 1px dashed var(--texte-2); }
.detail { background: var(--carte); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.detail h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.3; }
.detail .meta { color: var(--texte-2); font-size: 12.5px; margin: 0 0 8px; }
.vous-vote { font-size: 14px; margin: 0 0 8px; }
.vous-vote b { padding: 1px 8px; border-radius: 6px; }
.vous-vote b.pour { background: var(--pour); color: #052e16; }
.vous-vote b.contre { background: var(--contre); color: #fff; }
.vous-vote b.abstention { background: var(--abstention); color: var(--fond); }
.vous-vote b.passer { background: var(--carte-2); color: var(--texte-2); }
.groupes-vote { display: flex; flex-wrap: wrap; gap: 5px; }
.gv { font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; color: var(--fond); }
.gv.pour { background: var(--pour); color: #052e16; }
.gv.contre { background: var(--contre); color: #fff; }
.gv.abstention { background: var(--abstention); }
.gv.partage { background: repeating-linear-gradient(45deg, #15803d 0 5px, #b91c1c 5px 10px); color: #fff; }
.gv.absent { background: transparent; border: 1px dashed var(--texte-2); color: var(--texte-2); }
.gv.accord { box-shadow: 0 0 0 2px #fff; }
.detail-source { color: var(--texte-2); font-size: 12px; margin: 8px 0 0; }
.actions { margin-top: 24px; }
.partage-ok { text-align: center; color: var(--pour); }
.methode { margin-top: 18px; background: var(--carte); border-radius: 12px; padding: 12px 14px; color: var(--accent); font-size: 14px; }
.methode summary { cursor: pointer; font-weight: 700; }
.chargement { color: var(--texte-2); text-align: center; margin-top: 40px; }

/* menu commun */
.onglets { display: flex; gap: 4px; padding: 6px 12px; border-bottom: 1px solid var(--trait); overflow-x: auto; background: var(--fond); }
.onglets a { flex: 1; text-align: center; white-space: nowrap; color: var(--texte-2); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 6px; border-radius: 10px; }
.onglets a[aria-current="page"] { background: var(--carte); color: var(--texte); }

/* question développée */
.detail-texte { font-size: 15px; color: var(--accent); margin: 0 0 12px; }
.enjeu { background: var(--carte-2); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.enjeu h3 { font-size: 14px; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); }
.enjeu p { margin: 0 0 6px; }
.sens { list-style: none; padding: 0; margin: 6px 0; }
.sens li { margin: 3px 0; }
.sens .pastille { margin: 0 6px 0 0; }
.petit-lien { color: var(--texte-2); font-size: 13px; }

/* pages participation et institutions */
.intro { color: var(--accent); }
.bascule { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--carte); border-radius: 12px; padding: 4px; margin: 12px 0; }
.bascule button { border: 0; border-radius: 9px; padding: 10px 6px; background: none; color: var(--texte-2); font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.bascule button[aria-pressed="true"] { background: var(--texte); color: var(--fond); }
.recherche { display: flex; gap: 8px; margin: 10px 0; }
.recherche input, .recherche select { flex: 1; min-width: 0; min-height: 44px; border-radius: 10px; border: 1px solid var(--trait); background: var(--carte); color: var(--texte); font: inherit; font-size: 15px; padding: 8px 10px; }
.recherche select { flex: 0 0 38%; }
.deputes { list-style: none; padding: 0; margin: 0; }
.deputes li { background: var(--carte); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; border-left: 6px solid var(--trait); }
.deputes .haut { display: flex; justify-content: space-between; gap: 8px; }
.deputes .nom { font-weight: 700; }
.deputes .pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.deputes .meta { color: var(--texte-2); font-size: 12.5px; }
.plus { margin-top: 8px; }
.institution { background: var(--carte); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.institution h2 { font-size: 18px; margin: 0 0 2px; }
.institution .qui { color: var(--texte-2); font-size: 13px; margin: 0 0 8px; }
.institution p { margin: 6px 0; font-size: 15px; }
.institution ul { margin: 6px 0; padding-left: 20px; font-size: 15px; }
.parcours { list-style: none; padding: 0; margin: 0 0 10px; counter-reset: etape; }
.parcours li { position: relative; padding: 8px 0 8px 36px; border-left: 2px solid var(--trait); margin-left: 12px; font-size: 15px; }
.parcours li::before { counter-increment: etape; content: counter(etape); position: absolute; left: -13px; top: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--texte); color: var(--fond); font-weight: 800; font-size: 13px; text-align: center; line-height: 24px; }
a.lien-nom { text-decoration: none; }
.barre-pct div { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.recherche select:only-child { flex: 1; }

/* compte, soutien, partenaire */
.lien-compte { color: var(--texte); font-weight: 700; text-decoration: none; border: 1px solid var(--trait); border-radius: 99px; padding: 4px 10px; }
.carte-compte { margin-top: 18px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #1e293b, #172033); border: 1px solid var(--trait); text-align: center; }
.carte-compte-appel { margin: 0 0 8px; color: var(--accent); font-size: 15px; }
.carte-compte .btn { margin: 0; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.carte-compte .btn + .btn { margin-top: 10px; }
.btn.youtube { background: #ff0000; color: #fff; border: none; font-weight: 700; }
.regles-carte { margin: 12px 0 0; font-size: 13px; color: var(--texte-2); }
.regles-carte a { color: inherit; text-decoration: underline; }
.pied-commun { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--trait); text-align: center; }
.institution a { color: inherit; text-decoration: underline; }
.stats-privees { max-width: 900px; }
.stats-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0; }
.stats-cartes .carte { display: flex; flex-direction: column; gap: 4px; padding: 14px; margin: 0; }
.stats-cartes .grand { font-size: 28px; font-weight: 800; }
.tableau { overflow-x: auto; }
.tableau table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th, .tableau td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.tableau td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.tableau progress { width: 100%; min-width: 60px; height: 10px; accent-color: var(--accent); }
.btn.a-confirmer { background: #b91c1c; color: #fff; border-color: #b91c1c; white-space: normal; }
.choix-langue { margin-left: 8px; background: #1e293b; color: var(--texte); border: 1px solid var(--trait);
  border-radius: 99px; padding: 6px 8px; font-size: 13px; max-width: 110px; }
.traduction-ia { font-size: 12px; border-left: 3px solid var(--trait); padding-left: 8px; }
[dir="rtl"] .traduction-ia { border-left: none; border-right: 3px solid var(--trait); padding-left: 0; padding-right: 8px; }
.choix-parlement { margin-top: 22px; }
.liste-parlements { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 8px; }
.ligne-parlement { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: #1e293b; border: 1px solid var(--trait); color: var(--texte); text-decoration: none; }
.ligne-parlement.actuel { border-color: var(--accent); }
.ligne-parlement .drapeau { width: 36px; height: 24px; object-fit: contain; border-radius: 3px; flex: none;
  }
#titre-accueil .drapeau { width: 42px; height: 28px; object-fit: contain; border-radius: 4px; margin-right: 12px;
  vertical-align: -2px; }
.ligne-parlement .nom { display: flex; flex-direction: column; font-weight: 700; }
.ligne-parlement small { font-weight: 400; color: var(--texte-2); font-size: 13px; }
.lien-mentions { display: block; color: var(--texte-2); font-size: 13px; margin: 14px 0 4px; }
.lien-don { display: inline-block; color: var(--texte-2); font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--trait); border-radius: 99px; padding: 8px 14px; margin: 6px 0; }
.encart { background: var(--carte); border-radius: 12px; padding: 8px 12px 12px; margin-bottom: 10px; text-align: left; }
.encart-mention { display: block; color: var(--texte-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.encart-lien { display: flex; gap: 10px; align-items: center; color: var(--texte); text-decoration: none; font-size: 14px; }
.encart-lien img { max-width: 96px; max-height: 64px; border-radius: 8px; }

/* profil local */
.etiquette-champ { display: block; margin-top: 18px; color: var(--texte-2); font-size: 14px; }
.petit-titre { font-size: 15px; margin: 20px 0 8px; color: var(--accent); }
.lien-bouton { text-decoration: none; display: flex; align-items: center; justify-content: center; }
.fichier { display: flex; align-items: center; justify-content: center; text-align: center; }
.fichier input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.historique { list-style: none; padding: 0; margin: 0; }
.historique li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; background: var(--carte); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; font-size: 14px; }
.h-date { color: var(--texte-2); min-width: 92px; }
.h-groupe { font-weight: 700; border-left: 4px solid var(--trait); padding-left: 6px; }
.h-sens { color: var(--texte-2); font-size: 13px; width: 100%; }
.axe { margin-top: 30px; }
.axe-vous span { top: -26px; }
.compte-ligne { background: var(--carte); border-radius: 14px; padding: 4px 14px 10px; border: 1px solid var(--trait); }
.case { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; font-size: 14px; color: var(--accent); }
.case input { width: 22px; height: 22px; flex: 0 0 22px; margin: 0; accent-color: var(--pour); }
.alerte { color: #fcd34d; }
#q-onglets { margin: 4px 0 12px; }
.texte-integral { max-height: 60vh; overflow-y: auto; background: var(--fond); border: 1px solid var(--trait); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; line-height: 1.5; -webkit-overflow-scrolling: touch; }
.texte-integral p { margin: 0 0 8px; }
.texte-integral h4 { font-size: 14.5px; margin: 14px 0 6px; color: var(--texte); }

/* monde */
.carte-monde { background: #0b1222; border: 1px solid var(--trait); border-radius: 14px; padding: 6px; margin: 12px 0 8px; }
.svg-monde { display: block; width: 100%; height: auto; }
.svg-monde .forme { stroke: #0f172a; stroke-width: .6px; vector-effect: non-scaling-stroke; }
.svg-monde .cliquable { cursor: pointer; }
.svg-monde .choisie { stroke: #fff; stroke-width: 1.6px; }
#m-carte { position: relative; overflow: hidden; }
#m-carte svg { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
#m-carte.zoomee svg { cursor: grab; }
.zoom-carte { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
[dir="rtl"] .zoom-carte { right: auto; left: 8px; }
.zoom-carte button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--trait);
  background: rgba(15, 23, 42, .85); color: var(--texte); font-size: 20px; line-height: 1; cursor: pointer; }
.legende-monde { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--texte-2); }
.legende-monde .leg { display: inline-flex; align-items: center; gap: 5px; }
.legende-monde .pastille, .ligne-pays .pastille { margin: 0; }
.fiche-pays { background: var(--carte); border-radius: 14px; padding: 12px 14px; margin: 14px 0; border-left: 8px solid var(--trait); }
.fiche-pays h2 { margin: 0 0 4px; }
.tendance-pays { font-weight: 700; margin: 0 0 4px; }
.partis-pays { margin: 4px 0; padding-left: 18px; font-size: 14.5px; }
.partis-pays a { color: var(--texte); }
.liste-pays { list-style: none; padding: 0; margin: 0; }
.ligne-pays { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--carte); border: 0; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; color: var(--texte); font-family: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.ligne-pays .nom { flex: 1; font-weight: 600; }

/* installation de l'app */
.installer { display: none; }
.installer.visible { display: block; }
.aide-ios { font-size: 14px; color: var(--accent); background: var(--carte); border-radius: 12px; padding: 10px 12px; }

/* page d'un pays */
.titre-pays .drapeau { width: 42px; height: 28px; object-fit: contain; border-radius: 4px; margin-inline-end: 12px; vertical-align: -2px; }
.langues-pays { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.puce-langue { color: var(--texte); text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid var(--trait); border-radius: 99px; padding: 8px 14px; }
.puce-langue[aria-current] { background: var(--carte-2); border-color: var(--accent); }
.barre-sieges { display: flex; gap: 2px; height: 26px; border-radius: 8px; overflow: hidden; }
.barre-sieges span { flex: 1 1 0; min-width: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.groupes-pays { list-style: none; padding: 0; margin: 12px 0 8px; }
.groupes-pays li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--trait); }
.groupes-pays .pastille { margin: 0; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.groupes-pays .nom { flex: 1; font-weight: 700; font-size: 15px; }
.groupes-pays .nom small { display: block; font-weight: 400; color: var(--texte-2); font-size: 12.5px; }
.groupes-pays .pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.qui-vote { font-size: 14px; color: var(--accent); }
.qui-vote summary { cursor: pointer; padding: 8px 0; }
.qui-vote .groupes-vote { align-items: center; margin: 4px 0 8px; }
.qui-vote .groupes-vote b { min-width: 84px; font-size: 13px; }
.bas-vote { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 0; }
.bas-vote .btn { width: auto; min-height: 44px; margin: 0; padding: 6px 16px; font-size: 15px; }
.bas-vote > a:last-child { color: var(--texte-2); font-size: 13px; }
.detail .sens { font-size: 14px; color: var(--accent); }
[dir="rtl"] .sens .pastille { margin: 0 0 0 6px; }
