/* =========================================================================
   LA FRANCE EN AVANT — feuille de style
   Palette officielle La France Insoumise (charte 2027)
   ========================================================================= */
:root {
  --violet:  #7b13d6;
  --rouge:   #f91616;
  --bleu:    #3885f4;
  --rose:    #ed5fb1;
  --jaune:   #f9c900;
  --vert:    #2e9959;

  --grad: linear-gradient(115deg, var(--rouge) 0%, var(--violet) 100%);
  --grad-soft: linear-gradient(115deg, rgba(249,22,22,.18), rgba(123,19,214,.18));

  --bg:      #140e20;
  --bg2:     #0f0a1a;
  --panel:   #1d1530;
  --panel2:  #261b3e;
  --border:  #3a2c58;
  --text:    #f5eefc;
  --muted:   #a99cc4;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Public Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(123,19,214,.25), transparent 60%),
    radial-gradient(1000px 500px at 0% 0%, rgba(249,22,22,.18), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 900; letter-spacing: -.01em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
em.muted { font-style: normal; }

/* --- Topbar ------------------------------------------------------------ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 20px;
  background: linear-gradient(180deg, rgba(38,27,62,.92), rgba(29,21,48,.92));
  border-bottom: 2px solid var(--border);
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  font-size: 2rem; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(249,22,22,.5));
}
.logo-img {
  height: 40px; width: auto; border-radius: 8px; display: block;
  filter: drop-shadow(0 2px 6px rgba(123,19,214,.45));
}
.brand h1 {
  font-size: 1.35rem; font-weight: 900;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.rank {
  display: inline-block; font-size: .8rem; font-weight: 700;
  color: var(--jaune);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.energy { display: flex; align-items: center; gap: 8px; }
.energy-bar { width: 90px; height: 9px; background: #2a2042; border-radius: 6px; overflow: hidden; }
.energy-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--jaune), #ffe169); transition: width .3s; }
.energy-text { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* --- Boutons ----------------------------------------------------------- */
.btn {
  font-family: inherit; font-weight: 800; cursor: pointer;
  border: none; border-radius: 10px; padding: 9px 14px;
  background: var(--grad); color: #fff; font-size: .9rem;
  transition: transform .08s, filter .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(123,19,214,.35);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; filter: grayscale(.4); box-shadow: none; }
.btn.big { padding: 13px 20px; font-size: 1rem; width: 100%; margin-top: 12px; }
.btn.small { padding: 6px 11px; font-size: .8rem; box-shadow: none; }
.btn.ghost { background: transparent; border: 1.5px solid var(--border); color: var(--text); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { border-color: var(--violet); }

/* --- Barre de ressources ---------------------------------------------- */
.resource-bar {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  padding: 12px 16px; background: rgba(15,10,26,.6);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 63px; z-index: 25; backdrop-filter: blur(6px);
}
.res {
  display: flex; align-items: baseline; gap: 6px;
  background: var(--panel); border: 1px solid var(--border);
  padding: 7px 13px; border-radius: 30px; min-width: 120px;
}
.res-icon { font-size: 1.05rem; }
.res-val { font-weight: 900; font-size: 1.02rem; }
.res-rate { font-size: .72rem; color: var(--vert); font-weight: 700; }

.res { cursor: help; }

/* --- Tooltip ----------------------------------------------------------- */
.tooltip {
  display: none; position: fixed; z-index: 80; max-width: 260px;
  background: #0e0a18; border: 1.5px solid var(--violet); border-radius: 10px;
  padding: 10px 12px; box-shadow: var(--shadow); pointer-events: none;
  font-size: .85rem; line-height: 1.4;
}
.tooltip b { font-size: .92rem; }
.tip-howto { color: var(--vert); font-weight: 700; margin-top: 6px; font-size: .8rem; }

/* --- Aperçu de coût (solde avant → après) ----------------------------- */
.cost-preview { background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.cost-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; font-size: .88rem; }
.cost-line + .cost-line { border-top: 1px dashed var(--border); }
.cost-nums { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-nums .pos { color: var(--vert); }
.cost-nums .neg { color: var(--rouge); }
.cost-line.bad { opacity: .9; }
.after-hint { margin-top: 6px; text-align: center; }
.after-hint .neg { color: var(--rouge); font-weight: 800; }
.mini-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 0; }

/* --- Bannière quête ---------------------------------------------------- */
.quest-banner {
  display: none; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 16px; margin: 0; font-size: .9rem; font-weight: 700;
  background: var(--grad-soft); border-bottom: 1px solid var(--border);
}

/* --- Encart objectif (persistant) ------------------------------------- */
.objective-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 16px; cursor: pointer; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(123,19,214,.14), transparent);
  border-bottom: 1px solid var(--border); font-size: .9rem; transition: background .15s;
}
.objective-bar:hover { background: linear-gradient(180deg, rgba(123,19,214,.26), transparent); }
.obj-target b { color: var(--jaune); }
.obj-prog { width: 160px; max-width: 38vw; height: 9px; background: #2a2042; border-radius: 6px; overflow: hidden; }
.obj-fill { display: block; height: 100%; background: var(--grad); transition: width .4s; }
.obj-count { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--muted); }
.obj-go { font-weight: 900; color: var(--violet); }

/* --- Onglets ----------------------------------------------------------- */
.tabs {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  padding: 12px 16px 4px;
}
.tab {
  font-family: inherit; font-weight: 800; font-size: .88rem; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--panel); color: var(--muted);
  padding: 9px 16px; border-radius: 30px; transition: all .15s;
}
.tab:hover { color: var(--text); border-color: var(--violet); }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(249,22,22,.3); }

/* --- Vue / panneaux ---------------------------------------------------- */
.view { max-width: 980px; margin: 0 auto; padding: 18px 16px 60px; }
.panel-head { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.panel-head h2 { font-size: 1.4rem; }
.panel-head p { margin: 4px 0 0; flex-basis: 100%; }

/* --- Carte ------------------------------------------------------------- */
.map-host {
  position: relative;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.france-svg { width: 100%; height: auto; display: block; touch-action: none; cursor: default; }
.france-svg.zoomed { cursor: grab; }
.france-svg.zoomed:active { cursor: grabbing; }
/* Pas de transition pendant le glisser : le déplacement doit être instantané. */
.zoom-layer { will-change: transform; }

.map-hint {
  position: absolute; left: 10px; bottom: 8px; z-index: 5;
  font-size: .72rem; color: var(--muted); pointer-events: none;
  background: rgba(20,14,32,.6); padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(3px);
}

.map-zoom-controls {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  display: flex; flex-direction: column; gap: 6px;
}
.map-zoom-controls button {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  background: rgba(20,14,32,.82); border: 1.5px solid var(--border); color: var(--text);
  font-size: 1.15rem; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); transition: border-color .15s, background .15s;
}
.map-zoom-controls button:hover { border-color: var(--violet); background: rgba(36,27,62,.92); }
.france-circo {
  fill: #2a1f44; stroke: #4a3a6e; stroke-width: .5; stroke-linejoin: round;
  filter: drop-shadow(0 0 22px rgba(123,19,214,.3));
}
.city { cursor: pointer; }
.city:focus { outline: none; }
.city:hover .city-dot, .city:focus .city-dot { filter: brightness(1.35); }
.city:hover .city-label, .city:focus .city-label { opacity: 1; }
.city-dot { fill: #b3a3d6; stroke: #140e20; stroke-width: 1.5; transition: fill .3s, filter .15s; }
.city-dot.rn { fill: var(--bleu); }
.city-dot.droite { fill: #8b9bc0; }
.city-dot.deployed { fill: var(--jaune); }
.city-dot.owned { fill: var(--rouge); }
.city-ring { stroke: var(--rouge); stroke-width: 2.5; transition: stroke-dashoffset .4s; opacity: .95; }
.city-label {
  fill: #efe7fb; font-size: 13px; font-weight: 800; pointer-events: none;
  paint-order: stroke; stroke: #140e20; stroke-width: 3px; stroke-linejoin: round;
  opacity: 0; transition: opacity .15s;
}
.city.major .city-label { opacity: 1; }
.city.readonly { cursor: default; }

/* --- Cartes (bâtiments) ------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .12s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--violet); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-icon { font-size: 2rem; }
.card-count { font-weight: 900; font-size: 1.1rem; color: var(--jaune); }
.card h3 { font-size: 1.05rem; }
.card-prod { font-size: .8rem; color: var(--vert); font-weight: 800; margin: 4px 0 8px; }
.card-prod em { color: var(--muted); font-weight: 600; font-style: normal; }
.card .btn { margin-top: auto; }

/* --- Détail ville (modale) -------------------------------------------- */
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.kv b { font-weight: 800; }
.city-state { margin: 12px 0; padding: 10px; border-radius: 10px; font-weight: 800; text-align: center; }
.city-state.owned { background: rgba(46,153,89,.18); color: #6ee2a0; }
.progress { height: 12px; background: #2a2042; border-radius: 8px; overflow: hidden; margin: 12px 0 6px; }
.progress-fill { height: 100%; background: var(--grad); transition: width .4s; }

/* --- Compétences ------------------------------------------------------- */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.skill-branch { background: var(--panel); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px; }
.skill-branch h3 { font-size: 1.05rem; margin-bottom: 10px; }
.skill-node { background: var(--panel2); border-radius: 10px; padding: 11px; margin-bottom: 10px; border-left: 3px solid var(--border); }
.skill-node.owned { border-left-color: var(--vert); }
.skill-node.locked { opacity: .55; }
.skill-name { font-weight: 800; font-size: .92rem; margin-bottom: 3px; }
.skill-badge { color: var(--vert); font-weight: 800; font-size: .82rem; margin-top: 6px; }
.skill-node .btn { margin-top: 8px; }

/* --- Le vrai programme LFI --------------------------------------------- */
.prog { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.prog-sec {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 4px solid var(--c); border-radius: var(--radius); padding: 16px;
}
.prog-theme { font-size: 1.1rem; color: var(--c); margin-bottom: 12px; }
.prog-point { padding: 9px 0; border-top: 1px dashed var(--border); }
.prog-point:first-of-type { border-top: none; }
.prog-t { font-weight: 800; font-size: .96rem; margin-bottom: 3px; }
.prog-t::before { content: "✓ "; color: var(--c); font-weight: 900; }
.prog-w { font-size: .85rem; line-height: 1.45; }
.prog-cta {
  text-align: center; margin: 24px auto 0; max-width: 620px; padding: 20px;
  background: var(--grad-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.prog-cta .btn { display: inline-block; width: auto; margin: 8px 0; text-decoration: none; }

/* --- Boss -------------------------------------------------------------- */
.boss-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.boss-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--panel); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 16px; position: relative; overflow: hidden;
}
.boss-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, color-mix(in srgb, var(--boss) 22%, transparent), transparent 55%);
  pointer-events: none;
}
.boss-card.final { border-color: var(--bleu); border-width: 2px; }
.boss-card.beaten { opacity: .8; }
.boss-card.locked { opacity: .55; }
.boss-emoji { font-size: 2.6rem; position: relative; }
.boss-photo {
  position: relative; width: 64px; height: 64px; border-radius: 12px;
  object-fit: cover; object-position: top center; border: 2px solid var(--border);
  flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.boss-card.final .boss-photo { border-color: var(--bleu); }
.boss-card.beaten .boss-photo { filter: grayscale(.5); }
.boss-photo.big {
  display: block; width: 130px; height: 130px; margin: 0 auto 14px; border-radius: 16px;
  border-color: var(--violet);
}
.boss-info { position: relative; flex: 1; }
.boss-info h3 { font-size: 1.08rem; }
.boss-badge { font-weight: 800; font-size: .82rem; margin-top: 8px; }
.boss-badge.win { color: var(--vert); }
.boss-badge.lock { color: var(--muted); }
.boss-fight { margin-top: 10px; }

/* --- Boss : intro / résultat ------------------------------------------ */
.boss-intro { text-align: center; padding: 8px 4px; }
.boss-intro.phase .phase-label { font-weight: 900; font-size: 1.15rem; color: var(--jaune); margin-bottom: 14px; }
.boss-result { text-align: center; padding: 10px; }
.boss-result .big-emoji { font-size: 4rem; }
.boss-result.win h2 { color: var(--vert); }
.boss-result.lose h2 { color: var(--rose); }

/* --- Mini-jeu débat ---------------------------------------------------- */
.mg-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 8px; }
.mg-timer { color: var(--jaune); }
.poll-bar { position: relative; height: 22px; background: #2a2042; border-radius: 12px; overflow: hidden; margin-bottom: 4px; }
.poll-fill { height: 100%; width: 38%; background: var(--jaune); transition: width .3s, background .3s; }
.poll-target { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #fff; box-shadow: 0 0 6px #fff; }
.poll-num { text-align: center; font-weight: 800; margin: 6px 0 14px; }
.mg-question { font-size: 1.1rem; font-weight: 800; text-align: center; margin: 12px 0; min-height: 2.4em; }
.mg-answers { display: flex; flex-direction: column; gap: 10px; }
.mg-answer {
  font-family: inherit; text-align: left; cursor: pointer;
  background: var(--panel2); border: 1.5px solid var(--border); color: var(--text);
  padding: 13px 15px; border-radius: 11px; font-size: .95rem; font-weight: 600;
  transition: all .12s;
}
.mg-answer:hover:not(:disabled) { border-color: var(--violet); transform: translateX(3px); }
.mg-answer.good { background: rgba(46,153,89,.3); border-color: var(--vert); }
.mg-answer.bad { background: rgba(249,22,22,.3); border-color: var(--rouge); }
.mg-answer:disabled { cursor: default; }

/* --- Mini-jeu fake news ------------------------------------------------ */
.fk-area {
  position: relative; height: 300px; margin-top: 10px;
  background: var(--bg2); border: 1.5px dashed var(--border); border-radius: 12px; overflow: hidden;
}
.fk-bubble {
  position: absolute; font-family: inherit; cursor: pointer;
  background: var(--bleu); color: #fff; border: none; font-weight: 800;
  padding: 9px 13px; border-radius: 10px; font-size: .82rem; max-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4); transition: transform .15s, opacity .15s;
}
.fk-bubble:hover { transform: scale(1.06); }
.fk-bubble.pop { transform: scale(1.5); opacity: 0; background: var(--vert); }
.fk-bubble.spread { transform: scale(1.8); opacity: 0; background: var(--rouge); }

/* --- Mini-jeu tir à la corde ------------------------------------------ */
.tug-bar { position: relative; height: 30px; background: var(--bleu); border-radius: 14px; overflow: hidden; margin: 6px 0; }
.tug-fill { height: 100%; width: 50%; background: var(--grad); transition: width .12s; }
.tug-mid { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(255,255,255,.7); }

/* --- Succès ------------------------------------------------------------ */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ach {
  display: flex; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 13px;
  opacity: .6;
}
.ach.got { opacity: 1; border-color: var(--jaune); background: linear-gradient(115deg, rgba(249,201,0,.12), var(--panel)); }
.ach-icon { font-size: 1.9rem; }
.ach-body b { font-size: .95rem; }
.ach-rew { color: var(--vert); }

/* --- Social ------------------------------------------------------------ */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.social-col h3 { font-size: 1.05rem; margin-bottom: 12px; }
.row { display: flex; gap: 8px; margin-bottom: 14px; }
.row input, .auth input { flex: 1; }
input {
  font-family: inherit; font-size: .92rem; padding: 10px 12px;
  background: var(--panel2); border: 1.5px solid var(--border); border-radius: 10px; color: var(--text);
  width: 100%;
}
input:focus { outline: none; border-color: var(--violet); }
.friends-list, .leaderboard { display: flex; flex-direction: column; gap: 8px; }
.friend-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px;
  transition: border-color .15s;
}
.friend-row:hover { border-color: var(--violet); }
.friend-meta { display: flex; flex-direction: column; }
.friend-meta span { font-size: .76rem; }
.friend-stat { font-weight: 800; font-size: .82rem; color: var(--jaune); white-space: nowrap; }
.lb-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.lb-row.me { border-color: var(--rouge); background: linear-gradient(115deg, rgba(249,22,22,.12), var(--panel2)); }
.lb-rank { font-weight: 900; text-align: center; }
.lb-name { display: flex; flex-direction: column; line-height: 1.2; }
.lb-name em { font-size: .72rem; }
.lb-voix { font-weight: 800; color: var(--rouge); white-space: nowrap; }
.friend-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.fs { background: var(--panel2); border: 1px solid var(--border); border-radius: 9px; padding: 7px 11px; font-weight: 700; font-size: .85rem; }
.empty { text-align: center; padding: 30px 10px; }
.empty .btn { width: auto; display: inline-block; margin-top: 14px; }

/* --- Auth -------------------------------------------------------------- */
.auth { display: flex; flex-direction: column; gap: 6px; }
.auth label { font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: 8px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.auth-tab { flex: 1; font-family: inherit; font-weight: 800; cursor: pointer; padding: 9px; border-radius: 9px;
  background: var(--panel2); border: 1.5px solid var(--border); color: var(--muted); }
.auth-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.auth-err { color: var(--rose); font-size: .82rem; font-weight: 700; min-height: 1.1em; margin-top: 6px; }
.auth-warning {
  margin-top: 12px; padding: 11px 13px; font-size: .82rem; line-height: 1.5;
  background: rgba(249,201,0,.1); border: 1.5px solid var(--jaune); border-radius: 10px;
}
.auth-warning b { color: var(--jaune); }

/* --- Événements -------------------------------------------------------- */
.event-text { font-size: 1.05rem; font-weight: 700; text-align: center; margin: 4px 0 16px; }
.event-choices { display: flex; flex-direction: column; gap: 10px; }
.event-choice { text-align: left; }

/* --- Hors-ligne -------------------------------------------------------- */
.off-gains { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 16px 0; }
.off-gain { background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; font-size: 1.05rem; }
.howto { padding-left: 20px; line-height: 1.7; }
.howto li { margin-bottom: 4px; }

/* --- Toasts ------------------------------------------------------------ */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: 92%; max-width: 460px; }
.toast {
  background: var(--panel); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 11px 16px; font-weight: 700; font-size: .9rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(16px); transition: all .35s; width: 100%; text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.good { border-color: var(--vert); }
.toast.bad { border-color: var(--rouge); }
.toast.ach { border-color: var(--jaune); background: linear-gradient(115deg, rgba(249,201,0,.18), var(--panel)); }

/* --- Feuille de route -------------------------------------------------- */
.roadmap { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.rm-item {
  display: flex; align-items: center; gap: 12px; position: relative;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 11px; padding: 10px 13px;
}
.rm-item.done { opacity: .72; }
.rm-item.current { border-color: var(--jaune); background: linear-gradient(115deg, rgba(249,201,0,.12), var(--panel2)); }
.rm-item.future { opacity: .62; }
.rm-ic { font-size: 1.3rem; width: 34px; text-align: center; flex-shrink: 0; }
.rm-photo { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; object-position: top center; border: 1.5px solid var(--border); flex-shrink: 0; }
.rm-body { flex: 1; }
.rm-body b { font-size: .95rem; }
.rm-prog { height: 7px; background: #2a2042; border-radius: 5px; overflow: hidden; margin: 5px 0 2px; }
.rm-prog span { display: block; height: 100%; background: var(--grad); }
.rm-tag { font-size: .72rem; font-weight: 800; color: var(--jaune); white-space: nowrap; }
.rm-tag.done { color: var(--vert); }

/* --- Modales ----------------------------------------------------------- */
.modal-root { display: none; position: fixed; inset: 0; z-index: 50; }
.modal-overlay { position: absolute; inset: 0; background: rgba(8,5,15,.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal {
  background: var(--panel); border: 1.5px solid var(--border); border-radius: 18px;
  width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow);
  animation: pop .22s ease;
}
.modal.wide { max-width: 620px; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
.modal-head h2 { font-size: 1.2rem; }
.modal-close { background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 1rem; }
.modal-close:hover { border-color: var(--rouge); }
.modal-body { padding: 18px; }

/* --- Footer ------------------------------------------------------------ */
.foot { text-align: center; padding: 16px; border-top: 1px solid var(--border); margin-top: 20px; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 680px) {
  .social-grid { grid-template-columns: 1fr; }
  .brand h1 { font-size: 1.1rem; }
  .energy-bar { width: 60px; }
  .resource-bar { top: 60px; }
  .res { min-width: 0; flex: 1 1 44%; }
}
