/* ==========================================================================
   Bonobros - site vitrine
   --------------------------------------------------------------------------
   Direction : le plateau.

   - Aucun coin arrondi. Les plaques sont CHANFREINEES (clip-path), comme les
     panneaux de sorts et le cadre du bouton JOUER dans le HUD du jeu.
   - La page alterne des bandes ENCRE et des bandes PIERRE, comme les cases du
     damier. Chaque bande redefinit ses jetons de couleur, donc un composant
     s'adapte sans avoir de variante.
   - Les equerres de coin remplacent les contours complets sur les elements
     secondaires : c'est le cadre a ticks du jeu, et ca evite la carte bordee
     partout.
   - Typographie : Kanit + Saira Semi Condensed, le couple de polices que le
     jeu utilise deja (Assets/Assets-2D/Fonts/).
   ========================================================================== */

:root {
  /* Bande ENCRE (par defaut) --------------------------------------------- */
  --ground:    #080d19;   /* fond de page */
  --surface:   #101a30;   /* plaques */
  --surface-2: #16233f;   /* plaques survolees / creusees */
  --rule:      #24344f;   /* filets */
  --text:      #eef1f6;
  --muted:     #93a1b8;   /* neutre legerement froid, accorde a l'encre */
  --dim:       #5d6b83;

  /* Accents, communs aux deux bandes ------------------------------------- */
  --gold:      #e0a53a;
  --gold-lit:  #f5c765;
  --arcane:    #4fd0ff;
  --jade:      #2f7d70;
  --blood:     #b8323f;
  --on-gold:   #14100a;   /* texte pose sur l'or */

  /* Geometrie ------------------------------------------------------------ */
  --cut:       14px;      /* profondeur du chanfrein des plaques */
  --cut-sm:    9px;       /* idem, boutons et petits elements */
  --maxw:      1180px;

  --display:   "Kanit", "Trebuchet MS", system-ui, sans-serif;
  --body:      "Saira Semi Condensed", "Roboto Condensed", "Segoe UI", sans-serif;
}

/* Bande PIERRE : la case claire du damier. Seuls les jetons changent. */
.band-stone {
  --ground:    #ded8c8;
  --surface:   #e9e4d7;
  --surface-2: #d3ccb9;
  --rule:      #b9b09a;
  --text:      #141a26;
  --muted:     #565f6f;   /* neutre legerement chaud, accorde a la pierre */
  --dim:       #7d8494;
  --gold:      #9a6b12;   /* l'or clair est illisible sur la pierre */
  --gold-lit:  #7d560c;
  --arcane:    #106b8e;
}

/* Le chanfrein : coin haut-gauche et coin bas-droit coupes. Utilise partout,
   d'ou une variable de forme plutot qu'une repetition du polygone. */
.cut,
.card,
.plate,
.status-card,
.lang-menu,
.tag-chip {
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut)
  );
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--arcane); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.16rem; font-weight: 600; }
p  { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

/* Etiquette de section : un losange isometrique, pas une capitale doree isolee. */
.label {
  display: flex;
  align-items: center;
  gap: .7em;
  margin-bottom: 1em;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label::before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.lead  { font-size: 1.12rem; color: var(--muted); }
.muted { color: var(--muted); }

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .82em 1.7em;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  background: none;
  transition: background .14s linear, color .14s linear;
}

/* Plaque d'or pleine, coin coupe. Pas de degrade, pas de halo. */
.btn-primary {
  background: var(--gold);
  color: var(--on-gold);
  clip-path: polygon(
    var(--cut-sm) 0, 100% 0,
    100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%,
    0 100%, 0 var(--cut-sm)
  );
}
.btn-primary:hover { background: var(--gold-lit); color: var(--on-gold); }

/* Equerres de coin plutot qu'un contour : le cadre a ticks du HUD. */
.btn-ghost { color: var(--text); }
.btn-ghost::before,
.btn-ghost::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 1px solid var(--rule);
  transition: border-color .14s linear, width .14s linear, height .14s linear;
}
.btn-ghost::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.btn-ghost::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.btn-ghost:hover { color: var(--text); background: rgba(127, 160, 200, .07); }
.band-stone .btn-ghost:hover { background: rgba(20, 26, 38, .06); }
.btn-ghost:hover::before,
.btn-ghost:hover::after { border-color: var(--gold); width: 19px; height: 19px; }

.btn-sm { padding: .5em 1.05em; font-size: .88rem; }

/* ------------------------------------------------------------- Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 13, 25, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s linear, background .2s linear;
}
.nav.scrolled { background: rgba(8, 13, 25, .96); border-bottom-color: var(--rule); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 66px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 26px;
}
.nav-logo img { height: 26px; width: auto; mix-blend-mode: screen; }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 4px 0;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .16s linear;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

/* Selecteur de langue. Chaque langue est ecrite DANS sa langue, jamais traduite. */
.lang { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: .5em;
  padding: .42em .8em;
  background: none;
  border: 1px solid var(--rule);
  color: var(--text);
  font-family: var(--body);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .14s linear;
}
.lang-btn:hover { border-color: var(--gold); }
.lang-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 158px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--rule);
  --cut: 10px;
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: block;
  width: 100%;
  padding: .5em .75em;
  background: none;
  border: 0;
  color: var(--text);
  font-family: var(--body);
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
}
.lang-menu button:hover { background: var(--surface-2); }
.lang-menu button[aria-current="true"] { color: var(--gold); }

/* ------------------------------------------------------------------- Hero */

.hero {
  position: relative;
  padding: 96px 0 84px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("assets/screenshot-ec3d7b1d.jpg") center/cover no-repeat;
  opacity: .6;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, var(--ground) 6%, rgba(8, 13, 25, .82) 42%, rgba(8, 13, 25, .3) 100%),
    linear-gradient(180deg, rgba(8, 13, 25, .9) 0%, transparent 26%, var(--ground) 98%);
}
.hero .wrap { position: relative; }
.hero-logo {
  width: min(500px, 82vw);
  margin-bottom: 30px;
  mix-blend-mode: screen;
}
.hero h1 { max-width: 17ch; margin-bottom: .5em; }
.hero .lead { max-width: 56ch; margin-bottom: 2.1em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 26px; margin-bottom: 34px; }

/* La mention "gratuit, acces anticipe, Windows..." : une phrase en bas de casse
   sous un filet. Une rangee de jetons en capitales avait l'air cliquable. */
.facts {
  max-width: 62ch;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: .98rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- Sections */

section { padding: 100px 0; background: var(--ground); color: var(--text); }
.section-head { max-width: 660px; margin-bottom: 56px; }

.grid { display: grid; gap: 1px; background: var(--rule); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Les cellules d'une grille ne sont pas des cartes flottantes : elles sont
   separees par un filet d'un pixel, comme les cases d'un plateau. */
.grid > * {
  padding: 30px 28px;
  background: var(--ground);
  transition: background .16s linear;
}
.grid h3 { margin-bottom: .45em; }
.grid p { color: var(--muted); margin-bottom: 0; }

/* Plaque isolee (chanfreinee) : reservee a ce qui doit vraiment se detacher. */
.plate {
  padding: 30px 28px;
  background: var(--surface);
  border-top: 2px solid var(--gold);
}
.plate p:last-child { margin-bottom: 0; }

/* Piste de resolution : les 7 etapes d'un tour, en lignes. La numerotation est
   ici PORTEUSE - c'est un ordre d'execution fixe, pas une decoration - et la
   lecture en lignes tient quel que soit le nombre d'etapes. */
.track { border-top: 1px solid var(--rule); counter-reset: step; }
.track-step {
  display: grid;
  gap: 4px 26px;
  grid-template-columns: 64px 240px 1fr;
  align-items: baseline;
  padding: 17px 0 19px;
  border-bottom: 1px solid var(--rule);
}
.track-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  line-height: 1;
}
.track-step h3 { margin: 0; font-size: 1.02rem; }
.track-step p { margin: 0; font-size: .97rem; color: var(--muted); }

/* Les deux phases d'un tour, cote a cote et opposees. */
.phases { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); background: var(--rule); margin-bottom: 60px; }
.phase { padding: 30px 28px; background: var(--ground); border-top: 2px solid var(--arcane); }
.phase-2 { border-top-color: var(--blood); }
.phase .tag { font-size: .8rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); }
.phase h3 { margin: .3em 0 .5em; font-size: 1.4rem; }
.phase p { color: var(--muted); margin: 0; }

/* Index des classes : une page de regles, pas neuf cartes identiques. */
.index { border-top: 1px solid var(--rule); }
.index-row {
  display: grid;
  gap: 4px 30px;
  grid-template-columns: 190px 1fr;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
}
.index-row dt {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text);
}
/* La classe du champion, sous son nom : c'est une donnee du jeu, pas un ornement. */
.index-row dt em {
  display: block;
  margin-top: 1px;
  font-family: var(--body);
  font-size: .78rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--gold);
}
.index-row dd { margin: 0; color: var(--muted); }

/* Bloc image + texte */
.split { display: grid; gap: 50px; align-items: center; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.split img { border: 1px solid var(--rule); }

/* Les 3 paliers d'evolution : une echelle, donc une lecture horizontale. */
.tiers { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); background: var(--rule); border: 1px solid var(--rule); margin-top: 30px; }
.tier { padding: 22px 24px; background: var(--ground); }
.tier .stars { font-size: 1.15rem; letter-spacing: .18em; margin-bottom: .35em; }
.tier-1 .stars { color: #b07a3c; }
.tier-2 .stars { color: #9fadc2; }
.tier-3 .stars { color: var(--gold); }
.band-stone .tier-2 .stars { color: #6a7484; }
.tier strong { display: block; font-family: var(--display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .95rem; }
.tier span { font-size: .95rem; color: var(--muted); }

/* Galerie */
.gallery { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); background: var(--rule); border: 1px solid var(--rule); }
.gallery img:last-child { grid-column: span 2; aspect-ratio: auto; height: 100%; }
.gallery img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  cursor: zoom-in;
  filter: saturate(.9);
  transition: filter .18s linear, opacity .18s linear;
}
.gallery img:hover { filter: saturate(1.1); opacity: .88; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(4, 7, 14, .95);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; max-width: 100%; width: auto; border: 1px solid var(--rule); }

/* Acces anticipe : trois questions en texte courant, pas un tableau. */
.qa { max-width: 62ch; margin: 0; }
.qa dt { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--gold); }
.qa dd { margin: .2em 0 1.3em; color: var(--muted); }
.qa dd:last-child { margin-bottom: 0; }

/* Bandeau final : la seule zone or pleine de la page. */
.cta-band { padding: 80px 0; background: var(--gold); color: var(--on-gold); }
.cta-band h2 { max-width: 18ch; }
.cta-band p { max-width: 54ch; color: rgba(20, 16, 10, .78); font-size: 1.1rem; }
.cta-band .btn-row { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; }
.cta-band .btn-primary { background: var(--on-gold); color: var(--gold-lit); }
.cta-band .btn-primary:hover { background: #000; color: var(--gold-lit); }
.cta-band .btn-ghost { color: var(--on-gold); }
.cta-band .btn-ghost::before,
.cta-band .btn-ghost::after { border-color: rgba(20, 16, 10, .45); }
.cta-band .btn-ghost:hover { background: rgba(20, 16, 10, .08); }
.cta-band .btn-ghost:hover::before,
.cta-band .btn-ghost:hover::after { border-color: var(--on-gold); }

/* ----------------------------------------------------------------- Footer */

footer { padding: 58px 0 44px; background: var(--ground); color: var(--text); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 34px; justify-content: space-between; align-items: flex-start; }
.footer-inner img { height: 24px; margin-bottom: 12px; mix-blend-mode: screen; }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-links a { color: var(--muted); font-size: .96rem; }
.footer-links a:hover { color: var(--text); }
.footer-legal { width: 100%; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: .86rem; color: var(--dim); }

/* ------------------------------------------- Pages retour de paiement /buy */

.status-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 44px 22px;
  position: relative;
  background: var(--ground);
}
.status-page .hero-bg { opacity: .3; }
.status-card {
  position: relative;
  width: min(540px, 100%);
  padding: 46px 42px 40px;
  text-align: center;
  background: var(--surface);
  border-top: 2px solid var(--gold);
  --cut: 18px;
}
.status-card > img.mark { height: 30px; margin: 0 auto 30px; mix-blend-mode: screen; }
.status-card h1 { font-size: 1.85rem; margin-bottom: .45em; }
.status-card p { color: var(--muted); margin-left: auto; margin-right: auto; }

/* Le losange isometrique du plateau, pas un rond a degrade. */
.status-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  font-size: 1.5rem;
}
.status-icon span { transform: rotate(-45deg); }
.status-ok { background: var(--gold); color: var(--on-gold); }
.status-neutral { border: 1px solid var(--rule); color: var(--dim); }

/* Le montant : un jeton chanfreine, chiffres a chasse fixe. */
.tag-chip {
  display: inline-block;
  margin: 4px 0 22px;
  padding: .38em 1.2em;
  background: var(--ground);
  border: 1px solid var(--gold);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
  color: var(--gold);
  --cut: 10px;
}
.tag-chip[hidden] { display: none; }

.status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 6px; }
.status-note { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: .89rem; color: var(--dim); }
.status-page .lang { position: fixed; top: 22px; right: 22px; z-index: 10; }

/* ---------------------------------------------------------------- Mobile  */

@media (max-width: 980px) {
  .track-step { grid-template-columns: 52px 1fr; }
  .track-step p { grid-column: 2; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img:last-child { grid-column: span 2; aspect-ratio: 16 / 9; height: auto; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  section { padding: 72px 0; }
  .hero { padding: 72px 0 62px; }
  .index-row { grid-template-columns: 1fr; }
  .grid-3, .grid-2, .phases, .tiers, .gallery { grid-template-columns: 1fr; }
  .gallery img, .gallery img:last-child { grid-column: auto; aspect-ratio: 16 / 9; height: auto; }
  .cta-band { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ======================================================= Page des champions
   Meme systeme que le reste du site (chanfrein, filets, Kanit + Saira). La
   fiche reprend la lecture du menu Collection du jeu : le splash a gauche, les
   chiffres et les capacites a droite. */

.ch-head { padding: 74px 0 46px; background: var(--ground); }
.ch-head h1 { margin-bottom: .35em; }

/* Le rail de selection colle sous la barre de nav : on change de champion sans
   remonter, ce qui est tout l'interet d'une page de collection. */
.ch-rail {
  position: sticky;
  top: 66px;
  z-index: 40;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 0;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.ch-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 13px 4px 12px;
  background: var(--ground);
  border: 0;
  border-top: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: background .14s linear, color .14s linear, border-color .14s linear;
}
.ch-tab:hover { background: var(--surface); color: var(--text); }
.ch-tab.on { background: var(--surface); color: var(--text); border-top-color: var(--gold); }
.ch-tab-n {
  display: block;
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ch-tab-c {
  display: block;
  margin-top: 1px;
  font-family: var(--body);
  font-size: .74rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
}
.ch-tab.on .ch-tab-c { color: var(--gold); }

.ch-grid { display: grid; gap: 50px; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; margin-top: 48px; }

/* Le splash est detoure : on lui pose un halo et le losange du plateau derriere,
   plutot que de l'enfermer dans un cadre. */
.ch-art {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: start;
  height: 580px;
  overflow: hidden;
}
/* Le decor de la page Collection du jeu : fumee coloree + faisceau. On le
   chanfreine comme le reste et on l'estompe sur les bords pour qu'il ne
   devienne pas une boite posee au milieu de la page. */
.ch-backdrop {
  position: absolute;
  inset: 0;
  background: url("assets/champions/backdrop.jpg") center/cover no-repeat;
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut)
  );
  -webkit-mask-image: radial-gradient(ellipse 78% 82% at 50% 48%, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 82% at 50% 48%, #000 52%, transparent 100%);
  opacity: .8;
}
/* Zoome : l'image remplit la largeur du cadre, quitte a rogner les cotes,
   et depasse du bas pour que les pieds sortent du cadre. */
.ch-art img {
  position: relative;
  margin-top: 8px;
  width: 100%;
  height: 660px;
  object-fit: cover;
  object-position: center top;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55));
}

.ch-file h2 { margin-bottom: .12em; font-size: clamp(2rem, 4vw, 2.9rem); }
.ch-class {
  margin-bottom: 14px;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}

.ch-desc { max-width: 58ch; margin-bottom: 30px; color: var(--muted); font-size: 1.06rem; }

/* Quatre chiffres, meme grille a filets que partout ailleurs. */
/* Sorts a gauche, les quatre chiffres en grille 2x2 a droite. */
.ch-body { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
.ch-stats {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, 1fr);
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 33px;   /* aligne le haut de la grille sur le premier sort, sous le libelle */
}
.ch-stat { padding: 18px 16px 16px; background: var(--ground); text-align: center; }
.ch-stat img { width: 30px; height: 30px; margin: 0 auto 8px; object-fit: contain; }
.ch-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}
.ch-stat span {
  display: block;
  margin-top: 3px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ch-stat em { display: block; margin-top: 3px; font-size: .78rem; font-style: normal; color: var(--dim); }

/* Une capacite = un palier d'evolution. Le badge porte le niveau, donc la
   numerotation est une donnee de jeu, pas un ornement. */
.ch-spells { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
/* Lignes compactes : petite typo, marges serrees, pour que trois capacites
   tiennent a cote de la grille des chiffres sans faire descendre la fiche. */
.ch-spell {
  display: grid;
  gap: 14px;
  grid-template-columns: 58px 1fr;
  align-items: start;
  padding: 13px 16px 14px;
  background: var(--ground);
}
/* L'icone du jeu, chanfreinee comme les plaques du site. */
.ch-spell-icon {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--rule);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.lvl2 .ch-spell-icon { border-color: #9fadc2; }
.lvl3 .ch-spell-icon { border-color: var(--gold); }
.ch-lvl { text-align: center; padding-top: 2px; }
.ch-lvl b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 5px auto 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--muted);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.ch-lvl i {
  display: block;
  font-style: normal;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.lvl2 .ch-lvl b { border-color: #9fadc2; color: #cfd8e8; }
.lvl2 .ch-lvl i { color: #9fadc2; }
.lvl3 .ch-lvl b { border-color: var(--gold); color: var(--gold); }
.lvl3 .ch-lvl i { color: var(--gold); }

.ch-spell h3 { margin-bottom: .1em; font-size: 1rem; }
.ch-meta {
  margin-bottom: .4em;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--arcane);
}
.ch-spell p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

.ch-note { margin-top: 26px; font-size: .88rem; color: var(--dim); }

/* Lien vers la page depuis la liste de la page d'accueil. */
.ch-cta { margin-top: 30px; }

@media (max-width: 980px) {
  .ch-grid { grid-template-columns: 1fr; gap: 34px; }
  .ch-art { height: 440px; }
  .ch-art img { height: 500px; }
  .ch-body { grid-template-columns: 1fr; }
  .ch-stats { margin-top: 0; }
}
@media (max-width: 620px) {
  .ch-rail { top: 66px; }
  .ch-tab { flex-basis: 33%; }
  .ch-spell { grid-template-columns: 56px 1fr; gap: 14px; }
  .ch-spell-icon { width: 56px; height: 56px; }
}

/* ------------------------------------------ Galerie de cosmetiques (roi) */

.cos { margin-top: 56px; display: grid; gap: 34px; min-width: 0; }
.cos-row { min-width: 0; }
.cos-row .label { margin-bottom: .7em; }
.cos-strip {
  display: flex;
  gap: 1px;
  width: max-content;      /* la bande s'arrete a la derniere tuile... */
  max-width: 100%;         /* ...et defile quand il y en a trop */
  overflow-x: auto;
  background: var(--rule);
  border: 1px solid var(--rule);
  scrollbar-width: thin;
}
.cos-tile {
  flex: none;
  margin: 0;
  background: var(--ground);
  display: grid;
  justify-items: center;
  align-content: start;
}
.cos-tile img { display: block; }

/* Bateaux et viewos : les icones du jeu, deja cadrees. */
.cos-boats .cos-tile img,
.cos-viewos .cos-tile img { width: 118px; height: 118px; object-fit: cover; }

/* Rois : silhouettes detourees sur le decor bleu de la Collection. */
.cos-kings .cos-tile {
  width: 200px;
  padding: 0 0 12px;
  background: url("assets/champions/backdrop.jpg") center 30% / cover no-repeat, var(--ground);
}
.cos-kings .cos-tile img { height: 220px; width: auto; margin-top: 10px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55)); }
.cos-tile figcaption {
  margin-top: 8px;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #eef1f6;          /* toujours sur le decor bleu, quelle que soit la bande */
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}
@media (max-width: 620px) {
  .cos-kings .cos-tile { width: 150px; }
  .cos-kings .cos-tile img { height: 160px; }
  .cos-boats .cos-tile img, .cos-viewos .cos-tile img { width: 92px; height: 92px; }
}

/* -------------------------------------------------- Top 10 du classement */

.lb .lead { margin-bottom: 22px; }
.lb-table { max-width: 640px; border-top: 1px solid var(--rule); }
.lb-row {
  display: grid;
  grid-template-columns: 44px 1fr 90px 90px;
  gap: 12px;
  align-items: baseline;
  padding: 9px 4px;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.lb-row b { font-family: var(--display); font-weight: 600; color: var(--gold); }
.lb-row span { font-family: var(--display); font-weight: 600; }
.lb-row em, .lb-row i { font-style: normal; text-align: right; color: var(--muted); }
.lb-row em { color: var(--text); }
.lb-row:nth-child(2) b, .lb-row:nth-child(2) span { font-size: 1.15rem; }   /* le premier */
.lb-head { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.lb-head b, .lb-head span, .lb-head em { font-family: var(--body); font-weight: 600; font-size: .72rem; color: var(--dim); }
.lb-note { margin-top: 10px; font-size: .88rem; }

/* ------------------------------------------------------------ La carte */

.h2-like { font-size: clamp(1.5rem, 2.8vw, 2rem); }

.map { position: relative; border: 1px solid var(--rule); }
.map-stage { position: relative; }
.map img { display: block; width: 100%; }
.map-pin {
  position: absolute;
  transform: translate(-50%, -230%);   /* l'etiquette flotte au-dessus du batiment, pas dessus */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  background: rgba(8, 13, 25, .82);
  border: 1px solid rgba(240, 184, 60, .55);
  color: #eef1f6;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background .14s linear, border-color .14s linear;
}
.map-pin i { width: 9px; height: 9px; background: #e0a53a; transform: rotate(45deg); flex: none; }
.map-pin:hover, .map-pin.on { background: #e0a53a; color: #14100a; border-color: #e0a53a; }
.map-pin.on i { background: #14100a; }

/* La fiche d'un batiment, posee sur la carte a cote de son repere. */
.map-card {
  position: absolute;
  z-index: 3;
  width: min(300px, 46%);
  margin: 0;
  padding: 14px 16px 15px;
  background: rgba(8, 13, 25, .94);
  border-top: 2px solid #e0a53a;
  color: #eef1f6;
  pointer-events: none;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.map-card h3 { margin-bottom: .2em; font-size: 1rem; }
.map-card p { margin: 0; font-size: .9rem; line-height: 1.45; color: #b6c0d6; }

@media (max-width: 720px) {
  .map-pin span { display: none; }          /* sur mobile : le losange seul */
  .map-pin { padding: 8px; transform: translate(-50%, -110%); }   /* juste au-dessus, la carte est petite */
  /* Sur mobile la fiche sort de l'ecran : elle passe SOUS la carte, en pleine
     largeur. Les left/top poses par le script sont neutralises. */
  .map-card {
    position: static !important;
    width: 100%;
    margin: 26px 0 0;
    padding: 14px 16px 16px;
    font-size: .9rem;
    clip-path: none;
  }
}

/* Les trois niveaux sous "Evoluer" : trois plaques cote a cote, les etoiles en or. */
.tiers-inline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.tiers-inline li { display: grid; gap: 4px; padding: 14px 14px 15px; background: var(--ground); border-top: 2px solid transparent; }
.tiers-inline li.tier-1 { border-top-color: var(--dim); }
.tiers-inline li.tier-2 { border-top-color: var(--muted); }
.tiers-inline li.tier-3 { border-top-color: var(--gold); }
.tiers-inline b { font-size: 1.05rem; letter-spacing: .12em; color: var(--gold); font-weight: 400; line-height: 1; }
.tiers-inline strong { font-family: var(--display); font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.tiers-inline span { font-size: .88rem; line-height: 1.35; color: var(--muted); }
@media (max-width: 620px) { .tiers-inline { grid-template-columns: 1fr; } }

/* Competitif : le texte a gauche, le top 10 a droite. */
.comp-grid { display: grid; gap: 50px; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); align-items: start; }
.comp-grid .lb .label { margin-top: 0; }
@media (max-width: 900px) { .comp-grid { grid-template-columns: 1fr; } }

/* L'accroche au-dessus du titre du hero. */
.hero-kicker { margin-bottom: .6em; color: var(--gold); }

/* Titre force sur une ligne (la tete de section est limitee a 640 px). */
.section-head .h2-oneline { max-width: none; text-wrap: nowrap; }
@media (max-width: 760px) { .section-head .h2-oneline { text-wrap: balance; } }

/* ------------------------------------------------ Mobile vertical : nav */
@media (max-width: 480px) {
  .nav-inner { gap: 10px; padding: 0 14px; height: 60px; }
  .nav-logo img { height: 22px; }
  .nav-actions { gap: 8px; margin-left: auto; }
  .lang-btn { padding: .35em .6em; font-size: .8rem; }
  .nav .btn-sm { display: none; }   /* le hero a le meme bouton, en or, juste dessous */
  .hero { padding: 48px 0 44px; }
  .hero-logo { width: min(320px, 78vw); margin-bottom: 20px; }
  h1 { font-size: 1.85rem; }
  .hero .lead { font-size: 1rem; }
  .btn { padding: .78em 1.2em; font-size: .92rem; }
  .hero-cta { gap: 18px; }
  section { padding: 56px 0; }
  .track-step { grid-template-columns: 40px 1fr; gap: 2px 14px; }
  .track-step::before { font-size: 1.2rem; }
  .ch-art { height: 360px; }
  .ch-art img { height: 420px; }
  .ch-file h2 { font-size: 1.8rem; }
  .cos-kings .cos-tile { width: 132px; }
  .cos-kings .cos-tile img { height: 140px; }
  .lb-row { grid-template-columns: 30px 1fr 64px 60px; gap: 8px; }
  .cta-band { padding: 52px 0; }
  .footer-inner { gap: 22px; }
}

/* --------------------------------------------- Modale (launcher hors Windows) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 14, .82);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(460px, 100%);
  padding: 28px 28px 26px;
  background: #101a30;
  border-top: 2px solid #e0a53a;
  color: #eef1f6;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.modal-card h3 { margin-bottom: .4em; }
.modal-card p { color: #b6c0d6; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }
