/* ============================================================================
   WAR THUNDER · TANK GUIDE — styles composants
   Basé sur le design system "TierForge" (WarThunder.design/colors_and_type.css
   = source unique des tokens). Ce fichier porte/adapte les composants du
   kit (nav, hero, statband, cartes véhicule "recon", jauges, footer) et
   ajoute ce qui est propre au guide (atouts/faiblesses, sections de rang,
   vue Avions). Images : CDN encyclopédie War Thunder.
   ========================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--fg-2);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--fg-inverse); }
img { display: block; }

.container { max-width: var(--container-max); margin: 0 auto; padding-inline: var(--container-px); }

/* ---- Scroll reveal (signature Apple du kit) ------------------------------ */
.reveal { opacity: 0; transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
/* will-change UNIQUEMENT tant que l'élément n'est pas révélé : la couche GPU
   est libérée dès que `.is-in` est posé -> plus de centaines de couches
   compositées permanentes qui saturent la mémoire graphique et font ramer. */
.reveal:not(.is-in) { will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; will-change: auto; }
.reveal[style*="--i"] { transition-delay: calc(var(--i, 0) * 55ms); }
@media (prefers-reduced-motion: reduce){ .reveal{opacity:1;transform:none;transition:none;} }

/* ============================ NAV ========================================= */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  /* Fond opaque plutôt que backdrop-filter : un blur sur une barre sticky est
     recalculé à CHAQUE frame de scroll (très cher sur GPU intégré). Le fond
     quasi-opaque donne le même rendu sur surface sombre, sans ce coût. */
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 22px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo svg { width: 30px; height: 30px; display: block; }
/* Logo « ciel et sol » (logo.svg, vectoriel : net à toutes les tailles) */
.nav-mark { width: 38px; height: 38px; object-fit: contain; display: block; flex: none; }
.footer-brand .nav-mark { width: 46px; height: 46px; }
.nav-logo .wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 19px;
  letter-spacing: .12em; color: var(--fg-1);
}
.nav-logo .tag {
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  color: var(--fg-3); letter-spacing: .18em; border: 1px solid var(--border-default);
  padding: 2px 5px; border-radius: var(--radius-xs); text-transform: uppercase;
}
.nav-spacer { flex: 1; }

/* ---- Recherche cross-nation ---- */
.nav-search { position: relative; flex: 1; max-width: 380px; margin-left: auto; display: flex; align-items: center; }
.nav-search .ns-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--fg-4); pointer-events: none; }
#search-input {
  width: 100%; height: 38px; padding: 0 14px 0 36px;
  background: var(--bg-inset); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); color: var(--fg-1); font-size: 14px;
  font-family: inherit; outline: none;
  transition: border-color var(--dur-fast) var(--ease-snap), box-shadow var(--dur-fast) var(--ease-snap);
}
#search-input::placeholder { color: var(--fg-4); }
#search-input:focus { border-color: var(--border-accent); box-shadow: var(--glow-accent-sm, 0 0 0 3px var(--accent-ghost)); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--bg-raised); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-md, 0 16px 40px rgba(0,0,0,.5)); max-height: 60vh; overflow-y: auto;
}
.sr-feats { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 10px; border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 1; background: var(--bg-raised); }
.sr-count, .sr-empty { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; color: var(--fg-3);
  padding: 7px 12px; border-bottom: 1px solid var(--border-subtle); }
.sr-empty { border-bottom: none; padding: 12px; }
.sr-item { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--border-subtle); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover, .sr-item.active { background: var(--accent-ghost); }
.sr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px;
  text-align: left; padding: 8px 4px 8px 12px; background: none; border: none; cursor: pointer; }
.sr-thumb { width: 42px; height: 28px; flex-shrink: 0; display: grid; place-items: center; }
.sr-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.sr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-acts { display: flex; gap: 6px; padding-right: 10px; flex-shrink: 0; }
.sr-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--fg-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); }
/* boutons recherche révélés au survol de la ligne (souris) ; actif = visible ; tactile = toujours visibles */
@media (hover: hover) {
  .sr-acts .ca-btn { opacity: 0; transition: opacity var(--dur-fast) var(--ease-snap); }
  .sr-item:hover .sr-acts .ca-btn, .sr-item.active .sr-acts .ca-btn, .sr-item:focus-within .sr-acts .ca-btn { opacity: 1; }
  .sr-acts .ca-btn.on { opacity: 1; }
}

/* ============================ HERO ======================================== */
.hero { position: relative; padding: 84px 0 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--grad-glow); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: var(--dot-grid);
  background-size: var(--dot-grid-size); opacity: .6; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg,#000,transparent 82%); mask-image: linear-gradient(180deg,#000,transparent 82%); }
.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; text-align: center; }
.eyebrow { font-family: var(--font-mono); font-size: var(--fs-mono-sm); font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; }
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display-xl);
  line-height: var(--lh-display); letter-spacing: var(--tracking-display); margin: 16px 0 0; }
.hero h1 .grad { background: var(--grad-hero); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero h1 .amber { color: var(--accent); }
.hero-sub { font-size: var(--fs-body-lg); line-height: var(--lh-relaxed); color: var(--fg-2);
  margin: 22px auto 0; max-width: 580px; }

/* ---- Stat band ---- */
.statband { border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.statband-inner { display: grid; grid-template-columns: repeat(4,1fr); }
.statcell { padding: 24px 22px; border-left: 1px solid var(--border-subtle); }
.statcell:first-child { border-left: none; }
.statcell .v { font-family: var(--font-mono); font-weight: 600; font-size: 28px; color: var(--fg-1);
  letter-spacing: -.01em; font-feature-settings:"tnum" 1; }
.statcell .k { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }

/* ============================ SUBNAV (Chars / Avions) ===================== */
.subnav {
  position: sticky; top: var(--header-h); z-index: 40;
  padding: 14px 0; margin-bottom: 8px;
  background: var(--bg-header); /* opaque, pas de blur par-frame (cf. .nav) */
  border-bottom: 1px solid var(--border-subtle);
}
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-2); background: var(--bg-overlay);
  border: 1px solid var(--border-default); padding: 9px 16px; border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
  transition: all var(--dur-fast) var(--ease-snap); }
.chip:hover { border-color: var(--border-strong); color: var(--fg-1); }
.chip.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-ghost); }
.chip svg { width: 14px; height: 14px; }
.filter-spacer { flex: 1; }

/* Liste des rangs cliquables (à droite de la barre) */
.rank-jump { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.rank-jump .rj-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: .1em; margin-right: 3px;
}
.rj-btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--fg-2); background: var(--bg-overlay);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  min-width: 30px; padding: 5px 7px; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap), background var(--dur-fast) var(--ease-snap);
}
.rj-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-ghost); }
/* rang actif (position de scroll) */
.rj-btn.on {
  color: var(--fg-inverse); background: var(--accent);
  border-color: var(--accent); box-shadow: 0 0 10px rgba(255,106,31,.4);
}

/* ============================ CONTENT / RANK SECTIONS ===================== */
main { display: block; }
.view[hidden] { display: none; }
.ranks { padding: 22px 0 40px; }

/* Décale l'ancre sous les 2 barres collantes (nav 64 + subnav ~58) */
/* content-visibility : le navigateur saute layout+paint des sections hors
   écran (grosses images + ombres) -> scroll bien plus fluide. La taille
   intrinsèque évite les sauts de scrollbar ; `auto` mémorise la vraie taille. */
.rank-section { margin-top: 44px; scroll-margin-top: 128px;
  content-visibility: auto; contain-intrinsic-size: auto 900px; }
.rank-section:first-child { margin-top: 26px; }
.rank-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.rank-head .rank-eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  letter-spacing: .16em; text-transform: uppercase; }
.rank-head h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2);
  letter-spacing: var(--tracking-tight); color: var(--fg-1); margin: 6px 0 0; }
.rank-head .rule { flex: 1; height: 1px; background: var(--border-subtle); margin-bottom: 10px; }
.rank-head .rank-count { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: .08em; margin-bottom: 9px; white-space: nowrap; }

.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.grid > .vcard { flex: 0 1 calc((100% - 36px) / 3); }
@media (max-width: 920px){ .grid > .vcard { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 600px){ .grid > .vcard { flex-basis: 100%; } }

/* ============================ VEHICLE CARD =============================== */
.vcard { background: var(--bg-raised); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.vcard:hover { border-color: var(--border-accent); box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* Recon frame (zone image) */
.recon { position: relative; height: 168px; background: var(--bg-inset);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border-default); overflow: hidden; }
.recon::before { content: ""; position: absolute; inset: 0; background-image: var(--dot-grid);
  background-size: 16px 16px; opacity: .5; }
.recon .wt-img { position: relative; z-index: 1; width: 100%; height: 100%;
  object-fit: contain; padding: 10px 12px 16px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.55));
  transition: transform var(--dur-base) var(--ease-out); }
.vcard:hover .recon .wt-img { transform: scale(1.045); }
.recon .glyph { width: 46px; height: 46px; color: var(--fg-4); position: relative; z-index: 1;
  transition: color var(--dur-base) var(--ease-out); }
.vcard:hover .recon .glyph { color: var(--fg-3); }
/* coins "recon" ambre */
.recon .tick { position: absolute; width: 11px; height: 11px; border: 1.5px solid var(--accent-line); z-index: 2; }
.recon .tl{top:10px;left:10px;border-right:none;border-bottom:none;}
.recon .tr{top:10px;right:10px;border-left:none;border-bottom:none;}
.recon .bl{bottom:10px;left:10px;border-right:none;border-top:none;}
.recon .br{bottom:10px;right:10px;border-left:none;border-top:none;}
.recon .rank-chip { position: absolute; top: 11px; right: 11px; z-index: 3;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; color: var(--fg-inverse);
  background: var(--accent); padding: 3px 9px; border-radius: var(--radius-sm); letter-spacing: .04em; }
.recon .caplabel { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--font-mono); font-size: 9px; color: var(--fg-4); letter-spacing: .2em; }

/* Corps de carte */
.vcard-body { padding: 15px 16px 17px; display: flex; flex-direction: column; flex: 1; }
.vcard-eyebrow { font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  letter-spacing: .14em; text-transform: uppercase; }
.vcard-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--fg-1);
  letter-spacing: -.02em; margin: 5px 0 0; line-height: 1.15; }

/* ============================ FOOTER ===================================== */
.footer { border-top: 1px solid var(--border-subtle); background: var(--bg-inset);
  padding: 56px 0 36px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p { font-size: 14px; color: var(--fg-3); line-height: 1.7; max-width: 300px; margin: 0; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; font-weight: 500; }
.footer-col a, .footer-col span.dead { display: block; font-size: 14px; color: var(--fg-2);
  text-decoration: none; padding: 5px 0; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-snap); }
.footer-col a:hover { color: var(--accent); }
.footer-col span.dead { color: var(--fg-4); cursor: default; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border-subtle); flex-wrap: wrap; gap: 12px; }
.footer-meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); letter-spacing: .04em; text-transform: uppercase; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-3); letter-spacing: .06em; text-transform: uppercase; }
.footer-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.footer-copy { margin-top: 18px; text-align: center; font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-4); letter-spacing: .06em; }

/* ============================ RESPONSIVE ================================= */
@media (max-width: 860px){
  .statband-inner { grid-template-columns: 1fr 1fr; }
  .statcell:nth-child(3) { border-left: none; }
  .statcell:nth-child(3), .statcell:nth-child(4) { border-top: 1px solid var(--border-subtle); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px){
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   AJOUTS — Ground RB Optimizer : chips de type, teaser, résumé de rang, modale
   ========================================================================== */

/* Chip de type véhicule (sur l'image) */
.type-chip {
  position: absolute; top: 11px; left: 11px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--fg-1); background: rgba(13,15,17,.9);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 3px 8px;
}
.type-chip .ti { width: 12px; height: 12px; color: var(--accent); }

/* Carte cliquable */
.vcard { cursor: pointer; }
.vcard:focus-visible { outline: none; border-color: var(--border-accent); box-shadow: var(--glow-accent-sm); }

.status-pill {
  align-self: flex-start; margin-top: 2px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 45%, transparent);
  background: var(--success-bg); border-radius: var(--radius-xs); padding: 2px 7px;
}

.teaser {
  margin: 10px 0 0; font-size: var(--fs-body-sm); line-height: 1.45;
  color: var(--fg-2); flex: 1;
}

.details-link {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
  transition: gap var(--dur-fast) var(--ease-snap);
}
.details-link .ar { width: 14px; height: 14px; }
.vcard:hover .details-link { gap: 9px; }

/* Résumé de rang (sous l'en-tête, vue chars) */
.rank-summary {
  display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px;
}
.rank-summary span {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-2);
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: var(--radius-pill); padding: 5px 12px; letter-spacing: .02em;
}
.rank-summary b {
  color: var(--accent); font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; font-size: 10px; margin-right: 5px;
}

/* Illustration de repli grande (modale) */
.glyph-lg { width: 90px; height: 90px; color: var(--fg-4); }

/* ---- Prix Silver Lions / Research Points ---- */
.price-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.pr {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--fg-1); background: var(--bg-overlay);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  padding: 4px 9px; letter-spacing: .01em;
}
.pr img { width: 15px; height: 15px; display: block; flex-shrink: 0; }
.pr.sl { color: #d9dee6; }
.pr.rp { color: #cfe0c0; }
.pr.ge { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }

/* ---- Premiums recommandés (sous-section dorée d'un rang) ---- */
.prem-block {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px dashed color-mix(in srgb, var(--warning) 45%, transparent);
}
.prem-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 14px; }
.prem-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--warning);
}
.prem-sub { font-size: var(--fs-body-sm); color: var(--fg-3); }
.vcard.is-prem { border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
.status-pill.prem {
  color: var(--warning); background: var(--warning-bg);
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
}
.chip-tag.prem { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
/* dans la carte, la ligne prix se place avant le lien détails */
.vcard-body .price-row { margin-top: 10px; }
/* dans la modale */
.sheet-price { margin-top: 14px; }
.sheet-price .pr { font-size: 13px; padding: 6px 12px; }

/* ============================ MODALE (vehicle sheet) ===================== */
.scrim {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: var(--bg-scrim); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  justify-content: center; align-items: flex-start;
  padding: 56px 20px; overflow-y: auto;
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out);
}
.scrim.open { display: flex; }
.scrim.in { opacity: 1; }

.sheet {
  position: relative; /* ancre la croix .sheet-close sur la fiche, pas sur l'écran */
  width: 100%; max-width: 720px; background: var(--bg-raised);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-xl);
  transform: translateY(18px) scale(.99);
  transition: transform var(--dur-base) var(--ease-out);
}
.scrim.in .sheet { transform: none; }

.sheet-hero {
  position: relative; height: 260px; background: var(--bg-inset);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-bottom: 1px solid var(--border-default); overflow: hidden;
}
.sheet-hero::before {
  content: ""; position: absolute; inset: 0; background-image: var(--dot-grid);
  background-size: 22px 22px; opacity: .5;
}
.sheet-hero .wt-img {
  position: relative; z-index: 1; max-width: 100%; max-height: 100%;
  object-fit: contain; padding: 16px 18px 22px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.55));
}
.sheet-hero.multi .wt-img { max-width: 50%; }
.sheet-hero .glyph-lg { position: relative; z-index: 1; }

.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: rgba(13,15,17,.7); border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-2); cursor: pointer; backdrop-filter: blur(4px);
  transition: all var(--dur-fast) var(--ease-snap);
}
.sheet-close svg { width: 18px; height: 18px; }
.sheet-close:hover { border-color: var(--border-accent); color: var(--accent); }

.sheet-body { padding: 22px 26px 28px; }
.sheet-eyebrow {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  letter-spacing: .14em; text-transform: uppercase;
}
.sheet-title {
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
  letter-spacing: -.02em; color: var(--fg-1); margin: 6px 0 0; line-height: 1.1;
}
.sheet-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--fg-2);
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: var(--radius-pill); padding: 5px 11px;
}
.chip-tag .ti { width: 13px; height: 13px; color: var(--accent); }
.chip-tag.tt { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }

.m-sec { margin-top: 18px; }
.m-sec-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px;
  padding-left: 14px; position: relative;
}
.m-sec-label::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 3px; height: 12px;
  border-radius: 2px; background: var(--fg-4);
}
.m-sec.pros .m-sec-label::before { background: var(--success); }
.m-sec.cons .m-sec-label::before { background: var(--danger); }
.m-sec.why  .m-sec-label::before { background: var(--accent); }
.m-sec.note .m-sec-label::before { background: var(--warning); }
.m-sec p { margin: 0; font-size: var(--fs-body); line-height: 1.6; color: var(--fg-2); }
.m-sec.why p { color: var(--fg-1); }

/* Fiche technique (stats de combat) */
.m-stats-sec .m-sec-label::before { background: var(--accent); }
.ms-hint {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  text-transform: none; color: var(--fg-4); margin-left: 6px;
}
.m-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-default);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  overflow: hidden;
}
.m-stat {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 8px 12px; background: var(--bg-base);
}
.ms-k {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--fg-3); white-space: nowrap;
}
.ms-v {
  font-size: var(--fs-body); font-weight: var(--fw-semibold);
  color: var(--fg-1); text-align: right;
}
.m-stats-part + .m-stats-part { margin-top: 12px; }
.m-stats-part-name {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-3); margin-bottom: 5px;
}
/* Sections de la fiche avion (Performances, Cellule, Limites, Armement détaillé) */
.m-stats-group-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-4);
  margin: 14px 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border-default);
}
.m-stats + .m-stats-group-label { margin-top: 16px; }
/* Armement détaillé : une carte par arme */
.m-wpns { display: grid; gap: 8px; }
.m-wpn {
  padding: 9px 12px; background: var(--bg-base);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
}
.m-wpn-name {
  font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--fg-1);
}
.m-wpn-meta {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-top: 2px;
}
.m-wpn-belts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.m-belt {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .02em;
  color: var(--fg-2); background: var(--bg-elev-1, var(--bg-base));
  border: 1px solid var(--border-default); border-radius: 999px;
  padding: 2px 9px;
}
@media (max-width: 560px){
  .m-stats { grid-template-columns: 1fr; }
}

@media (max-width: 560px){
  .sheet-hero { height: 200px; }
  .sheet-title { font-size: 24px; }
}

/* ============================================================================
   VÉHICULES COMBINÉS (2 véhicules à la même place)
   ========================================================================== */
/* --- Carte : 2 mini-véhicules côte à côte --- */
.combo { display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-default); border-bottom: 1px solid var(--border-default); }
.combo-col { background: var(--bg-inset); padding: 10px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; }
.combo-media { position: relative; width: 100%; height: 92px;
  display: flex; align-items: center; justify-content: center; }
.combo-media .wt-img { max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.combo-name { font-family: var(--font-display); font-weight: 700; font-size: 14px;
  color: var(--fg-1); text-align: center; line-height: 1.1; letter-spacing: -.01em; }
.combo-col .price-row { margin-top: auto; justify-content: center; gap: 5px; }
.combo-col .pr { font-size: 11px; padding: 3px 6px; }
.combo-col .pr img { width: 13px; height: 13px; }
.vcard.is-combo:hover .combo-media .wt-img { transform: scale(1.05); transition: transform var(--dur-base) var(--ease-out); }

/* --- Modale : 2 colonnes (image + nom + prix) --- */
.sheet-combo { display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-inset); border-bottom: 1px solid var(--border-default); }
.sheet-combo .sc-col { padding: 22px 18px; display: flex; flex-direction: column;
  align-items: center; gap: 10px; position: relative; }
.sheet-combo .sc-col + .sc-col { border-left: 1px solid var(--border-default); }
.sheet-combo .sc-media { height: 150px; width: 100%;
  display: flex; align-items: center; justify-content: center; }
.sheet-combo .sc-media .wt-img { max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.55)); }
.sheet-combo .sc-name { font-family: var(--font-display); font-weight: 700; font-size: 19px;
  color: var(--fg-1); text-align: center; }
.sheet-combo .sc-col .price-row { justify-content: center; }

@media (max-width: 480px){
  .combo-name { font-size: 12px; }
  .combo-col .pr { font-size: 10px; }
}

/* ============================================================================
   BOUTONS (fenêtre de compte)
   ========================================================================== */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px;
  border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 700;
  font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-snap), background var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap), box-shadow var(--dur-fast) var(--ease-snap); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #1a1006; box-shadow: 0 8px 24px rgba(255,90,31,.28); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(255,90,31,.4); }
.btn-ghost { background: var(--bg-overlay); color: var(--fg-1); border-color: var(--accent); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-ghost);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-ghost); }

/* ============================================================================
   POLISH UI/UX (accessibilité + finition) — passe ui-ux-pro-max
   ========================================================================== */
/* --- Focus visible cohérent (clavier) --- */
:where(a, button, input, [tabindex], .vcard, .nation-card, .pick-card, .sr-item):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Skip-link (caché jusqu'au focus clavier) --- */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--accent); color: #1a1006; font-family: var(--font-display);
  font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: var(--radius-sm);
  text-decoration: none; transition: top var(--dur-fast) var(--ease-snap);
}
.skip-link:focus { top: 12px; }

/* --- Chiffres tabulaires : prix et stats alignés, zéro décalage --- */
.pr, .nc-v, .gs-v, .statcell .v, .st-n, .rank-count, .rank-numeral {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}

/* --- Ancres : ne pas passer sous la nav sticky --- */
.home-sec, .rank-section { scroll-margin-top: calc(var(--header-h) + 16px); }

/* --- Reduced motion : neutralise toutes les transitions/animations --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ============================================================================
   FEATURES — skeleton, actions carte, toolbar (filtres/tri/favoris),
   comparateur (tray + sheet)
   ========================================================================== */
/* --- Skeleton images : fondu à l'arrivée + shimmer pendant le chargement --- */
.wt-img { opacity: 0; transition: opacity .35s var(--ease-out); }
.wt-img.is-loaded { opacity: 1; }
.recon, .combo-media, .sc-media, .cmp-media { position: relative; overflow: hidden; }
/* Shimmer animé en transform (composité GPU) et non en background-position
   (qui repeint à chaque frame) -> aucun coût de paint pendant le scroll. */
.recon::after, .combo-media::after, .sc-media::after, .cmp-media::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 60%;
  z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.06), transparent);
  animation: tf-shimmer 1.25s linear infinite;
}
.recon:has(.wt-img.is-loaded)::after, .combo-media:has(.wt-img.is-loaded)::after,
.sc-media:has(.wt-img.is-loaded)::after, .cmp-media:has(.wt-img.is-loaded)::after { display: none; }
@keyframes tf-shimmer { to { transform: translateX(370%); } }
/* Drapeau du pays derrière le véhicule (image officielle du jeu, bords déjà fondus),
   en haut à gauche comme sur le wiki ; le véhicule passe devant. */
.op-flag { position: absolute; left: -3%; top: -8%; width: 74%; max-width: 440px; height: auto;
  z-index: 0; pointer-events: none; opacity: .5; }
.sheet-hero .op-flag { width: 62%; top: -6%; }
.combo-media .op-flag, .sc-media .op-flag { width: 92%; top: -14%; }
.combo-media .wt-img, .sc-media .wt-img, .cmp-media .wt-img { position: relative; z-index: 1; }
.sheet-hero, .cmp-media { position: relative; overflow: hidden; }

/* --- Actions sur la carte (favori / comparer) — en bas de carte --- */
.vcard { position: relative; }
.vcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding-top: 12px; }
.card-actions { display: flex; gap: 6px; }
/* Étoile favori à gauche du rang (eyebrow) */
.fav-flag { display: none; }
.vcard.is-fav .fav-flag { display: inline-flex; align-items: center; }
.fav-flag .ff { width: 11px; height: 11px; color: var(--accent); fill: var(--accent); margin-right: 3px; vertical-align: -1px; }
.ca-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--border-default); background: rgba(9,11,15,.88); color: var(--fg-2);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap), background var(--dur-fast) var(--ease-snap); }
.ca-btn:hover { color: var(--fg-1); border-color: var(--border-accent); }
.ca-btn .cai { width: 16px; height: 16px; }
.ca-fav.on { color: var(--accent); border-color: var(--accent); }
.ca-fav.on .cai { fill: var(--accent); }
.ca-cmp.on { color: var(--accent); border-color: var(--accent); background: var(--accent-ghost); }

/* --- Toolbar (filtres type + tri + Ma ligne) --- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border-subtle); }
.tb-types { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-type { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2);
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  padding: 7px 13px; border-radius: var(--radius-pill); cursor: pointer;
  transition: color var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap), background var(--dur-fast) var(--ease-snap); }
.tb-type:hover { color: var(--fg-1); }
.tb-type.on { color: var(--accent); border-color: var(--accent); background: var(--accent-ghost); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-sort { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); }
.tb-sort select {
  appearance: none; -webkit-appearance: none;
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); cursor: pointer;
  border: 1px solid var(--border-default); border-radius: var(--radius-pill);
  padding: 7px 32px 7px 14px;
  background: var(--bg-overlay) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767D89' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  background-size: 13px;
  transition: color var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap); }
.tb-sort select:hover { color: var(--fg-1); border-color: var(--border-accent); }
.tb-fav { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-2); background: var(--bg-overlay);
  border: 1px solid var(--border-default); padding: 7px 13px; border-radius: var(--radius-pill);
  cursor: pointer; transition: color var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap), background var(--dur-fast) var(--ease-snap); }
.tb-fav .tbi { width: 15px; height: 15px; }
.tb-fav:hover { color: var(--fg-1); }
.tb-fav.on { color: var(--accent); border-color: var(--accent); background: var(--accent-ghost); }
.tb-fav.on .tbi { fill: var(--accent); }
.tb-favn { font-weight: 700; }

/* la barre sticky est plus haute (2 lignes) → décaler les ancres */
.rank-section { scroll-margin-top: 190px; }
.view-empty { text-align: center; color: var(--fg-3); font-size: 15px; padding: 60px 20px; }

/* --- Compare tray (barre flottante) --- */
.compare-tray { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 160%);
  z-index: 120; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-raised); border: 1px solid var(--border-accent); border-radius: var(--radius-pill);
  box-shadow: 0 16px 40px rgba(0,0,0,.55); transition: transform var(--dur-base) var(--ease-out);
  max-width: calc(100vw - 24px); flex-wrap: wrap; }
.compare-tray.show { transform: translate(-50%, 0); }
/* Le tray flottant ne doit jamais chevaucher une modale ouverte (sinon il
   recouvre la fiche de comparaison, surtout sur petit écran). */
body:has(#modal.open) .compare-tray { display: none; }
.ct-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); }
.ct-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-1);
  background: var(--bg-overlay); border: 1px solid var(--border-default); padding: 5px 6px 5px 11px; border-radius: var(--radius-pill); }
.ct-chip button { border: none; background: none; color: var(--fg-3); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.ct-chip button:hover { color: var(--accent); }
.ct-go { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #1a1006;
  background: var(--accent); border: none; border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; }
.ct-go:disabled { opacity: .45; cursor: not-allowed; }
.ct-clear { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); background: none; color: var(--fg-3); cursor: pointer; }
.ct-clear:hover { color: var(--accent); border-color: var(--border-accent); }
.ct-clear .tbi { width: 15px; height: 15px; }

/* --- Compare sheet --- */
/* Comparaison : large mais jamais plus que l'écran ; min-width:0 laisse les
   colonnes rétrécir (sinon la grille déborde et overflow:hidden coupe la droite) */
.sheet-compare { max-width: min(1080px, 100%); }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; }
.cmp-col { padding: 24px 20px; min-width: 0; }
.cmp-col + .cmp-col { border-left: 1px solid var(--border-default); }
/* Dans les comparaisons : stats sur UNE colonne par véhicule -> chaque ligne a
   la place de s'afficher et les lignes se font face entre les deux véhicules */
.sheet-compare .m-stats, .sheet-tree-compare .m-stats { grid-template-columns: 1fr; }
.sheet-compare .ms-k, .sheet-tree-compare .ms-k { white-space: normal; }
.sheet-compare .ms-v, .sheet-tree-compare .ms-v { overflow-wrap: anywhere; }
/* Cadre héro : fond clair + bordure pour détacher l'image du sombre de la modale */
.cmp-media {
  height: 176px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--bg-inset); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 10px;
}
.cmp-media .wt-img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.cmp-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--fg-1); text-align: center; }
.cmp-tags { display: flex; gap: 6px; justify-content: center; margin: 8px 0; flex-wrap: wrap; }
.cmp-price { display: flex; justify-content: center; margin-bottom: 10px; }

@media (max-width: 720px){
  .cmp-grid { grid-template-columns: 1fr; }
  .cmp-col + .cmp-col { border-left: none; border-top: 1px solid var(--border-default); }
  .toolbar { gap: 10px; }
  .tb-right { width: 100%; }
}

/* ============================================================================
   MOBILE — nav 2 lignes (logo + nation + compte / recherche), barres allégées
   ========================================================================== */
@media (max-width: 640px) {
  .nav { height: auto; }
  .nav-inner { flex-wrap: wrap; padding-block: 9px; row-gap: 10px; column-gap: 12px; } /* padding-inline = .container */
  .nav .tag { display: none; }
  .nav-spacer { display: none; }
  .nav-search { order: 9; flex-basis: 100%; max-width: none; margin-left: 0; }
  /* nav devient multi-lignes → subnav ne peut plus se caler dessus proprement */
  .subnav { position: static; }
  .rank-section { scroll-margin-top: 84px; }
  .toolbar { gap: 10px; }
  .tb-right { width: 100%; justify-content: space-between; }
}

/* --- Bouton "comparer" par sous-véhicule (cartes combinées) --- */
.combo-cmp { position: absolute; top: 7px; right: 7px; z-index: 4; width: 28px; height: 28px; }
.combo-cmp .cai { width: 15px; height: 15px; }

/* --- Tag nation dans le tray de comparaison (cross-nation) --- */
.ct-nat { font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--border-accent); border-radius: var(--radius-xs); padding: 1px 4px; margin-right: 2px; }

/* --- Actions carte (dans .vcard) révélées au survol ; tactile = toujours visibles ;
       un favori/comparé actif reste visible. Hors carte (recherche) : toujours visibles. --- */
@media (hover: hover) {
  .vcard .ca-btn { opacity: 0; transition: opacity var(--dur-fast) var(--ease-snap); }
  .vcard:hover .ca-btn, .vcard:focus-within .ca-btn { opacity: 1; }
  /* seul "comparé" reste visible hors survol ; le favori est indiqué par l'étoile au rang */
  .vcard .ca-cmp.on { opacity: 1; }
}

/* --- Fenêtre de synchro des favoris --- */
.sheet-sync { max-width: 560px; }
.sheet-sync .sheet-title { margin-bottom: 8px; }
.sync-p { color: var(--fg-2); font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.sync-row { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 16px; }
.sync-row textarea { flex: 1; resize: vertical; font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-1); background: var(--bg-inset); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); padding: 9px 11px; line-height: 1.4; word-break: break-all; }
.sync-row textarea:focus { outline: none; border-color: var(--border-accent); }
.sync-row .btn { white-space: nowrap; }
.sync-msg { min-height: 18px; font-size: 13px; color: var(--accent); margin: 2px 0 0; }
.sync-uid { font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); margin: 16px 0 0; }
.sync-uid code { color: var(--fg-3); }

/* ===== Arbre technologique (disposition du jeu, 10 nations) ===== */
.wt-tree-sec { margin: 6px 0 30px; }
.wt-tree-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--fg-2);
}
.wtt-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--accent); border: 1px solid var(--border-accent, var(--accent));
  border-radius: 999px; padding: 2px 9px; text-transform: none;
}
/* panneau commun derrière tout l'arbre, en retrait des bords de la page */
.wt-tree-scroll {
  overflow-x: auto; padding: 18px 18px 12px; margin: 0 6px;
  border-radius: 12px; border: 1px solid rgba(160, 185, 215, .10);
  background: linear-gradient(180deg, #161d28, #10151d);
}
/* Nombre de colonnes = celui du jeu ; colonnes premium (à droite) masquables */
.wt-tree { --n: var(--cols-tt, 5); min-width: calc(var(--n) * 128px); }
.wt-tree.show-prem { --n: var(--cols-all, 5); }
.wt-tree:not(.show-prem) .wtt-col.is-prem { display: none; }
/* contexte d'empilement : panneau premium passent derrière les cases, devant le fond */
.wt-tree { position: relative; z-index: 0; }
.wtt-rank { position: relative; margin-bottom: 20px; }
/* sous-panneau doré : un seul bloc pour les colonnes premium voisines, ajusté à leurs véhicules */
.wtt-prem-group {
  grid-column: span var(--k, 1); position: relative;
  display: grid; grid-template-columns: repeat(var(--k, 1), minmax(0, 1fr)); gap: inherit; align-items: start;
}
.wt-tree:not(.show-prem) .wtt-prem-group { display: none; }
/* séparation tech tree | premium : trait doré vertical sur toute la hauteur du rang */
.wtt-prem-group { align-self: stretch; margin-left: 10px; }
.wtt-prem-group::before {
  content: ""; position: absolute; left: calc((var(--gx, 14px) + 10px) / -2 - 1px); top: -8px; bottom: -8px; width: 2px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--wt-prem) 60%, transparent) 15%, color-mix(in srgb, var(--wt-prem) 60%, transparent) 85%, transparent);
  pointer-events: none;
}
.wtt-col.is-prem.has-bg::after {
  --b: 1px solid color-mix(in srgb, var(--wt-prem) 20%, transparent);
  content: ""; position: absolute; top: -6px; bottom: -6px; left: -6px; right: -6px; z-index: -1; pointer-events: none;
  border-radius: 8px; border: var(--b);
  background: color-mix(in srgb, var(--wt-prem) 8%, transparent);
}
/* case vide d'un bloc premium (colonne voisine plus longue) : fond doré seul */
.wtt-slot-empty { height: 56px; }
/* soudé à la colonne pleine voisine : déborde de la moitié de l'espacement, sans bord ni arrondi côté joint */
.wtt-col.is-prem.j-l::after { left: calc(var(--gx, 14px) / -2); border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.wtt-col.is-prem.j-r::after { right: calc(var(--gx, 14px) / -2); border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.wtt-rank-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-3);
  border-bottom: 1px solid var(--border-default); padding-bottom: 5px; margin-bottom: 14px;
}
.wtt-grid { --gx: 14px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 30px var(--gx); align-items: start; }
/* Pas de flèches de recherche entre premiums */
.wtt-col.is-prem .wtt-cell + .wtt-cell::before, .wtt-col.is-prem .wtt-cell + .wtt-cell::after { display: none; }
.wtt-col { position: relative; display: flex; flex-direction: column; gap: 30px; }
/* flèche entre rangs : remonte dans l'espace inter-rang vers le rang précédent */
.wtt-rank-arrow {
  position: absolute; top: -54px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 42px; background: var(--accent); z-index: 1;
}
.wtt-rank-arrow::after {
  content: ""; position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 11px solid var(--accent);
}
.wtt-cell { position: relative; }
.wtt-cell.is-folder { cursor: pointer; }
/* Dossier : cover (image group) par défaut. Au clic, la liste s'ouvre en
   MINI-FENÊTRE superposée (position absolue) : elle ne décale PAS l'arbre,
   les avions tombent pile sur les cases du dessous (gap = gap de .wtt-col)
   donc la flèche existante reste visible entre eux. */
.wtt-folder-list { display: none; }
.wtt-cell.is-folder.is-open > .wtt-folder-list {
  display: flex; flex-direction: column; gap: 0;
  position: absolute; top: -8px; left: 0; width: 100%; z-index: 20;
  padding: 8px; border-radius: 14px;
  background: var(--bg-inset); border: 1px solid var(--border-default);
  box-shadow: 0 14px 34px rgba(0,0,0,.6);
}
.wtt-cell.is-folder.is-open > .wtt-folder-list .wtt-plane { box-shadow: 0 6px 16px rgba(0,0,0,.4); }
/* flèche entre avions dépliés (élément dédié, non rognée) */
.wtt-folder-arrow { position: relative; height: 26px; flex: none; }
.wtt-folder-arrow::before {
  content: ""; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 14px; background: var(--accent);
}
.wtt-folder-arrow::after {
  content: ""; position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--accent);
}
/* flèche entre cellules (ligne + pointe), style wiki — un peu plus grosse */
.wtt-cell + .wtt-cell::before {
  content: ""; position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 19px; background: var(--accent); opacity: 1;
}
.wtt-cell + .wtt-cell::after {
  content: ""; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 11px solid var(--accent); opacity: 1;
}
/* carte avion : plus petite, nom haut-droite, BR bas-droite, image centrée un peu à gauche */
.wtt-plane {
  position: relative; height: 56px; overflow: hidden; cursor: pointer;
  background: var(--bg-elev-1, var(--bg-base)); border: 1px solid var(--border-default);
  border-radius: var(--radius-xs); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.wtt-plane:hover, .wtt-plane:focus-visible,
.wtt-cell.is-folder:hover > .wtt-plane {
  border-color: var(--accent); transform: translateY(-1px); outline: none;
  box-shadow: 0 6px 18px rgba(110, 150, 200, .28), 0 0 0 3px rgba(110, 150, 200, .10);
}
.wtt-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: 40% center; transform: scale(.9);
  opacity: 0; transition: opacity .2s ease;
}
.wtt-img.is-loaded { opacity: 1; }
.wtt-noimg { opacity: 1; background: var(--bg-base); }
.wtt-name {
  position: absolute; top: 4px; right: 7px; max-width: 66%; text-align: right;
  font-size: 11px; font-weight: var(--fw-semibold); color: var(--fg-1); line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0,0,0,.85);
}
.wtt-br {
  position: absolute; bottom: 4px; right: 7px;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-3);
  text-shadow: 0 1px 3px rgba(0,0,0,.85);
}
/* mode Arbre : tri et « Ma ligne » (propres aux cartes) masqués */
.toolbar.is-tree .tb-right { display: none; }
/* bouton « Arbre » dans le filtre */
.tb-type.tb-tree.on { color: var(--accent); border-color: var(--accent); }
@media (max-width: 560px) {
  .wt-tree { min-width: calc(var(--n) * 112px); }
  .wtt-grid { --gx: 10px; gap: 20px var(--gx); }
}
/* Statut d'achat (couleurs proches du jeu) : premium/pack doré, escadron vert, événement violet */
:root { --wt-prem: #d9a93a; --wt-squad: #4fbf8a; --wt-event: #a98bf0; }
.wtt-plane.st-premium, .wtt-plane.st-pack {
  border-color: color-mix(in srgb, var(--wt-prem) 55%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--wt-prem) 16%, var(--bg-elev-1, var(--bg-base))), var(--bg-elev-1, var(--bg-base)) 70%);
}
.wtt-plane.st-squadron {
  border-color: color-mix(in srgb, var(--wt-squad) 55%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--wt-squad) 14%, var(--bg-elev-1, var(--bg-base))), var(--bg-elev-1, var(--bg-base)) 70%);
}
.wtt-plane.st-event {
  border-color: color-mix(in srgb, var(--wt-event) 55%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--wt-event) 14%, var(--bg-elev-1, var(--bg-base))), var(--bg-elev-1, var(--bg-base)) 70%);
}
.wtt-plane.st-premium .wtt-name, .wtt-plane.st-pack .wtt-name { color: #f3d58a; }
.wtt-plane.st-squadron .wtt-name { color: #9fe3c2; }
.wtt-plane.st-event .wtt-name { color: #cdbbff; }
.chip-tag.st-squadron { color: var(--wt-squad); border-color: color-mix(in srgb, var(--wt-squad) 45%, transparent); }
.chip-tag.st-event { color: var(--wt-event); border-color: color-mix(in srgb, var(--wt-event) 45%, transparent); }
/* Pastille « n véhicules » sur la couverture d'un dossier */
.wtt-fcount {
  position: absolute; bottom: 4px; left: 6px; z-index: 2;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 10px; line-height: 16px; text-align: center;
  color: var(--fg-1); background: rgba(0,0,0,.55); border: 1px solid var(--border-default);
}
.wtt-title { color: var(--fg-1); }
/* Interrupteur premiums + légende */
.wtt-prem-toggle {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: none;
  color: var(--fg-2); background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: 999px; padding: 3px 10px 3px 7px; transition: border-color .15s, color .15s;
}
.wtt-prem-toggle:hover { color: var(--fg-1); border-color: var(--wt-prem); }
.wtt-prem-dot {
  width: 22px; height: 12px; border-radius: 6px; position: relative; flex: none;
  background: var(--bg-inset); border: 1px solid var(--border-default); transition: background .15s;
}
.wtt-prem-dot::after {
  content: ""; position: absolute; top: 1px; left: 1px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--fg-3); transition: transform .15s, background .15s;
}
.wtt-prem-toggle[aria-pressed="true"] { color: #f3d58a; border-color: color-mix(in srgb, var(--wt-prem) 55%, transparent); }
.wtt-prem-toggle[aria-pressed="true"] .wtt-prem-dot { background: color-mix(in srgb, var(--wt-prem) 35%, transparent); }
.wtt-prem-toggle[aria-pressed="true"] .wtt-prem-dot::after { transform: translateX(10px); background: var(--wt-prem); }
.wtt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -6px 0 16px; font-size: 11px; color: var(--fg-3); }
.wtt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wtt-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--border-default); background: var(--bg-elev-1, var(--bg-base)); }
.wtt-legend .lg-premium::before { border-color: var(--wt-prem); background: color-mix(in srgb, var(--wt-prem) 25%, transparent); }
.wtt-legend .lg-squadron::before { border-color: var(--wt-squad); background: color-mix(in srgb, var(--wt-squad) 25%, transparent); }
.wtt-legend .lg-event::before { border-color: var(--wt-event); background: color-mix(in srgb, var(--wt-event) 25%, transparent); }
.wt-tree-sec:not(.prem-on) .wtt-legend { display: none; }

/* ============ Arbre : line-up BR, progression, comparateur (2026-07-02) ============ */
.wtt-brsel {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--fg-2); text-transform: none;
}
.wtt-brsel select {
  background: var(--bg-overlay); color: var(--fg-1);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  font: inherit; padding: 3px 6px; cursor: pointer;
}
.wtt-progress {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--success, #7bd88f); border: 1px solid color-mix(in srgb, var(--success, #7bd88f) 40%, transparent);
  border-radius: 999px; padding: 2px 9px; text-transform: none; white-space: nowrap;
}
.wtt-plane.wtt-dim, .wtt-plane.wtt-nofeat { opacity: .22; filter: grayscale(.85); }
/* Filtres par équipement (arbre + recherche) */
.wtt-feats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 16px; }
.wtt-feats-l { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); margin-right: 2px; }
.wtt-feat, .sr-feat {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--fg-2); background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: 999px; padding: 3px 10px; transition: border-color .15s, color .15s, background .15s;
}
.wtt-feat:hover, .sr-feat:hover { color: var(--fg-1); border-color: var(--border-accent, var(--accent)); }
.wtt-feat[aria-pressed="true"], .sr-feat[aria-pressed="true"] {
  color: var(--fg-1); border-color: var(--accent); background: var(--accent-ghost);
}
.wtt-feat-n { color: var(--fg-4); }
.wtt-feat[aria-pressed="true"] .wtt-feat-n { color: var(--accent); }
.wtt-feats-res { font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-left: 4px; }
.wtt-plane.wtt-owned::after {
  content: "\2713"; position: absolute; top: 3px; left: 5px; z-index: 2;
  font-size: 11px; line-height: 1; font-weight: 700;
  color: var(--success, #7bd88f);
  text-shadow: 0 0 4px rgba(0,0,0,.9);
}
.wtt-plane.wtt-cmp-pending { outline: 2px solid var(--accent); outline-offset: 1px; }
.wtt-own-btn, .wtt-cmp-btn { cursor: pointer; }
.wtt-own-btn.on { color: var(--success, #7bd88f); border-color: color-mix(in srgb, var(--success, #7bd88f) 45%, transparent); }
.sheet-tree-compare { max-width: 980px; }
.sheet-tree-compare { max-width: min(1080px, 100%); }
.tcmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.tcmp-col { min-width: 0; }
.tcmp-col .sheet-hero {
  height: 176px; position: relative; padding: 10px;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
}
.tcmp-name { margin: 10px 0 4px; font-size: 17px; }
@media (max-width: 720px) { .tcmp-grid { grid-template-columns: 1fr; } }
.sheet-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border-default);
}
.sheet-actions .chip-tag { padding: 7px 14px; }
.acct-row input {
  flex: 1; min-width: 0; background: var(--bg-overlay); color: var(--fg-1);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  font: inherit; padding: 9px 12px;
}
.acct-row input:focus { outline: none; border-color: var(--border-accent, var(--accent)); }
.nav-account {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-2); cursor: pointer;
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: 999px; padding: 7px 14px; white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}
.nav-account:hover { border-color: var(--border-accent, var(--accent)); color: var(--accent); }
.nav-account.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
/* Feuille compte : petite boîte centrée à l'écran, contenu centré */
.sheet-sync { margin: auto; max-width: 480px; text-align: center; }
.sheet-sync .sheet-title { font-size: 24px; }
.sheet-sync .sync-row { justify-content: center; }

/* ============================================================================
   LANDING v5 — SIMPLE : fond aléatoire + titre 3 lignes + 4 nations 2×2 (2026-07-05)
   ========================================================================== */
.acc-hero {
  position: relative; min-height: min(52vw, 86vh); display: flex; align-items: center; justify-content: center;
  background: #0a0d14 center / cover no-repeat;
  border-bottom: 1px solid var(--border-subtle);
}
/* Fond sombre par défaut si aucune image (léger dégradé, pas du noir plat) */
.acc-hero:not(.has-bg) {
  background:
    radial-gradient(70% 60% at 50% 30%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    linear-gradient(180deg, #0e131d, #06080e);
}
.acc-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4,6,11,.55) 0%, rgba(4,6,11,.05) 24%, rgba(4,6,11,.18) 62%, rgba(4,6,11,.68) 100%),
    radial-gradient(120% 90% at 50% 45%, transparent 50%, rgba(0,0,0,.38) 100%);
}
/* Fondu flouté progressif en bas de l'image : 6 couches très fines à +1px de flou
   chacune — chaque couche refloute le résultat de la précédente, donc le flou
   s'accumule vers le bas en rampe continue, sans palier visible.
   Pas de mask ici : mask + backdrop-filter est cassé sur Safari iOS. */
.acc-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; pointer-events: none; z-index: 1; }
.acc-fade i {
  position: absolute; left: 0; right: 0; bottom: 0; display: block;
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}
.acc-fade i:nth-child(1) { height: 36px; }
.acc-fade i:nth-child(2) { height: 30px; }
.acc-fade i:nth-child(3) { height: 24px; }
.acc-fade i:nth-child(4) { height: 18px; }
.acc-fade i:nth-child(5) { height: 12px; }
.acc-fade i:nth-child(6) { height: 6px; }
/* Léger voile dégradé vers le fond de page pour finir la transition */
.acc-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 36px;
  pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(5,6,10,0), #05060a);
}
.acc-title {
  position: relative; z-index: 1; margin: 0; text-align: center;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  text-transform: uppercase; color: #fff; line-height: .96;
  text-shadow: 0 4px 34px rgba(0,0,0,.75);
}
.acc-title span { display: block; }
.acc-title span:first-child { font-size: clamp(38px, 7.5vw, 92px); }
.acc-title .sm { font-size: clamp(20px, 3vw, 34px); font-weight: 700; color: var(--fg-2); margin: 6px 0; letter-spacing: .12em; }
.acc-title .hl { font-size: clamp(46px, 9vw, 116px); color: var(--accent); }

/* ---- 4 nations 2×2 (char + chasseur) ---- */
.acc-main { padding-top: 44px; padding-bottom: 24px; } /* padding-inline = celui de .container */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.acc-nat {
  position: relative; overflow: hidden; text-decoration: none;
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 100% 106%, color-mix(in srgb, var(--nat) 26%, transparent), transparent 58%),
    var(--bg-raised);
  transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s;
}
.acc-nat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--nat); z-index: 3; }
.acc-nat:hover {
  transform: translateY(-4px); border-color: var(--nat);
  box-shadow: 0 20px 48px rgba(0,0,0,.5), 0 0 0 1px var(--nat), 0 0 30px color-mix(in srgb, var(--nat) 32%, transparent);
}
.acc-imgs { position: relative; height: 210px; }
.acc-plane {
  position: absolute; top: 16px; right: 5%; width: 52%; height: auto; z-index: 1; transform: rotate(-7deg);
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.5)); transition: transform .3s var(--ease-out);
}
.acc-tank {
  position: absolute; bottom: 8px; left: 3%; width: 66%; height: auto; z-index: 2;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.6)); transition: transform .3s var(--ease-out);
}
.acc-nat:hover .acc-tank { transform: translateY(-4px) scale(1.05); }
.acc-nat:hover .acc-plane { transform: rotate(-7deg) translate(-6px,-5px); }
.acc-name {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 15px 22px; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #fff;
  border-top: 1px solid rgba(255,255,255,.06);
}
.acc-name svg { width: 18px; height: 18px; margin-left: auto; color: var(--nat); transition: transform var(--dur-fast) var(--ease-snap); }
.acc-nat:hover .acc-name svg { transform: translateX(5px); }

@media (max-width: 720px) {
  /* La nav overlay passe sur 2 lignes en mobile : le hero doit démarrer dessous */
  .acc-hero {
    min-height: max(320px, 86vw); box-sizing: border-box;
    padding: 84px 16px 30px;
  }
  /* Titre plus compact : il ne doit plus masquer l'image de fond */
  .acc-title span:first-child { font-size: clamp(24px, 7.5vw, 34px); }
  .acc-title .sm { font-size: 14px; margin: 4px 0; }
  .acc-title .hl { font-size: clamp(30px, 10vw, 46px); }
  .acc-grid { grid-template-columns: 1fr; }
  .acc-imgs { height: 180px; }
}

/* ---- Localisation dans l'arbre (bouton « Voir dans l'arbre » des fiches) ---- */
.chip-tag.goto-tree { cursor: pointer; }
.chip-tag.goto-tree:hover { color: var(--accent-2); border-color: var(--accent-2); }
.wtt-plane.wtt-locate { animation: wtt-locate 2.6s ease; }
@keyframes wtt-locate {
  0%, 55% { outline: 2px solid var(--accent); outline-offset: 3px;
            box-shadow: 0 0 18px var(--accent-ghost), 0 0 10px rgba(255, 106, 31, 0.5); }
  100% { outline: 2px solid transparent; outline-offset: 3px; box-shadow: none; }
}

/* ---- Fiche technique : bascule De base / Amélioré + comparaison ---- */
.ms-modes { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: middle; }
.ms-mode-btn {
  font: inherit; font-size: 10.5px; letter-spacing: .02em; padding: 2px 9px;
  border-radius: 999px; cursor: pointer; background: transparent;
  color: var(--fg-3); border: 1px solid var(--border-default);
}
.ms-mode-btn:hover { color: var(--fg-1, #fff); border-color: var(--border-strong); }
.ms-mode-btn.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-ghost); }
/* mode « De base » : masque la flèche + la valeur améliorée ; « Amélioré » : inverse */
.sheet.ms-stock .ms-v .v-up, .sheet.ms-stock .ms-v .v-arr { display: none; }
.sheet.ms-up .ms-v .v-stock, .sheet.ms-up .ms-v .v-arr { display: none; }
/* comparaison : la meilleure valeur des deux passe en vert */
.ms-v.ms-best { color: var(--success); font-weight: 700; }
.ms-v.ms-best::after { content: " ✓"; font-size: .85em; }

/* ============================================================================
   NATIONS ×10 (2026-10-02) — sélecteur de nation, drapeaux, accueil, pied
   ========================================================================== */
/* Drapeaux = images des émojis Apple (58×42) : on fixe la hauteur, la largeur suit */
.flag { height: 17px; width: auto; flex: none; display: inline-block; vertical-align: middle;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.4)); }
.eyebrow-flag { height: 14px; }

/* --- Sélecteur (bouton + panneau) --- */
.natsel { position: relative; margin-left: 4px; }
.natsel-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px 0 11px;
  font: 600 14px/1 var(--font-sans); color: var(--fg-1); cursor: pointer;
  background: var(--bg-overlay); border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-snap), background var(--dur-fast) var(--ease-snap);
}
.natsel-btn:hover, .natsel.is-open .natsel-btn { border-color: var(--border-strong); background: var(--bg-overlay-2, var(--bg-overlay)); }
.natsel-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.natsel-globe { flex: none; color: var(--fg-2); width: 18px; height: 18px; }
.natsel-chev { width: 15px; height: 15px; color: var(--fg-3); transition: transform var(--dur-fast) var(--ease-snap); }
.natsel.is-open .natsel-chev { transform: rotate(180deg); }
.natmenu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; width: min(520px, calc(100vw - 32px));
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px;
  background: var(--bg-raised); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  box-shadow: 0 22px 50px rgba(0,0,0,.6);
}
.natmenu[hidden] { display: none; }
.natmenu-item {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 11px; align-items: center; padding: 9px 11px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--fg-2); border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-snap), border-color var(--dur-fast) var(--ease-snap);
}
.natmenu-item .flag { grid-row: 1 / 3; height: 21px; }
.natmenu-item:hover, .natmenu-item:focus-visible {
  outline: none; color: var(--fg-1);
  background: color-mix(in srgb, var(--nat) 12%, transparent); border-color: color-mix(in srgb, var(--nat) 40%, transparent);
}
.natmenu-item.on { background: color-mix(in srgb, var(--nat) 16%, transparent); border-color: color-mix(in srgb, var(--nat) 55%, transparent); color: var(--fg-1); }
.nm-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: inherit; line-height: 1.2; }
.nm-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.nm-tag.soon { color: var(--fg-3); }

/* Nav : sélecteur à gauche, recherche au centre */
.nav-inner { gap: 16px; }
@media (max-width: 860px) {
  .natsel { order: 2; margin-left: auto; }
  .nav-account { order: 3; }
  .natsel-name { display: none; }
  .natmenu { left: auto; right: 0; }
}
@media (max-width: 420px) {
  .natmenu { grid-template-columns: 1fr; }
}

/* --- Accueil : titres de section + petites cartes (nations « arbres ») --- */
.acc-h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 18px;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--fg-1); letter-spacing: -.01em; }
.acc-h2 small { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--fg-3); }
.acc-grid + .acc-h2 { margin-top: 46px; }
.acc-name .flag { height: 23px; }
.acc-grid--sm { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.acc-nat--sm .acc-imgs { height: 138px; }
.acc-nat--sm .acc-name { font-size: 17px; padding: 12px 16px; gap: 9px; }
.acc-nat--sm .acc-name .flag { height: 18px; }
.acc-tag { font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-3); border: 1px solid var(--border-default); border-radius: 999px; padding: 2px 8px; }
@media (max-width: 900px) { .acc-grid--sm { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .acc-grid--sm { grid-template-columns: 1fr; } .acc-h2 { font-size: 19px; } }

/* --- Pied de page : 10 nations sur 2 colonnes --- */
.footer-grid { grid-template-columns: 1.5fr 1.6fr 1fr 1fr; }
.footer-nations { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; align-content: start; }
.footer-nations h4 { grid-column: 1 / -1; }
.footer-nations a { display: flex; align-items: center; gap: 9px; }
.footer-nations .flag { height: 14px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Carte « report » : véhicule d'un rang inférieur retenu faute de mieux (rang réel affiché) */
.recon .rank-chip.is-report { background: var(--bg-overlay); color: var(--accent); border: 1px dashed var(--accent); }
/* Petit mobile : logo réduit à l'emblème pour garder logo + nation + compte sur une ligne */
@media (max-width: 480px) {
  .nav-logo .wordmark { display: none; }
  .nav-inner { column-gap: 10px; }
}
/* Mobile : en-tête de page plus compact (le texte de présentation est long) */
@media (max-width: 640px) {
  .hero { padding: 44px 0 30px; }
  .hero h1 { font-size: clamp(34px, 10vw, 46px); }
  .hero-sub { font-size: 15px; line-height: 1.6; margin-top: 16px; }
  .statcell { padding: 16px 14px; }
  .statcell .v { font-size: 22px; }
}

/* ============================================================================
   MOBILE v2 (2026-10-02) — cartes sur 2 colonnes, barres de filtres défilantes,
   accueil compact
   ========================================================================== */
@media (max-width: 640px) {
  /* Rangs et filtres : une seule ligne qui défile au doigt (plus de retour à la ligne) */
  .filterbar { row-gap: 10px; }
  .filterbar .filter-spacer { display: none; }
  .rank-jump { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: 100%;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .rank-jump::-webkit-scrollbar, .tb-types::-webkit-scrollbar { display: none; }
  .rank-jump .rj-btn, .rank-jump .rj-label { flex: none; }
  .rj-btn { min-width: 36px; padding: 7px 8px; }
  .tb-types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .tb-type { flex: none; }
  /* En-tête de rang : le compteur ne déborde plus */
  .rank-head { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 16px; }
  .rank-head .rule { display: none; }
  .rank-head .rank-count { margin-left: auto; }
  .rank-section { margin-top: 30px; }
}
@media (max-width: 600px) {
  /* Cartes : 2 par ligne, compactes (les cartes combinées gardent toute la largeur) */
  .grid { gap: 10px; }
  .grid > .vcard { flex-basis: calc((100% - 10px) / 2); min-width: 0; }
  .grid > .vcard.is-combo { flex-basis: 100%; }
  .vcard:not(.is-combo) .recon { height: 112px; }
  .recon .wt-img { padding: 22px 6px 8px; }
  .recon .tick { display: none; }
  .type-chip { top: 7px; left: 7px; gap: 3px; font-size: 8.5px; letter-spacing: .06em; padding: 2px 5px; }
  .type-chip .ti { width: 10px; height: 10px; }
  .recon .rank-chip { top: 7px; right: 7px; font-size: 9px; padding: 2px 6px; }
  .vcard-body { padding: 10px 10px 11px; }
  .vcard-eyebrow { font-size: 8.5px; letter-spacing: .06em; }
  .vcard-title { font-size: 16px; overflow-wrap: anywhere; }
  .teaser { font-size: 12.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
  .vcard-body .price-row { gap: 5px; margin-top: 8px; }
  .vcard-body .pr { font-size: 10.5px; padding: 3px 6px; gap: 3px; }
  .vcard-body .pr img { width: 12px; height: 12px; }
  .vcard-foot { padding-top: 8px; gap: 4px; }
  .details-link { margin-top: 0; font-size: 10px; }
  .card-actions { gap: 4px; }
  .vcard .ca-btn { width: 28px; height: 28px; }
}
@media (max-width: 560px) {
  /* Accueil : nations sur 2 colonnes, cartes plus basses */
  .acc-grid, .acc-grid--sm { grid-template-columns: 1fr 1fr; gap: 10px; }
  .acc-imgs, .acc-nat--sm .acc-imgs { height: 98px; }
  .acc-plane { top: 8px; }
  .acc-tank { bottom: 4px; }
  .acc-name, .acc-nat--sm .acc-name { font-size: 15px; padding: 10px 11px; gap: 7px; }
  .acc-name .flag, .acc-nat--sm .acc-name .flag { height: 15px; }
  .acc-name svg { width: 14px; height: 14px; }
  .acc-tag { display: none; }
  .acc-h2 small { font-size: 10px; }
  .acc-grid + .acc-h2 { margin-top: 32px; }
}
/* Nav mobile (2 lignes, recherche dessous) : il reste la place pour le nom de la nation */
@media (max-width: 640px) { .natsel-name { display: inline; } }
@media (max-width: 350px) { .natsel-name { display: none; } }

/* ============ Lien « Munitions » de la nav + page munitions.html ============ */
.nav-link { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-2); text-decoration: none; padding: 6px 10px;
  border: 1px solid transparent; border-radius: var(--radius-sm); white-space: nowrap; }
.nav-link:hover { color: var(--fg-1); border-color: var(--border-default); }
.nav-link.on { color: var(--accent); border-color: var(--accent-line); }
.mu-main { padding-block: 36px 64px; }
.mu-sec { scroll-margin-top: 130px; margin-bottom: 48px; }
.mu-group { margin-bottom: 28px; }
.mu-gtitle { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--fg-1); margin: 0 0 12px; }
.mu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mu-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px;
  background: var(--bg-surface, rgba(255,255,255,.03)); border: 1px solid var(--border-subtle); border-radius: var(--radius-md, 10px); }
.mu-rank { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font-mono); font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); }
.mu-body { min-width: 0; flex: 1; }
.mu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mu-flag { width: 24px; height: auto; }
.mu-name { font-weight: 700; color: var(--fg-1); font-size: 15px; }
.mu-cal { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
.mu-why { margin: 6px 0 0; color: var(--fg-2); line-height: 1.55; font-size: 14px; }
.mu-nat { color: var(--fg-3); }
.mu-tip { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); color: var(--fg-2); font-size: 14px; }
.mu-sources ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.mu-sources a { color: var(--fg-2); }
.subnav a.chip { text-decoration: none; }
@media (max-width: 760px) {
  /* mobile : logo + nation + compte sur la 1re ligne, liens (Munitions, Cartes) sur la 2e */
  .nav-link { order: 4; padding: 4px 8px; font-size: 11px; }
  .mu-item { padding: 12px; gap: 10px; }
  .mu-rank { width: 26px; height: 26px; font-size: 12px; }
}
/* Munitions : icône(s) du jeu — 1 icône, ou bande = cartouches côte à côte (comme en jeu) */
.mu-img { flex: none; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm, 6px); border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.07), rgba(0,0,0,.25)); }
.mu-img img { width: 80px; height: 80px; object-fit: contain; display: block; }
.mu-img--belt { gap: 0; padding: 0 4px; }
.mu-img--belt img { width: auto; height: 82px; flex: 0 1 auto; min-width: 0; margin: 0 -3px; }
.mu-credits-intro { color: var(--fg-3); font-size: 13px; margin: 14px 0 0; }
@media (max-width: 760px) {
  .mu-img { width: 70px; height: 70px; }
  .mu-img img { width: 60px; height: 60px; }
  .mu-img--belt img { width: auto; height: 62px; margin: 0 -2px; }
}
/* Top 3 des munitions (fiche des cartes) : liste numérotée avec icône du jeu */
.mv-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mv-ammo { display: flex; gap: 10px; align-items: flex-start; }
.mv-n { flex: none; width: 22px; height: 22px; margin-top: 12px; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); }
.mv-ammo:first-child .mv-n { background: var(--accent); color: var(--bg-base, #0b0f14); border-color: var(--accent); }
.mv-ico { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-subtle); background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.07), rgba(0,0,0,.25)); }
.mv-ico img { width: 40px; height: 40px; object-fit: contain; display: block; }
.mv-txt { min-width: 0; flex: 1; }
.mv-aname b { color: var(--fg-1); font-size: 14px; }
.mv-type { font-size: 12px; color: var(--fg-3); }
.mv-det { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-2); margin-top: 2px; }
.mv-why { margin: 3px 0 0; color: var(--fg-2); font-size: 13px; line-height: 1.5; }
/* Classe du jeu (icône officielle colorée) : coin bas-droit des images + ligne « Classe » des fiches */
.cls-badge { position: absolute; right: 16px; bottom: 15px; z-index: 3; display: grid; place-items: center;
  padding: 4px 6px; border-radius: 5px; background: rgba(10, 13, 16, .78);
  border: 1px solid rgba(255, 255, 255, .1); line-height: 0; }
.cls-ico { width: 26px; height: 19px; display: block; }
.combo-media, .sc-media { position: relative; }
.ms-cls { width: 22px; height: 16px; vertical-align: -3px; margin-right: 6px; padding: 2px 4px; box-sizing: content-box;
  background: #1b2223; border-radius: 3px; }
/* « Meilleures munitions » en bas de la fiche d'une carte (réutilise les styles .mv-*) */
.m-mun-sec .m-sec-label::before { background: var(--accent); }
.m-mun-sec .mv-top { margin-top: 10px; }
.m-mun-sec .m-stats-part-name { margin-top: 12px; }
.m-mun-sec .mv-why { font-size: 13px; line-height: 1.5; }
.m-mun-sec .m-mun-src { margin-top: 10px; font-size: 12px; color: var(--fg-3); }
.m-mun-sec .m-mun-src a { color: var(--fg-2); }
@media (max-width: 760px) {
  .cls-badge { right: 12px; bottom: 11px; padding: 3px 5px; }
  .cls-ico { width: 21px; height: 15px; }
}
/* Munitions par catégorie (Obus, Missiles, Bombes, Roquettes, Bandes) + badges de classe réduits */
.mv-cat { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin: 12px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border-subtle); }
.m-mun-sec .mv-tabs + .mv-cat, .m-mun-sec .m-sec-label + .mv-cat { margin-top: 4px; }
/* Boutons de classement de l'arsenal (Combat aérien / Attaque de bases / Classement anti-chars) :
   le chiffre 1-2-3 du classement remplace celui de la catégorie ; re-clic = affichage normal */
.mv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.mv-tab {
  flex: 1; font: inherit; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 7px 10px; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--fg-3); border: 1px solid var(--border-default);
}
.mv-tab:hover { color: var(--fg-1, #fff); border-color: var(--border-strong); }
.mv-tab.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-ghost); }
.mv-n { position: relative; }
.mv-rk { display: none; position: absolute; inset: -1px; place-items: center; border-radius: 50%; }
.mv-rk[data-n="1"] { background: #f2b33d; color: #1a1306; }
.mv-rk[data-n="2"] { background: #c3cad4; color: #14181d; }
.mv-rk[data-n="3"] { background: #c27c45; color: #1a0f07; }
.m-mun-sec[data-mun-cur] .mv-n0, .m-mun-sec[data-mun-cur] .mv-best { display: none; }
.m-mun-sec[data-mun-cur] .mv-ammo .mv-n { background: transparent; border-color: var(--border-default); }
.m-mun-sec[data-mun-cur="combat"] .mv-rk[data-t="combat"],
.m-mun-sec[data-mun-cur="base"] .mv-rk[data-t="base"],
.m-mun-sec[data-mun-cur="sol"] .mv-rk[data-t="sol"] { display: grid; }
.m-mun-sec[data-mun-cur="combat"] .mv-ammo:not([data-r-combat]),
.m-mun-sec[data-mun-cur="base"] .mv-ammo:not([data-r-base]),
.m-mun-sec[data-mun-cur="sol"] .mv-ammo:not([data-r-sol]) { opacity: .45; }
.cls-badge { right: 14px; bottom: 14px; padding: 3px 4px; border-radius: 4px; }
.cls-ico { width: 17px; height: 12px; }
.ms-cls { width: 16px; height: 11px; vertical-align: -1px; padding: 2px 3px; }
@media (max-width: 760px) {
  .cls-badge { right: 11px; bottom: 10px; padding: 2px 3px; }
  .cls-ico { width: 14px; height: 10px; }
}
/* Classement 1-2-3 de chaque catégorie : or / argent / bronze + étiquette « Meilleur choix » */
.mv-ammo:nth-child(1) .mv-n { background: #f2b33d; border-color: #f2b33d; color: #1a1306; }
.mv-ammo:nth-child(2) .mv-n { background: #c3cad4; border-color: #c3cad4; color: #14181d; }
.mv-ammo:nth-child(3) .mv-n { background: #c27c45; border-color: #c27c45; color: #1a0f07; }
.mv-best { display: inline-block; margin-right: 8px; padding: 1px 6px; border-radius: 3px; vertical-align: 1px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #f2b33d; border: 1px solid rgba(242, 179, 61, .5); background: rgba(242, 179, 61, .08); }

/* ============================ PAGE CARTES (cartes.html, cartes-app.js) ============================ */
.mp-bar { padding-block: 10px; }
.mp-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 380px; }
.mp-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--fg-3); pointer-events: none; }
.mp-search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: var(--radius-sm); border: 1px solid var(--border-default);
  background: var(--bg-overlay); color: var(--fg-1); font: inherit; font-size: 14px; }
.mp-search input:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--focus-ring); }
.mp-count { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
.mp-main { padding-block: 28px 64px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mp-card { display: flex; flex-direction: column; border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  background: var(--bg-raised); overflow: hidden; color: inherit; text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.mp-card:hover, .mp-card:focus-visible { border-color: var(--accent-line); transform: translateY(-2px); }
.mp-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mp-card[hidden] { display: none; }
.mp-thumb { position: relative; aspect-ratio: 1; background: var(--bg-inset); overflow: hidden; }
.mp-thumb img, .mp-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mp-thumb img { object-fit: fill; transition: transform var(--dur-base) var(--ease-out); }
.mp-card:hover .mp-thumb img { transform: scale(1.03); }
.mp-z circle { fill: rgba(11, 13, 17, .78); stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.mp-z text { fill: #fff; font-family: var(--font-mono); font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.mp-z.eq1 circle { stroke: #4C8DFF; } .mp-z.eq1 text { fill: #8DB5FF; }
.mp-z.eq2 circle { stroke: #E5524B; } .mp-z.eq2 text { fill: #FF8E88; }
.mp-info { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.mp-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--fg-1); }
.mp-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
.mp-empty { color: var(--fg-3); text-align: center; padding: 40px 0; }
.mp-sources { margin-top: 48px; }
/* Fiche d'une carte : visionneuse à gauche, infos à droite */
.mp-sheet { max-width: 1280px; }
.mp-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); }
.mp-viewer { padding: 18px; border-right: 1px solid var(--border-default); background: var(--bg-inset); }
.mp-modes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 44px 12px 0; }
.mp-modes .chip { padding: 6px 10px; font-size: 11.5px; }
.mp-mapwrap { position: relative; aspect-ratio: 1; border-radius: var(--radius-md, 10px); overflow: hidden;
  border: 1px solid var(--border-strong); background: #0B0D11; }
.mp-map, .mp-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mp-svg { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.mp-svg.grab { cursor: grabbing; }
.mp-zlab, .mp-dlab { font-family: var(--font-mono); font-weight: 700; pointer-events: none; }
.mp-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.mp-zoom button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: rgba(11, 13, 17, .82); color: var(--fg-1); font-size: 19px; line-height: 1; cursor: pointer; }
.mp-zoom button:hover { border-color: var(--accent-line); color: var(--accent); }
.mp-zoom svg { width: 16px; height: 16px; }
.mp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--fg-2); }
.mp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.mp-legend i { display: inline-block; flex: none; }
.lg-zone { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: rgba(255, 255, 255, .22); }
.lg-sp { width: 13px; height: 13px; border-radius: 3px; border: 1.5px solid #fff; }
.lg-sp.eq1, .mp-dot.eq1 { background: #4C8DFF; }
.lg-sp.eq2, .mp-dot.eq2 { background: #E5524B; }
.lg-area { width: 18px; height: 0; border-top: 2px dashed var(--accent); }
.mp-toggles { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--fg-2); }
.mp-toggles label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.mp-toggles input { accent-color: var(--accent); width: 15px; height: 15px; }
.mp-side { padding: 24px 26px 28px; max-height: calc(100vh - 112px); overflow-y: auto; }
.mp-en { margin-top: 4px; font-size: 13px; color: var(--fg-3); }
.mp-stats { margin: 16px 0 6px; }
.mp-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 13.5px; }
.mp-dl dt { color: var(--fg-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.mp-dl dd { margin: 0; color: var(--fg-1); }
.mp-dist { width: 100%; border-collapse: collapse; font-size: 13px; }
.mp-dist th, .mp-dist td { padding: 7px 8px; border-bottom: 1px solid var(--border-subtle); text-align: center; }
.mp-dist thead th { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); font-weight: 600; letter-spacing: .06em; }
.mp-dist thead th:first-child, .mp-dist tbody th { text-align: left; }
.mp-dist thead th.eq1 { color: #8DB5FF; }
.mp-dist thead th.eq2 { color: #FF8E88; }
.mp-dist tbody th { font-weight: 600; color: var(--fg-1); white-space: nowrap; }
.mp-dist td { font-family: var(--font-mono); color: var(--fg-2); }
.mp-dist td.near { color: var(--accent); font-weight: 700; }
.mp-dist td.own { color: var(--fg-4); }
.mp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
.mp-note { margin: 8px 0 0; font-size: 12px; color: var(--fg-3); line-height: 1.5; }
.mp-sec { margin-top: 22px; }
.mp-sec h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--fg-1); margin: 0 0 8px;
  display: flex; align-items: center; gap: 8px; }
.mp-sec h3::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--accent); }
.mp-warn h3::before { background: var(--danger); }
.mp-sec p, .mp-sec li { color: var(--fg-2); font-size: 14px; line-height: 1.6; }
.mp-sec p { margin: 0; }
.mp-sec ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.mp-warn li::marker { color: var(--danger); }
.mp-sec p.mp-soon { color: var(--fg-3); font-style: italic; }
.mp-src { margin: 22px 0 0; font-size: 12px; color: var(--fg-3); line-height: 1.6; }
.mp-src a { color: var(--fg-2); }
@media (max-width: 900px) {
  .mp-layout { grid-template-columns: 1fr; }
  .mp-viewer { border-right: 0; border-bottom: 1px solid var(--border-default); padding: 14px; }
  .mp-side { max-height: none; overflow: visible; padding: 20px 18px 24px; }
}
@media (max-width: 560px) {
  .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mp-info { padding: 9px 10px 11px; }
  .mp-name { font-size: 14px; padding-right: 0; }
  .mp-meta { font-size: 10.5px; }
  .mp-modes .chip { padding: 5px 8px; font-size: 11px; }
  #mp-modal.scrim { padding: 0; }
  .mp-sheet { border-radius: 0; min-height: 100%; }
}

/* ============ Planificateur de progression (2026-10-03) ============ */
.sheet-planner { max-width: 720px; }
.wtt-plan-btn { cursor: pointer; color: var(--accent); border-color: var(--border-accent, var(--accent)); }
.pl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 6px; }
.pl-tile { background: var(--bg-inset); border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.pl-k { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); }
.pl-v { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--fg-1); white-space: nowrap; }
.pl-v img { width: 16px; height: 16px; }
.pl-done { color: var(--success, #7bd88f); margin: 14px 0; }
.pl-conds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--fg-2); }
.pl-conds li { padding-left: 14px; position: relative; }
.pl-conds li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-4); }
.pl-conds li.ok::before { background: var(--success, #7bd88f); }
.pl-conds li.path::before { background: var(--accent); }
.pl-conds li.miss::before { background: var(--danger, #e5484d); }
.pl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl-step { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.pl-step.target { border-color: var(--border-accent, var(--accent)); background: var(--accent-ghost); }
.pl-step.done { opacity: .55; }
.pl-own {
  width: 26px; height: 26px; flex: none; border-radius: 50%; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-2);
  background: var(--bg-overlay); border: 1px solid var(--border-default);
}
.pl-own:hover { border-color: var(--success, #7bd88f); }
.pl-own[aria-pressed="true"] { color: var(--success, #7bd88f); border-color: color-mix(in srgb, var(--success, #7bd88f) 50%, transparent); }
.pl-thumb { width: 64px; height: 30px; flex: none; display: grid; place-items: center; }
.pl-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pl-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pl-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); }
.pl-cost { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-2); white-space: nowrap; }
.pl-cost span { display: inline-flex; align-items: center; gap: 4px; }
.pl-cost img { width: 12px; height: 12px; }
.pl-note { font-size: 12px; color: var(--fg-3); margin: 10px 0 0; }
.pl-show, .pl-back { cursor: pointer; }
.wtt-plane.wtt-path { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 560px) {
  .pl-tiles { grid-template-columns: 1fr; }
  .pl-thumb { width: 44px; }
}

/* ============ Bascule de langue FR / EN (nav) ============ */
.nav-lang { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--fg-2); text-decoration: none; padding: 6px 9px; white-space: nowrap;
  border: 1px solid var(--border-default); border-radius: 999px; transition: border-color .15s, color .15s; }
.nav-lang:hover { color: var(--accent); border-color: var(--border-accent, var(--accent)); }
@media (max-width: 860px) { .nav-lang { order: 3; } }
/* Schéma tactique d'une carte (cartes.json → schema) */
.mp-sch [data-ref] { transition: opacity .15s; }
.mp-sch .dim { opacity: .12; }
.mp-sch-legend { margin-top: 8px; }
.lg-cle { width: 14px; height: 10px; border-radius: 3px; border: 2px solid #3DDC97; background: rgba(61, 220, 151, .2); }
.lg-route { width: 18px; height: 0; border-top: 3px solid #FFC23D; }
.lg-danger { width: 14px; height: 10px; border-radius: 3px; border: 2px dashed #FF4D4D;
  background: repeating-linear-gradient(45deg, rgba(255, 77, 77, .45) 0 2px, transparent 2px 5px); }
.mp-sch-hint { color: var(--fg-3); font-size: 12px; }
.mp-nums { list-style: none; padding-left: 0 !important; }
.mp-nums li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; border-radius: var(--radius-sm); padding: 2px 4px; margin: 0 -4px; }
.mp-nums li[data-ref] { cursor: default; }
.mp-nums li.on, .mp-nums li[data-ref]:hover { background: var(--bg-2, rgba(255, 255, 255, .05)); color: var(--fg-1); }
.mp-num { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 700; color: #0B0D11; background: #FFC23D; }
.mp-num.a { background: #FF4D4D; }
.mp-nums li:not([data-ref]) .mp-num { opacity: .45; }
/* Bouton « Changer de côté » (votre équipe en bleu) */
.mp-cote { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 6px 9px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: rgba(11, 13, 17, .85); color: var(--fg-1);
  font-size: 12.5px; font-weight: 600; cursor: pointer; line-height: 1.15; text-align: left; }
.mp-cote:hover { border-color: var(--accent-line); color: var(--accent); }
.mp-cote svg { width: 16px; height: 16px; flex: none; }
.mp-cote span { display: flex; flex-direction: column; }
.mp-cote small { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: #8DB5FF; }

/* ============================ HISTOIRE DES VÉHICULES =====================
   Aperçu dans les fiches (.m-hist-sec) + vue de lecture (.hist-sheet) ;
   textes générés par build-histoires.js (hist/<id>.<langue>.js). */
.m-hist-sec .m-sec-label::before { background: var(--steel-1); }
.hist-card {
  display: flex; align-items: stretch; gap: 14px; width: 100%; text-align: left;
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 10px; cursor: pointer; color: inherit; font: inherit;
  transition: border-color var(--dur-fast) var(--ease-snap), background var(--dur-fast) var(--ease-snap);
}
.hist-card + .hist-card { margin-top: 8px; }
.hist-card:hover, .hist-card:focus-visible { border-color: var(--border-accent); background: var(--bg-overlay-2); }
.hist-thumb { flex: 0 0 112px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-inset); }
.hist-thumb img { width: 100%; height: 100%; min-height: 76px; object-fit: cover; display: block; filter: saturate(.85); }
.hist-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hist-t { font-weight: 600; color: var(--fg-1); font-size: 15px; }
.hist-a { font-size: var(--fs-body-sm); line-height: 1.5; color: var(--fg-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hist-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.hist-go .ti { width: 13px; height: 13px; }

.hist-sheet { max-width: 780px; }
.hist-back {
  position: absolute; top: 14px; left: 14px; z-index: 4; height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-sm);
  background: rgba(13,15,17,.7); border: 1px solid var(--border-default); color: var(--fg-2);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; backdrop-filter: blur(4px);
}
.hist-back .ti { width: 14px; height: 14px; transform: rotate(180deg); }
.hist-back:hover { border-color: var(--border-accent); color: var(--accent); }
.hs-hero .hs-fig { margin: 0; }
.hs-hero .hs-fig img { width: 100%; height: auto; max-height: 420px; object-fit: cover; display: block; }
.hs-hero figcaption { padding: 8px 26px 0; }
.hs-body { padding: 22px 26px 30px; }
.hs-text { margin-top: 18px; }
.hs-text p, .hs-jeu p {
  font-size: 1.0625rem; line-height: 1.75; color: var(--fg-2); margin: 0 0 1.05em;
  max-width: 68ch; hyphens: auto; -webkit-hyphens: auto;
}
.hs-text h3 { font-size: 1.25rem; margin: 1.6em 0 .55em; color: var(--fg-1); }
.hs-text h4, .hs-jeu h4 { font-size: 1.05rem; margin: 1.3em 0 .4em; color: var(--fg-1); }
.hs-text a, .hs-jeu a, .hs-src a { color: var(--accent-3); text-decoration-color: var(--accent-line); }
.hs-text ul, .hs-jeu ul { margin: 0 0 1.05em; padding-left: 1.2em; color: var(--fg-2); line-height: 1.7; max-width: 68ch; }
.hs-text blockquote {
  margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent-line);
  color: var(--fg-1); font-style: italic; line-height: 1.7; max-width: 64ch;
}
.hs-fig { margin: 1.5em 0; }
.hs-fig img { width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--bg-inset); display: block; }
.hs-fig figcaption { font-size: var(--fs-caption); color: var(--fg-3); line-height: 1.5; margin-top: 6px; }
.hs-credit { display: block; font-size: 11px; color: var(--fg-4); margin-top: 2px; }
.hs-credit a { color: inherit; }
.hs-jeu {
  margin-top: 30px; padding: 18px 20px 6px; border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent); border-radius: var(--radius-md); background: var(--bg-inset);
}
.hs-jeu h3, .hs-src h3 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px;
}
.hs-jeu p { font-size: 1rem; }
.hs-src { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border-default); }
.hs-src h3 { color: var(--fg-3); }
.hs-src ul { margin: 0; padding-left: 1.1em; }
.hs-src li, .hs-src p { font-size: var(--fs-caption); line-height: 1.55; color: var(--fg-3); margin-bottom: 5px; }
.hs-src .hs-note { margin-top: 10px; color: var(--fg-4); }
@media (max-width: 600px) {
  /* Lecture : la fiche prend presque toute la largeur du téléphone */
  .scrim:has(.hist-sheet) { padding: 12px 6px 24px; }
  .hist-thumb { flex-basis: 84px; }
  .hs-body { padding: 18px 16px 24px; }
  .hs-hero figcaption { padding: 8px 16px 0; }
  .hs-text p, .hs-jeu p { font-size: 1rem; line-height: 1.7; }
  .hs-jeu { padding: 14px 14px 4px; }
}

/* ============================ MODÈLE 3D (modele3d.js) =====================
   Visionneuse WebGL des fiches (.m-3d-sec) ; modèles construits à la main. */
.m-3d-sec .m-sec-label::before { background: var(--accent); }
.m3d {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border-default);
  background: linear-gradient(180deg, var(--bg-overlay-2), var(--bg-inset));
}
.m3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.m3d canvas:active { cursor: grabbing; }
.m3d-views { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.m3d-views button {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-2); background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: var(--radius-pill); padding: 4px 9px; cursor: pointer;
}
.m3d-views button:hover, .m3d-views button:focus-visible { border-color: var(--border-accent); color: var(--accent); }
.m3d-views .m3d-arms { margin-left: 6px; }
.m3d-views .m3d-arms.on { color: var(--accent); border-color: var(--border-accent); }
.m3d-hint {
  position: absolute; right: 10px; bottom: 8px; pointer-events: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
  transition: opacity var(--dur-fast) var(--ease-snap);
}
.m3d.m3d-used .m3d-hint, .m3d:not(.m3d-on) .m3d-views, .m3d:not(.m3d-on) .m3d-hint { opacity: 0; }
.m3d-msg { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; color: var(--fg-3); font-size: var(--fs-body-sm); }
.m3d.m3d-off .m3d-msg { display: flex; }
@media (max-width: 560px) { .m3d { aspect-ratio: 4 / 3; } }
.m3d-note { margin-top: 6px !important; font-size: var(--fs-body-sm) !important; color: var(--fg-3) !important; }
