:root {
  --bg: #0a0f1c;
  --bg2: #0d1424;
  --panel: #111a2c;
  --panel2: #16213a;
  --panel3: #1c2944;
  --line: rgba(148, 163, 184, .14);
  --line2: rgba(148, 163, 184, .24);
  --text: #e8ecf4;
  --muted: #8d98ad;
  --dim: #5f6b82;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --accent-bg: rgba(59, 130, 246, .14);
  --good: #22c55e;
  --good-bg: rgba(34, 197, 94, .13);
  --bad: #f05252;
  --bad-bg: rgba(240, 82, 82, .13);
  --warn: #f5a524;
  --warn-bg: rgba(245, 165, 36, .14);
  --gold: #e8b84a;
  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.ico.sm { width: 15px; height: 15px; }
.ico.lg { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2);
  padding: 9px 14px; border-radius: var(--r-sm); font-weight: 600; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--panel3); border-color: rgba(148, 163, 184, .35); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #2f74e6; }
.btn.danger { border-color: rgba(240, 82, 82, .5); color: #ffb4b4; background: var(--bad-bg); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel2); }
.btn.big { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.icon-btn:hover { background: var(--panel2); }
.q { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line2); background: none;
  font-size: 11px; font-weight: 700; color: var(--muted); padding: 0; flex: none; }
.q:hover { color: var(--text); border-color: var(--accent2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.accent { background: var(--accent-bg); border-color: rgba(59, 130, 246, .35); color: #bcd6ff; }
.chip.gold { background: rgba(232, 184, 74, .12); border-color: rgba(232, 184, 74, .35); color: #f4d48b; }
.chip.bad { background: var(--bad-bg); border-color: rgba(240, 82, 82, .35); color: #ffb4b4; }
.chip.good { background: var(--good-bg); border-color: rgba(34, 197, 94, .35); color: #a7f3c0; }

/* ---------- Écran d'accueil ---------- */
#start { min-height: 100vh; background:
  radial-gradient(900px 500px at 15% -10%, rgba(59, 130, 246, .18), transparent 60%),
  radial-gradient(700px 400px at 100% 0%, rgba(232, 184, 74, .08), transparent 60%), var(--bg); }
.start-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }
.start-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 44px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .22em; font-size: 15px; }
.brand img { width: 28px; height: 28px; }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; margin-bottom: 40px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; margin: 0 0 16px; letter-spacing: -.03em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent2); }
.hero p.lead { font-size: 17px; color: #b9c2d3; margin: 0 0 22px; max-width: 560px; }
.hero-points { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-point { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(17, 26, 44, .6); }
.hero-point .ico { color: var(--accent2); margin-top: 1px; }
.hero-point b { display: block; font-size: 13.5px; }
.hero-point span { font-size: 12.5px; color: var(--muted); }
.continue-card { border: 1px solid rgba(59, 130, 246, .35); background: linear-gradient(180deg, rgba(59, 130, 246, .12), rgba(17, 26, 44, .7)); border-radius: var(--r); padding: 18px; display: flex; gap: 14px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.continue-card img { width: 54px; height: 36px; border-radius: 4px; object-fit: cover; }
.continue-card .grow { flex: 1; min-width: 180px; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.section-title h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.section-title .step { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; align-self: center; }
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 30px; }
.ccard { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .15s, background .15s; }
.ccard:hover { border-color: rgba(96, 165, 250, .45); transform: translateY(-2px); }
.ccard.sel { border-color: var(--accent); background: linear-gradient(180deg, rgba(59, 130, 246, .14), var(--panel)); box-shadow: 0 0 0 1px var(--accent) inset; }
.ccard-head { display: flex; gap: 12px; align-items: center; }
.ccard-head img { width: 48px; height: 32px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.ccard-head b { font-size: 16px; display: block; }
.ccard-head small { color: var(--muted); font-size: 12px; }
.ccard p { margin: 0; color: #b6bfd0; font-size: 13px; min-height: 38px; }
.ccard-stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.ccard-stats b { color: var(--text); font-weight: 600; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--panel3); }
.dots i.on { background: var(--warn); }
.setup { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 16px; align-items: end; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input { width: 100%; padding: 11px 12px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--bg2); outline: none; }
.input:focus { border-color: var(--accent); }
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 7px; font-weight: 600; color: var(--muted); font-size: 13px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel3); color: var(--text); box-shadow: 0 0 0 1px var(--line2) inset; }
.seg button.cur { color: #bcd6ff; }
.seg button.cur.on { background: var(--accent-bg); box-shadow: 0 0 0 1px rgba(59, 130, 246, .5) inset; }
.foot { margin-top: 40px; color: var(--dim); font-size: 12px; text-align: center; }

/* ---------- Jeu ---------- */
#game { min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: rgba(10, 15, 28, .92);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.top .brand { font-size: 13px; }
.top .country { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); min-width: 0; }
.top .country img { width: 36px; height: 24px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.top .country b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .country small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.top .spacer { flex: 1; }
.top .chips { display: flex; gap: 8px; align-items: center; }
.layout { flex: 1; display: grid; grid-template-columns: 340px 1fr; gap: 16px; padding: 16px 18px 100px; max-width: 1500px; width: 100%; margin: 0 auto; }
.dash { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.dash-sec { padding: 12px; }
.dash-sec h3 { margin: 2px 4px 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { text-align: left; border: 1px solid var(--line); background: var(--bg2); border-radius: 10px; padding: 9px 10px; transition: border-color .15s; }
.kpi:hover { border-color: var(--line2); }
.kpi .l { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 4px; }
.kpi .v { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-top: 1px; }
.kpi .d { font-size: 11.5px; font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 2px; }
.bar-row { display: grid; grid-template-columns: 112px 1fr 40px; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 8px; border: 0; background: none; text-align: left; }
.bar-row:hover { background: var(--bg2); }
.bar-row .l { font-size: 12.5px; color: #c3cad8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .v { font-size: 12.5px; font-weight: 700; text-align: right; }
.meter { height: 7px; background: var(--panel3); border-radius: 99px; overflow: hidden; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.meter i.good { background: var(--good); } .meter i.bad { background: var(--bad); } .meter i.warn { background: var(--warn); }
.meter b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: rgba(255, 255, 255, .55); border-radius: 2px; }

.panel { display: flex; flex-direction: column; min-width: 0; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--panel3); color: var(--text); }
.tabs .badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; }
.tab-body { display: flex; flex-direction: column; gap: 14px; }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; background: var(--accent-bg); border: 1px solid rgba(59, 130, 246, .25); color: #c7dcff; font-size: 13px; }
.hint .ico { color: var(--accent2); margin-top: 1px; }

/* Budget */
.budget-sum { padding: 16px; display: grid; grid-template-columns: repeat(4, 1fr) 1.4fr; gap: 14px; align-items: center; }
.sum-item .l { font-size: 12px; color: var(--muted); }
.sum-item .v { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.sum-item .s { font-size: 12px; color: var(--muted); }
.balance { display: flex; flex-direction: column; gap: 6px; }
.balance .row { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.balance .track { height: 12px; background: var(--panel3); border-radius: 99px; position: relative; overflow: hidden; }
.balance .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.budget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.bcol { padding: 14px 14px 8px; }
.bcol h3 { margin: 0 0 4px; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.bcol h3 small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.bcol > p { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; }
.slider { padding: 10px 0; border-top: 1px solid var(--line); }
.slider:first-of-type { border-top: 0; }
.slider-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.slider-top .ico { color: var(--muted); }
.slider-top .n { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; }
.slider-top .val { font-weight: 750; font-size: 15px; min-width: 64px; text-align: right; }
.slider-sub { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; gap: 8px; }
.slider-sub .chg { font-weight: 700; }
.slider-sub .undo { border: 0; background: none; color: var(--accent2); padding: 0; font-size: 11.5px; font-weight: 600; }
.range { position: relative; height: 22px; }
.range input { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; position: relative; z-index: 2; }
.range .rail { position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 99px; background: var(--panel3); }
.range .fill { position: absolute; left: 0; top: 8px; height: 6px; border-radius: 99px; background: var(--accent); }
.range .mark { position: absolute; top: 4px; width: 2px; height: 14px; background: rgba(255, 255, 255, .45); border-radius: 2px; z-index: 1; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.range input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.range input::-moz-range-track { background: transparent; }
.static-line { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: #c3cad8; gap: 8px; }
.static-line b { font-weight: 700; }

/* Lois */
.laws { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.law { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.law-head { display: flex; gap: 10px; align-items: center; }
.law-head .ico { color: var(--accent2); }
.law-head b { flex: 1; font-size: 14.5px; }
.law p { margin: 0; color: var(--muted); font-size: 12.5px; }
.fx { display: flex; flex-wrap: wrap; gap: 6px; }
.fx span { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); }
.fx span.p { color: #a7f3c0; background: var(--good-bg); border-color: rgba(34, 197, 94, .25); }
.fx span.m { color: #ffb4b4; background: var(--bad-bg); border-color: rgba(240, 82, 82, .25); }
.law-act { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.law-act small { color: var(--warn); font-size: 12px; }

/* Population */
.gauge-card { padding: 18px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; align-items: center; }
.gauge-big { font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.gauge-track { height: 14px; border-radius: 99px; background: var(--panel3); position: relative; overflow: visible; margin: 10px 0 6px; }
.gauge-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.gauge-track .half { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 2px; background: #fff; opacity: .7; }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.group { padding: 14px; }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.group-head .gi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); color: var(--accent2); flex: none; }
.group-head b { display: block; font-size: 14px; }
.group-head small { color: var(--muted); font-size: 12px; }
.group-head .score { margin-left: auto; text-align: right; }
.group-head .score b { font-size: 22px; }
.issues { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.issues span { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); display: inline-flex; gap: 5px; align-items: center; }
.issues span i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* Régime */
.regime-card { padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 16px; }
.regime-card .big-ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent2); }
.regime-card .big-ico .ico { width: 28px; height: 28px; }
.regime-card h2 { margin: 0 0 6px; font-size: 22px; }
.regime-card p { margin: 0; color: #b9c2d3; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.action.danger { border-color: rgba(240, 82, 82, .3); }
.action-head { display: flex; gap: 10px; align-items: center; }
.action-head b { flex: 1; }
.action p { margin: 0; color: var(--muted); font-size: 12.5px; flex: 1; }
.regime-map { padding: 14px; }
.regime-map h3 { margin: 0 0 10px; font-size: 15px; }
.rmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rnode { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); font-size: 12.5px; }
.rnode b { display: flex; gap: 6px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.rnode.cur { border-color: var(--accent); background: var(--accent-bg); }
.rnode span { color: var(--muted); }

/* Journal */
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chart-card { padding: 12px 12px 8px; }
.chart-card .h { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.chart-card .h b { color: var(--text); font-size: 15px; }
.chart svg { display: block; width: 100%; height: auto; }
.log { padding: 6px 14px; max-height: 420px; overflow: auto; }
.log-row { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.log-row:first-child { border-top: 0; }
.log-row span { color: var(--muted); font-size: 12px; }

/* Barre de fin de tour */
.endbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 14px; align-items: center; justify-content: flex-end; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 15, 28, .94); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
.endbar .preview { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-right: auto; flex-wrap: wrap; }
.endbar .preview b { color: var(--text); }

/* Modales */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(4, 7, 14, .72); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(4px); overflow-y: auto; }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s ease-out; }
.modal-card.wide { width: min(940px, 100%); }
.modal-card.narrow { width: min(520px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.m-head { padding: 20px 22px 12px; display: flex; gap: 14px; align-items: flex-start; }
.m-head .m-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent2); flex: none; }
.m-head .m-ico.bad { background: var(--bad-bg); color: var(--bad); }
.m-head .m-ico.good { background: var(--good-bg); color: var(--good); }
.m-head .m-ico.gold { background: rgba(232, 184, 74, .14); color: var(--gold); }
.m-head h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.m-head p { margin: 4px 0 0; color: var(--muted); }
.m-head .x { margin-left: auto; }
.m-body { padding: 4px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.m-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.m-body h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ev-text { font-size: 15.5px; color: #d6dcea; margin: 0; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); transition: border-color .15s, background .15s; }
.choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-bg); }
.choice b { display: block; font-size: 15px; margin-bottom: 3px; }
.choice span { font-size: 13px; color: var(--muted); }
.choice:disabled { opacity: .4; cursor: not-allowed; }
.rep-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.rep-kpi { padding: 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.rep-kpi .l { font-size: 11.5px; color: var(--muted); }
.rep-kpi .v { font-size: 18px; font-weight: 750; }
.rep-kpi .d { font-size: 11.5px; font-weight: 700; }
.parts { display: flex; flex-direction: column; gap: 5px; }
.part { display: grid; grid-template-columns: 1fr 160px 56px; gap: 10px; align-items: center; font-size: 13px; }
.part .pb { height: 9px; position: relative; background: var(--panel2); border-radius: 99px; }
.part .pb::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line2); }
.part .pb i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.part .pv { text-align: right; font-weight: 700; }
.part.total { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; font-weight: 700; }
.news { display: flex; flex-direction: column; gap: 8px; }
.news div { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; border: 1px solid var(--line); background: var(--bg2); }
.news .g { border-color: rgba(34, 197, 94, .3); background: var(--good-bg); }
.news .b { border-color: rgba(240, 82, 82, .3); background: var(--bad-bg); }
.tips { display: flex; flex-direction: column; gap: 8px; }
.tip { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent-bg); border: 1px solid rgba(59, 130, 246, .25); }
.tip .ico { color: var(--accent2); margin-top: 2px; }
.tip p { margin: 0; font-size: 13.5px; color: #d3e2ff; }
.tip button { border: 0; background: none; color: var(--accent2); padding: 0; font-weight: 700; font-size: 12.5px; margin-top: 4px; }
.gchg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.gchg > div { padding: 10px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-size: 12.5px; }
.gchg b { display: block; font-size: 13px; }
.gchg .dv { font-size: 17px; font-weight: 750; }
.notion-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.notion-chips button { border: 1px solid rgba(232, 184, 74, .35); background: rgba(232, 184, 74, .1); color: #f4d48b; border-radius: 99px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; }
.elec-big { text-align: center; padding: 8px 0 4px; }
.elec-big .pct { font-size: 56px; font-weight: 800; letter-spacing: -.03em; }
.etable { width: 100%; border-collapse: collapse; font-size: 13px; }
.etable th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.etable td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.etable td.r, .etable th.r { text-align: right; }
.score-ring { display: flex; gap: 20px; align-items: center; }
.grade { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-size: 44px; font-weight: 800; border: 4px solid var(--accent); flex: none; }
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gl { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); }
.gl b { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.gl p { margin: 0; font-size: 13px; color: #b9c2d3; }
.gl.locked { opacity: .45; }
.gl.locked p { filter: blur(3px); user-select: none; }
.tuto-steps { display: flex; flex-direction: column; gap: 10px; }
.tuto-step { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.tuto-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.tuto-step p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* Popover & toast */
.pop { position: fixed; z-index: 80; max-width: 320px; padding: 12px 14px; border-radius: 12px; background: #1d2a46; border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 13px; color: #dbe3f3; }
.pop b { display: block; margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); z-index: 90; padding: 11px 16px; border-radius: 12px; background: #1d2a46; border: 1px solid var(--line2); box-shadow: var(--shadow); font-weight: 600; max-width: calc(100% - 32px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .dash { display: grid; grid-template-columns: 1fr 1fr; }
  .dash > :first-child { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .budget-sum { grid-template-columns: repeat(2, 1fr); }
  .balance { grid-column: 1 / -1; }
  .charts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-points { grid-template-columns: 1fr; }
  .setup { grid-template-columns: 1fr; }
  .top { padding: 8px 12px; gap: 10px; }
  .top .brand span { display: none; }
  .top .country { padding-left: 10px; }
  .top .chips .chip.hide-m { display: none; }
  .layout { padding: 12px 12px 120px; gap: 12px; }
  .dash { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .budget-grid, .laws, .groups, .actions, .glossary { grid-template-columns: 1fr; }
  .budget-sum { padding: 12px; gap: 10px; }
  .sum-item .v { font-size: 18px; }
  .gauge-card { grid-template-columns: 1fr; }
  .rmap { grid-template-columns: 1fr 1fr; }
  .charts { grid-template-columns: 1fr; }
  .rep-kpis { grid-template-columns: repeat(3, 1fr); }
  .gchg { grid-template-columns: 1fr; }
  .part { grid-template-columns: 1fr 90px 48px; font-size: 12.5px; }
  .endbar { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .endbar .preview { gap: 10px; font-size: 12px; }
  .endbar .btn { padding: 11px 14px; }
  .modal { padding: 10px; place-items: end center; }
  .modal-card { max-height: calc(100vh - 20px); border-radius: 16px; }
  .m-head, .m-body, .m-foot { padding-left: 16px; padding-right: 16px; }
  .regime-card { grid-template-columns: 1fr; }
}
@media (max-width: 760px){.hide-s{display:none}}

details.dash-sec > summary { list-style: none; cursor: pointer; }
details.dash-sec > summary::-webkit-details-marker { display: none; }
details.dash-sec > summary h3 .ico { display: none; transition: transform .15s; }
@media (max-width: 760px) {
  .top .brand, .top .spacer { display: none; }
  .top .country { border-left: 0; padding-left: 0; flex: 1; }
  .top .country small { display: block; overflow: hidden; text-overflow: ellipsis; }
  .top .chips { gap: 6px; }
  .top .chip { padding: 4px 8px; }
  .hide-m { display: none !important; }
  details.dash-sec > summary h3 { margin-bottom: 2px; }
  details.dash-sec > summary h3 .ico { display: inline-block; }
  details.dash-sec[open] > summary h3 .ico { transform: rotate(180deg); }
  details.dash-sec[open] > summary h3 { margin-bottom: 10px; }
}
