/* Police Geist hébergée par le site (fichiers de Google Fonts, licence SIL OFL : fonts/OFL.txt).
   Un seul fichier « variable » par alphabet couvre toutes les graisses (400 à 800) ; le navigateur
   ne télécharge que les alphabets présents dans la page (unicode-range). Le latin est préchargé
   par l'en-tête de chaque page (src/pages.js). */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/geist-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/geist-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* En attendant Geist : Arial ajustée à ses proportions (valeurs de next/font), pour que le
   changement de police ne décale pas la page (CLS). */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial");
  ascent-override: 95.94%;
  descent-override: 28.16%;
  line-gap-override: 0%;
  size-adjust: 104.76%;
}

/*
 * Armory WoW Forever — direction artistique inspirée du site WoW Forever :
 * océan profond, bandeaux étoilés bordés de sable, parchemin, cadres à volutes, boutons jade.
 */
:root {
  --ink: #04121c;
  --ocean-1: #062a40;
  --ocean-2: #063149;
  --ocean-3: #0a5a80;
  --ocean-4: #017caa;
  --glow: #5fd0e0;

  --sand: #c6af8d;
  --sand-2: #a8906a;
  --parch-1: #f3eee2;
  --parch-2: #e2c2ab;
  --leather: #6a5634;

  --ivory: #efe3c8;
  --ivory-2: #d8c6a2;
  --text: #e8edf0;
  --muted: #a8bccb;
  --ink-text: #2b2114;

  --jade: #2e8474;
  --jade-2: #226a5e;
  --royal: #1f5f86;
  --royal-2: #174a6a;

  --q-poor: #9d9d9d; --q-common: #fff; --q-uncommon: #1eff00;
  --q-rare: #3b95ff; --q-epic: #b65cf5; --q-legendary: #ff8000;

  --modern: "Geist", "Geist Fallback", "Segoe UI", system-ui, sans-serif;

  /* Grain (SVG feTurbulence) : donne du relief aux aplats */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); background: var(--ink);
  font: 15px/1.6 var(--modern); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1200px; }

/* ---------- Typographie ---------- */

.eyebrow {
  margin: 0 0 8px; font: 600 13px/1.2 var(--modern); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ivory);
}
.title {
  margin: 0; font: 800 clamp(30px, 4.4vw, 52px)/1.05 var(--modern); letter-spacing: -.035em;
  color: #f6eedc; text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}
.title.sm { font-size: clamp(24px, 3vw, 34px); }
.lead { color: #d9e2e8; font-size: 16px; max-width: 58ch; }

.divider {
  display: block; width: 220px; height: 22px; margin: 14px 0 18px; color: var(--sand);
  background: currentColor;
  -webkit-mask: url("svg/divider.svg") center / contain no-repeat;
  mask: url("svg/divider.svg") center / contain no-repeat;
}
.center .divider, .divider.center { margin-left: auto; margin-right: auto; }

/* ---------- Surfaces texturées ---------- */

.band { position: relative; padding: 72px 0; isolation: isolate; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grain); mix-blend-mode: overlay; pointer-events: none; }

.band-ocean { background: linear-gradient(180deg, var(--ocean-2) 0%, #04577c 60%, var(--ocean-4) 100%); }
.band-deep { background: radial-gradient(ellipse 60% 70% at 50% 40%, #0d557a 0%, #083956 45%, #051f33 100%); }
.band-paper {
  background: var(--leather) var(--paper-img, none) center top / 100% auto repeat-y;
  box-shadow: inset 0 18px 30px -18px rgba(0,0,0,.5), inset 0 -18px 30px -18px rgba(0,0,0,.45);
}
.band-starry {
  background: #0d4f69 var(--starry-img, none) center / cover no-repeat;
  border-top: 10px solid var(--sand); border-bottom: 10px solid var(--sand);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.08), inset 0 -3px 0 rgba(0,0,0,.25);
  padding: 34px 0;
}

/* ---------- Cadre à volutes (médias, scènes) ---------- */

.framed {
  position: relative; border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    inset 0 0 0 7px rgba(4, 18, 28, .55),
    inset 0 0 0 8px rgba(239, 227, 200, .75),
    0 18px 40px rgba(0,0,0,.45);
}
.framed > .corner {
  position: absolute; width: 46px; height: 46px; z-index: 3; pointer-events: none;
  background: url("svg/corner.svg") center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.6));
}
.framed > .corner.tl { top: 2px; left: 2px; }
.framed > .corner.tr { top: 2px; right: 2px; transform: scaleX(-1); }
.framed > .corner.bl { bottom: 2px; left: 2px; transform: scaleY(-1); }
.framed > .corner.br { bottom: 2px; right: 2px; transform: scale(-1, -1); }

/* ---------- Navigation (barre flottante façon site officiel) ---------- */

/* min-height : la barre est dessinée par le script après chargement ; sa place est réservée d'avance
   pour que le contenu ne soit pas poussé vers le bas à son arrivée (CLS) */
header.top { position: sticky; top: 0; z-index: 50; padding: 12px 12px 0; min-height: 74px; }
header.top .bar {
  display: flex; align-items: center; gap: 20px; height: 62px; padding: 0 10px 0 6px;
  background: linear-gradient(180deg, rgba(20, 46, 60, .96), rgba(12, 32, 44, .96));
  border: 1px solid rgba(198, 175, 141, .25); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 50px; height: 50px; margin: -6px 0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.brand b { font: 700 20px/1 var(--modern); color: var(--ivory); letter-spacing: -.02em; }
.brand b span { color: var(--glow); }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { font: 600 15px/1 var(--modern); color: #dfe8ec; letter-spacing: .01em; white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.bar .spacer { flex: 1; }
.pill {
  font: 600 12px/1 var(--modern); letter-spacing: .06em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 6px; color: var(--ivory);
  border: 1px solid rgba(198, 175, 141, .45); background: rgba(0,0,0,.2);
}
.pill.mock { color: #ffd27a; border-color: #ffd27a; }

/* Menu des langues */
.lang-menu { position: relative; }
.lang-menu summary {
  display: flex; align-items: center; gap: 7px; list-style: none; cursor: pointer; user-select: none;
  font: 700 13px/1 var(--modern); letter-spacing: .04em; color: var(--ivory);
  padding: 9px 11px; border-radius: 8px; background: rgba(0,0,0,.25); border: 1px solid rgba(198, 175, 141, .3);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after {
  content: ""; width: 6px; height: 6px; margin: -3px 1px 0 2px; border: solid currentColor; border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg); opacity: .7; transition: transform .15s ease;
}
.lang-menu[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--sand); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; z-index: 60;
  background: linear-gradient(180deg, #16303f, #0d2230); border: 1px solid rgba(198, 175, 141, .35); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.lang-list p { margin: 4px 10px 6px; font: 700 11px/1 var(--modern); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lang-list a {
  display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 6px;
  font: 500 14px/1.2 var(--modern); color: #dce6ec;
}
.lang-list a:hover { background: rgba(95, 208, 224, .1); color: #fff; }
.lang-list a[aria-current="true"] { color: var(--ivory); font-weight: 700; }
.lang-list a[aria-current="true"]::after { content: "✓"; color: var(--glow); }

/* Menu des pages (petits écrans) : trois traits, croix une fois ouvert */
.nav-menu { position: relative; display: none; margin-left: -10px; }
.nav-menu summary {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 36px;
  list-style: none; cursor: pointer; user-select: none; color: var(--ivory);
  border-radius: 8px; background: rgba(0,0,0,.25); border: 1px solid rgba(198, 175, 141, .3);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover, .nav-menu[open] summary { border-color: var(--sand); }
.nav-menu .b-close, .nav-menu[open] .b-open { display: none; }
.nav-menu[open] .b-close { display: inline; }
.nav-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px; z-index: 60;
  background: linear-gradient(180deg, #16303f, #0d2230); border: 1px solid rgba(198, 175, 141, .35); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.nav-list a { display: block; padding: 12px; border-radius: 6px; font: 600 15px/1.2 var(--modern); color: #dce6ec; }
.nav-list a:hover { background: rgba(95, 208, 224, .1); color: #fff; }
@media (max-width: 1160px) { /* en dessous, les liens ne tiennent plus sur une ligne (es/pt : ~1120 px) */
  .nav-links, .pill.flavor { display: none; }
  .nav-menu { display: block; }
}

/* ---------- Boutons ---------- */

.btn, form.search button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--modern); color: #fff; cursor: pointer; letter-spacing: .01em;
  padding: 14px 22px; border-radius: 3px; border: 0;
  background: linear-gradient(180deg, #3a9888, var(--jade) 50%, var(--jade-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.25), 0 4px 12px rgba(0,0,0,.3);
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover, form.search button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn.royal { background: linear-gradient(180deg, #2a78a6, var(--royal) 50%, var(--royal-2)); }
.btn.ghost {
  background: rgba(0,0,0,.25); color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(239, 227, 200, .5);
}

/* ---------- Formulaire de recherche ---------- */

form.search { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
form.search input, form.search select, .filters select {
  font: 15px/1.2 var(--modern); color: var(--text);
  background: rgba(3, 16, 26, .7); border: 1px solid rgba(198, 175, 141, .35); border-radius: 3px;
  padding: 13px 14px; box-shadow: inset 0 2px 6px rgba(0,0,0,.4);
}
form.search input { flex: 1 1 240px; min-width: 0; }
form.search input::placeholder { color: #8ea3b3; }
form.search input:focus, form.search select:focus, .filters select:focus {
  outline: none; border-color: var(--sand); box-shadow: inset 0 2px 6px rgba(0,0,0,.4), 0 0 0 3px rgba(198,175,141,.25);
}

form.search select option, form.search select optgroup { color: var(--text); background: #0a1a26; }

/* ---------- Message en haut de page : ouverture de l'armurerie WoW Forever ---------- */

.notice {
  width: fit-content; max-width: 100%; margin: 0 auto;
  padding: 8px 14px; border-radius: 10px; font: 500 13.5px/1.45 var(--modern); color: #e3eef0; text-align: center;
  background: rgba(3, 20, 32, .6); border: 1px solid rgba(95, 208, 224, .3); backdrop-filter: blur(4px);
}
.notice::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; vertical-align: 1px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 0 4px rgba(95, 208, 224, .18);
}
.notice b { color: #fff; font-weight: 700; }
.notice-bar { padding-top: 16px; }

/* ---------- Tags de serveur (couleur selon le type : JcE, JcJ, JdR…) ---------- */

.tag { font: 600 11px/1 var(--modern); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 2px; border: 1px solid; vertical-align: 2px; white-space: nowrap; }
.tag.normal { color: #8fe3d2; border-color: #8fe3d266; background: rgba(46,132,116,.15); }
.tag.pvp { color: #ffd27a; border-color: #ffd27a66; background: rgba(255,210,122,.08); }
.tag.rp, .tag.pvp_rp { color: #d4b8ff; border-color: #d4b8ff66; background: rgba(212,184,255,.08); }
.tag.hardcore { color: #ff9a8f; border-color: #ff9a8f66; background: rgba(255,154,143,.08); }

.q-POOR { color: var(--q-poor); } .q-COMMON { color: var(--q-common); } .q-UNCOMMON { color: var(--q-uncommon); }
.q-RARE { color: var(--q-rare); } .q-EPIC { color: var(--q-epic); } .q-LEGENDARY { color: var(--q-legendary); }

.empty { color: var(--muted); font-style: italic; }
.error { color: #ff9a8f; }
.panel { background: rgba(4, 18, 28, .6); border: 1px solid rgba(198,175,141,.3); border-radius: 4px; padding: 20px; }

/* ---------- Grille de talents (fiche perso + calculateur) ---------- */

.trees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tree h3 {
  margin: 0 0 12px; padding-bottom: 12px; font: 700 17px/1.2 var(--modern); letter-spacing: -.01em; color: #fff;
  border-bottom: 1px solid rgba(239, 227, 200, .14); display: flex; justify-content: space-between; align-items: baseline;
}
.tree h3 span { font: 800 22px/1 var(--modern); letter-spacing: -.03em; color: #ffe2a6; font-variant-numeric: tabular-nums; }

.trees.grids .tree {
  display: flex; flex-direction: column; align-items: center; padding: 20px 18px 26px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)), rgba(3, 20, 32, .45);
  border: 1px solid rgba(239, 227, 200, .12); box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.trees.grids .tree h3 { width: 100%; }
.grid { position: relative; margin-top: 8px; }
.grid .tal {
  position: absolute; width: calc(var(--cell) * .72); height: calc(var(--cell) * .72); margin: calc(var(--cell) * .14);
  padding: 2px; border-radius: 4px; z-index: 1;
  background: linear-gradient(145deg, #8a7250, #3a2b16);
  box-shadow: 0 0 0 1px #0d0904, 0 3px 6px rgba(0,0,0,.45);
}
.grid .tal img { width: 100%; height: 100%; display: block; border-radius: 2px; }
.grid .tal.off img { filter: grayscale(1) brightness(.45); }
.grid .tal.part { background: linear-gradient(145deg, #7dff6a, #1c8a10); box-shadow: 0 0 0 1px #000, 0 0 8px rgba(30,255,0,.35); }
.grid .tal.max { background: linear-gradient(145deg, #f7e2ad, #b08a4a 45%, #6f4f27); box-shadow: 0 0 0 1px #000, 0 0 10px rgba(247,226,173,.45); }
.grid .tal:hover { transform: scale(1.1); z-index: 2; }
.grid .tal .rk {
  position: absolute; right: -7px; bottom: -7px; padding: 2px 4px; border-radius: 3px;
  font: 700 10px/1 var(--modern); background: #06141d; border: 1px solid #6f4f27; box-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.grid .tal.part .rk { color: #5fe07a; }
.grid .tal.max .rk { color: #ffe2a6; }
.grid .link { position: absolute; background: rgba(168, 188, 203, .25); border-radius: 1px; z-index: 0; }
.grid .link.on { background: linear-gradient(180deg, #f7e2ad, #c29a5c); box-shadow: 0 0 5px rgba(247,226,173,.5); }
/* Talent disponible (calculateur) : icône en couleur, pas encore de point */
.grid .tal.avail { background: linear-gradient(145deg, #3fa590, #1f6457); box-shadow: 0 0 0 1px #000, 0 0 6px rgba(63,165,144,.35); }
.grid .tal.avail .rk { color: #bfe9df; border-color: #1f6457; }
.grid .tal .rk:empty { display: none; }
@media (max-width: 760px) { .trees { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pied de page ---------- */

footer.site {
  background: #03101a; border-top: 1px solid rgba(198,175,141,.2); padding: 36px 0 44px; color: #8ea3b3; font-size: 13px;
}
footer.site .wrap { display: flex; gap: 20px; align-items: flex-start; }
footer.site img { width: 44px; flex: none; opacity: .9; }
footer.site p { margin: 0 0 6px; max-width: 80ch; }
footer.site b { color: var(--ivory); font-weight: 600; }

@media (max-width: 760px) {
  .band { padding: 52px 0; }
  .brand b { font-size: 19px; }
  header.top { padding: 8px 8px 0; min-height: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
