

:root {
  --fond: #0b1220;
  --verre: rgba(13, 20, 36, 0.86);
  --verre-bord: rgba(120, 150, 200, 0.16);
  --encre: #e8edf7;
  --encre-2: #9fadc8;
  --or: #f2a13c;
  --or-fonce: #c77f21;
  --rouge: #e2574c;
  --vert: #58b368;
  --rayon: 14px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --titre: "Space Grotesk", system-ui, sans-serif;
  --texte: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 15px;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

canvas#carte, canvas#vie {
  position: fixed;
  inset: 0;
  display: block;
}
canvas#vie {
  touch-action: none;
  cursor: grab;
  -webkit-user-drag: none;
}
canvas#vie:active { cursor: grabbing; }

h1, h2, h3 { font-family: var(--titre); }
button { font-family: inherit; color: inherit; }

.voile {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 40;
  background: rgba(4, 8, 16, 0.45);
  backdrop-filter: blur(3px);
  overflow-y: auto;
}
.voile[hidden] { display: none; }

.panneau-verre {
  background: var(--verre);
  border: 1px solid var(--verre-bord);
  border-radius: var(--rayon);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

#ecran-charge { background: var(--fond); }
.charge-coeur { text-align: center; color: var(--encre-2); }
.charge-globe {
  display: block;
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(242, 161, 60, 0.25);
  border-top-color: var(--or);
  animation: tourne 1.1s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

#ecran-accueil {
  justify-content: flex-start;
  align-items: stretch;
  background: none;
  backdrop-filter: none;
  pointer-events: none;
}
.carte-accueil {
  pointer-events: auto;
  width: min(400px, 92vw);
  margin: auto 0 auto clamp(8px, 4vw, 48px);
  padding: 26px 26px 20px;
  align-self: center;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}
.surtitre {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--or);
}
.carte-accueil h1 { font-size: 40px; line-height: 1.05; margin: 6px 0 12px; }
.pitch { color: var(--encre-2); font-size: 13.5px; line-height: 1.55; margin-bottom: 18px; }

.champ { display: block; margin-bottom: 14px; }
.champ > span {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-2);
  margin-bottom: 6px;
}
.champ input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--verre-bord);
  background: rgba(8, 13, 24, 0.8);
  color: var(--encre);
  font-size: 15px;
  outline: none;
}
.champ input:focus { border-color: var(--or); }

.choix-pays {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--verre-bord);
  color: var(--encre-2);
  font-size: 13px;
  line-height: 1.45;
}
.choix-pays.choisi { border-style: solid; border-color: var(--or); color: var(--encre); }

.apercu-pays { margin-top: 10px; }
.apercu-nom { font-size: 15px; margin-bottom: 8px; }
.apercu-nom span { color: var(--encre-2); font-size: 12px; }
.apercu-res { display: grid; gap: 5px; }
.barre-ressource {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.barre-ressource .jauge {
  height: 7px;
  border-radius: 4px;
  background: rgba(120, 150, 200, 0.15);
  overflow: hidden;
}
.barre-ressource .jauge i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--or);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--verre-bord);
  background: rgba(30, 42, 66, 0.8);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: rgba(44, 60, 92, 0.9); border-color: rgba(160, 190, 240, 0.3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-or {
  width: 100%;
  background: linear-gradient(180deg, var(--or), var(--or-fonce));
  border-color: rgba(255, 210, 140, 0.5);
  color: #1a1206;
  font-size: 15px;
}
.btn-or:hover:not(:disabled) { background: linear-gradient(180deg, #ffb44f, var(--or-fonce)); }

.btn-mini { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-rouge { background: rgba(140, 45, 40, 0.85); border-color: rgba(230, 120, 110, 0.4); }
.btn-rouge:hover { background: rgba(170, 55, 48, 0.95); }

.lien {
  background: none;
  border: none;
  color: var(--encre-2);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12.5px;
  margin-top: 10px;
}
.lien:hover { color: var(--encre); }

.note { color: var(--encre-2); font-size: 11.5px; line-height: 1.5; margin-top: 12px; }
.etat-net { font-family: var(--mono); font-size: 11px; margin-top: 8px; color: var(--encre-2); }
.etat-net b { color: var(--vert); font-weight: 600; }

#hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  padding: 10px;
  pointer-events: none;
}
#hud[hidden] { display: none; }
.barre {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 12px;
}
.barre-res { display: flex; gap: 12px; flex-wrap: wrap; }
.res {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--mono);
  font-size: 13px;
}
.res i { font-style: normal; font-size: 13px; }
.res b { font-weight: 600; min-width: 4ch; }
.res em { font-style: normal; font-size: 10px; color: var(--vert); }

.barre-centre {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-family: var(--titre);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--or);
}
.barre-droite { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.pastille {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(8, 13, 24, 0.6);
  border: 1px solid var(--verre-bord);
}
.pastille b { font-weight: 600; }
.pastille-net { font-size: 10.5px; color: var(--encre-2); }
.pastille-net.en-ligne { color: var(--vert); border-color: rgba(88, 179, 104, 0.4); }

#notifs {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  width: min(480px, 92vw);
}
.notif {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--verre);
  border: 1px solid var(--verre-bord);
  font-size: 13px;
  animation: apparait 0.2s ease;
  text-align: center;
}
.notif-victoire { border-color: rgba(88, 179, 104, 0.5); }
.notif-alerte { border-color: rgba(226, 87, 76, 0.6); }
.notif-defaite { border-color: rgba(226, 87, 76, 0.35); }
.notif-ere { border-color: rgba(242, 161, 60, 0.5); }
@keyframes apparait { from { opacity: 0; transform: translateY(-6px); } }

#panneau {
  position: fixed;
  right: 10px;
  top: 74px;
  bottom: 10px;
  width: min(330px, calc(100vw - 20px));
  z-index: 30;
  padding: 16px;
  overflow-y: auto;
}
#panneau[hidden] { display: none; }
#panneau h2 { font-size: 19px; margin-bottom: 2px; display: flex; align-items: center; gap: 8px; }
#panneau h2 .drapeau { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
#panneau .sous-titre { color: var(--encre-2); font-size: 12px; margin-bottom: 12px; }
#panneau h3 {
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--encre-2);
  margin: 14px 0 6px;
}
.ferme-panneau {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  color: var(--encre-2);
  font-size: 18px;
  cursor: pointer;
}
.ferme-panneau:hover { color: var(--encre); }

.ligne-garnison {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
}
.ligne-garnison b { font-family: var(--mono); }

.ligne-former {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(120, 150, 200, 0.08);
  font-size: 13px;
}
.ligne-former .infos { line-height: 1.3; }
.ligne-former .infos small { color: var(--encre-2); font-size: 11px; display: block; }
.ligne-former .cout { font-family: var(--mono); font-size: 10.5px; color: var(--encre-2); }

.ligne-bat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(120, 150, 200, 0.08);
  font-size: 13px;
}
.ligne-bat small { color: var(--encre-2); display: block; font-size: 11px; }

.file-info {
  font-size: 12px;
  color: var(--encre-2);
  font-family: var(--mono);
  margin-top: 4px;
}
.file-info .jauge {
  height: 5px;
  margin-top: 3px;
  border-radius: 3px;
  background: rgba(120, 150, 200, 0.15);
  overflow: hidden;
}
.file-info .jauge i { display: block; height: 100%; background: var(--vert); }

.stat-def { font-family: var(--mono); font-size: 13px; }
.grand-btn-attaque { width: 100%; margin-top: 12px; }

#bandeau-cible {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13.5px;
  border-color: rgba(226, 87, 76, 0.5);
}
#bandeau-cible[hidden] { display: none; }

.dialogue {
  width: min(400px, 94vw);
  padding: 20px;
  max-height: 88vh;
  overflow-y: auto;
}
.dialogue h2 { font-size: 18px; margin-bottom: 4px; }
.dialogue .sous-titre { color: var(--encre-2); font-size: 12.5px; margin-bottom: 12px; }
.ligne-envoi {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(120, 150, 200, 0.08);
  font-size: 13.5px;
}
.pas {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
}
.pas button {
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1px solid var(--verre-bord);
  background: rgba(30, 42, 66, 0.8);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.pas button:hover { background: rgba(44, 60, 92, 0.9); }
.pas b { min-width: 3ch; text-align: center; }
.rapide { display: flex; gap: 6px; margin: 10px 0; }
.previsions {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 13px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(8, 13, 24, 0.6);
}
.previsions .contre { color: var(--encre-2); }
.dialogue-boutons { display: flex; gap: 8px; margin-top: 8px; }
.dialogue-boutons .btn { flex: 1; }

.carte-fin {
  width: min(460px, 94vw);
  padding: 26px;
  text-align: center;
  max-height: 92vh;
  overflow-y: auto;
}
.carte-fin h1 { font-size: 30px; margin-bottom: 4px; }
.carte-fin .raison { color: var(--encre-2); margin-bottom: 16px; }
.score-final {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 600;
  color: var(--or);
  margin: 8px 0 2px;
}
.score-detail { font-size: 12.5px; color: var(--encre-2); line-height: 1.7; margin-bottom: 16px; }

.onglets { display: flex; gap: 6px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.onglets .btn-mini[aria-pressed="true"] { background: var(--or); color: #1a1206; border-color: transparent; }
table.scores {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 8px 0 14px;
}
table.scores th {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--encre-2);
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--verre-bord);
}
table.scores td { padding: 5px 6px; border-bottom: 1px solid rgba(120, 150, 200, 0.07); text-align: left; }
table.scores td.num { font-family: var(--mono); text-align: right; }
table.scores tr.moi td { color: var(--or); font-weight: 600; }
.vide-scores { color: var(--encre-2); font-size: 13px; padding: 12px 0; }

.carte-classement, .carte-aide {
  width: min(480px, 94vw);
  padding: 24px;
  max-height: 88vh;
  overflow-y: auto;
}
.carte-classement h2, .carte-aide h2 { margin-bottom: 12px; }
.carte-aide ul { list-style: none; display: grid; gap: 10px; }
.carte-aide li { font-size: 13.5px; line-height: 1.55; color: var(--encre-2); }
.carte-aide li b { color: var(--encre); }
.ferme-overlay { margin-top: 14px; width: 100%; }

@media (max-width: 720px) {
  #ecran-accueil {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }
  .carte-accueil {
    margin: 0;
    width: 100%;
    align-self: flex-end;
    max-height: 52vh;
    border-radius: var(--rayon) var(--rayon) 0 0;
    padding: 18px 18px 14px;
  }
  .carte-accueil h1 { font-size: 26px; margin: 4px 0 8px; }
  .pitch { font-size: 12.5px; line-height: 1.45; margin-bottom: 12px; }
  #panneau {
    top: auto;
    right: 0; left: 0; bottom: 0;
    width: 100%;
    max-height: 46vh;
    border-radius: var(--rayon) var(--rayon) 0 0;
  }
  #notifs { top: 132px; }
  .barre { gap: 6px; padding: 6px 8px; }
  .barre-res { gap: 8px; }
  .res { font-size: 12px; }
  .res em { display: none; }
  .barre-centre { font-size: 12px; flex-basis: 100%; order: 3; margin-left: 0; }
  .barre-droite { margin-left: 0; }
  #btn-ere { font-size: 11px; padding: 4px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .charge-globe { animation-duration: 3s; }
  .notif { animation: none; }
}

.ic {
  display: inline-block;
  vertical-align: -0.16em;
  flex: none;
}

.res { gap: 5px; }
.res-effort { color: var(--or); }
.res-effort em { color: var(--or-fonce); }

.cout, .cout-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.cout { gap: 7px; flex-wrap: wrap; font-family: var(--mono); font-size: 10.5px; opacity: 0.9; }
.cout-item { gap: 2px; }

.pastille { display: inline-flex; align-items: center; gap: 4px; }
.pastille-nb {
  background: var(--or);
  color: #1a1206;
  border-radius: 6px;
  padding: 0 4px;
  font-size: 10px;
}
.btn-carre { padding: 5px 7px; }
.btn-pouvoirs { gap: 5px; }

.boosts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  pointer-events: none;
}
.boost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--or);
  background: rgba(13, 20, 36, 0.9);
  border: 1px solid rgba(242, 161, 60, 0.45);
}

.drapeau.petit {
  width: 9px; height: 9px;
  border-radius: 2px;
  margin-right: 6px;
}
.badge-cap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--or);
  border: 1px solid rgba(242, 161, 60, 0.4);
}
.ligne-garnison.total {
  border-top: 1px solid rgba(120, 150, 200, 0.12);
  margin-top: 4px;
  padding-top: 5px;
  color: var(--or);
}
.ligne-former .infos, .ligne-bat .infos {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 7px;
  align-items: center;
}
.ligne-former .infos .dom, .ligne-bat .infos .dom {
  grid-row: span 2;
  color: var(--encre-2);
}
.ligne-former .infos small, .ligne-bat .infos small { grid-column: 2; }
.ligne-bat .infos .niv {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--or);
  margin-left: 5px;
}
.ligne-former .infos small, .ligne-bat .infos small {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.grand-btn-attaque kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.note-radiation {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #b7d94c;
}
.routes-info .chemin, .route-resume .chemin {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--encre-2);
  word-break: break-word;
}
.route-resume {
  font-size: 12px;
  color: var(--encre-2);
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(8, 13, 24, 0.55);
}
.pale { color: var(--encre-2); }
.rouge { color: var(--rouge); }

.carte-pouvoirs {
  width: min(520px, 94vw);
  padding: 24px;
  max-height: 88vh;
  overflow-y: auto;
}
.carte-pouvoirs .sous-titre {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--encre-2);
  margin-bottom: 6px;
}
.carte-pouvoirs .sous-titre b { color: var(--or); }
.carte-pouvoirs h3 {
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--or);
  margin: 16px 0 6px;
}
.ligne-pouvoir {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(120, 150, 200, 0.08);
}
.ligne-pouvoir .infos { display: grid; gap: 2px; }
.ligne-pouvoir .infos b { font-size: 14px; }
.ligne-pouvoir .infos small { font-size: 11.5px; line-height: 1.45; color: var(--encre-2); }
.btn-effort {
  gap: 3px;
  font-family: var(--mono);
  color: var(--or);
  border-color: rgba(242, 161, 60, 0.35);
}
.btn-effort:not(:disabled):hover { background: rgba(242, 161, 60, 0.18); }

.bulle {
  position: fixed;
  z-index: 33;
  pointer-events: none;
  display: none;
  white-space: nowrap;
}

#bandeau-cible b { color: var(--or); }

@media (max-width: 720px) {
  .boosts { margin-top: 4px; }
  .boost { font-size: 10px; padding: 2px 7px; }
  .carte-pouvoirs { padding: 18px; }
  .ligne-pouvoir .infos small { font-size: 11px; }
  .grand-btn-attaque kbd { display: none; }
  .btn-pouvoirs { order: -1; }
}

#panneau { top: 104px; }

.barre-centre { font-size: 12.5px; }
#btn-ere { max-width: 340px; }
#btn-ere .cout { gap: 5px; }

.ligne-bat { grid-template-columns: minmax(0, 1fr) auto; }
.ligne-bat .infos { min-width: 0; }
.ligne-bat .btn-mini { max-width: 160px; }
.ligne-bat .cout { justify-content: flex-end; row-gap: 2px; }
.ligne-former .btn-mini { flex: none; }

@media (max-width: 720px) {
  #panneau { top: auto; }
}

.ligne-bat {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}
.ligne-bat .btn-mini { justify-self: end; max-width: none; }

@media (max-width: 720px) {
  .barre { gap: 5px 7px; }
  .barre-droite { gap: 5px; }
  .pastille { font-size: 11px; padding: 2px 6px; }
  .pastille-net { font-size: 0; padding: 2px 5px; }
  .pastille-net::first-letter { font-size: 12px; }
  .btn-mini { padding: 4px 8px; font-size: 11.5px; }
  #bandeau-cible { bottom: 12px; font-size: 12.5px; padding: 9px 12px; }
}

#panneau .onglets, #pouvoirs-corps .onglets { justify-content: flex-start; }

.carte-merveilles {
  width: min(460px, 94vw);
  padding: 22px;
  max-height: 88vh;
  overflow-y: auto;
}
.ligne-merveille {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(120, 150, 200, 0.08);
}
.ligne-merveille .infos { display: grid; gap: 2px; }
.ligne-merveille .infos b { font-size: 14px; }
.ligne-merveille .infos small { font-size: 11.5px; line-height: 1.45; color: var(--encre-2); }
.ligne-merveille .faite { color: var(--vert); font-weight: 600; }

@media (max-width: 720px) {
  .voile.feuille-bas { align-items: flex-end; padding: 0; }
  .voile.feuille-bas .panneau-verre {
    width: 100%;
    max-height: 52vh;
    border-radius: var(--rayon) var(--rayon) 0 0;
    padding: 18px 18px 14px;
  }
}

.res-xp { color: #b7d94c; }

.carte-talents {
  width: min(1060px, 96vw);
  height: min(90vh, 840px);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.talents-tete,
.talents-legende,
.talents-detail,
.carte-talents > .ferme-overlay { flex: none; }
.talents-tete h2 { font-size: 20px; }

.talents-tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.talents-compteurs {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--encre-2);
}
.talents-compteurs span { display: inline-flex; align-items: center; gap: 5px; }
.talents-compteurs b { color: var(--encre); font-size: 13.5px; }

.talents-legende {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--encre-2);
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(8, 13, 24, 0.5);
  border: 1px solid var(--verre-bord);
}
.talents-legende .lg { display: inline-flex; align-items: center; gap: 6px; }
.talents-legende .lg svg { color: #8fa3c8; }
.talents-legende .lg-trait {
  width: 1px;
  align-self: stretch;
  background: var(--verre-bord);
}

.etat-talent {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.etat-talent.verrou { background: rgba(9, 14, 26, 0.92); border: 1.5px solid rgba(143, 163, 200, 0.3); }
.etat-talent.ouvert { background: rgba(15, 23, 40, 0.95); border: 1.5px solid rgba(143, 163, 200, 0.9); }
.etat-talent.payable {
  background: rgba(242, 161, 60, 0.12);
  border: 2px solid var(--or);
  animation: bat-talent 1.8s ease-in-out infinite;
}
.etat-talent.acquis { background: #8fa3c8; border: 1.5px solid #d3dff2; }

@keyframes bat-talent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 161, 60, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(242, 161, 60, 0); }
}

.talents-vue {
  position: relative;
  flex: 1;
  min-height: 300px;
  border-radius: 12px;
  overflow: hidden;
  background: #05080f;
  border: 1px solid var(--verre-bord);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6);
}
#talents-canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  touch-action: none;
  cursor: grab;
}
#talents-canvas:active { cursor: grabbing; }

.talents-recentre {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  background: rgba(13, 20, 36, 0.85);
  backdrop-filter: blur(3px);
}
.talents-mode-emploi {
  position: absolute;
  left: 12px;
  bottom: 9px;
  margin: 0;
  font-size: 11px;
  color: rgba(159, 173, 200, 0.65);
  pointer-events: none;
}

.talents-detail {
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 13, 24, 0.6);
  border: 1px solid var(--verre-bord);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  flex-wrap: wrap;
}
.talents-detail.vide { justify-content: flex-start; }
.talents-detail .pale { font-size: 12.5px; color: var(--encre-2); }

.td-corps { display: flex; align-items: center; gap: 11px; min-width: 0; }
.td-pastille {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--col, var(--encre-2));
  background: rgba(6, 10, 20, 0.8);

  border: 1px solid var(--col, #8fa3c8);
  border-color: color-mix(in srgb, var(--col, #8fa3c8) 45%, transparent);
}
.td-pastille.fait {
  background: color-mix(in srgb, var(--col, #8fa3c8) 22%, rgba(6, 10, 20, 0.8));
  box-shadow: 0 0 14px color-mix(in srgb, var(--col, #8fa3c8) 40%, transparent);
}

.talents-detail .infos { display: grid; gap: 2px; min-width: 0; }
.talents-detail .infos b { font-size: 14px; }
.talents-detail .infos small { font-size: 11.5px; color: var(--encre-2); }
.talents-detail .td-situation {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10.5px !important;
  color: rgba(159, 173, 200, 0.75) !important;
}
.talents-detail .td-route {
  color: var(--or) !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.talents-detail .td-route b { font-size: 11.5px; color: inherit; }
.talents-detail .faite { color: var(--vert); font-weight: 600; white-space: nowrap; }

.td-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.td-actions .btn { white-space: nowrap; }
.btn-route {
  border-color: rgba(242, 161, 60, 0.45);
  background: rgba(242, 161, 60, 0.12);
  color: #f7d9a6;
}
.btn-route:hover:not(:disabled) { background: rgba(242, 161, 60, 0.22); }

@media (max-width: 720px) {
  .carte-talents { padding: 14px; height: 92vh; gap: 8px; }
  .talents-legende {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .talents-legende::-webkit-scrollbar { display: none; }
  .talents-legende .lg { white-space: nowrap; }
  .talents-vue { min-height: 220px; }
  .talents-mode-emploi { display: none; }
  .talents-detail { min-height: 58px; padding: 9px 10px; }
  .td-actions { width: 100%; }
  .td-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .etat-talent.payable { animation: none; }
}
