/* ============================================================
   BFC ARENA — direction artistique : NOIR MAT CHAUD + LAITON

   Trois règles, et tout le reste en découle :
   1. La séparation vient des PALIERS de surface (bg → surface → raised →
      hover), jamais d'une bordure. Une bordure ne sert qu'à rattraper deux
      surfaces de même valeur.
   2. L'accent (laiton mat) est RARE : actions principales et état actif.
      Dès qu'il décore, il crie. Aucun halo, aucune lueur — c'est ce qui
      faisait « néon » dans la version précédente.
   3. Aucune valeur en dur hors du bloc de tokens ci-dessous. Couleur,
      taille, espacement, rayon, ombre, durée : tout passe par une variable.
   ============================================================ */
:root {
  /* ============================================================
     TOKENS — la SEULE source des valeurs visuelles.
     Règle : aucune couleur, taille, rayon ni durée en dur ailleurs.
     ------------------------------------------------------------
     Direction : NOIR MAT CHAUD + LAITON. Les gris tirent légèrement vers le
     rouge/jaune (R > G > B) au lieu du bleu : c'est ce qui distingue un noir
     « produit » d'un noir « terminal ». L'accent est un laiton MAT, pas un
     jaune vif — l'ancien #EFBF04 (saturation 97 %) criait à côté des références.
     ============================================================ */

  /* Largeur de la sidebar. Repliée, elle devient un rail : le contenu suit
     tout seul, car le padding gauche du body lit la MÊME variable. */
  --side-w: 220px;

  /* ---- Rampe de gris CHAUDS (du plus profond au plus clair) ---- */
  --bg-2:        #070605;
  --bg:          #0b0a09;
  --surface:     #141210;
  --raised:      #1c1918;
  --hover:       #262220;
  /* Les séparations restent des PALIERS de couleur : la bordure est presque
     invisible et ne sert qu'à rattraper deux surfaces de même valeur. */
  --border:      rgba(255,248,238,0.045);
  --border-mid:  rgba(255,248,238,0.10);

  /* ---- Texte (blanc cassé chaud, jamais bleuté) ---- */
  --text:        #ece7e0;
  --dim:         #a49c92;
  --mute:        #6d655c;

  /* ---- Accent unique : LAITON MAT ----
     Réservé aux actions principales et à l'état actif. Jamais décoratif. */
  --accent:      #c9a458;
  --accent-2:    #b08f47;   /* survol / état pressé */
  --accent-ink:  #17130a;   /* texte posé SUR l'accent */
  --accent-soft: rgba(201,164,88,0.10);
  --accent-line: rgba(201,164,88,0.32);
  --accent-glow: transparent;   /* pas de halo : c'est ce qui fait « néon » */

  /* ---- Monnaie ---- */
  --gold:        #d3ac5c;   /* un peu plus clair que l'accent : c'est un CHIFFRE, il doit se lire */
  --gold-soft:   rgba(211,172,92,0.10);
  --gold-line:   rgba(211,172,92,0.28);

  /* ---- Sémantique (désaturée : un gain ne doit pas fluorescer) ---- */
  --win:         #5f9e79;
  --win-soft:    rgba(95,158,121,0.12);
  --loss:        #bf5a63;
  --loss-soft:   rgba(191,90,99,0.12);
  --info:        #6b8cb8;
  --red:         #bf5a63;
  --pink:        #bf5a63;

  /* ---- Raretés (sourdes : elles se distinguent sans éclairer la page) ---- */
  --r-common:    #8a857d;
  --r-rare:      #6b8cb8;
  --r-epic:      #8e77ae;
  --r-legend:    #c9a458;

  /* ---- Échelle typographique (rapport ~1.25) ---- */
  --fs-xs:   11px;
  --fs-sm:   12px;
  --fs-base: 14px;
  --fs-md:   16px;
  --fs-lg:   20px;
  --fs-xl:   26px;
  --fs-2xl:  34px;
  --fs-3xl:  44px;

  /* ---- Échelle d'espacement (base 4) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* ---- Rayons ---- */
  --radius-xs:   6px;
  --radius-sm:   8px;
  --radius:      10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-pill: 999px;

  /* ---- Élévation : 3 niveaux, pas plus. Une ombre = une distance au fond. ---- */
  --shadow-1:  0 1px 2px rgba(0,0,0,0.35);
  --shadow-2:  0 4px 14px rgba(0,0,0,0.42);
  --shadow-3:  0 14px 36px rgba(0,0,0,0.52);
  --shadow:    var(--shadow-2);
  --glow:      none;

  /* ---- MOUVEMENT ----
     3 durées, 3 courbes. ease-out pour tout ce qui APPARAÎT ou répond à un clic
     (départ rapide, arrivée douce) ; ease-spring UNIQUEMENT pour une récompense
     (pièce qui tombe, palier gagné) — jamais sur de la navigation. */
  --dur-1: 120ms;   /* micro-interaction : survol, bascule */
  --dur-2: 200ms;   /* panneau, repli, onglet */
  --dur-3: 320ms;   /* entrée de page, modale */
  --ease-out:    cubic-bezier(.22,.61,.36,1);
  --ease-in-out: cubic-bezier(.65,.05,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t:         var(--dur-1) var(--ease-out);
  --font-display: "Bahnschrift", "Franklin Gothic Medium", "Arial Narrow", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
input { font-family: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* COLONNE DE CONTENU — la gouttiere vient d un padding, PAS d une largeur.
   Avant : width: min(1140px, 92vw, 100%). Des que la sidebar (220 px) et le dock (300 px)
   reduisaient la place, c est `100%` qui gagnait : le contenu touchait les deux bords sur
   TOUTES les pages. Le `92vw` prouvait pourtant que des marges etaient prevues.
   Avec un padding, la gouttiere existe toujours, quelle que soit la largeur restante.
   1204 = 1140 (colonne de texte inchangee) + 2 x 32 de padding : la mise en page large
   ne bouge pas d un pixel, seules les fenetres etroites gagnent leurs marges.
   Reference : stake.com et duel.com centrent tous deux une colonne ~1150 px a gouttieres. */
.wrap { width: 100%; max-width: 1204px; margin: 0 auto; padding-inline: clamp(14px, 2.2vw, 32px); }
.eyebrow { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); font-weight: 600; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.muted { color: var(--dim); }

/* ---------- Boutons (à plat, sobres) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  transition: var(--t); white-space: nowrap; border: 1px solid transparent; color: var(--text);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--raised); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-mid); background: var(--hover); }
.btn-outline { border-color: var(--border-mid); background: transparent; }
.btn-outline:hover { border-color: var(--accent-line); color: var(--accent); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,11,13,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
/* Le wallet etait en position:absolute DANS .nav-right : hors flux, il passait PAR-DESSUS
   les boutons. Mesure du bug a 958 px de large : 169 px de recouvrement, « Deconnexion »
   rogne au bord, « FR » et le son inaccessibles sous le wallet. Il est desormais EN FLUX. */
.nav-inner { display: flex; align-items: center; gap: 16px; height: 60px; position: relative; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; cursor: pointer; letter-spacing: -0.01em; }
.logo .mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.logo small { color: var(--dim); font-weight: 500; }

/* ---------- Sidebar zones (façon Stake) ---------- */
.app-side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); transition: width .18s ease; z-index: 120; background: var(--surface); padding: 12px 10px; display: none; flex-direction: column; gap: 2px; overflow-y: auto; }
.app-side .side-logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; cursor: pointer; letter-spacing: -0.01em; padding: 8px 10px 18px; }
.app-side .side-logo .mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.app-side .side-logo small { color: var(--dim); font-weight: 500; }
.app-side a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--dim); cursor: pointer; transition: var(--t); }
.app-side a:hover { background: var(--raised); color: var(--text); }
.app-side a.active { background: var(--raised); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.app-side .zi { width: 20px; height: 20px; display: grid; place-items: center; flex: none; }
.app-side .side-div { height: 1px; background: rgba(255,255,255,0.05); margin: 10px 8px; }
@media (min-width: 901px) {
  body { padding-left: var(--side-w); transition: padding-left .18s ease; }
  .app-side { display: flex; }
  .nav .logo { display: none; }
}

/* ---------- Sidebar REPLIEE : rail d icones (motif repris de stake.com) ----------
   Seule `--side-w` change ; tout le reste suit. Les libelles sont dans des <span>,
   donc il suffit de les masquer. Le logo, lui, contient un noeud de TEXTE nu (« BFC »)
   qu aucun selecteur n atteint : `font-size: 0` l efface, et on rend sa taille a la pastille. */
body.side-collapsed { --side-w: 64px; }
body.side-collapsed .app-side { padding-inline: 8px; }
body.side-collapsed .app-side a { justify-content: center; padding-inline: 0; gap: 0; }
body.side-collapsed .app-side a > span:not(.zi) { display: none; }
body.side-collapsed .app-side a.active { box-shadow: inset 3px 0 0 var(--accent); }
body.side-collapsed .app-side .side-logo { justify-content: center; padding-inline: 0; gap: 0; font-size: 0; }
body.side-collapsed .app-side .side-logo .mark { font-size: 14px; }
body.side-collapsed .app-side .side-div { margin-inline: 4px; }
/* Le bouton de repli occupe la colonne gauche de la barre, restee vide depuis que le
   logo y est masque au profit de celui de la sidebar. */
.side-toggle { display: none; width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--raised);
  color: var(--dim); font-size: 15px; line-height: 1; cursor: pointer; align-items: center; justify-content: center;
  border: none; flex: none; transition: var(--t); }
.side-toggle:hover { background: var(--hover); color: var(--text); }

/* ---------- ICÔNES (jeu de tracés, cf. public/icons.js) ----------
   Le tracé hérite de `currentColor` : il suit la couleur du texte qui le porte, donc il
   grise avec un libellé inactif et se dore quand l entrée devient active — sans une seule
   règle de couleur ici. C est tout l intérêt par rapport à un emoji, qui garde ses couleurs. */
.ic { display: block; flex: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 0; }
/* Les boutons de la barre mêlent un tracé et un mot (« FR ») : on les aligne proprement. */
.btn > [data-icon] + span, #langToggle > [data-icon] + span { margin-left: 6px; }
#langToggle, .side-toggle, #soundToggle { display: inline-flex; align-items: center; }
.notif-bell { display: inline-flex; align-items: center; justify-content: center; position: relative; }
/* Les titres d'étagère et de zone mêlent un tracé et un mot : on aligne sur la ligne
   de base plutôt que de laisser le SVG pousser la hauteur de ligne. */
.shelf-title, .zone-nav-title { display: inline-flex; align-items: center; gap: var(--sp-2); }
.shelf-ic { display: inline-flex; align-items: center; color: var(--dim); }
.zone-nav-title .ic { color: var(--dim); }
@media (min-width: 901px) { .side-toggle { display: inline-flex; } }
.nav-inner > .side-toggle { grid-column: 1; justify-self: start; }

.nav-right { display: flex; align-items: center; gap: 10px; flex: none; }

/* CENTRAGE STRICT (wallet aligne sur le centre exact de la barre, cf. le theme en §1).
   Il n est possible QUE si chaque cote peut faire la largeur des actions (~370 px), sinon
   la colonne de droite reviendrait mordre sur le centre. Deux seuils, parce que la largeur
   utile ne depend pas que de la fenetre : la sidebar prend 220 px et le dock OUVERT 300 de
   plus. En dessous du seuil, on garde le mode ci-dessus (cote a cote) — rien n est masque. */
@media (min-width: 1360px) {
  body.dock-collapsed .nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  body.dock-collapsed .nav-inner > .logo { grid-column: 1; justify-self: start; }
  body.dock-collapsed .wallet { grid-column: 2; justify-self: center; margin-inline: 0; }
  body.dock-collapsed .nav-right { grid-column: 3; justify-self: end; }
}
@media (min-width: 1660px) {
  .nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav-inner > .logo { grid-column: 1; justify-self: start; }
  .wallet { grid-column: 2; justify-self: center; margin-inline: 0; }
  .nav-right { grid-column: 3; justify-self: end; }
}
/* Wallet façon Stake : solde + bouton Caisse, centré dans la navbar */
.wallet { display: none; margin-inline: auto; align-items: stretch; z-index: 2; min-width: 0; }
.wallet.show { display: flex; }
.wallet .bal { display: flex; align-items: center; gap: 8px; background: var(--bg); padding: 8px 14px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 700; font-size: 14px; color: var(--gold); font-variant-numeric: tabular-nums; }
.wallet .c { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.wallet .buy { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; padding: 8px 15px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; transition: var(--t); }
.wallet .buy:hover { background: var(--accent-2); }
.burger { display: none; color: var(--text); font-size: 22px; }

/* ============================================================
   PAGES
   ============================================================ */
.page { display: none; padding: 46px 0 90px; }
.page.active { display: block; animation: page-in var(--dur-3) var(--ease-out); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; }
.section-head p { color: var(--dim); margin-top: 5px; font-size: 14px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.4vw, 46px); margin: 16px 0; letter-spacing: -0.02em; font-weight: 700; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { font-size: 17px; color: var(--dim); max-width: 520px; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; }
.hero-stats .s b { font-size: 24px; display: block; }
.hero-stats .s span { color: var(--mute); font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.live-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.8s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.vs-match { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; }
.vs-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.vs-team { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vs-team .av { width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-size: 19px; }
.vs-team span { font-size: 12px; font-weight: 600; color: var(--dim); }
.vs-mid { text-align: center; }
.vs-mid .vs { font-weight: 800; color: var(--mute); font-size: 14px; }
.vs-mid .pot { font-size: 12px; color: var(--accent); font-weight: 700; margin-top: 3px; }

/* ============================================================
   CARDS / GRID
   ============================================================ */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: var(--t); }
.card:hover { border-color: var(--border-mid); }

.feature .ic { font-size: 24px; margin-bottom: 10px; }
.feature h3 { font-size: 16px; }
.feature p { color: var(--dim); font-size: 13px; margin-top: 6px; }

/* Mode cards */
.mode-card { padding: 0; overflow: hidden; cursor: pointer; }
.mode-card .banner { height: 92px; display: grid; place-items: center; background: var(--raised); border-bottom: 1px solid var(--border); }
.mode-card .banner .icon { font-size: 34px; opacity: .9; }
.mode-card .body { padding: 14px 16px 16px; }
.mode-card h3 { font-size: 16px; }
.mode-card p { color: var(--dim); font-size: 12.5px; margin: 5px 0 10px; min-height: 34px; }
.mode-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); }
.mode-meta b { color: var(--accent); }

.tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.tag-open { background: var(--accent-soft); color: var(--accent); }
.tag-soon { background: var(--gold-soft); color: var(--gold); }
.tag-live { background: rgba(240,88,106,.14); color: var(--red); }
.tag-prem { background: var(--gold-soft); color: var(--gold); }

/* ============================================================
   TOURNOIS
   ============================================================ */
.tourn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.tourn .date { text-align: center; min-width: 56px; }
.tourn .date b { font-size: 22px; display: block; }
.tourn .date span { font-size: 11px; color: var(--mute); text-transform: uppercase; }
.tourn .info h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tourn .info .meta { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; color: var(--dim); flex-wrap: wrap; }
.tourn .info .meta b { color: var(--gold); }
.tourn .info .slots { height: 5px; border-radius: 99px; background: var(--raised); margin-top: 10px; max-width: 320px; overflow: hidden; }
.tourn .info .slots span { display: block; height: 100%; background: var(--accent); }
.tourn .action { text-align: right; }
.prize { font-size: 20px; font-weight: 800; color: var(--accent); }

/* ============================================================
   WAGERS
   ============================================================ */
.wager-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.wager-mode { font-size: 13px; font-weight: 600; color: var(--dim); }
.wager-amt { font-size: 22px; font-weight: 800; color: var(--accent); }
.wager-players { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 12px 0; }
.wager-players .p { text-align: center; }
.wager-players .p .av { width: 46px; height: 46px; border-radius: 11px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; font-size: 20px; margin: 0 auto 5px; }
.wager-players .p span { font-size: 12px; color: var(--dim); }
.wager-players .vs { font-weight: 800; color: var(--mute); }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.pills { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.pill { padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 500; background: var(--surface); color: var(--dim); border: 1px solid var(--border); transition: var(--t); }
.pill:hover { color: var(--text); border-color: var(--border-mid); }
.pill.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); font-weight: 600; }

.lb-selectors { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.lb-select { background: var(--raised); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.lb-select:focus { outline: none; border-color: var(--accent-line); }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--mute); padding: 11px 14px; font-weight: 600; }
.lb-table td { padding: 11px 14px; border-top: 1px solid var(--border); font-size: 14px; }
.lb-table tr.row:hover td { background: var(--raised); }
.lb-rank { font-weight: 700; width: 46px; color: var(--dim); }
.lb-rank.top { color: var(--accent); }
.lb-player { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.lb-player .av { width: 32px; height: 32px; border-radius: 8px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; font-size: 15px; }
.lb-rr { color: var(--text); font-weight: 700; }
.lb-wr { color: var(--accent); font-weight: 600; }

.rank-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--raised); border: 1px solid var(--border); color: var(--dim); }
.rank-badge.champ { color: var(--gold); border-color: rgba(207,168,92,.3); }
.rank-badge.elite { color: var(--accent); border-color: var(--accent-line); }
/* Paliers ranked (palette d'échelle, façon raretés) */
.rank-badge.t-iron      { color: #9aa3ad; border-color: rgba(154,163,173,.3); }
.rank-badge.t-bronze    { color: #c2864e; border-color: rgba(194,134,78,.3); }
.rank-badge.t-silver    { color: #c9d2dc; border-color: rgba(201,210,220,.3); }
.rank-badge.t-gold      { color: var(--accent); border-color: rgba(231,193,74,.32); }
.rank-badge.t-platinum  { color: var(--info); border-color: rgba(69,200,193,.32); }
.rank-badge.t-diamond   { color: var(--info); border-color: rgba(106,166,255,.32); }
.rank-badge.t-ascendant { color: var(--win); border-color: rgba(70,196,107,.32); }
.rank-badge.t-immortal  { color: var(--loss); border-color: rgba(224,85,107,.32); }
.rank-badge.t-radiant   { color: #ffe9a8; border-color: rgba(255,233,168,.45); background: rgba(255,233,168,.06); }

/* Tag RR gagné/perdu à côté d'un joueur dans la salle de match */
.mp-rr { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.mp-rr.up { color: var(--win); background: rgba(70,196,107,.12); }
.mp-rr.down { color: var(--loss); background: rgba(224,85,107,.12); }

/* Carte résultat post-match : delta RR + rang + barre de progression */
.rank-result { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); text-align: center; }
.rank-result .rr-delta { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.rank-result .rr-delta.up { color: var(--win); }
.rank-result .rr-delta.down { color: var(--loss); }
.rank-result .rr-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 10px; }
.rr-bar { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.rr-bar-fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); background: var(--accent); }
.rr-bar-fill.t-iron { background: #9aa3ad; } .rr-bar-fill.t-bronze { background: #c2864e; }
.rr-bar-fill.t-silver { background: #c9d2dc; } .rr-bar-fill.t-gold { background: var(--accent); }
.rr-bar-fill.t-platinum { background: var(--info); } .rr-bar-fill.t-diamond { background: var(--info); }
.rr-bar-fill.t-ascendant { background: var(--win); } .rr-bar-fill.t-immortal { background: var(--loss); }
.rr-bar-fill.t-radiant { background: #ffe9a8; }
.rr-bar-lbl { margin-top: 5px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* Description/détails d'un tournoi sur sa carte */
.tourn-desc { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--dim); white-space: pre-wrap; }

/* ===== Accueil : hero parallax ===== */
.hero-px { position: relative; overflow: hidden; padding: 60px 0 50px; isolation: isolate; }
.hero-px .px-layer { position: absolute; inset: -20% 0 auto 0; height: 150%; z-index: -1; will-change: transform; pointer-events: none; }
.px-1 { background:
  radial-gradient(900px 420px at 15% 8%, rgba(239,191,4,.08), transparent 60%),
  radial-gradient(720px 360px at 88% 18%, rgba(106,166,255,.06), transparent 60%); }
.px-2 { background-image:
  radial-gradient(2px 2px at 20% 30%, rgba(231,238,245,.22), transparent),
  radial-gradient(2px 2px at 62% 68%, rgba(231,238,245,.16), transparent),
  radial-gradient(1.5px 1.5px at 82% 42%, rgba(231,238,245,.20), transparent),
  radial-gradient(1.5px 1.5px at 42% 82%, rgba(231,238,245,.14), transparent);
  background-size: 620px 620px; opacity: .55; }
.px-glow { inset: auto 0 -30% 0; height: 60%; background: radial-gradient(620px 240px at 50% 100%, var(--accent-soft), transparent 70%); }
.hero-px-inner { display: grid; grid-template-columns: 1.12fr .88fr; gap: 36px; align-items: center; }
@media (max-width: 900px) { .hero-px-inner { grid-template-columns: 1fr; } }
.hero-copy h1 { font-size: clamp(30px, 5vw, 52px); margin: 12px 0; }
.hero-copy .lead { color: var(--dim); font-size: 16px; max-width: 520px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 24px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats .s b { display: block; font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.hero-stats .s span { font-size: 12px; color: var(--dim); }

/* "En direct" : slider rotatif */
.hero-live { background: var(--raised); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.live-count { font-size: 12px; color: var(--dim); margin-left: auto; }
.live-slider { min-height: 96px; }
.ls-card { display: block; padding: 14px; border-radius: 12px; background: var(--raised); cursor: pointer; transition: var(--t); animation: lsfade .45s ease; }
.ls-card:hover { background: var(--hover); transform: translateY(-2px); }
.ls-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--red); margin-bottom: 8px; }
.ls-tag.live { color: var(--accent); }
.ls-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.ls-who { font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 5px; }
.ls-empty { padding: 30px 14px; text-align: center; font-size: 13px; }
@keyframes lsfade { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.live-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.live-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border-mid); cursor: pointer; transition: var(--t); }
.live-dots span.on { background: var(--accent); width: 18px; border-radius: 4px; }

/* Bandeau "derniers gagnants" */
.winners-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); overflow: hidden; }
.winners-lbl { font-size: 12px; font-weight: 700; color: var(--dim); white-space: nowrap; }
.winners-track { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.winners-track::-webkit-scrollbar { display: none; }
.winner-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border-mid); white-space: nowrap; }
.winner-chip b { color: var(--text); font-weight: 600; }

/* ===== Profil unifié : onglets de catégories ===== */
.social-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 18px 0 14px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.social-tab { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--dim); background: transparent; border: 1px solid var(--border); cursor: pointer; transition: var(--t); }
.social-tab:hover { color: var(--text); border-color: var(--border-mid); }
.social-tab.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.so-pane { display: none; }
.so-pane.active { display: block; animation: lsfade .35s ease; }

/* Catégorie Classement : rangs par jeu/mode */
.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-row { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.rank-row .rk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.rank-row .rk-game { font-size: 13px; font-weight: 600; color: var(--text); }
.rank-row .rk-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.rank-row .rk-meta { display: flex; justify-content: space-between; font-size: 12px; margin-top: 7px; font-variant-numeric: tabular-nums; }

/* ============================================================
   PROFIL + RADAR
   ============================================================ */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 16px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; font-size: 36px; }
.profile-meta h2 { font-size: 23px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-meta .sub { color: var(--dim); font-size: 14px; margin-top: 3px; }

.stat-mini { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 16px 0 24px; }
.stat-mini .s { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.stat-mini .s b { font-size: 20px; display: block; color: var(--accent); }
.stat-mini .s span { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.radar-wrap { display: flex; flex-direction: column; align-items: center; }
.bar-row { margin-bottom: 13px; }
.bar-row .lab { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bar-row .lab b { color: var(--accent); }
.bar-track { height: 7px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .8s ease; }

.radar-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 12px; }
.radar-legend .li { font-size: 13px; color: var(--dim); }
.radar-legend .li b { color: var(--text); }

/* ============================================================
   BOUTIQUE
   ============================================================ */
.shop-panel { display: none; }
.shop-panel.active { display: block; animation: fade .25s ease; }

.plan-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px; display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 55%); box-shadow: var(--glow); }
.plan .ribbon { position: absolute; top: 16px; right: 16px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 18px; }
.plan .price { font-size: 34px; font-weight: 800; margin: 12px 0 2px; }
.plan .price small { font-size: 14px; color: var(--mute); font-weight: 500; }
.plan .desc { color: var(--dim); font-size: 14px; margin-bottom: 18px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; flex: 1; }
.plan ul li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; }
.plan ul li .ic { color: var(--accent); flex-shrink: 0; font-weight: 700; }
.plan ul li.off { color: var(--mute); }
.plan ul li.off .ic { color: var(--mute); }

.crate { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: var(--t); }
.crate:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.45), var(--glow); }
.crate .box { font-size: 50px; margin: 4px 0 12px; transition: transform .25s ease; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.crate:hover .box { transform: scale(1.1); }
.crate h3 { font-size: 15px; }
.crate .rar { font-size: 12px; margin: 3px 0 12px; font-weight: 700; letter-spacing: .3px; }
.rar-common { color: var(--r-common); } .rar-rare { color: var(--r-rare); } .rar-epic { color: var(--r-epic); } .rar-legend { color: var(--r-legend); }
.crate .price-row { font-weight: 700; font-size: 16px; color: var(--gold); margin-bottom: 12px; }

.coin-pack { text-align: center; }
.coin-pack .stack { font-size: 42px; margin-bottom: 8px; }
.coin-pack .amount { font-size: 22px; font-weight: 800; color: var(--gold); }
.coin-pack .bonus { font-size: 12px; color: var(--accent); font-weight: 600; margin: 3px 0 10px; min-height: 16px; }
.coin-pack .eur { font-size: 14px; color: var(--dim); margin-bottom: 12px; }

.pass-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.pass-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.pass-progress { height: 10px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.pass-progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .8s ease; }
.pass-track { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.pass-tier { flex: 0 0 110px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px; text-align: center; position: relative; }
.pass-tier.unlocked { border-color: var(--accent-line); }
.pass-tier.locked { opacity: .55; }
.pass-tier .lvl { font-size: 11px; color: var(--mute); font-weight: 600; }
.pass-tier .reward { font-size: 32px; margin: 7px 0; }
.pass-tier .name { font-size: 12px; color: var(--dim); }
.pass-tier .lock { position: absolute; top: 8px; right: 9px; font-size: 12px; }
.pass-tier .prem-flag { position: absolute; top: 8px; left: 9px; font-size: 10px; color: var(--gold); }

/* ============================================================
   MODAL (auth)
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; animation: fade var(--dur-2) var(--ease-out); }
.modal { position: relative; background: var(--surface); border: 1px solid var(--border-mid); border-radius: var(--radius); padding: 28px; width: 100%; max-width: 400px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 22px; margin-bottom: 4px; }
.modal .sub { color: var(--dim); font-size: 14px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 10px 13px; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid var(--border); color: var(--text); font-size: 14px; transition: var(--t); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--mute); }
.modal .err { color: var(--red); font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.modal .switch { text-align: center; font-size: 13px; color: var(--dim); margin-top: 16px; }
.modal .switch a { color: var(--accent); cursor: pointer; font-weight: 600; }
.modal .close { position: absolute; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 44px 0 36px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3,1fr); gap: 28px; }
.footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--mute); margin-bottom: 12px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer ul li { color: var(--dim); font-size: 14px; cursor: pointer; transition: var(--t); }
.footer ul li:hover { color: var(--text); }
.footer .brand-col p { color: var(--dim); font-size: 14px; margin: 12px 0; max-width: 280px; }
.socials { display: flex; gap: 9px; }
.socials a { width: 36px; height: 36px; border-radius: 9px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; font-size: 15px; transition: var(--t); }
.socials a:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--mute); font-size: 13px; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-box { position: fixed; bottom: 22px; right: 22px; z-index: 300; display: flex; flex-direction: column; gap: 9px; }
.toast { background: var(--raised); border: 1px solid var(--border-mid); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 13px 16px; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 9px; animation: slideIn .25s ease; max-width: 320px; }
.toast.err { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================
   BANNIÈRE IMPERSONATION
   ============================================================ */
#imperBanner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: rgba(207,168,92,0.14); border-bottom: 1px solid rgba(207,168,92,0.35);
  color: var(--gold); font-size: 14px; font-weight: 600; padding: 9px 16px; flex-wrap: wrap;
}
#imperBanner .btn { background: var(--gold); color: #1a1300; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-table td { vertical-align: middle; }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.admin-actions .btn { padding: 6px 10px; font-size: 12px; }
.type-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--raised); border: 1px solid var(--border); color: var(--dim); }
.type-badge.admin { color: var(--gold); border-color: rgba(207,168,92,.3); }
.type-badge.temp { color: var(--accent); border-color: var(--accent-line); }
.creds-box { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.creds-box code { background: var(--bg); padding: 2px 7px; border-radius: 6px; font-size: 13px; }
.creds-box .row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }

/* ============================================================
   PROFIL — infos & équipes
   ============================================================ */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.info-grid .it { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-grid .it span { color: var(--dim); }
.info-grid .it b { font-weight: 700; }
.info-grid .it b.pos { color: var(--accent); }
.info-grid .it b.gold { color: var(--gold); }

.team-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.team-row:last-child { border-bottom: none; }
.team-row .tag { width: 44px; height: 44px; border-radius: 10px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--accent); }
.team-row .tn { font-weight: 600; font-size: 14px; }
.team-row .tp { font-size: 12px; color: var(--mute); }

/* ============================================================
   MODAL CRYPTO
   ============================================================ */
.crypto-choices { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.crypto-opt { flex: 1; min-width: 64px; padding: 10px 6px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); text-align: center; cursor: pointer; transition: var(--t); }
.crypto-opt:hover { border-color: var(--border-mid); }
.crypto-opt.active { border-color: var(--accent-line); background: var(--accent-soft); }
.crypto-opt .ico { font-size: 18px; font-weight: 800; }
.crypto-opt .s { font-size: 11px; color: var(--dim); }
.crypto-detail { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px; }
.crypto-detail .amt { font-size: 22px; font-weight: 800; color: var(--accent); }
.crypto-detail .lbl { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; margin-top: 10px; }
.crypto-detail .addr { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.crypto-detail .addr code { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; font-size: 12px; word-break: break-all; }
.crypto-detail .copy { padding: 7px 11px; font-size: 12px; background: var(--raised); border: 1px solid var(--border); border-radius: 7px; color: var(--text); cursor: pointer; }
.crypto-status { text-align: center; font-size: 13px; color: var(--mute); margin: 12px 0 2px; line-height: 1.5; }
.crypto-status .pay-wait { color: var(--accent); font-weight: 600; }

select { font-family: inherit; }

/* ============================================================
   MON PROFIL
   ============================================================ */
.profile-banner { position: relative; border-radius: var(--radius); border: 1px solid var(--border); padding: 26px 24px; margin-bottom: 18px; overflow: hidden; }
.profile-banner .edit-btn { position: absolute; top: 14px; right: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.chip { padding: 4px 11px; border-radius: 999px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.12); font-size: 12px; color: #e8e9ec; backdrop-filter: blur(4px); }
.chip.prem { color: var(--gold); border-color: rgba(207,168,92,.4); }

.cosmo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 10px; }
.cosmo { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 6px; text-align: center; }
.cosmo .ic { font-size: 26px; }
.cosmo .nm { font-size: 11px; color: var(--dim); margin-top: 5px; line-height: 1.25; }
.cosmo.rar-rare { border-color: rgba(75,139,255,.45); box-shadow: inset 0 -2px 14px rgba(75,139,255,.16); }
.cosmo.rar-epic { border-color: rgba(178,73,255,.45); box-shadow: inset 0 -2px 14px rgba(178,73,255,.18); }
.cosmo.rar-legend { border-color: var(--gold-line); box-shadow: inset 0 -2px 14px rgba(255,186,38,.2); }
.cosmo .sell-mini { margin-top: 7px; padding: 3px 8px; font-size: 11px; width: 100%; }
.cosmo-empty { color: var(--mute); font-size: 13px; }

/* ============================================================
   RECHERCHE JOUEURS
   ============================================================ */
.search-row { position: relative; min-width: 250px; }
.search-input { width: 100%; padding: 10px 13px; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid var(--border); color: var(--text); font-size: 14px; transition: var(--t); }
.search-input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 50; overflow: hidden; display: none; max-height: 320px; overflow-y: auto; }
.search-results.show { display: block; }
.search-results .res { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
.search-results .res:hover { background: var(--raised); }
.search-results .res .av { width: 28px; height: 28px; border-radius: 7px; background: var(--raised); border: 1px solid var(--border); display: grid; place-items: center; font-size: 14px; }
.search-results .res .meta { color: var(--mute); font-size: 12px; margin-left: auto; font-weight: 500; }
.search-results .empty { padding: 11px 12px; color: var(--mute); font-size: 13px; }
.lb-table tr.row { cursor: pointer; }

/* ============================================================
   ÉDITION PROFIL (modal)
   ============================================================ */
.picker { display: flex; flex-wrap: wrap; gap: 8px; }
.picker .opt { width: 42px; height: 42px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); display: grid; place-items: center; font-size: 20px; cursor: pointer; transition: var(--t); position: relative; }
.picker .opt:hover { border-color: var(--border-mid); }
.picker .opt.active { border-color: var(--accent); background: var(--accent-soft); }
.picker .opt.locked { opacity: .4; cursor: not-allowed; }
.picker .opt .lk { position: absolute; bottom: -3px; right: -3px; font-size: 11px; }
.banner-list { gap: 10px; }
.banner-opt { width: 74px; height: 40px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px var(--border); transition: var(--t); }
.banner-opt.active { border-color: var(--accent); }
.banner-opt.locked { cursor: not-allowed; }
.banner-opt .lk { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; background: rgba(0,0,0,.45); border-radius: 7px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label.inline { display: flex; align-items: center; gap: 8px; cursor: pointer; }
label.inline input { width: auto; }
.prem-tag { font-size: 11px; color: var(--gold); border: 1px solid rgba(207,168,92,.3); padding: 1px 8px; border-radius: 999px; }
.field select { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid var(--border); color: var(--text); font-size: 14px; transition: var(--t); }
.field select:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ============================================================
   ANIMATION OUVERTURE DE CAISSE (style CS:GO)
   ============================================================ */
.crate-modal { max-width: 640px; width: 100%; text-align: center; }
.reel-viewport { position: relative; height: 132px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); margin: 18px 0 16px; }
.reel-viewport::before, .reel-viewport::after { content: ''; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; pointer-events: none; }
.reel-viewport::before { left: 0; background: linear-gradient(90deg, var(--surface), transparent); }
.reel-viewport::after { right: 0; background: linear-gradient(270deg, var(--surface), transparent); }
.reel-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: translateX(-50%); z-index: 3; }
.reel { display: flex; gap: 8px; height: 100%; align-items: center; padding-left: 12px; }
.reel-item { flex: 0 0 100px; height: 100px; border-radius: 10px; border: 1px solid var(--border); background: var(--raised); display: grid; place-items: center; font-size: 44px; position: relative; overflow: hidden; }
.reel-item.r-common { background: radial-gradient(circle at 50% 130%, rgba(139,147,167,.22), var(--raised) 70%); }
.reel-item.r-rare { border-color: var(--r-rare); background: radial-gradient(circle at 50% 130%, rgba(75,139,255,.30), var(--raised) 70%); box-shadow: inset 0 0 22px rgba(75,139,255,.25); }
.reel-item.r-epic { border-color: var(--r-epic); background: radial-gradient(circle at 50% 130%, rgba(178,73,255,.32), var(--raised) 70%); box-shadow: inset 0 0 22px rgba(178,73,255,.28); }
.reel-item.r-legend { border-color: var(--r-legend); background: radial-gradient(circle at 50% 130%, rgba(255,186,38,.34), var(--raised) 70%); box-shadow: inset 0 0 24px rgba(255,186,38,.30); }
.reel-item .strip { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; border-radius: 0 0 9px 9px; }
.r-common .strip { background: var(--r-common); } .r-rare .strip { background: var(--r-rare); } .r-epic .strip { background: var(--r-epic); } .r-legend .strip { background: var(--r-legend); }
.crate-result { min-height: 26px; font-weight: 700; }
.crate-result .won { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; animation: pop .35s ease; }
.crate-result .won .em { font-size: 30px; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#crateActions { justify-content: center; }
#crateActions:empty { display: none !important; }

/* ============================================================
   LIVE
   ============================================================ */
.live-featured { display: grid; grid-template-columns: 1.7fr .85fr; gap: 16px; }
.live-embed { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.live-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.live-embed .tiktok-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; gap: 10px; }
.live-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.live-side h3 { font-size: 17px; }
.live-side .meta { color: var(--dim); font-size: 13px; margin-top: 6px; }
.live-card { cursor: pointer; padding: 0; overflow: hidden; }
.live-card .thumb { height: 92px; background: var(--raised); display: grid; place-items: center; font-size: 30px; position: relative; border-bottom: 1px solid var(--border); }
.live-card .body { padding: 11px 13px; }
.live-card .body .nm { font-weight: 700; font-size: 14px; }
.live-card .body .ti { color: var(--dim); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--red); color: #fff; display: flex; align-items: center; gap: 5px; }
.live-badge .d { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
.live-badge.off { background: var(--mute); }
.plat-badge { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; }
.cat-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }

.stream-form { display: flex; gap: 8px; flex-wrap: wrap; }
.stream-form select, .stream-form input { padding: 9px 11px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: 13px; }
.stream-form input { flex: 1; min-width: 110px; }
.admin-stream-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-stream-row:last-child { border-bottom: none; }
.admin-stream-row .meta { color: var(--mute); font-size: 12px; }
.admin-stream-row .rm { margin-left: auto; }

/* ============================================================
   PANEL ADMIN (amélioré)
   ============================================================ */
.admin-pane { animation: fade .2s ease; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
.dash-grid .s { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.dash-grid .s b { font-size: 22px; display: block; color: var(--accent); }
.dash-grid .s.warn b { color: var(--gold); }
.dash-grid .s.danger b { color: var(--red); }
.dash-grid .s span { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .4px; }
.admin-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-toolbar .pills { margin: 0; }
.admin-empty { padding: 16px; color: var(--mute); font-size: 13px; text-align: center; }
.au-action { font-family: ui-monospace, monospace; font-size: 12px; color: var(--accent); }
.admin-actions select { padding: 6px 8px; border-radius: 7px; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: 12px; }
.dash-tx { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dash-tx:last-child { border-bottom: none; }
.dash-chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
.dash-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.dash-chart .bar .fill { width: 100%; max-width: 44px; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 3px; }
.dash-chart .bar .n { font-size: 12px; font-weight: 700; color: var(--accent); }
.dash-chart .bar .d { font-size: 10px; color: var(--mute); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); transform: translateY(-1px); }

.det-pass { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; color: var(--dim); margin-top: 6px; }
.det-tx { max-height: 220px; overflow-y: auto; }
.det-tx .tx { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.det-tx .tx:last-child { border-bottom: none; }
.det-tx .amt-pos { color: var(--accent); font-weight: 700; }
.det-tx .amt-neg { color: var(--red); font-weight: 700; }
.det-tx .when { color: var(--mute); font-size: 11px; }

/* ============================================================
   PARIS (Polymarket)
   ============================================================ */
.wager-market { margin: 10px 0 12px; }
.wager-market .mkt-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--raised); }
.wager-market .mkt-bar .a { background: var(--accent); }
.wager-market .mkt-bar .b { background: var(--pink, #d96a72); }
.wager-market .mkt-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 5px; }
.wager-market .mkt-row .a { color: var(--accent); font-weight: 700; }
.wager-market .mkt-row .b { color: var(--red); font-weight: 700; }
.wager-market .mkt-vol { text-align: center; font-size: 11px; color: var(--mute); margin-top: 3px; }
.btn-bet { width: 100%; margin-top: 8px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); font-weight: 700; }
.btn-bet:hover { background: rgba(239,191,4,.2); }

/* Paris style trading/Polymarket : courbe de probas + prix en ¢ */
.bet-chart-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; margin: 10px 0 8px; }
.bet-chart { width: 100%; height: 92px; display: block; }
.bet-chart-empty { text-align: center; font-size: 12px; padding: 30px 8px; }
.bet-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 10px; }
.bet-stats b { color: var(--text); }

.bet-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 2px; }
.bet-outcome { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 12px; text-align: center; cursor: pointer; transition: var(--t); background: var(--bg); }
.bet-outcome:hover { border-color: var(--border-mid); }
.bet-outcome.active { border-color: var(--oc); box-shadow: inset 0 0 0 1px var(--oc); }
.bet-outcome .bo-dot { position: absolute; top: 10px; left: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--oc); }
.bet-outcome .bo-side { font-size: 13px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet-outcome .bo-price { font-size: 28px; font-weight: 800; color: var(--oc); line-height: 1; }
.bet-outcome .bo-cents { font-size: 14px; font-weight: 700; opacity: .7; }
.bet-outcome .bo-odds { font-size: 11px; color: var(--mute); margin-top: 4px; }

/* ===== Prédictions live (sondages à coins) ===== */
.live-section-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.poll-card { border: 1px solid var(--border); border-radius: 14px; background: var(--raised); padding: 16px; margin-bottom: 14px; }
.poll-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.poll-q { font-size: 16px; font-weight: 700; color: var(--text); }
.poll-by { font-size: 12px; margin: 4px 0 12px; }
.poll-opts { display: flex; flex-direction: column; gap: 8px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); cursor: pointer; overflow: hidden; transition: var(--t); }
.poll-opt:hover:not(:disabled) { border-color: var(--border-mid); }
.poll-opt.active { border-color: var(--oc); box-shadow: inset 0 0 0 1px var(--oc); }
.poll-opt:disabled { cursor: default; opacity: .85; }
.poll-opt .po-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--oc); opacity: .14; z-index: 0; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.poll-opt .po-label { position: relative; z-index: 1; flex: 1; font-weight: 600; font-size: 14px; }
.poll-opt .po-prob { position: relative; z-index: 1; font-weight: 800; color: var(--oc); font-variant-numeric: tabular-nums; }
.poll-opt .po-odds { position: relative; z-index: 1; font-size: 11px; color: var(--mute); min-width: 38px; text-align: right; }
.poll-mine { font-size: 12px; color: var(--dim); margin-top: 10px; }
.poll-mine b { color: var(--win); }
.poll-betbox { display: flex; gap: 8px; margin-top: 12px; }
.poll-amt { flex: 1; }
.poll-manage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.poll-opt-input { width: 100%; margin-bottom: 8px; }

/* ===================== CASINO ===================== */
/* Lanceur de jeux dans la catégorie casino */
.rl-demo-tag { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--accent-ink); background: var(--accent); padding: 1px 5px; border-radius: 5px; vertical-align: middle; }
/* Roulette intégrée dans la salle de match : version COMPACTE (l'anim mesure la cellule, on peut réduire) */
.mrl-table { max-width: 540px; margin: 0 auto; }
.mrl-table .mrl-mode { font-size: 11px; padding: 5px 8px; margin-bottom: 8px; }
.mrl-table .rl-players-wrap, .mrl-table .rl-results-wrap { margin: 6px 0; }
.mrl-table .rl-results-wrap { justify-content: flex-end; }
.mrl-table .rl-player { font-size: 12px; padding: 3px 8px; gap: 4px; }
.mrl-table .rl-player .rp-av { font-size: 14px; }
.mrl-table .rl-strip-wrap { padding: 10px 0; }
.mrl-table .rl-cell { flex-basis: 40px; height: 42px; font-size: 14px; border-radius: 7px; }
.mrl-table .rl-statusbar { margin: 8px 0 4px; }
.mrl-table .rl-status { font-size: 13px; }
.mrl-table .rl-chips { gap: 6px; margin-bottom: 10px; }
.mrl-table .rl-chip { width: 40px; height: 40px; font-size: 12px; }
.mrl-table .rl-board { max-width: 100%; }
.mrl-table .rl-num { height: 30px; font-size: 12px; }
.mrl-table .rl-zero { width: 32px; }
.mrl-table .rl-bet { min-height: 32px; font-size: 12px; }
.mrl-table .rl-mybets { margin-top: 10px; }

/* Match casino : le JEU prend la place principale, le tchat est réduit */
.match-layout.casino-game { grid-template-columns: 0.62fr 2fr; }
.match-layout.casino-game .match-chat-col { height: 60vh; }
.match-layout.casino-game .match-chat-head span:first-child { font-size: 12px; }
@media (max-width: 900px) { .match-layout.casino-game { grid-template-columns: 1fr; } }

/* Bande "adversaires" (joueurs / bots) */
.rl-players-wrap { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.rl-players-lbl { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.rl-players { display: flex; gap: 8px; flex-wrap: wrap; }
.rl-player { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--raised); border: 1px solid var(--border-mid); }
.rl-player.me { border-color: var(--accent); color: var(--accent); }
.rl-player.bot { border-style: dashed; }
.rl-player .rp-av { font-size: 16px; }
.rl-player .rp-you { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; background: var(--accent); color: var(--accent-ink); padding: 0 5px; border-radius: 5px; }
.rl-player .rp-score { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.rl-player .rp-ok { color: var(--win); font-weight: 800; }
.rl-player .rp-wait { color: var(--dim); }
/* Bandeau mode (match casino) */
.mrl-mode { text-align: center; font-size: 13px; font-weight: 600; color: var(--dim); margin-bottom: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.mrl-mode b { color: var(--accent); }
/* Best-of : pari choisi cette manche */
.rl-num.mypick, .rl-bet.mypick { outline: 3px solid var(--accent); outline-offset: -3px; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Couleurs roulette */
:root { --rl-red: var(--loss); --rl-black: #2c3a47; --rl-green: #2bb673; }
.rl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 14px 0 16px; flex-wrap: wrap; }
.rl-results-wrap { display: flex; align-items: center; gap: 8px; }
.rl-results-lbl { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.rl-results { display: flex; gap: 5px; }
.rl-rdot { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; }
.rl-rdot.red { background: var(--rl-red); } .rl-rdot.black { background: var(--rl-black); } .rl-rdot.green { background: var(--rl-green); }

/* ---- Plinko : plateau SVG (Galton) + bille animée ---- */
.plinko-board { border: 1px solid var(--border); border-radius: 16px; background: radial-gradient(120% 90% at 50% 0%, var(--bg-2), var(--bg)); padding: 10px; margin: 6px 0; display: flex; justify-content: center; }
.pl-svg { width: 100%; max-width: 520px; height: auto; display: block; }
.pl-peg-svg { fill: rgba(255,255,255,.32); }
.pl-slot-svg.p-hot { fill: var(--accent); } .pl-slot-svg.p-warm { fill: var(--accent); }
.pl-slot-svg.p-mid { fill: #5f7d4f; } .pl-slot-svg.p-cold { fill: #2a2f27; }
.pl-slot-txt { fill: #11140f; font-size: 11px; font-weight: 800; }
.pl-slot-svg.p-cold + .pl-slot-txt, .pl-slot-svg.p-mid + .pl-slot-txt { fill: #e8ece3; }
/* bille : descente type gravité (cy ease-in), déviation latérale rapide (cx ease-out). Pas de glow. */
.pl-ball { fill: var(--accent); stroke: rgba(0,0,0,.4); stroke-width: 1; transition: cx .12s ease-out, cy .12s ease-in; }
.pl-ball.landed { transition: cx .14s ease-out, cy .18s cubic-bezier(.34,1.3,.64,1); }
.pl-ball-lbl { fill: var(--text); font-size: 13px; font-weight: 800; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.rl-rdot.p-hot { background: var(--accent); color: #11140f; } .rl-rdot.p-warm { background: var(--accent); color: #11140f; }
.rl-rdot.p-mid { background: #5f7d4f; } .rl-rdot.p-cold { background: #2a2f27; }
.plinko-risks { display: flex; gap: 8px; margin: 10px 0 4px; }
.pl-risk { flex: 1; padding: 10px 6px; border-radius: 8px; background: var(--raised); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: 12px; cursor: pointer; transition: var(--t); }
.pl-risk:hover { border-color: var(--border-mid); }
.pl-risk.active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.pl-risk:disabled { opacity: .5; cursor: default; }
.plinko-action { margin-top: 8px; }

/* ---- Poker Texas Hold'em (table heads-up) ---- */
.mpk-table { display: flex; flex-direction: column; gap: 10px; }
.mpk-center { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border: 1px solid var(--border); border-radius: 16px; background: radial-gradient(120% 100% at 50% 0%, rgba(95,125,79,.18), var(--bg-2)); }
.mpk-pot { font-size: 14px; color: var(--text); }
.mpk-pot-lbl { font-size: 10px; letter-spacing: 1px; color: var(--mute); }
.mpk-cards { display: flex; gap: 6px; }
.mpk-status { font-size: 13px; color: var(--text); min-height: 20px; text-align: center; }
.pk-card { width: 38px; height: 54px; border-radius: 6px; background: #f4f1e8; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; line-height: 1; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.pk-card.blk { color: #14110c; } .pk-card.red { color: #c12d2d; }
.pk-card.back { background: repeating-linear-gradient(45deg, #3a4d6e, #3a4d6e 4px, #2c3c58 4px, #2c3c58 8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.pk-card.slot { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.pk-card span:last-child { font-size: 13px; }
.mpk-seat { border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; background: var(--bg-2); }
.mpk-seat.me { border-color: var(--accent-line); }
.pk-seat-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pk-seat-row.folded { opacity: .5; }
.pk-seat-row.winner { box-shadow: 0 0 0 2px var(--accent); border-radius: 8px; }
.pk-seat-info { display: flex; align-items: center; gap: 6px; min-width: 120px; }
.pk-av { font-size: 18px; } .pk-name { font-weight: 700; font-size: 13px; }
.pk-btn-badge { background: var(--accent); color: #11140f; font-size: 10px; font-weight: 800; border-radius: 50%; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; }
.pk-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; }
.pk-tag.fold { background: rgba(255,255,255,.1); color: var(--mute); }
.pk-tag.allin { background: var(--red); color: #fff; }
.pk-tag.win { background: var(--accent); color: #11140f; }
.pk-seat-cards { display: flex; gap: 5px; }
.pk-seat-meta { display: flex; gap: 10px; align-items: center; margin-left: auto; font-size: 12px; }
.pk-stack { font-weight: 700; } .pk-bet { color: var(--accent); } .pk-hand { color: var(--text); font-weight: 700; }
.mpk-actions { display: flex; flex-direction: column; gap: 8px; }
.mpk-btn-row { display: flex; gap: 8px; }
.mpk-btn-row .btn { flex: 1; }
.mpk-raise { display: flex; gap: 6px; align-items: center; }
.mpk-raise input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-weight: 700; }
.btn-gold { background: var(--accent); color: #11140f; border: none; font-weight: 800; }
.btn-gold:hover { filter: brightness(1.08); }

/* ---- Machine à sous (3 rouleaux) ---- */
.sl-machine { display: flex; justify-content: center; padding: 16px 10px; margin: 8px 0; }
/* Cabinet doré */
.sl-cabinet { width: min(94vw, 320px); border-radius: 20px; padding: 12px; background: linear-gradient(180deg, #ffe38a 0%, #e8b33a 22%, #a9791b 55%, #7c560f 100%); box-shadow: 0 12px 36px rgba(0,0,0,.5), inset 0 2px 3px rgba(255,255,255,.6), inset 0 -3px 6px rgba(0,0,0,.35); transition: box-shadow .3s; }
.sl-cabinet.win { box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 40px rgba(255,215,80,.6), inset 0 2px 3px rgba(255,255,255,.6); animation: sl-winpulse 1s ease-in-out infinite; }
@keyframes sl-winpulse { 50% { box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 60px rgba(255,225,120,.9), inset 0 2px 3px rgba(255,255,255,.6); } }
.sl-marquee { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0 10px; font-size: 15px; font-weight: 900; letter-spacing: .12em; color: #3a2606; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.sl-marquee b { color: #4a1f04; background: linear-gradient(180deg, #fff6d5, var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.sl-bulb { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ff5); box-shadow: 0 0 8px var(--accent); animation: sl-blink 1.1s ease-in-out infinite; }
.sl-bulb:last-child { animation-delay: .55s; }
@keyframes sl-blink { 50% { opacity: .35; box-shadow: 0 0 2px var(--accent); } }
/* Fenêtre + payline */
.sl-window { position: relative; border-radius: 12px; background: #0c1018; padding: 10px; box-shadow: inset 0 0 0 3px #5c3f10, inset 0 0 26px rgba(0,0,0,.8); overflow: hidden; }
.sl-payline { position: absolute; left: 6px; right: 6px; top: 50%; height: 3px; transform: translateY(-1.5px); background: linear-gradient(90deg, transparent, var(--loss) 20%, var(--loss) 80%, transparent); box-shadow: 0 0 10px rgba(255,77,94,.8); z-index: 3; pointer-events: none; }
.sl-payline::before, .sl-payline::after { content: '▶'; position: absolute; top: -7px; color: var(--loss); font-size: 12px; text-shadow: 0 0 6px rgba(255,77,94,.9); }
.sl-payline::before { left: -2px; } .sl-payline::after { right: -2px; content: '◀'; }
.sl-glass { position: absolute; inset: 0; pointer-events: none; z-index: 2; background: linear-gradient(180deg, rgba(12,16,24,.95) 0%, rgba(12,16,24,0) 26%, rgba(12,16,24,0) 74%, rgba(12,16,24,.95) 100%), linear-gradient(100deg, rgba(255,255,255,.14) 0%, transparent 40%); }
.sl-reels { display: flex; gap: 6px; position: relative; z-index: 1; }
.sl-reel { width: 64px; height: 192px; overflow: hidden; border-radius: 8px; background: linear-gradient(90deg, #efe9dc, #fffdf7 50%, #efe9dc); box-shadow: inset 2px 0 4px rgba(0,0,0,.25), inset -2px 0 4px rgba(0,0,0,.25); }
.sl-strip { display: flex; flex-direction: column; will-change: transform; }
.sl-sym { height: 64px; min-height: 64px; display: flex; align-items: center; justify-content: center; font-size: 34px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.sl-reel.spinning .sl-sym { filter: blur(1.4px); }

/* ---- Puissance 4 ---- */
.mc4-table { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mc4-players { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.mc4-pl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); }
.mc4-pl.active { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line); }
.mc4-pl.winner { background: var(--accent-soft); border-color: var(--accent); }
.mc4-disc { width: 14px; height: 14px; border-radius: 50%; }
.mc4-pl.p1 .mc4-disc { background: #e0463e; } .mc4-pl.p2 .mc4-disc { background: #f0c040; }
.mc4-board { display: flex; gap: 6px; padding: 10px; background: linear-gradient(180deg, #2a5bd0, #1f47a8); border-radius: 14px; box-shadow: inset 0 2px 10px rgba(0,0,0,.35); }
.c4-col { display: flex; flex-direction: column; gap: 6px; padding: 4px; border-radius: 8px; transition: background .12s; }
.c4-col.playable { cursor: pointer; }
.c4-col.playable:hover { background: rgba(255,255,255,.12); }
.c4-cell { width: 42px; height: 42px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 3px 5px rgba(0,0,0,.55); }
.c4-cell.p1 { background: radial-gradient(circle at 35% 30%, #ff6b62, #d8392f); }
.c4-cell.p2 { background: radial-gradient(circle at 35% 30%, #ffe07a, #e8b021); }
.c4-cell.win { box-shadow: 0 0 0 3px var(--accent), inset 0 3px 5px rgba(0,0,0,.4); }
.c4-cell.last { outline: 2px solid rgba(255,255,255,.7); outline-offset: -2px; }
.mc4-status { font-size: 14px; min-height: 22px; text-align: center; }
@media (max-width: 560px) { .c4-cell { width: 32px; height: 32px; } }

/* ---- Blackjack ---- */
.mbj-table { display: flex; flex-direction: column; gap: 12px; }
.mbj-hands { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.mbj-hand { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); text-align: center; }
.mbj-hand.me { border-color: var(--accent-line); }
.mbj-hand.winner { box-shadow: 0 0 0 2px var(--accent); }
.mbj-hand.bust { opacity: .65; }
.mbj-hand-h { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.mbj-cards { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mbj-total { margin-top: 6px; font-size: 14px; font-weight: 800; color: var(--accent); }
.mbj-myhand { display: flex; justify-content: center; }
.mbj-myhand-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border: 1px solid var(--accent-line); border-radius: 14px; background: radial-gradient(120% 100% at 50% 0%, var(--accent-soft), var(--bg-2)); }
.mbj-myhand-inner.bust { border-color: var(--red); }
.mbj-total-badge { font-size: 18px; font-weight: 800; }

/* ---- Pile ou Face — table + layout ---- */
.mcf-table { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px 0; }
.mcf-mode { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---- Pièce 3D ---- */
.mcf-3d-wrap { perspective: 700px; display: flex; justify-content: center; align-items: center; height: 160px; }
.mcf-coin-inner {
  width: 128px; height: 128px; position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-25deg) rotateX(8deg);
  will-change: transform;
}
/* Les deux faces */
.mcf-coin-face,
.mcf-coin-back {
  position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  user-select: none;
}
/* Face avant — or (PILE) */
.mcf-coin-face {
  background: radial-gradient(circle at 38% 30%, #fff8c0 0%, var(--accent) 42%, #9a7200 85%);
  box-shadow: inset -5px -5px 14px rgba(0,0,0,.32), 0 10px 36px rgba(200,155,0,.45);
  border: 3px solid #a07800;
}
/* Face arrière — ardoise (FACE) */
.mcf-coin-back {
  background: radial-gradient(circle at 38% 30%, #6a6a80 0%, #2c2c44 50%, #10101e 90%);
  box-shadow: inset -5px -5px 14px rgba(0,0,0,.45), 0 10px 36px rgba(0,0,0,.4);
  border: 3px solid #3c3c56;
  transform: rotateY(180deg);
}
/* Anneau gravé */
.mcf-coin-face::before, .mcf-coin-back::before {
  content: ''; position: absolute; inset: 9px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.18); pointer-events: none;
}
/* Reflet lumière */
.mcf-coin-face::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.55) 0%, transparent 48%);
  pointer-events: none;
}
.mcf-coin-back::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 48%);
  pointer-events: none;
}
/* Lettre centrale + label */
.mcf-face-l { font-size: 38px; font-weight: 900; line-height: 1; position: relative; z-index: 1; }
.mcf-coin-face .mcf-face-l { color: #5a3800; text-shadow: 0 2px 0 rgba(255,220,80,.5); }
.mcf-coin-back .mcf-face-l { color: #c8c8e0; text-shadow: 0 2px 0 rgba(0,0,0,.7); }
.mcf-face-sub { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; position: relative; z-index: 1; opacity: .75; }
.mcf-coin-face .mcf-face-sub { color: #4a2c00; }
.mcf-coin-back .mcf-face-sub { color: #9898b8; }
/* Glow victoire */
@keyframes cf-win-glow { 0% { filter: drop-shadow(0 0 0 rgba(239,191,4,.9)); } 60% { filter: drop-shadow(0 0 28px rgba(239,191,4,.7)); } 100% { filter: drop-shadow(0 0 0 rgba(239,191,4,0)); } }
.mcf-coin-inner.win-glow { animation: cf-win-glow 1s ease-out; }

/* ---- Boutons pile / face ---- */
.mcf-btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.mcf-btn { min-width: 148px; font-size: 18px; font-weight: 800; padding: 14px 22px; border-radius: 16px; border: 2px solid var(--border); background: var(--raised); color: var(--text); cursor: pointer; transition: var(--t); }
.mcf-btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(0,0,0,.35); }
.mcf-btn.pile.picked { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(239,191,4,.25); }
.mcf-btn.face.picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mcf-btn:disabled { opacity: .55; cursor: default; }
.mcf-mypick { font-size: 13px; color: var(--muted); text-align: center; }
.mcf-flip-msg { font-size: 15px; color: var(--muted); font-weight: 600; }

/* ---- Joueurs + pips ---- */
.mcf-players { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; }
.mcf-player { display: flex; align-items: center; justify-content: space-between; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; font-size: 14px; }
.mcf-player.me { border-color: var(--accent-line); }
.mcf-pips { display: flex; gap: 7px; }
.mcf-pip { width: 13px; height: 13px; border-radius: 50%; background: var(--raised); border: 1.5px solid var(--border-mid); transition: background .25s, border-color .25s; }
.mcf-pip.won { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 6px var(--accent-soft); }

/* ---- Historique + résultats ---- */
.mcf-history { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.mcf-hdot { font-size: 19px; }
.mcf-picks { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mcf-reveals { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.mcf-reveal { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 20px; min-width: 120px; }
.mcf-reveal.me { border-color: var(--accent-line); }
.mcf-side { font-size: 22px; font-weight: 800; }
.mcf-check { color: #4caf50; font-size: 18px; font-weight: 900; }
.mcf-cross  { color: var(--red); font-size: 18px; font-weight: 900; }
.mcf-result-lbl { font-size: 15px; font-weight: 600; color: var(--muted); }

/* ---- Effets win / lose ---- */
.cf-burst-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 9997; }
.cf-flash { position: fixed; inset: 0; pointer-events: none; z-index: 9998; animation: cf-flash-out .8s ease-out forwards; }
.cf-flash.win  { background: radial-gradient(ellipse at center, rgba(239,191,4,.38), transparent 68%); }
.cf-flash.lose { background: radial-gradient(ellipse at center, rgba(220,50,50,.32), transparent 68%); }
@keyframes cf-flash-out { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cf-shake { 0%,100% { transform: none; } 15% { transform: translate(-9px,-2px) rotateZ(-.6deg); } 30% { transform: translate(9px,2px) rotateZ(.6deg); } 45% { transform: translate(-6px,0); } 60% { transform: translate(6px,0); } 80% { transform: translate(-2px,0); } }
.cf-shake { animation: cf-shake .52s ease-out; }
/* Pop d'entrée pour les cartes résultat */
@keyframes cf-pop { 0% { transform: scale(.55); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
.cf-pop { animation: cf-pop .38s cubic-bezier(.34,1.56,.64,1) both; }

/* ---- Pierre-Papier-Ciseaux ---- */
.mrps-table { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px 0; }
.mrps-arena { display: flex; align-items: center; justify-content: center; gap: 22px; min-height: 128px; width: 100%; max-width: 460px; }
.mrps-hand { font-size: 72px; line-height: 1; user-select: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); transition: transform .2s; }
.mrps-hand.left  { transform: scaleX(-1); }               /* le poing "moi" fait face à l'adversaire */
.mrps-hand.left.shaking  { animation: rps-shake-l .28s ease-in-out infinite; }
.mrps-hand.right.shaking { animation: rps-shake-r .28s ease-in-out infinite; }
.mrps-hand.revealed { animation: cf-pop .34s cubic-bezier(.34,1.56,.64,1); }
.mrps-hand.win  { filter: drop-shadow(0 0 16px rgba(239,191,4,.85)); }
.mrps-hand.lose { opacity: .5; }
@keyframes rps-shake-l { 0%,100% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-16px); } }
@keyframes rps-shake-r { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.mrps-vs { font-size: 22px; font-weight: 900; color: var(--muted); min-width: 46px; text-align: center; transition: var(--t); }
.mrps-vs.win  { color: var(--accent); transform: scale(1.35); }
.mrps-vs.lose { color: var(--red); }
.mrps-btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mrps-btn { min-width: 120px; font-size: 16px; font-weight: 800; padding: 12px 18px; border-radius: 16px; border: 2px solid var(--border); background: var(--raised); color: var(--text); cursor: pointer; transition: var(--t); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.mrps-btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(0,0,0,.35); border-color: var(--accent-line); }
.mrps-btn.picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mrps-btn:disabled { opacity: .55; cursor: default; }
.mrps-btn-ic { font-size: 22px; }
.mrps-hdot { font-size: 17px; }
.mrps-hdot.draw { opacity: .6; }
.rpsd-score { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; }
.rpsd-sc { color: var(--muted); }
.rpsd-sc.lead { color: var(--accent); }
.rpsd-sc b { font-size: 20px; }
.rpsd-sc-sep { color: var(--muted); font-size: 12px; }

/* ---- Bannière de résultat WIN / LOSE (casino & matches) ---- */
.result-banner { text-align: center; font-size: 34px; font-weight: 900; letter-spacing: .1em; padding: 14px 10px; border-radius: 14px; margin-bottom: 10px; line-height: 1.05; animation: rb-pop .42s cubic-bezier(.34,1.56,.64,1); }
.result-banner.win { color: var(--win); background: rgba(38,208,124,.12); box-shadow: inset 0 0 0 2px rgba(38,208,124,.45), 0 0 34px rgba(38,208,124,.22); text-shadow: 0 0 20px rgba(38,208,124,.55); }
.result-banner.lose { color: var(--loss); background: rgba(224,65,78,.1); box-shadow: inset 0 0 0 2px rgba(224,65,78,.45), 0 0 30px rgba(224,65,78,.18); text-shadow: 0 0 20px rgba(224,65,78,.45); }
.result-banner .rw-amt { display: block; font-size: 22px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }
@keyframes rb-pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---- Avatars : image inline (remplace l'emoji partout) ---- */
.ava-i { height: 1.15em; width: 1.15em; border-radius: 50%; object-fit: cover; vertical-align: -0.22em; background: var(--raised); display: inline-block; image-rendering: pixelated; }
.ava-i.ava-big { height: 100%; width: 100%; border-radius: inherit; vertical-align: middle; }
.ava-e { display: inline-block; }
#myAvatar img.ava-big, #soAvatar img.ava-big { width: 100%; height: 100%; object-fit: cover; }

/* ---- Sélecteur de gobelin (joueur) ---- */
.av-composer { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
@media (max-width: 720px) { .av-composer { grid-template-columns: 1fr; } }
.av-preview { position: sticky; top: 118px; display: flex; flex-direction: column; gap: 10px; }
.av-canvas { width: 100%; max-width: 240px; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 16px; image-rendering: pixelated; }
.av-presets-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.av-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.av-preset { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--raised); color: var(--dim); cursor: pointer; font-size: 12px; font-weight: 700; transition: var(--t); }
.av-preset:hover { border-color: var(--accent-line); color: var(--text); }
.av-preset.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.av-preview-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.av-cats { display: flex; flex-direction: column; gap: 14px; }
.av-cat-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.av-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.av-thumb { width: 58px; height: 58px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg-2); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--muted); overflow: hidden; transition: var(--t); }
.av-thumb img, .av-thumb canvas { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; display: block; }
.av-thumb.av-none { font-size: 22px; }
.av-thumb:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.av-thumb.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---- Éditeur de traits gobelin (admin) ---- */
.ge-layout { display: grid; grid-template-columns: 230px 1fr 240px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .ge-layout { grid-template-columns: 1fr; } }
.ge-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ge-center { align-items: center; }
.ge-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
.ge-list { display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto; }
.ge-group-h { font-size: 11px; font-weight: 800; color: var(--dim); margin-bottom: 3px; }
.ge-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; text-align: left; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--raised); color: var(--text); cursor: pointer; font-size: 12.5px; font-weight: 600; transition: var(--t); }
.ge-item:hover { border-color: var(--accent-line); }
.ge-item.on { border-color: var(--accent); color: var(--accent); }
.ge-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ge-item-tag { font-size: 11px; opacity: .8; flex: none; }
.ge-canvas-wrap { width: 100%; max-width: 480px; }
.ge-canvas-wrap canvas { width: 100%; aspect-ratio: 1; display: block; border: 1px solid var(--border-mid); border-radius: 12px; image-rendering: pixelated; touch-action: none; cursor: crosshair; }
.ge-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; align-items: center; margin-top: 10px; font-size: 12px; }
.ge-tool { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.ge-hint { font-size: 11px; text-align: center; margin-top: 6px; }
.ge-field { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.ge-field input, .ge-field select { padding: 6px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-size: 13px; }
.ge-palette { display: flex; flex-wrap: wrap; gap: 5px; }
.ge-sw { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; padding: 0; transition: var(--t); }
.ge-sw:hover { transform: translateY(-1px); }
.ge-sw.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ge-sw-erase { background: var(--raised); color: var(--muted); font-size: 12px; line-height: 1; }
.ge-preview { width: 100%; max-width: 180px; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 12px; image-rendering: pixelated; }
.ge-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
/* barre d'outils du canevas (pinceau, seau, formes, annuler, transformations) */
.ge-toolbar { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; margin-bottom: 10px; max-width: 480px; }
.ge-t { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--raised); color: var(--dim); cursor: pointer; padding: 0; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: var(--t); }
.ge-t:hover { border-color: var(--accent-line); color: var(--text); }
.ge-t.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ge-sep { width: 1px; height: 20px; background: var(--border-mid); margin: 0 3px; }
/* traits et catégories masqués : visibles mais barrés (pour pouvoir les restaurer) */
.ge-item.off, .ge-cat-item.off { opacity: .5; text-decoration: line-through; }
.ge-cat-list { display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; }
.ge-cat-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; text-align: left; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--raised); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 600; transition: var(--t); }
.ge-cat-item:hover { border-color: var(--accent-line); }
.ge-cat-item.on { border-color: var(--accent); color: var(--accent); }
.ge-cat-form { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.ge-cat-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ge-tools select { padding: 4px 6px; border-radius: 7px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-size: 12px; }

/* ---- Crypto / Trading ---- */
.crypto-table { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0; width: 100%; }
.crypto-chart-wrap { width: 100%; max-width: 560px; }
.crypto-chart-wrap { border-radius: 12px; transition: box-shadow .2s; }
.crypto-chart-wrap canvas { width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.crypto-chart-wrap.danger { animation: cy-danger 0.5s ease-in-out infinite; border-radius: 12px; }
@keyframes cy-danger { 0%,100% { box-shadow: 0 0 0 2px rgba(255,77,94,.5), 0 8px 30px rgba(0,0,0,.4); } 50% { box-shadow: 0 0 0 3px rgba(255,77,94,.95), 0 0 34px rgba(255,77,94,.5); } }
.crypto-action { width: 100%; max-width: 440px; }
.cy-levrow { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.cy-lev { min-width: 42px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-weight: 800; cursor: pointer; transition: var(--t); }
.cy-lev.on { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cy-dirrow { display: flex; gap: 12px; }
.cy-long, .cy-short { flex: 1; font-size: 18px; font-weight: 800; padding: 14px; border-radius: 14px; border: none; cursor: pointer; color: #06210f; transition: var(--t); }
.cy-long { background: linear-gradient(180deg, var(--win), var(--win)); }
.cy-short { background: linear-gradient(180deg, var(--loss), #d0313f); color: #2a0508; }
.cy-long:hover, .cy-short:hover { transform: translateY(-2px); }
/* réutilisés depuis l'ancien module trading */
.crash-action { width: 100%; max-width: 440px; }
.crash-sell-btn { width: 100%; font-size: 18px; font-weight: 800; padding: 14px; border-radius: 14px; border: none; color: #06210f; background: linear-gradient(180deg, var(--win), var(--win)); cursor: pointer; transition: var(--t); box-shadow: 0 4px 16px rgba(38,208,124,.35); }
.crash-sell-btn:hover:not(:disabled) { transform: translateY(-2px); }
.crash-sell-btn:disabled { opacity: .6; cursor: default; }
.crash-locked { text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); }
.crash-status { font-size: 15px; font-weight: 600; min-height: 22px; text-align: center; }
.crash-score { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 700; }
.crash-pl b { color: var(--accent); font-variant-numeric: tabular-nums; }
.crash-hdot { font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--bg-2); }
.crash-hdot.hi { color: var(--win); } .crash-hdot.lo { color: var(--loss); }

/* ---- Billard ---- */
.pool-table-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0; width: 100%; }
.pool-canvas-wrap { width: 100%; max-width: 620px; }
.pool-canvas-wrap canvas { width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.45); touch-action: none; cursor: crosshair; }
.pool-scoreboard { display: flex; align-items: stretch; justify-content: center; gap: 12px; width: 100%; max-width: 620px; }
.pool-team { flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; background: var(--bg-2); transition: var(--t); }
.pool-team.turn { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pool-team.win { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pool-team.t1 { border-left: 3px solid #e6b400; }
.pool-team.t2 { border-left: 3px solid #1b56b8; }
.pool-team-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.pool-rem { display: inline-block; min-width: 18px; text-align: center; background: var(--raised); border-radius: 6px; padding: 0 5px; font-size: 11px; }
.pool-team-players { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pool-team-players .to-play { color: var(--accent); font-weight: 800; }
.pool-vs { display: flex; align-items: center; font-weight: 900; color: var(--muted); font-size: 13px; }
.pool-status { font-size: 15px; font-weight: 600; min-height: 22px; text-align: center; }
.pool-foul { color: var(--red); font-weight: 800; }
.pool-controls { width: 100%; max-width: 420px; }
.pool-power { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.pool-power input[type=range] { flex: 1; accent-color: var(--accent); }

/* ---- Dés (3D) ---- */
.dice-table { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 0; }
.dice-arena { display: flex; align-items: flex-end; justify-content: center; gap: 22px; flex-wrap: wrap; width: 100%; }
.dice-group { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); transition: var(--t); }
.dice-group.me { border-color: var(--accent-line); }
.dice-group.rolled { box-shadow: 0 0 0 2px var(--accent-soft); }
.dice-group.win { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 22px var(--accent-soft); }
.dice-group.lose { opacity: .6; }
/* Sol + perspective : les dés tombent dessus */
.dice-floor { perspective: 640px; height: 120px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; border-radius: 12px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.18)); }
.dice-lane { display: flex; gap: 14px; align-items: flex-end; }
.die3d { width: 52px; height: 52px; position: relative; transform-style: preserve-3d; will-change: transform; }
.die-cube { width: 52px; height: 52px; position: absolute; transform-style: preserve-3d; will-change: transform; }
.die-face { position: absolute; width: 52px; height: 52px; box-sizing: border-box; border-radius: 11px; padding: 6px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  background: linear-gradient(150deg, #fdfdfd, #dfe3ea); border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 0 6px rgba(0,0,0,.12); }
.pip-cell { display: flex; align-items: center; justify-content: center; }
.pip-cell i { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a5262, #14181f); box-shadow: inset 0 -1px 1px rgba(0,0,0,.5); }
/* Placement des 6 faces du cube (demi-arête = 26px) */
.die-face.f1 { transform: translateZ(26px); }
.die-face.f6 { transform: rotateY(180deg) translateZ(26px); }
.die-face.f3 { transform: rotateY(90deg) translateZ(26px); }
.die-face.f4 { transform: rotateY(-90deg) translateZ(26px); }
.die-face.f2 { transform: rotateX(90deg) translateZ(26px); }
.die-face.f5 { transform: rotateX(-90deg) translateZ(26px); }
.dice-sum { font-size: 22px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; min-height: 26px; }
.dice-name { font-size: 13px; font-weight: 700; }

/* ---- Mines ---- */
.mines-table { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0; }
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: min(88vw, 380px); }
.mine-tile { aspect-ratio: 1; border: none; border-radius: 12px; font-size: min(7vw, 30px); line-height: 1; cursor: default; display: flex; align-items: center; justify-content: center; transition: transform .12s, background .18s, box-shadow .18s; }
.mine-tile.hidden { background: linear-gradient(180deg, var(--raised), var(--bg-2)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.25); }
.mine-tile.hidden.playable { cursor: pointer; }
.mine-tile.hidden.playable:hover { transform: translateY(-2px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.28), 0 0 0 2px var(--accent-line); }
.mine-tile.gem { background: radial-gradient(circle at 50% 38%, rgba(88,214,141,.28), var(--bg-2)); box-shadow: inset 0 0 0 1px rgba(88,214,141,.5); animation: mn-pop .3s cubic-bezier(.34,1.56,.64,1); }
.mine-tile.boom { background: radial-gradient(circle at 50% 40%, rgba(224,65,78,.4), #3a1418); box-shadow: inset 0 0 0 1px rgba(224,65,78,.7); animation: mn-pop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes mn-pop { 0% { transform: scale(.55); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ---- Échecs ---- */
.chess-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0; }
.chess-side { width: 100%; max-width: 480px; }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: min(92vw, 480px); aspect-ratio: 1; border: 3px solid var(--border-mid); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.csq { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; -webkit-user-select: none; }
.csq.light { background: #b9c3d0; }
.csq.dark  { background: #5b6b7f; }
.csq.last::after { content: ''; position: absolute; inset: 0; background: rgba(239,191,4,.32); pointer-events: none; }
.csq.sel::after  { content: ''; position: absolute; inset: 0; background: rgba(239,191,4,.5); box-shadow: inset 0 0 0 3px var(--accent); pointer-events: none; }
.csq.check { background: radial-gradient(circle, var(--loss) 30%, #a3242e 100%) !important; }
/* Indicateur de coup possible : point central (case vide) ou anneau (capture) */
.csq.target::before { content: ''; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(20,25,35,.42); pointer-events: none; z-index: 2; }
.csq.capture::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; border: 4px solid rgba(20,25,35,.42); pointer-events: none; z-index: 2; }
.cpiece { font-size: min(9vw, 46px); line-height: 1; position: relative; z-index: 1; pointer-events: none; }
.cpiece.wp { color: #fbfcfe; text-shadow: 0 0 2px #000, 0 1px 2px rgba(0,0,0,.9), 0 0 1px #000; }
.cpiece.bp { color: #16202c; text-shadow: 0 1px 1px rgba(255,255,255,.25); }
.csq:hover { filter: brightness(1.08); }
.chess-player { display: flex; align-items: center; justify-content: space-between; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; font-size: 14px; transition: var(--t); }
.chess-player.active { border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--accent-soft); }
.chess-player.winner { border-color: var(--accent); }
.chess-pl-name { font-weight: 700; }
.chess-clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 16px; background: var(--raised); padding: 2px 10px; border-radius: 6px; }
.chess-clock.low { color: var(--red); animation: chess-low 1s ease-in-out infinite; }
@keyframes chess-low { 50% { opacity: .5; } }
.chess-status { font-size: 15px; font-weight: 600; min-height: 22px; text-align: center; }
.chess-chk { color: var(--red); font-weight: 800; }
.chess-actions { display: flex; justify-content: center; min-height: 8px; }
.chess-promo { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--accent-line); border-radius: 12px; padding: 8px 14px; }
.chess-promo span { font-size: 13px; color: var(--muted); }
.chess-promo-btn { font-size: 30px; line-height: 1; width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 10px; background: var(--raised); color: var(--text); cursor: pointer; transition: var(--t); }
.chess-promo-btn:hover { border-color: var(--accent); transform: translateY(-2px); }

/* Ruban (roue déroulée) + pointeur central */
.rl-wheelbox { position: relative; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); padding: 0; overflow: hidden; }
.rl-pointer { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--accent); z-index: 3; box-shadow: 0 0 12px var(--accent); }
.rl-pointer::before, .rl-pointer::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border-left: 7px solid transparent; border-right: 7px solid transparent; }
.rl-pointer::before { top: 0; border-top: 8px solid var(--accent); }
.rl-pointer::after { bottom: 0; border-bottom: 8px solid var(--accent); }
.rl-strip-wrap { overflow: hidden; padding: 18px 0; }
.rl-strip { display: flex; will-change: transform; }
.rl-cell { flex: 0 0 58px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; color: #fff; border-radius: 9px; margin: 0 1px; }
.rl-cell.red { background: var(--rl-red); } .rl-cell.black { background: var(--rl-black); } .rl-cell.green { background: var(--rl-green); }

.rl-statusbar { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.rl-status { font-size: 14px; font-weight: 600; }
.rl-status b { color: var(--accent); }
.rl-balance { font-weight: 800; font-variant-numeric: tabular-nums; }
.rl-timerbar { height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; margin-bottom: 14px; }
#rlTimerFill { height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
#rlTimerFill.open { background: linear-gradient(90deg, var(--rl-green), var(--accent)); }

/* Jetons */
.rl-chips { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.rl-chip { width: 50px; height: 50px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); background: var(--raised); color: var(--text); font-weight: 800; font-size: 13px; cursor: pointer; transition: var(--t); }
.rl-chip:hover { transform: translateY(-2px); }
.rl-chip.active { border-style: solid; border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Plateau de mises */
.rl-board { max-width: 720px; margin: 0 auto; }
.rl-numgrid { display: flex; gap: 4px; }
.rl-zero-col { display: flex; }
.rl-nums { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rl-numrow { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.rl-num { position: relative; height: 42px; border: none; border-radius: 6px; color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; transition: var(--t); }
.rl-num.red { background: var(--rl-red); } .rl-num.black { background: var(--rl-black); } .rl-num.green { background: var(--rl-green); }
.rl-zero { width: 40px; height: auto; align-self: stretch; }
.rl-num:hover:not(:disabled), .rl-bet:hover:not(:disabled) { outline: 2px solid var(--accent); outline-offset: -2px; }
.rl-num:disabled, .rl-bet:disabled { opacity: .65; cursor: default; }
.rl-dozens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.rl-outside { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 4px; }
.rl-bet { position: relative; min-height: 40px; border: 1px solid var(--border-mid); border-radius: 6px; background: var(--raised); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; transition: var(--t); display: flex; align-items: center; justify-content: center; gap: 6px; }
.rl-bet.red { background: rgba(224,65,78,.16); } .rl-bet.black { background: rgba(44,58,71,.5); }
.rl-diamond { width: 14px; height: 14px; transform: rotate(45deg); display: inline-block; }
.rl-diamond.red { background: var(--rl-red); } .rl-diamond.black { background: var(--rl-black); }
.rb-tot { position: absolute; bottom: 2px; right: 4px; font-size: 9px; color: var(--accent); font-weight: 700; }
.rb-mine { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rl-mybets { margin: 16px auto 0; max-width: 720px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rl-mybets-h { width: 100%; font-size: 12px; font-weight: 700; color: var(--dim); }
.rl-mybet { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--raised); border: 1px solid var(--border-mid); }
@media (max-width: 640px) { .rl-cell { flex-basis: 46px; } .rl-num { font-size: 12px; height: 36px; } }
.bet-est { text-align: center; font-size: 14px; color: var(--dim); min-height: 20px; margin: 6px 0; }
.bet-est b { color: var(--accent); font-size: 17px; }
.bet-mine { display: flex; justify-content: space-between; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.bet-mine:last-child { border-bottom: none; }
.bet-mine .st-won { color: var(--accent); font-weight: 700; }
.bet-mine .st-lost { color: var(--red); }
.bet-mine .st-refunded { color: var(--gold); }

/* ============================================================
   LIVE PANEL (Chat + Feed)
   ============================================================ */
.live-fab { position: fixed; bottom: 24px; right: 24px; z-index: 1200; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border: none; cursor: pointer; font-size: 20px; display: grid; place-items: center; box-shadow: 0 4px 22px var(--accent-glow); transition: transform .2s ease, box-shadow .2s ease; }
.live-fab:hover { transform: scale(1.1); box-shadow: 0 6px 30px var(--accent-glow); }
.live-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 800; padding: 1px 5px; min-width: 16px; text-align: center; }

.live-panel { position: fixed; bottom: 88px; right: 24px; z-index: 1199; width: 320px; max-height: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.45); display: flex; flex-direction: column; transform: translateY(20px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.live-panel.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.live-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.live-close { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 4px; }
.live-close:hover { color: var(--text); }
.live-tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid var(--border); }
.live-tab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--dim); font-size: 13px; font-weight: 600; padding: 6px 12px; cursor: pointer; transition: color .15s, border-color .15s; }
.live-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.live-body { flex: 1; overflow: hidden; }
.live-pane { display: none; height: 100%; flex-direction: column; }
.live-pane.active { display: flex; }

/* Feed */
#liveFeed { overflow-y: auto; padding: 10px 12px; gap: 6px; }
.feed-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; line-height: 1.5; animation: fadeIn .3s ease; }
.feed-item:last-child { border-bottom: none; }
.feed-av { font-size: 18px; flex-shrink: 0; }
.feed-body { color: var(--dim); }
.feed-body b { color: var(--text); }
.feed-body .hl { color: var(--accent); font-weight: 700; }
.feed-time { margin-left: auto; flex-shrink: 0; color: var(--mute); font-size: 10px; }

/* Chat */
#liveChat { display: none; flex-direction: column; height: 350px; }
#liveChat.active { display: flex; }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-msg { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; line-height: 1.5; animation: fadeIn .25s ease; }
.chat-msg .av { font-size: 16px; flex-shrink: 0; }
.chat-msg .name { font-weight: 700; color: var(--accent); margin-right: 4px; }
.chat-msg .text { color: var(--dim); word-break: break-word; }
.chat-input-row { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
.chat-input-row input { flex: 1; min-width: 0; }

/* ============================================================
   JEUX & CATÉGORIES
   ============================================================ */
.game-card { position: relative; cursor: pointer; text-align: center; padding: 22px 16px; overflow: hidden; }
.game-card .game-icon { font-size: 46px; line-height: 1; margin-bottom: 12px; transition: transform .25s ease; }
.game-card:hover .game-icon { transform: scale(1.12); }
.game-card .game-name { font-weight: 700; font-size: 16px; }
.game-card .game-meta { display: flex; justify-content: center; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--mute); }
.game-card .game-meta b { color: var(--accent); }
.game-card.featured { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.game-card .feat-tag { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.game-card .custom-tag { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 700; color: var(--gold); background: rgba(207,168,92,.14); padding: 2px 8px; border-radius: 999px; }

.game-header { display: flex; align-items: center; gap: 16px; margin: 14px 0 16px; }
.game-header-icon { width: 64px; height: 64px; border-radius: 16px; background: radial-gradient(120% 120% at 50% 0%, var(--accent-soft), var(--raised) 70%); border: 1px solid var(--accent-line); display: grid; place-items: center; font-size: 34px; box-shadow: var(--glow); }
.game-header h2 { font-size: 24px; }

/* ============================================================
   PROFIL SOCIAL (guns.lol / discord)
   ============================================================ */
.social-wrap { max-width: 560px; }
.social-card { position: relative; background: var(--surface); border-radius: var(--radius); margin-top: 14px; padding: 0 24px 26px; text-align: center; overflow: hidden; }
.social-banner { position: relative; height: 132px; margin: 0 -24px; background: var(--raised); }
.social-views { position: absolute; top: 10px; right: 12px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; backdrop-filter: blur(4px); }
.social-avatar { width: 92px; height: 92px; margin: -46px auto 0; border-radius: 22px; background: var(--raised); border: 3px solid var(--surface); box-shadow: 0 0 24px var(--accent-glow); display: grid; place-items: center; font-size: 44px; }
.social-name { font-size: 24px; margin: 14px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.social-bio { color: var(--dim); font-size: 14px; margin: 8px auto 0; max-width: 420px; }
.social-followrow { display: flex; justify-content: center; gap: 24px; margin-top: 16px; font-size: 14px; color: var(--dim); }
.social-followrow b { color: var(--text); font-size: 16px; }
.social-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.social-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.social-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; background: var(--raised); font-size: 13px; font-weight: 600; transition: var(--t); color: var(--sl-color, var(--text)); text-decoration: none; }
.social-link:hover { background: color-mix(in srgb, var(--sl-color, var(--accent)) 16%, var(--hover)); transform: translateY(-2px); }
.social-link .ico { font-size: 15px; }
.social-chips { justify-content: center; margin-top: 16px; }
.social-stats { margin-top: 18px; }
.social-cosmo-wrap { margin-top: 22px; text-align: left; }
.social-cosmo-wrap h3 { font-size: 15px; margin-bottom: 10px; }

.u-link { cursor: pointer; transition: color .12s; }
.u-link:hover { color: var(--accent); text-decoration: underline; }

.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.accent-input { width: 58px; height: 34px; padding: 2px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); cursor: pointer; vertical-align: middle; }
/* minmax(0,1fr) et non 1fr : une piste `1fr` ne descend PAS sous le contenu minimum de son
   element (ici ~220 px par ligne). Dans la colonne etroite de la page de personnalisation
   (361 px), les deux colonnes debordaient de 106 px et sortaient la page entiere en
   defilement horizontal. Le minmax(0,...) autorise la piste a retrecir. */
.socials-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.se-row { display: flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; transition: var(--t); }
.se-row:focus-within { border-color: var(--accent-line); }
.se-row span { font-size: 15px; }
.se-row input { flex: 1; min-width: 0; border: none; background: none; color: var(--text); padding: 9px 0; font-size: 13px; }
.se-row input:focus { outline: none; }

/* ============================================================
   LIVE PAGE — style Kick.com
   ============================================================ */
.live-page-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.live-hero { display: grid; grid-template-columns: 1.8fr 1fr; gap: 18px; margin-bottom: 28px; }
.live-main-embed { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16/9; }
.live-main-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.live-main-info { background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.live-main-info .live-streamer { display: flex; align-items: center; gap: 12px; }
.live-main-info .live-av { width: 48px; height: 48px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-size: 22px; }
.live-main-info .live-name { font-weight: 800; font-size: 17px; }
.live-main-info .live-title { color: var(--dim); font-size: 13px; margin-top: 2px; }
.live-main-info .live-viewers { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--red); }
.live-main-info .live-viewers .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

.live-section-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.live-grid-kick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.kick-card { border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface); transition: var(--t); }
.kick-card:hover { background: var(--raised); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,.5); }
.kick-card:hover .thumb { filter: brightness(1.1); }
.kick-card .thumb { aspect-ratio: 16/9; background: var(--raised); display: grid; place-items: center; font-size: 36px; position: relative; overflow: hidden; transition: filter var(--t); }
.kick-card .thumb-img { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7)); display: grid; place-items: center; font-size: 36px; }
.kick-card .badge-live { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; letter-spacing: .5px; }
.kick-card .badge-plat { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.kick-card .badge-viewers { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
.kick-card .body { padding: 10px 12px; }
.kick-card .body .name { font-weight: 700; font-size: 14px; }
.kick-card .body .title { font-size: 12px; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kick-card .body .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.kick-card .body .tag-sm { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--raised); color: var(--dim); }

.live-affiliate-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 28px; text-align: center; }
.live-affiliate-box h3 { font-size: 18px; margin-bottom: 8px; }

/* ============================================================
   DIRECTORY — style Twitch
   ============================================================ */
.dir-hero { background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%); border-radius: var(--radius); padding: 26px 22px; margin-bottom: 22px; }
.dir-hero h2 { font-size: 26px; }
.dir-hero p { color: var(--dim); font-size: 14px; margin-top: 6px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.dir-card { cursor: pointer; border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: var(--t); }
.dir-card:hover { background: var(--raised); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,.5); }
.dir-card:hover .art { filter: brightness(1.1); }
.dir-card .art { aspect-ratio: 3/4; background: var(--raised); display: grid; place-items: center; font-size: 56px; position: relative; transition: filter var(--t); }
.dir-card .art-overlay { position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: linear-gradient(0deg, rgba(0,0,0,.8), transparent); }
.dir-card .art-count { position: absolute; bottom: 8px; left: 10px; font-size: 11px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 4px; }
.dir-card .art-count .dot-red { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.dir-card .body { padding: 10px 12px; }
.dir-card .body .name { font-weight: 700; font-size: 14px; }
.dir-card .body .sub { font-size: 11px; color: var(--mute); margin-top: 2px; }
.dir-card .body .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

/* ============================================================
   PROFIL SOCIAL — style guns.lol amélioré
   ============================================================ */
.social-wrap { max-width: 640px; }
.social-card { --accent: var(--accent); }
.social-card .social-avatar { box-shadow: none; }
.social-badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.social-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--raised); border: 1px solid var(--border); }
.social-badge.prem { color: var(--gold); border-color: var(--gold-line); }
.social-badge.staffrole { color: #5fa8ff; border-color: rgba(95,168,255,.4); background: rgba(95,168,255,.1); }
.role-select { background: var(--raised); border: 1px solid var(--border-mid); color: var(--text); border-radius: 7px; padding: 6px 8px; font-size: 12px; cursor: pointer; }
.role-select:focus { outline: none; border-color: var(--accent-line); }
.social-badge.streamer { color: var(--accent); border-color: var(--accent-line); }
.social-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-top: 18px; }
.social-stats-grid .ss { background: var(--raised); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; }
.social-stats-grid .ss b { font-size: 18px; display: block; color: var(--text); }
.social-stats-grid .ss span { font-size: 11px; color: var(--mute); text-transform: uppercase; }

/* ============================================================
   MARCHÉ — style Steam Community Market
   ============================================================ */
.market-hero { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.market-stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.market-stat-box b { font-size: 22px; display: block; color: var(--accent); }
.market-stat-box span { font-size: 11px; color: var(--mute); text-transform: uppercase; }
.market-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.market-section { margin-bottom: 32px; }
.market-section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.market-section-title .tag-sm { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.market-item-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.market-item-row:last-child { border-bottom: none; }
.market-item-row .ico { font-size: 26px; flex-shrink: 0; }
.market-item-row .info { flex: 1; min-width: 0; }
.market-item-row .nm { font-weight: 600; }
.market-item-row .meta { font-size: 12px; color: var(--mute); margin-top: 2px; }
.market-item-row .price { font-weight: 700; color: var(--gold); flex-shrink: 0; font-size: 15px; }
.market-item-row .sold-cnt { font-size: 11px; color: var(--mute); flex-shrink: 0; text-align: right; }
.market-order-book { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.market-order-col h4 { font-size: 13px; font-weight: 600; color: var(--dim); margin-bottom: 8px; }
.market-order-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.market-order-row.sell { color: var(--red); }
.market-order-row.buy { color: var(--accent); }
.market-item-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.market-item-detail .top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.market-item-detail .big-ico { font-size: 54px; }
.market-price-hero { font-size: 28px; font-weight: 800; color: var(--accent); }
.market-price-sub { font-size: 12px; color: var(--mute); margin-top: 3px; }
.market-price-hero .nego, .vinted-card-price .nego { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }

/* ============================================================
   MARCHÉ STYLE VINTED — cartes annonce, fiche produit, négo, tchat
   ============================================================ */
.market-cat-pills { gap: 7px; }
.vinted-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; transition: var(--t); }
.vinted-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--glow); }
.vinted-card-photo { width: 100%; aspect-ratio: 1/1; background: var(--raised); background-size: cover; background-position: center; display: grid; place-items: center; }
.vinted-card-photo.emoji { font-size: 52px; }
.vinted-card-body { padding: 9px 11px 11px; }
.vinted-card-title { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.vinted-card-meta { font-size: 11px; color: var(--mute); margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.rar-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--r-common); }
.rar-dot.rar-rare, .rar-dot.rar-uncommon { background: var(--r-rare); }
.rar-dot.rar-epic { background: var(--r-epic); }
.rar-dot.rar-legend, .rar-dot.rar-legendary { background: var(--gold); }
.vinted-card-seller { font-size: 11px; color: var(--dim); margin-top: 5px; }
.vinted-card-price { font-weight: 800; color: var(--accent); margin-top: 6px; font-size: 15px; }

.vinted-detail .modal-close { position: absolute; top: 12px; right: 14px; font-size: 18px; color: var(--dim); background: none; z-index: 2; }
.vinted-detail-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.vinted-detail-photo { width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-sm); background: var(--raised); background-size: cover; background-position: center; display: grid; place-items: center; }
.vinted-detail-photo.emoji { font-size: 88px; }
.vinted-cat-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }
.vinted-seller-row { font-size: 13px; color: var(--dim); margin-top: 8px; }
.vinted-desc { font-size: 13px; color: var(--text); margin-top: 12px; line-height: 1.55; white-space: pre-wrap; }
.vinted-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vinted-actions .btn { flex: 1; min-width: 130px; }
.vinted-section { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 16px; }
.vinted-section h3 { font-size: 14px; margin-bottom: 10px; }
.price-hist-box { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.price-spark { width: 100%; height: 56px; display: block; }
.spark-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-top: 8px; }

.offer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }
.offer-row:last-child { border-bottom: none; }
.offer-actions { display: flex; gap: 6px; }

.market-chat { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.mchat-msg { background: var(--raised); border: 1px solid var(--border); border-radius: 10px; padding: 7px 11px; max-width: 80%; align-self: flex-start; }
.mchat-msg.me { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-line); }
.mchat-who { display: block; font-size: 11px; color: var(--mute); margin-bottom: 2px; }
.mchat-txt { font-size: 13px; }
.market-chat-input { display: flex; gap: 8px; margin-top: 10px; }
.market-chat-input input { flex: 1; }

.tx-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 8px; }
.tx-row .ico { font-size: 26px; }
.tx-row .info { flex: 1; min-width: 0; }
.tx-row .nm { font-weight: 600; font-size: 14px; }
.tx-row .meta { font-size: 12px; color: var(--mute); margin-top: 2px; }
.tx-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.vinted-photo-row { display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start; }
.vinted-photo-preview { width: 92px; height: 92px; border-radius: var(--radius-sm); background: var(--raised); border: 1px dashed var(--border-mid); display: grid; place-items: center; font-size: 40px; background-size: cover; background-position: center; flex-shrink: 0; }
.vinted-photo-preview.has-img { border-style: solid; }

@media (max-width: 560px) {
  .vinted-detail-grid { grid-template-columns: 1fr; }
  .vinted-detail-photo { max-width: 220px; margin: 0 auto; }
}

/* ============================================================
   NOTIFICATIONS (cloche navbar) + SALLE DE MATCH
   ============================================================ */
.notif-bell { position: relative; cursor: pointer; font-size: 19px; line-height: 1; padding: 4px; user-select: none; }
.notif-badge { position: absolute; top: -3px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
.notif-dropdown { position: absolute; top: 32px; right: 0; width: 320px; max-height: 420px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); box-shadow: var(--shadow); display: none; z-index: 300; }
.notif-dropdown.open { display: block; }
.notif-head { font-size: 13px; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.notif-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.notif-item.unread { background: var(--accent-soft); }
.notif-title { font-size: 13px; font-weight: 600; }
.notif-body { font-size: 12px; color: var(--dim); margin-top: 2px; }
.notif-empty { padding: 20px 14px; font-size: 13px; color: var(--mute); text-align: center; }

.mr-head { margin-bottom: 8px; }
.mr-rules { background: var(--raised); border: 1px solid var(--gold-line); border-radius: var(--radius-sm); padding: 10px 13px; font-size: 13px; margin-bottom: 14px; }
.mr-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px; }
.mr-vs { font-weight: 800; color: var(--mute); font-size: 13px; }
.mr-teams.multi { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.mr-teams.multi .mp-side { flex: 1 1 130px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.mr-teams.multi .mr-vs { display: none; }
.mp-side-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--mute); margin-bottom: 8px; font-weight: 600; }
.mp { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; flex-wrap: wrap; }
.mp.empty { opacity: .5; }
.mp-av { font-size: 18px; }
.mp-nm { font-weight: 600; }
.mp-ready { font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; }
.mp-res { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.mp-res.win { color: var(--accent); background: var(--accent-soft); }
.mp-res.loss { color: var(--red); background: rgba(255,82,99,.14); }
.mr-actions { margin-bottom: 6px; }
.mr-info { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; text-align: center; }
.mr-result-btns { display: flex; gap: 10px; }
.mr-result-btns .btn { flex: 1; }

/* Pages salle de match / conversation marché (tchat à gauche, infos à droite) */
.match-layout, .convo-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 14px; align-items: start; }
.match-layout.chat-fs { grid-template-columns: 1fr; }
.match-layout.chat-fs .match-info-col { display: none; }
.match-chat-col { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: 72vh; }
.match-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.match-chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.match-chat-msgs .mchat-msg { background: var(--raised); border: 1px solid var(--border); border-radius: 10px; padding: 7px 11px; max-width: 78%; align-self: flex-start; }
.match-chat-msgs .mchat-msg.me { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-line); }
.match-chat-msgs .mchat-msg.staff { align-self: center; background: rgba(255,82,99,.12); border-color: rgba(255,82,99,.4); max-width: 92%; }
.match-chat-msgs .mchat-who { display: block; font-size: 11px; color: var(--mute); margin-bottom: 2px; }
.match-chat-msgs .mchat-txt { font-size: 14px; word-break: break-word; }
.match-chat-inputbar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.match-chat-inputbar input { flex: 1; }
.match-info-col { display: flex; flex-direction: column; gap: 14px; }
.match-info-col .mr-teams { margin-bottom: 0; }
.mr-staff { background: rgba(255,82,99,.08); border: 1px solid rgba(255,82,99,.3); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mr-reqs { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.mp-move { margin-left: auto; width: 24px; height: 24px; border-radius: 6px; background: var(--raised); border: 1px solid var(--border-mid); color: var(--accent); font-size: 13px; }
.mp-move:hover { border-color: var(--accent-line); }
.mr-stake { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 10px; font-size: 13px; }
.stake-prop { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dispute-card { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.dispute-card:last-child { border-bottom: none; }
.dispute-info { font-size: 13px; }
.dispute-act { display: flex; gap: 6px; flex-wrap: wrap; }

.swapped-wrap { margin-top: 8px; }
.swapped-frame { width: 100%; height: 620px; border: 1px solid var(--border-mid); border-radius: var(--radius); background: var(--surface); }

/* ============================================================
   MARCHÉ — refonte Steam Market CS:GO / G2G / Vinted
   ============================================================ */
.rar-edge-common    { --rc: #8b93a7; }
.rar-edge-uncommon  { --rc: #5e98d9; }
.rar-edge-rare      { --rc: #4b8bff; }
.rar-edge-epic      { --rc: #b249ff; }
.rar-edge-legend, .rar-edge-legendary { --rc: var(--gold); }
.rar-dot.rar-uncommon { background: #5e98d9; }

.mkt-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.mkt-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; background: var(--raised); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); padding: 0 12px; }
.mkt-search input { flex: 1; background: none; border: none; color: var(--text); padding: 11px 0; font-size: 14px; outline: none; }
.mkt-search-ico { color: var(--mute); }
.mkt-sort { background: var(--raised); border: 1px solid var(--border-mid); color: var(--text); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; cursor: pointer; }

.mkt-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.mkt-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
.mkt-fgroup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.mkt-fgroup h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--mute); margin-bottom: 8px; }
.mkt-flist { display: flex; flex-direction: column; gap: 2px; }
.mkt-fitem { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 9px; border-radius: 7px; background: none; color: var(--dim); font-size: 13px; cursor: pointer; transition: var(--t); }
.mkt-fitem:hover { background: var(--raised); color: var(--text); }
.mkt-fitem.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.mkt-mini-stats { display: flex; flex-direction: column; gap: 6px; }
.mms-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); }
.mms-row b { color: var(--accent); }
.mkt-mini-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; cursor: pointer; }
.mkt-mini-row:last-child { border-bottom: none; }
.mkt-mini-row .mr-ico { font-size: 17px; }
.mkt-mini-row .mr-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-mini-row .mr-pr { color: var(--accent); font-weight: 700; }
.mkt-mini-x { background: none; color: var(--mute); cursor: pointer; font-size: 12px; }
.mkt-mini-x:hover { color: var(--red); }

.mkt-strip { background: var(--surface); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 16px; }
.mkt-strip-h { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.mkt-strip-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.mkt-pop-card { flex: 0 0 130px; background: var(--raised); border: 1px solid var(--border); border-top: 3px solid var(--rc, var(--border-mid)); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.mkt-pop-card .pop-ico { font-size: 30px; }
.mkt-pop-card .pop-nm { font-size: 12px; font-weight: 600; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-pop-card .pop-meta { font-size: 11px; color: var(--mute); }
.mkt-pop-card .pop-pr { font-size: 13px; font-weight: 800; color: var(--accent); margin-top: 4px; }

.mkt-results-head { font-size: 13px; margin-bottom: 12px; }
/* Barre de catégories horizontale (nav Vinted) */
.mkt-catbar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 4px; scrollbar-width: thin; }
.mkt-catbar::-webkit-scrollbar { height: 5px; }
.mkt-catchip { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: var(--t); }
.mkt-catchip:hover { border-color: var(--accent-line); }
.mkt-catchip.active { background: var(--accent); color: var(--accent-ink, #1a1205); border-color: var(--accent); }

/* Grille + carte "poste" façon Vinted (photo verticale dominante) */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px 14px; }
.mkt-card { position: relative; background: transparent; cursor: pointer; }
.mkt-card-photowrap { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--bg-2); box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .16s, box-shadow .16s; }
.mkt-card:hover .mkt-card-photowrap { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.4); }
.mkt-card-photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.mkt-card-photo.emoji { display: flex; align-items: center; justify-content: center; font-size: 66px; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc, #555) 20%, var(--bg-2)), var(--bg-2)); }
.mkt-card-rar { position: absolute; top: 8px; left: 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.6); color: var(--rc, #fff); backdrop-filter: blur(2px); }
.mkt-card-status { position: absolute; bottom: 8px; right: 8px; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.65); color: var(--accent); }
/* Avatar vendeur en médaillon (coin bas-gauche de la photo) */
.mkt-card-avi { position: absolute; left: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,.85); background: var(--raised); display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.mkt-card-avi .ava-i { width: 100%; height: 100%; }
.mkt-card-avi .ava-e { font-size: 15px; }
/* Bloc infos sous la photo */
.mkt-card-info { padding: 8px 3px 2px; }
.mkt-card-title { font-size: 13px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-card-sub { font-size: 11px; color: var(--dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-card-price { font-weight: 800; color: var(--text); font-size: 15px; margin-top: 5px; }
.mkt-card-incl { font-size: 11px; color: #2ec7b8; font-weight: 600; margin-top: 1px; }
.mkt-incl-nego { color: var(--accent); }
.mkt-card-nego { font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; }
/* Cœur favori (overlay sur la photo, façon Vinted) */
.mkt-fav { position: absolute; top: 6px; right: 6px; z-index: 3; border: none; background: rgba(10,14,20,.5); backdrop-filter: blur(3px); border-radius: 999px; min-width: 30px; height: 30px; padding: 0 7px; line-height: 1; cursor: pointer; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 3px; transition: transform .12s, background .2s; }
.mkt-fav:hover { transform: scale(1.14); background: rgba(10,14,20,.72); }
.mkt-fav-ic { font-size: 16px; }
.mkt-fav.on .mkt-fav-ic { color: var(--loss); }
.mkt-fav-n { font-size: 11px; font-weight: 800; }
.mkt-fav.detail { position: static; background: var(--raised); color: var(--text); border: 1px solid var(--border); border-radius: 999px; height: auto; font-size: 15px; padding: 6px 12px; margin-left: 8px; vertical-align: middle; }
.mkt-fav.detail.on { border-color: var(--red); color: var(--loss); }
.mkt-fav-count { font-size: 12px; color: var(--dim); margin-left: 8px; }
/* Note vendeur sur carte */
.mkt-card-rating { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 10.5px; }
.mkt-rate.up { color: var(--win); font-weight: 800; }
.mkt-rate.new { color: var(--accent); font-weight: 700; }
.mkt-sales { color: var(--dim); }
.mkt-card-badges { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; }
.mkt-card-prot { font-size: 12px; opacity: .85; cursor: help; }
/* Fourchette de prix */
.mkt-price-range { display: flex; align-items: center; gap: 6px; }
.mkt-price-range input { width: 100%; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-size: 12px; }
.mkt-price-range span { color: var(--dim); }
/* Achat protégé + carte vendeur (fiche) */
.mkt-protect { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--win); background: rgba(38,208,124,.1); border: 1px solid rgba(38,208,124,.3); border-radius: 8px; padding: 6px 10px; margin: 6px 0 10px; }
.mkt-seller-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 10px 0; cursor: pointer; transition: var(--t); background: var(--bg-2); }
.mkt-seller-card:hover { border-color: var(--accent-line); }
.mkt-seller-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.mkt-seller-link { margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 700; }
.mkt-seller-stats { font-size: 12px; margin-top: 5px; color: var(--muted); }
.mkt-seller-revs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.mkt-rev { font-size: 11.5px; display: flex; gap: 6px; align-items: baseline; }
.mkt-rev.pos span { color: var(--text); } .mkt-rev.neg span { color: var(--red); }
.mkt-rev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Articles similaires */
.mkt-sim { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.mkt-sim-card { border: 1px solid var(--border); border-radius: 10px; padding: 8px; cursor: pointer; text-align: center; transition: var(--t); background: var(--surface); }
.mkt-sim-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.mkt-sim-ico { font-size: 30px; height: 48px; display: flex; align-items: center; justify-content: center; }
.mkt-sim-photo { width: 100%; height: 48px; background-size: cover; background-position: center; border-radius: 6px; }
.mkt-sim-nm { font-size: 11px; font-weight: 700; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-sim-pr { font-size: 12px; font-weight: 800; color: var(--accent); margin-top: 2px; }
#marketFavChip.active { background: rgba(224,65,78,.18); border-color: var(--red); color: var(--loss); }
/* ---- Enchères ---- */
.mkt-card-auc { position: absolute; top: 8px; right: 44px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 3px 7px; border-radius: 999px; background: linear-gradient(180deg, var(--accent), #e0951a); color: #3a2606; }
.mkt-auc-tag { font-size: 10px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .3px; }
.mkt-auc-line { color: var(--dim) !important; }
.mkt-auc-line.leading { color: var(--win) !important; font-weight: 700; }
.mkt-auc-time.urgent { color: var(--loss); font-weight: 800; }
.seg-toggle { display: flex; gap: 6px; }
.seg-toggle .seg { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; transition: var(--t); }
.seg-toggle .seg.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.auc-panel { border: 1px solid var(--accent-line); border-radius: 14px; padding: 14px; background: var(--bg-2); }
.auc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.auc-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.auc-cur { font-size: 24px; font-weight: 900; color: var(--accent); }
.auc-right { text-align: right; }
.auc-time { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.auc-time.urgent { color: var(--loss); }
.auc-meta { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.auc-leading { color: var(--win); font-weight: 800; }
.auc-bidrow { display: flex; gap: 8px; }
.auc-bidrow input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-size: 15px; font-weight: 700; }
.auc-hero { color: var(--accent); font-weight: 800; }
.auc-hist { margin-top: 12px; }
.auc-hist-h { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
.auc-bid-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.auc-bid-amt { font-weight: 800; color: var(--accent); }

/* Carnet d'ordres (fiche article) façon Steam */
.order-book { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.order-col h4 { font-size: 12px; color: var(--mute); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.order-line { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 8px; border-radius: 5px; margin-bottom: 3px; }
.order-line.sell { background: rgba(255,82,99,.1); color: #ff8b96; }
.order-line.buy { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 860px) {
  .mkt-layout { grid-template-columns: 1fr; }
  .mkt-sidebar { position: static; flex-direction: column; }
}

/* Dock DROIT : Gains + Chat (façon chat Stake ; la sidebar zones occupe la gauche) */
.side-dock { position: fixed; right: 0; top: 0; bottom: 0; width: 300px; z-index: 1050; background: var(--bg-2); border-left: 1px solid var(--border-mid); display: flex; flex-direction: column; transition: transform .22s ease; }
body.dock-collapsed .side-dock { transform: translateX(100%); }
/* sur écran large, le contenu se décale pour faire place au dock (vraie sidebar) */
@media (min-width: 1100px) { body:not(.dock-collapsed) { padding-right: 300px; } }
.dock-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dock-title { font-weight: 800; font-size: 14px; color: var(--accent); }
.dock-x, .dock-reopen { background: var(--raised); border: 1px solid var(--border-mid); color: var(--text); width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-weight: 700; }
.dock-reopen { position: fixed; right: 0; top: 70px; z-index: 901; width: 30px; height: 40px; border-radius: 8px 0 0 8px; border-right: none; }
.dock-sect { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); min-height: 0; }
.dock-sect.dock-chat { flex: 1; min-height: 0; }
.dock-sect-h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; background: none; color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; }
.dock-sect.collapsed .dock-sect-body { display: none; }
.dock-sect.collapsed .dock-caret { transform: rotate(-90deg); }
.dock-caret { transition: transform .15s ease; color: var(--mute); }
#dockGainsBody { max-height: 34vh; overflow-y: auto; padding: 4px 12px 10px; }
.dock-gain-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.dock-gain-row:last-child { border-bottom: none; }
.dock-gain-row .lbl { color: var(--dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-gain-row .amt.pos { color: var(--accent); font-weight: 700; }
.dock-gain-row .amt.neg { color: var(--red); font-weight: 700; }
.dock-gain-head { font-size: 12px; color: var(--mute); padding: 8px 0 4px; }
.dock-gain-head b { color: var(--accent); font-size: 16px; }
.dock-chat-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dock-chat-msgs { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.dock-cmsg { font-size: 12px; line-height: 1.4; }
.dock-cmsg b { color: var(--accent); cursor: pointer; }
.dock-chat-input { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.dock-chat-input input { flex: 1; }
@media (max-width: 1100px) { .side-dock { top: 0; z-index: 1300; box-shadow: var(--shadow); } }

/* Profil vendeur + avis (note % positif/négatif) */
.seller-block { margin-top: 22px; text-align: left; border-top: 1px solid var(--border); padding-top: 18px; }
.seller-block h3 { font-size: 15px; margin-bottom: 12px; }
.seller-sub { font-size: 13px; margin: 16px 0 8px; color: var(--dim); }
.seller-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seller-stats-row .ss { background: var(--raised); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.seller-stats-row .ss b { font-size: 18px; display: block; color: var(--text); }
.seller-stats-row .ss span { font-size: 11px; color: var(--mute); text-transform: uppercase; }
.seller-rating { margin-top: 14px; }
.rating-head { font-size: 13px; margin-bottom: 6px; }
.rating-bar { height: 10px; border-radius: 999px; overflow: hidden; display: flex; background: var(--raised); }
.rating-bar .pos { background: var(--accent); }
.rating-bar .neg { background: var(--red); }
.rating-legend { display: flex; justify-content: space-between; font-size: 12px; margin-top: 5px; }
.rating-legend .pos { color: var(--accent); } .rating-legend .neg { color: var(--red); }
.seller-items { display: flex; flex-direction: column; gap: 6px; }
.seller-item { display: flex; align-items: center; gap: 10px; background: var(--raised); border-radius: var(--radius-sm); padding: 8px 11px; cursor: pointer; transition: var(--t); }
.seller-item:hover { background: var(--hover); }
.seller-item .si-ico { font-size: 20px; } .seller-item .si-nm { flex: 1; font-size: 13px; font-weight: 600; } .seller-item .si-pr { color: var(--accent); font-weight: 700; font-size: 13px; }
.seller-reviews { display: flex; flex-direction: column; gap: 8px; }
.srev { background: var(--raised); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 8px 11px; }
.srev.neg { border-left-color: var(--red); }
.srev-h { font-size: 12px; font-weight: 700; display: block; }
.srev-c { font-size: 13px; color: var(--dim); }
@media (max-width: 760px) {
  .match-layout, .convo-layout { grid-template-columns: 1fr; }
  .match-chat-col { height: 60vh; }
}

/* Messagerie marché : inbox (gauche) + fil (droite) */
.convo-shell { display: grid; grid-template-columns: 280px 1fr; gap: 16px; margin-top: 14px; align-items: start; }
.convo-inbox { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; max-height: 74vh; overflow-y: auto; }
.convo-inbox-head { padding: 12px 14px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.convo-item { display: flex; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--t); }
.convo-item:hover { background: var(--raised); }
.convo-item.active { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.convo-item .ci-ico { font-size: 24px; flex-shrink: 0; }
.convo-item .ci-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ci-top { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.ci-top small { color: var(--mute); font-weight: 500; }
.ci-badge { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 0 6px; }
.ci-item { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-last { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-thread { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: 74vh; }
.convo-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.convo-head-r { display: flex; gap: 6px; flex-wrap: wrap; }
.convo-thread .match-chat-msgs { flex: 1; }
.offer-bubble { align-self: flex-start; max-width: 78%; background: var(--raised); border: 1px solid var(--gold-line); border-radius: 12px; padding: 9px 13px; }
.offer-bubble.me { align-self: flex-end; }
.offer-bubble.accepted { border-color: var(--accent-line); }
.offer-bubble.declined { opacity: .6; }
.offer-bubble .ob-h { font-size: 13px; }
.offer-bubble .ob-act { display: flex; gap: 6px; margin-top: 7px; }
@media (max-width: 760px) { .convo-shell { grid-template-columns: 1fr; } .convo-inbox { max-height: 200px; } }

/* ============================================================
   PROFIL AVANCÉ (guns.lol) — fond, particules, effets de nom, audio, verre
   ============================================================ */
.social-wrap.has-custom-bg { background-size: cover; background-position: center; background-attachment: fixed; border-radius: var(--radius); padding: 18px; }
.social-wrap.has-custom-bg .social-card { background: rgba(18,21,20, var(--card-alpha, 0.85)); backdrop-filter: blur(7px); }
.social-card { position: relative; }
.profile-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; border-radius: var(--radius); }
.profile-fx .fx-p { position: absolute; top: -24px; font-size: 14px; opacity: .8; animation-name: fx-fall; animation-timing-function: linear; animation-iteration-count: infinite; will-change: transform; }
.social-card > *:not(.profile-fx) { position: relative; z-index: 1; }
@keyframes fx-fall { 0% { transform: translateY(-24px) translateX(0); } 100% { transform: translateY(640px) translateX(14px); } }
.fx-snow .fx-p { color: #cfe8ff; }
.fx-rain .fx-p { color: #6fb7ff; opacity: .55; animation-name: fx-fall-fast; }
.fx-stars .fx-p { color: var(--gold); animation-name: fx-twinkle; top: auto; }
.fx-stars .fx-p:nth-child(odd) { top: 20%; } .fx-stars .fx-p:nth-child(even) { top: 60%; }
.fx-confetti .fx-p { animation-name: fx-fall-spin; }
.fx-confetti .fx-p:nth-child(3n) { color: var(--accent); } .fx-confetti .fx-p:nth-child(3n+1) { color: var(--gold); } .fx-confetti .fx-p:nth-child(3n+2) { color: var(--r-epic); }
.fx-matrix .fx-p { color: var(--accent); font-family: ui-monospace, monospace; animation-name: fx-fall-fast; text-shadow: 0 0 6px var(--accent); }
@keyframes fx-fall-fast { 0% { transform: translateY(-24px); } 100% { transform: translateY(640px); } }
@keyframes fx-fall-spin { 0% { transform: translateY(-24px) rotate(0); } 100% { transform: translateY(640px) rotate(360deg); } }
@keyframes fx-twinkle { 0%,100% { opacity: .15; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.3); } }

.so-name-txt.name-fx-glow { color: var(--accent); text-shadow: 0 0 8px var(--accent-glow), 0 0 18px var(--accent-glow); }
.so-name-txt.name-fx-gradient { background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.so-name-txt.name-fx-typewriter { display: inline-block; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--accent); max-width: 22ch; animation: tw 2.4s steps(22) 1 both, twcaret .8s step-end infinite; }
@keyframes tw { from { max-width: 0; } to { max-width: 22ch; } }
@keyframes twcaret { 50% { border-color: transparent; } }

.profile-audio { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 5px 12px 5px 5px; margin: 10px auto 0; backdrop-filter: blur(4px); }
.profile-audio .pa-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; display: grid; place-items: center; font-weight: 700; }
.profile-audio .pa-title { font-size: 12px; font-weight: 600; }

.adv-custom { display: flex; flex-direction: column; gap: 10px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.adv-custom label { font-size: 12px; }
.adv-custom input[type=range] { width: 100%; }

/* ============================================================
   CODES DE MATCH
   ============================================================ */
.match-code-box { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.match-code-box .code { font-family: ui-monospace, monospace; font-size: 20px; font-weight: 800; letter-spacing: 4px; color: var(--accent); }
.match-code-box .lbl { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.join-code-row { display: flex; gap: 8px; margin-top: 14px; }
.join-code-row input { flex: 1; font-family: ui-monospace, monospace; letter-spacing: 3px; text-transform: uppercase; font-size: 16px; font-weight: 700; text-align: center; }

/* ============================================================
   MODE STREAMER
   ============================================================ */
.streamer-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(239,191,4,.1); color: var(--accent); border: 1px solid var(--accent-line); }
.privacy-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.privacy-row:last-child { border-bottom: none; }
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--raised); border: 1px solid var(--border); border-radius: 22px; transition: var(--t); }
.toggle-slider:before { position: absolute; content: ''; height: 16px; width: 16px; left: 2px; top: 2px; background: var(--dim); border-radius: 50%; transition: var(--t); }
.toggle-switch input:checked + .toggle-slider { background: var(--accent-soft); border-color: var(--accent-line); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); background: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .burger { display: block; }
  .app-side.open { display: flex; top: 60px; width: min(78vw, 300px); box-shadow: var(--shadow); z-index: 1301; }
  .hero-grid, .profile-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .grid-5, .plan-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tourn { grid-template-columns: 1fr; }
  .tourn .action { text-align: left; }
  .hero-stats { flex-wrap: wrap; gap: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .search-row { width: 100%; min-width: 0; }
  .live-featured { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stat-mini { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .socials-edit { grid-template-columns: 1fr; }
}
/* Wallet : sous 760px il rentre dans le flux nav-right (plus de centrage absolu) */
@media (max-width: 760px) {
  .wallet { position: static; transform: none; }
  .wallet .buy { display: none; }
  .wallet .bal { border-radius: var(--radius-sm); }
}

/* ---------- Sous-navigation de zone ---------- */
.zone-nav { position: sticky; top: 60px; z-index: 99; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.zone-nav-inner { display: flex; align-items: center; gap: 16px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.zone-nav-inner::-webkit-scrollbar { display: none; }
.zone-nav-title { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; letter-spacing: -0.01em; }
.zone-nav-pills { display: flex; gap: 4px; }
.zpill { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--dim); cursor: pointer; background: transparent; border: 1px solid transparent; white-space: nowrap; transition: var(--t); }
.zpill:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.zpill.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }


/* ---------- Fil d'Ariane (pages profondes) ---------- */
.crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 14px; }
.crumb a { color: var(--dim); cursor: pointer; font-weight: 600; transition: var(--t); }
.crumb a:hover { color: var(--accent); }
.crumb-sep { color: var(--mute); }
.crumb-cur { color: var(--text); font-weight: 600; }

/* ---------- Toggle "options avancées" (modal création) ---------- */
.adv-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--dim); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0; margin: 2px 0 10px; }
.adv-toggle:hover { color: var(--text); }

/* ---------- Indice de mode (relie Matches <-> Matchmaking) ---------- */
.mode-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--dim); margin: -4px 0 18px; }
.mode-hint-link { color: var(--accent); font-weight: 600; cursor: pointer; }
.mode-hint-link:hover { text-decoration: underline; }

/* ---------- Bandeau de bienvenue (onboarding) ---------- */
.welcome-card { position: relative; display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 18px 20px; }
.welcome-emoji { font-size: 34px; line-height: 1; }
.welcome-body h3 { margin: 0 0 4px; }
.welcome-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.welcome-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--mute); font-size: 16px; cursor: pointer; line-height: 1; }
.welcome-x:hover { color: var(--text); }

/* ---------- Barre de recherche de hub (casino) ---------- */
.hub-search { display: flex; align-items: center; gap: 8px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; max-width: 420px; margin: 0 0 20px; transition: var(--t); }
.hub-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.hub-search-ic { color: var(--mute); font-size: 14px; }
.hub-search input { flex: 1; background: none; border: none; color: var(--text); font-size: 14px; padding: 11px 0; outline: none; }
.hub-search input::placeholder { color: var(--mute); }

/* ---------- Shelves thématiques (rangées horizontales, façon Stake) ---------- */
.shelf { margin: 0 0 26px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.shelf-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; min-width: 0; }
.shelf-title .shelf-ic { font-size: 20px; }
.shelf-nav { display: flex; align-items: center; gap: 10px; flex: none; }
.shelf-viewall { font-size: 12px; font-weight: 600; color: var(--dim); cursor: pointer; background: none; border: none; white-space: nowrap; transition: var(--t); }
.shelf-viewall:hover { color: var(--accent); }
.shelf-arrows { display: flex; gap: 4px; }
.shelf-arrow { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--raised); color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: 16px; line-height: 1; transition: var(--t); }
.shelf-arrow:hover { border-color: var(--accent-line); color: var(--accent); }
.shelf-track { display: grid; grid-auto-flow: column; grid-auto-columns: 152px; gap: 12px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track.wide { grid-auto-columns: 290px; }
.shelf-track.games { grid-auto-columns: 172px; }
.shelf-empty { color: var(--mute); font-size: 13px; padding: 18px; border: 1px dashed var(--border-mid); border-radius: var(--radius); }

/* Tuile de jeu (art-first, façon "Stake Originals" : artwork duotone plein cadre) */
.stile { border-radius: 12px; overflow: hidden; background: var(--surface); transition: var(--t); display: flex; flex-direction: column; }
.stile:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }
.stile-art { aspect-ratio: 3/4; position: relative; cursor: pointer; overflow: hidden; background: var(--raised); }
/* VOILE DÉGRADÉ — indispensable, pas décoratif. Le texte de la tuile doit rester lisible
   sur N'IMPORTE QUELLE image : l'admin peut remplacer l'artwork par la sienne depuis le
   mode édition. Une simple ombre portée suffit sur un fond sombre et échoue sur un fond
   clair — c'est le dispositif qu'utilisent les deux références. Le haut est voilé plus
   légèrement que le bas : il ne porte qu'un badge, le bas porte le nom du jeu. */
.stile-art::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.80) 0%, rgba(0,0,0,.32) 30%, rgba(0,0,0,0) 58%),
              linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 26%);
}
.stile-art svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: filter var(--t); }
.stile-art-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: filter var(--t); }
.stile:hover .stile-art-img { filter: brightness(1.16); }
.stile:hover .stile-art svg { filter: brightness(1.16); }
/* Le nom se pose EN BAS, là où le voile est le plus dense — comme chez les deux
   références. En haut, il masquait le sujet de l'illustration. */
.stile-nm-art { position: absolute; bottom: var(--sp-2); left: 0; right: 0; z-index: 2; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-base); line-height: 1.1;
  text-transform: uppercase; letter-spacing: .03em; color: #fff; padding: 0 var(--sp-2); }
/* Deux badges empilés en haut à gauche. Hiérarchie voulue : la CONTREPARTIE est un fait
   de structure (neutre, discret), l'ÉQUITÉ VÉRIFIABLE est la garantie rare (accent).
   Aucun badge rendu si le jeu n'a ni l'un ni l'autre — pas de bloc vide. */
.stile-badges { position: absolute; top: var(--sp-2); left: var(--sp-2); z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.stile-badge { font-size: var(--fs-xs); font-weight: 700; padding: 2px var(--sp-2);
  border-radius: var(--radius-xs); background: rgba(0,0,0,.55); color: var(--text);
  letter-spacing: .3px; line-height: 1.5; }
.stile-badge.alt { color: var(--accent); }
/* Révélé au survol, au centre : il ne dispute plus le coin au nom du jeu. */
.stile-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -46%) scale(.94);
  z-index: 3; display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm);
  font-weight: 700; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.stile-art:hover .stile-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.stile-body { padding: 8px 9px 9px; display: flex; flex-direction: column; gap: 7px; }
.stile-live { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.stile-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--win); flex: none; animation: livepulse 2s infinite; }
.stile-live b { color: var(--text); font-weight: 600; }
@keyframes livepulse { 50% { opacity: .4; } }
.stile-cta { width: 100%; padding: 6px 4px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .stile-live::before { animation: none; } }

/* ---------- Éditeur rapide (admin) ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }
.ed-lbl { display: block; font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 5px; }
.ed-in { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; }
.ed-in:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.ed-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .ed-row { grid-template-columns: 1fr; } }
.ed-check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0 2px; cursor: pointer; }
.ed-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ed-saved { color: var(--win, var(--win)); font-weight: 700; font-size: 13px; }

/* Éditeur de contenu (jeux + casino) */
.ce-block { padding: 8px 0; border-bottom: 1px solid var(--border); }
.ce-block:last-child { border-bottom: none; }
.ce-row { display: flex; align-items: center; gap: 8px; }
.ce-subs { margin: 6px 0 2px 34px; display: flex; flex-direction: column; gap: 6px; }
.ce-subrow { display: flex; align-items: center; gap: 8px; }
.ce-sub-arrow { color: var(--mute); flex: none; }
.ce-thumb { width: 34px; height: 34px; border-radius: 8px; background: var(--raised) center/cover no-repeat; flex: none; }
.ce-emoji { width: 34px; height: 34px; border-radius: 8px; background: var(--raised); display: grid; place-items: center; font-size: 19px; flex: none; }
.ce-nm { flex: 0 0 130px; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-row .ce-name, .ce-row .ce-img, .ce-row .ce-casimg, .ce-subrow .ce-sname { flex: 1; min-width: 0; }

/* Barre d'édition inline (accueil, admin) */
.inline-edit-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1400; display: none; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.inline-edit-bar.show { display: flex; }
.inline-edit-bar .ie-msg { font-size: 13px; color: var(--dim); }
.ie-active { outline: 2px dashed var(--accent-line); outline-offset: 3px; border-radius: 6px; cursor: text; transition: outline-color var(--t); }
.ie-active:hover { outline-color: var(--accent); }
/* Image échangeable en mode édition */
.ie-img { cursor: pointer; position: relative; outline: 2px dashed rgba(239,191,4,.5); outline-offset: -2px; }
.ie-img::after { content: '🖼️'; position: absolute; top: 6px; left: 6px; z-index: 5; background: rgba(6,7,15,.75); border-radius: 6px; padding: 2px 6px; font-size: 13px; pointer-events: none; }
/* Bouton de suppression (visible seulement quand le mode édition est actif) */
.ie-delbtn { position: absolute; top: 6px; right: 6px; z-index: 6; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 13px; display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
body.ie-on .ie-delbtn { display: inline-flex; }
body.ie-on .tourn { position: relative; }
.ie-fab { position: fixed; right: 18px; bottom: 18px; z-index: 1200; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; padding: 11px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.5); display: none; }
.ie-fab.show { display: inline-flex; align-items: center; gap: 7px; }
/* Le FAB se pose en bas a droite... exactement la ou le dock met son champ de chat : il le
   recouvrait (et avec lui les boutons de bas de page). On le decale de la largeur du dock
   quand celui-ci est ouvert, comme `body { padding-right: 300px }` le fait pour le contenu. */
@media (min-width: 1100px) { body:not(.dock-collapsed) .ie-fab { right: 318px; } }

/* ---------- Bandeau "Événement à la une" (accueil, éditable admin) ---------- */
.event-banner { display: flex; gap: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.event-banner .ev-media { flex: 0 0 38%; min-height: 190px; background-size: cover; background-position: center; background-color: var(--raised); }
.event-banner .ev-media.ev-emoji { display: grid; place-items: center; font-size: 74px; }
.event-banner .ev-body { flex: 1; min-width: 0; padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.ev-tag { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ev-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.ev-desc { color: var(--dim); font-size: 14px; max-width: 560px; }
.ev-countdown { display: flex; gap: 10px; margin-top: 4px; }
.ev-cd-cell { background: var(--bg); border-radius: 8px; padding: 8px 12px; text-align: center; min-width: 56px; }
.ev-cd-cell b { font-family: var(--font-display); font-size: 24px; font-weight: 700; display: block; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1; }
.ev-cd-cell span { font-size: 10px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.ev-live { color: var(--red); font-weight: 700; font-size: 15px; }
.ev-cta { margin-top: 6px; }
@media (max-width: 680px) { .event-banner { flex-direction: column; } .event-banner .ev-media { flex-basis: 150px; } }

/* ---------- Onglets catégorie en capsule (accueil, façon Stake) ---------- */
.cat-caps { display: flex; gap: 6px; background: var(--surface); border-radius: 26px; padding: 5px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cat-caps::-webkit-scrollbar { display: none; }
.cat-caps .cap { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 22px; font-size: 13.5px; font-weight: 700; color: var(--dim); white-space: nowrap; transition: var(--t); }
.cat-caps .cap:hover { color: var(--text); }
.cat-caps .cap.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- Carte de bienvenue connectée (rang + RR) ---------- */
.home-welcome { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  background: var(--surface); border-radius: var(--radius); padding: 20px 24px; }
.hw-main { min-width: 0; flex: 1 1 320px; }
.hw-hi { color: var(--dim); font-size: 14px; }
.hw-name { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: .01em; margin: 2px 0 14px; }
.hw-rankrow { display: flex; align-items: center; gap: 14px; max-width: 460px; }
.hw-badge { flex: none; }
.hw-rankinfo { flex: 1; min-width: 0; }
.hw-lbl { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--dim); margin-bottom: 7px; }
.hw-lbl span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-rr { flex: none; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.hw-bar { height: 9px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.hw-bar i { display: block; height: 100%; border-radius: 6px; }
.hw-noRank { color: var(--dim); font-size: 13.5px; max-width: 460px; }
.hw-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Récompense quotidienne + série ---------- */
.daily-card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; }
.daily-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.daily-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.daily-streak { margin-left: 12px; font-size: 13px; font-weight: 700; color: var(--gold-hi, var(--accent)); }
.daily-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.daily-cell { position: relative; background: var(--raised); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center; transition: var(--t); }
.daily-cell .dc-day { display: block; font-size: 10px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.daily-cell .dc-amt { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.daily-cell.done { opacity: .55; }
.daily-cell.done .dc-amt { color: var(--dim); }
.daily-cell.done .dc-check { position: absolute; top: 4px; right: 6px; color: var(--win, var(--win)); font-weight: 800; font-size: 12px; }
.daily-cell.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.daily-cell.active .dc-amt { color: var(--accent); }
@media (max-width: 560px) { .daily-strip { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Tableau "Paris en direct" (accueil, façon Stake) ---------- */
.livewrap { background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }
.lt-head { padding: 14px 16px 4px; font-size: 15px; font-weight: 700; }
.lt-scroll { overflow-x: auto; }
table.lt { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.lt thead th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 12px 16px 8px; }
table.lt tbody td { padding: 10px 16px; }
table.lt tbody tr { cursor: pointer; transition: var(--t); }
table.lt tbody tr:nth-child(odd) { background: rgba(255,255,255,0.022); }
table.lt tbody tr:hover { background: var(--raised); }
.lt-g { font-weight: 700; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.lt-gi { width: 26px; height: 26px; border-radius: 7px; background: var(--raised); display: grid; place-items: center; font-size: 13px; flex: none; }
.lt-who { color: var(--dim); font-weight: 600; }
.lt-hour { color: var(--mute); font-size: 12.5px; }
.lt-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.lt-up { color: var(--win); font-weight: 700; }

/* ---------- Matchmaking ---------- */
.mm-panel { text-align: center; }
.mm-panel .field { text-align: left; }
.mm-spinner { width: 46px; height: 46px; margin: 4px auto 16px; border-radius: 50%; border: 3px solid var(--border-mid); border-top-color: var(--accent); animation: mm-spin 0.9s linear infinite; }
@keyframes mm-spin { to { transform: rotate(360deg); } }
.mm-queued-fmt { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.mm-queued-time { color: var(--dim); font-size: 14px; margin-bottom: 6px; }
.mm-found-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; text-align: left; }
.mm-countdown { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent-line); color: var(--accent); font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mm-roster { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 16px; }
.mm-roster-p { display: flex; align-items: center; gap: 6px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px 6px 6px; font-size: 13px; }
.mm-roster-p.team-2 { border-color: var(--accent-line); }
.mm-roster-p .ava-e, .mm-roster-p .ava-i { width: 22px; height: 22px; border-radius: 50%; }
.mm-roster-p.accepted { opacity: 1; box-shadow: 0 0 0 1px var(--green, #3ecf7a); }
.mm-roster-p.waiting { opacity: 0.6; }
.mm-found-actions { display: flex; gap: 10px; justify-content: center; }
.mm-found-actions .btn { flex: 1; max-width: 220px; }

/* ---- COLLECTION (façon OpenSea) ---- */
.col-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.col-stat { flex: 1 1 120px; background: var(--surface); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.col-stat span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.col-stat b { font-size: 18px; font-weight: 800; color: var(--text); font-family: var(--font-display); }
.col-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.col-filters select { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-size: 13px; }
.col-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.col-tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; cursor: pointer; text-align: left; color: var(--text); transition: var(--t); overflow: hidden; }
.col-tile:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.col-tile.owned { border-color: var(--accent); }
.col-art { width: 100%; aspect-ratio: 1; border-radius: 10px; image-rendering: pixelated; display: block; background: var(--bg-2); }
.col-name { font-size: 13px; font-weight: 700; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 11px; color: var(--muted); }
.col-rar { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.col-price { font-size: 13px; font-weight: 800; margin-top: 4px; color: var(--accent); font-family: var(--font-display); }
.col-num { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 700; }
.col-badge { position: absolute; top: 8px; right: 8px; background: var(--accent); color: #000; border-radius: 999px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; }
.col-soldout { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.75); color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
/* couleurs de rareté, partagées par les tuiles et les pastilles */
.rar-legend .col-rar, .col-rar.rar-legend { color: var(--accent); }
.rar-epic .col-rar, .col-rar.rar-epic { color: #b06cff; }
.rar-rare .col-rar, .col-rar.rar-rare { color: #4aa3ff; }
.rar-common .col-rar, .col-rar.rar-common { color: var(--muted); }

/* page d'un objet */
.ci-layout { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; margin-top: 14px; }
@media (max-width: 860px) { .ci-layout { grid-template-columns: 1fr; } }
.ci-canvas { width: 100%; max-width: 280px; aspect-ratio: 1; border-radius: 16px; image-rendering: pixelated; display: block; }
.ci-cat { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.ci-head h2 { margin: 4px 0 6px; }
.ci-sub { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.ci-owned { color: var(--accent); }
.ci-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.ci-stat { flex: 1 1 100px; background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.ci-stat span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ci-stat b { font-size: 17px; font-weight: 800; font-family: var(--font-display); }
.ci-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ci-note { font-size: 12px; color: var(--muted); font-weight: 700; align-self: center; }
.ci-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.ci-traits { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ci-trait { background: var(--surface); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.ci-trait span { font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ci-trait b { font-size: 15px; font-weight: 800; }
.ci-trait i { font-size: 11px; color: var(--accent); font-style: normal; font-weight: 700; }
.ci-chart { background: var(--surface); border-radius: 12px; padding: 10px; }
.ci-svg { width: 100%; height: 120px; display: block; }
.ci-chart-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; font-size: 13px; }
.ci-row b { font-family: var(--font-display); font-size: 15px; }
.ci-owner { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.ci-owner-av { width: 26px; height: 26px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--raised); flex: none; }
.ci-owner-av img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.ci-owner-name { font-weight: 700; cursor: pointer; }
.ci-owner-name:hover { color: var(--accent); }
.ci-owner-num { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; }

/* options verrouillées dans le sélecteur d'avatar */
.av-thumb.locked { opacity: .45; }
.av-thumb.locked:hover { opacity: .8; border-color: var(--accent-line); }
.av-lock { position: absolute; bottom: 2px; right: 3px; font-size: 11px; }
.av-thumb { position: relative; }
.av-preset.locked { opacity: .5; }

/* ---- MONNAIES : Gold + Gemmes, et l'animation de gain/perte ---- */
.wallet .bal { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--raised); font-weight: 800; font-family: var(--font-display); transition: transform .18s; }
.wallet .bal .cur { width: 20px; height: 20px; display: block; image-rendering: auto; }
.wallet .bal.gem { color: #7fe38a; }
/* le compteur « tape » quand il change — vert en gain, rouge en perte */
.wallet .bal.bump { animation: bal-bump .5s ease-out; }
.wallet .bal.bump:not(.loss) { box-shadow: 0 0 0 2px rgba(120, 220, 130, .45); }
.wallet .bal.bump.loss { box-shadow: 0 0 0 2px rgba(255, 90, 90, .45); }
@keyframes bal-bump { 0% { transform: scale(1); } 35% { transform: scale(1.16); } 100% { transform: scale(1); } }
/* les pièces qui volent : hors flux, non cliquables, au-dessus de tout */
.fly-coin { position: fixed; width: 26px; height: 26px; z-index: 9999; pointer-events: none; will-change: transform, opacity;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.fly-coin.loss { filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)) grayscale(.4); }
@media (prefers-reduced-motion: reduce) { .fly-coin { display: none; } .wallet .bal.bump { animation: none; } }

/* ---- TAILLES : monnaies et photos de profil plus grosses ----
   Ces règles arrivent APRÈS les définitions d'origine, donc elles gagnent sans qu'il
   faille toucher au code plus haut (et on voit d'un coup d'œil ce qui a été agrandi). */
/* Le wallet agrandi demande ~325 px : au-dela de 1280 px seulement, sinon il pousse les
   actions hors de la barre (c est cet agrandissement qui avait fait basculer le bug). */
@media (min-width: 1280px) {
  .wallet .bal { padding: 10px 18px; font-size: 19px; gap: 10px; }
  .wallet .bal .cur { width: 34px; height: 34px; }
  .wallet .buy { font-size: 15px; padding: 10px 20px; }
}
.fly-coin { width: 40px; height: 40px; }

.profile-avatar { width: 128px; height: 128px; border-radius: 22px; font-size: 58px; }
.social-avatar { width: 148px; height: 148px; margin: -74px auto 0; border-radius: 30px; font-size: 70px; }
/* l'avatar gobelin est du pixel art : jamais de lissage, quelle que soit la taille */
.profile-avatar img, .social-avatar img { image-rendering: pixelated; }
@media (max-width: 720px) {
  .wallet .bal { padding: 7px 12px; font-size: 16px; }
  .wallet .bal .cur { width: 26px; height: 26px; }
  .profile-avatar { width: 96px; height: 96px; font-size: 44px; }
  .social-avatar { width: 112px; height: 112px; margin: -56px auto 0; font-size: 52px; }
}

/* ---- CAISSES : coffre pixel art + ruban façon CS:GO ---- */
.crate-modal { max-width: 720px; }
.crate-stage { display: grid; place-items: center; padding: 18px 0 6px; min-height: 260px; }
.crate-canvas { width: 256px; height: 256px; image-rendering: pixelated; display: block; }
.reel-viewport { position: relative; overflow: hidden; height: 150px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); }
.reel-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--accent); z-index: 3; box-shadow: 0 0 14px var(--accent); }
.reel-marker::before, .reel-marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 7px solid transparent; }
.reel-marker::before { top: -1px; border-top-color: var(--accent); }
.reel-marker::after { bottom: -1px; border-bottom-color: var(--accent); }
.reel { display: flex; will-change: transform; }
.reel-item { position: relative; width: 118px; flex: none; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--surface); border-right: 1px solid var(--bg-2); }
.reel-art { width: 78px; height: 78px; display: grid; place-items: center; }
.reel-canvas { width: 78px; height: 78px; image-rendering: pixelated; border-radius: 8px; }
.reel-swatch { width: 62px; height: 62px; border-radius: 10px; display: block; border: 2px solid rgba(255,255,255,.15); }
.reel-emoji { font-size: 40px; }
.reel-name { font-size: 10.5px; color: var(--muted); max-width: 104px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* la bande de couleur en bas = la rareté, comme sur les skins CS */
.reel-item .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--muted); }
.reel-item.rar-common .strip { background: #8b93a1; }
.reel-item.rar-rare .strip { background: #4aa3ff; }
.reel-item.rar-epic .strip { background: #b06cff; }
.reel-item.rar-legend .strip { background: var(--accent); }
.reel-item.rar-epic { background: linear-gradient(180deg, rgba(176,108,255,.10), transparent); }
.reel-item.rar-legend { background: linear-gradient(180deg, rgba(239,191,4,.14), transparent); }
.reel-item.landed { animation: reel-pop .5s ease-out; }
@keyframes reel-pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
/* révélation */
.crate-result .won { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--surface); }
.crate-result .won-art { width: 96px; height: 96px; display: grid; place-items: center; flex: none; }
.crate-result .won-art canvas { width: 96px; height: 96px; image-rendering: pixelated; border-radius: 10px; }
.crate-result .won-name { font-size: 20px; font-weight: 800; font-family: var(--font-display); }
.crate-result .won-meta { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.crate-result .won-dup { color: #ffb020; }
.crate-result .won-gems { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 800; color: #7fe38a; }
.crate-result .won-gems .cur { width: 22px; height: 22px; }
.crate-result .won.rar-legend { box-shadow: 0 0 0 2px rgba(239,191,4,.5), 0 0 40px rgba(239,191,4,.25); }
.crate-result .won.rar-epic { box-shadow: 0 0 0 2px rgba(176,108,255,.5), 0 0 40px rgba(176,108,255,.2); }

/* ---- L'interface de l'AVATAR agrandie aussi (oubli de la passe précédente) ---- */
.av-composer { grid-template-columns: 360px 1fr; }
.av-canvas { max-width: 340px; }
.av-preview { top: 130px; }
.av-thumb { width: 82px; height: 82px; border-radius: 15px; }
.av-thumbs { gap: 10px; }
.av-cat-h { font-size: 13px; }
.av-preset { font-size: 13px; padding: 8px 13px; }
.av-lock { font-size: 15px; bottom: 3px; right: 4px; }
/* l'aperçu de l'éditeur de traits suit */
.ge-preview { max-width: 240px; }
@media (max-width: 980px) {
  .av-composer { grid-template-columns: 1fr; }
  .av-thumb { width: 66px; height: 66px; }
  /* En 2 colonnes, l apercu COLLE pendant qu on fait defiler les vignettes a cote : c est
     voulu. En 1 colonne il est AU-DESSUS de la liste, et coller le fait flotter PAR-DESSUS
     les vignettes (mesure : 395 px de recouvrement a 958 px de large). Meme correctif que
     `.mkt-sidebar` quand `.mkt-layout` s effondre. */
  .av-preview { position: static; }
}

/* ---- AVATAR EN HAUT À DROITE : juste le gobelin, à la taille des monnaies ----
   Mêmes dimensions que `.wallet .bal .cur` (34 px, 26 px sous 720 px) pour que la
   barre du haut reste alignée. Volontairement NU : aucun cosmétique de profil ici. */
.top-me { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex: none;
  display: grid; place-items: center; background: var(--raised); font-size: 20px; line-height: 1;
  padding: 0; cursor: pointer; transition: var(--t); }
.top-me:hover { box-shadow: 0 0 0 2px var(--accent-line); }
.top-me img, .top-me .ava-i { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; border-radius: inherit; }
@media (max-width: 720px) { .top-me { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; } }

/* ---- COSMÉTIQUES DE PROFIL ---- */
.pc-tag { font-size: 10px; font-weight: 900; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; border: 1px solid; text-transform: uppercase; }
.pc-badge { font-size: 15px; }
.pc-title { font-size: 11.5px; color: var(--muted); font-style: italic; }
.pc-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim); font-weight: 700; }
.pc-status i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pc-emoji { font-size: .9em; }
/* animations partagées par les cadres, bannières et dégradés */
.pc-anim-shift { background-size: 220% 100% !important; animation: pc-shift 6s linear infinite; }
@keyframes pc-shift { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.pc-anim-pulse { animation: pc-pulse 2.2s ease-in-out infinite; }
@keyframes pc-pulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
/* effets permanents */
.pc-fx-glow { box-shadow: 0 0 26px rgba(239,191,4,.35) !important; }
.pc-fx-halo { position: relative; }
.pc-fx-halo::after { content: ''; position: absolute; inset: -20px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(239,191,4,.30), transparent 62%); }
.pc-fx-particles, .pc-fx-coins { position: relative; overflow: hidden; }
.pc-particle { position: absolute; bottom: -12px; width: 6px; height: 6px; border-radius: 50%; pointer-events: none;
  background: rgba(239,191,4,.85); animation: pc-rise linear infinite; }
.pc-particle.coin { width: 18px; height: 18px; border-radius: 0; background-size: contain; background-repeat: no-repeat; }
@keyframes pc-rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }
/* effets d'ouverture (joués une seule fois) */
.pc-in-fade { animation: pc-in-fade .8s ease-out; }
@keyframes pc-in-fade { from { opacity: 0; } to { opacity: 1; } }
.pc-in-deal { animation: pc-in-deal .7s cubic-bezier(.2,.9,.2,1); }
@keyframes pc-in-deal { from { transform: translateX(-60%) rotate(-9deg); opacity: 0; } to { transform: none; opacity: 1; } }
.pc-in-jackpot { animation: pc-in-jackpot .9s ease-out; }
@keyframes pc-in-jackpot { 0% { transform: scale(.9); filter: brightness(2.4); } 60% { transform: scale(1.03); } 100% { transform: none; filter: none; } }
.pc-in-vault { animation: pc-in-vault 1.1s cubic-bezier(.2,.8,.2,1); }
@keyframes pc-in-vault { 0% { clip-path: inset(0 50% 0 50%); } 100% { clip-path: inset(0 0 0 0); } }

/* page de personnalisation */
.pc-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; margin-top: 14px; }
@media (max-width: 900px) {
  .pc-layout { grid-template-columns: 1fr; }
  /* Meme piege que .av-preview : en 1 colonne, la carte d apercu passerait par-dessus la
     liste des cosmetiques au lieu de rester a cote. */
  .pc-side, .pc-card { position: static; }
}
.pc-card { position: sticky; top: 118px; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.pc-card-banner { height: 110px; background: var(--raised); }
.pc-card-body { padding: 0 16px 18px; text-align: center; }
.pc-card-name { font-size: 22px; font-weight: 800; font-family: var(--font-display); margin-top: 8px; }
.pc-card-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
/* sur MA page profil, la méta est alignée à gauche : les insignes suivent */
#myBadges { justify-content: flex-start; margin-top: 6px; }
/* Page « Éditer mon profil » : aperçu collant à gauche, formulaire + cosmétiques à droite.
   C'est `.pc-side` qui colle désormais, pas la carte seule — le bouton Enregistrer
   doit rester atteignable quel que soit l'endroit du formulaire où on se trouve. */
.pc-side { position: sticky; top: 118px; display: flex; flex-direction: column; gap: 10px; }
.pc-side .pc-card { position: static; top: auto; }
.pc-note { font-size: 13px; }
.pc-err { color: var(--red); font-size: 13px; min-height: 18px; }
.pc-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pc-block { background: var(--surface); border-radius: 16px; padding: 16px 18px; }
.pc-block-h { font-family: var(--font-display); font-weight: 800; font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
@media (max-width: 900px) { .pc-side { position: static; } }
.pc-cats { display: flex; flex-direction: column; gap: 16px; }
.pc-cat-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 7px; }
.pc-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 92px; padding: 8px 6px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: var(--t); }
.pc-opt:hover { border-color: var(--accent-line); }
.pc-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pc-opt.locked { opacity: .45; }
.pc-opt.locked:hover { opacity: .8; }
.pc-sw { width: 46px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--raised); }
.pc-sw-txt { font-size: 15px; font-weight: 800; }
.pc-opt-name { font-size: 10.5px; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 82px; }
.pc-lock { position: absolute; top: 4px; right: 5px; font-size: 11px; }

/* ---- Cosmétiques de profil : les 8 catégories ajoutées ---- */
.pc-motif { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 0; }
.pc-mood { font-size: 15px; }
/* traînées derrière l'avatar (dans les listes comme sur le profil) */
.pc-trail-gold, .pc-trail-ember, .pc-trail-frost, .pc-trail-rift { position: relative; }
.pc-trail-gold::before, .pc-trail-ember::before, .pc-trail-frost::before, .pc-trail-rift::before {
  content: ''; position: absolute; inset: -6px; border-radius: inherit; pointer-events: none; z-index: -1;
  animation: pc-trail 2.6s ease-in-out infinite; }
.pc-trail-gold::before { background: radial-gradient(circle, rgba(239,191,4,.55), transparent 68%); }
.pc-trail-ember::before { background: radial-gradient(circle, rgba(255,110,40,.55), transparent 68%); }
.pc-trail-frost::before { background: radial-gradient(circle, rgba(120,220,255,.55), transparent 68%); }
.pc-trail-rift::before { background: radial-gradient(circle, rgba(176,108,255,.55), transparent 68%); }
@keyframes pc-trail { 0%,100% { opacity: .45; transform: scale(1); } 50% { opacity: .9; transform: scale(1.08); } }
/* le contenu de la carte doit passer AU-DESSUS du motif */
.pc-card > *:not(.pc-motif), .social-card > *:not(.pc-motif) { position: relative; z-index: 1; }
/* lecteur audio : l'iframe YouTube ne doit jamais être visible */
.profile-yt { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; left: -9999px; }
.profile-audio .pa-hint { font-size: 11px; color: var(--muted); margin-left: 8px; }

/* ============================================================
   ZONE PARIS — marchés parimutuels (sport / esport / prédiction)
   Toutes les couleurs viennent des variables :root existantes.
   ============================================================ */
.paris-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 20px; }
.paris-tab { padding: 9px 16px; border-radius: 10px; background: var(--surface); color: var(--dim);
  font-size: 13.5px; font-weight: 600; border: 0; cursor: pointer; transition: .14s; }
.paris-tab:hover { background: var(--hover); color: var(--text); }
.paris-tab.on { background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line); }

.paris-note { background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 11px 15px; font-size: 12.5px; color: var(--dim);
  line-height: 1.6; margin-bottom: 18px; }
.paris-note b { color: var(--text); }

.paris-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.pm-card { background: var(--surface); border-radius: 14px; padding: 16px; position: relative;
  box-shadow: inset 0 0 0 1px var(--border); }
.pm-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.pm-league { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.pm-q { font-size: 15.5px; font-weight: 700; line-height: 1.3; margin-top: 3px; }
.pm-st { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 4px 9px;
  border-radius: 7px; background: var(--raised); color: var(--dim); white-space: nowrap; }
.pm-st.open { color: var(--good, #3f9b62); }
.pm-st.locked { color: var(--accent); }
.pm-st.cancelled { color: var(--bad, #c0392b); }
.pm-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--mute);
  margin: 8px 0 12px; }
.pm-meta b { color: var(--dim); font-weight: 600; }

.pm-opts { display: flex; flex-direction: column; gap: 7px; }
.pm-opt { display: flex; align-items: center; gap: 10px; background: var(--raised);
  border-radius: 10px; padding: 10px 12px; position: relative; overflow: hidden; }
.pm-opt .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); }
.pm-opt > * { position: relative; z-index: 1; }
.pm-opt .lbl { flex: 1; font-size: 13.5px; font-weight: 600; }
.pm-opt .pct { font-size: 13px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; }
.pm-opt .od { font-size: 11.5px; color: var(--mute); font-variant-numeric: tabular-nums;
  min-width: 46px; text-align: right; }
.pm-opt.win { box-shadow: inset 0 0 0 2px var(--accent-line); }
.pm-opt .stake { padding: 6px 12px; border-radius: 8px; background: var(--accent);
  color: var(--accent-ink); font-size: 12px; font-weight: 700; border: 0; cursor: pointer; }
.pm-opt .stake:disabled { background: var(--raised); color: var(--mute); cursor: not-allowed; }

.pm-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--border); font-size: 11.5px; color: var(--mute); flex-wrap: wrap; }
.pm-foot .pool { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-mine { font-size: 11.5px; color: var(--accent); margin-top: 8px; }
.pm-admin { display: flex; gap: 6px; margin-left: auto; }
.pm-admin button { padding: 5px 10px; border-radius: 7px; background: var(--raised);
  color: var(--dim); font-size: 11px; font-weight: 600; border: 0; cursor: pointer; }
.pm-admin button:hover { background: var(--hover); color: var(--text); }

/* ============================================================
   LIVE — badges des 4 natures de flux
   ============================================================ */
.ls-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px;
  background: var(--raised); color: var(--dim); }
.ls-badge.tournoi { background: var(--accent-soft); color: var(--accent); }
.ls-badge.sponsor { background: rgba(47,106,217,.16); color: #6b9bff; }
.ls-badge.affilie { background: rgba(63,155,98,.16); color: #6fd39a; }
.ls-badge.dealer  { background: rgba(160,107,224,.16); color: #c49bf0; }
.live-sec { margin-top: 26px; }
.live-sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.live-sec-h .t { font-size: 15px; font-weight: 700; }
.live-sec-h .n { font-size: 11.5px; color: var(--mute); }
.ls-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--mute);
  margin-top: 6px; }
.ls-meta b { color: var(--dim); font-weight: 600; }
.ls-overlay { font-size: 11px; color: var(--accent); word-break: break-all; margin-top: 6px; }

/* ============================================================
   MOUVEMENT — couche finale, volontairement courte.

   Un mouvement dit UNE chose : « ceci vient d'arriver » ou « ceci répond à
   ton geste ». Tout le reste est du bruit. D'où seulement deux entrées ici
   (page, modale) et un état de survol, tous branchés sur les mêmes durées.

   La montée est de 6 px, pas 20 : au-delà, l'œil suit le déplacement au lieu
   de lire le contenu, et l'interface paraît lente même si elle est rapide.
   ============================================================ */
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Élévation au survol : la carte se rapproche d'un cran, l'ombre suit.
   Une seule propriété transformée -> pas de recalcul de mise en page. */
.card { transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out); }
.card:hover { box-shadow: var(--shadow-2); }

/* ⚠️ RESPECT DU RÉGLAGE SYSTÈME — non négociable.
   Certaines personnes désactivent les animations pour raisons vestibulaires
   (nausées, vertiges). On ne les supprime pas à moitié : durée quasi nulle
   PARTOUT, y compris sur les animations décoratives déjà présentes. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- JETONS D'ICÔNE EN LIGNE ----------
   Ces <i> remplacent des emoji qui vivaient AU MILIEU d'une phrase
   (« 🏆 Classement », « ⚠️ Attention »). Ils doivent donc se comporter comme
   un caractère : s'asseoir sur la ligne de base et ne pas gonfler la hauteur
   de ligne. D'où le décalage vertical négatif — un SVG est aligné par le bas
   de sa boîte, un glyphe par sa ligne de base, et l'écart se voit. */
i[data-ic] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.16em;
  flex: none;
  line-height: 0;
}
/* Collé à un mot, le tracé a besoin d'un cheveu d'air ; seul, il n'en veut pas. */
i[data-ic] + span, i[data-ic] + b { margin-left: var(--sp-1); }
/* Dans un bouton, le tracé prend la couleur du libellé — donc rien à déclarer,
   sauf pour les états sémantiques où l'icône doit porter le sens. */
.toast i[data-ic] { color: var(--win); }
.toast.err i[data-ic] { color: var(--loss); }

/* ---------- ÉQUITÉ VÉRIFIABLE ----------
   Une page de preuve : elle doit avoir l'air d'un relevé, pas d'une publicité.
   D'où la typo à chasse fixe sur toutes les valeurs (une empreinte se compare
   caractère par caractère — en proportionnelle, l'œil glisse) et l'accent
   réservé au seul verdict. */
.fair-card { margin-top: var(--sp-4); }
.fair-card h3 { font-size: var(--fs-md); font-family: var(--font-display); margin-bottom: var(--sp-3); }
.fair-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.fair-row:last-child { border-bottom: none; }
.fair-row .fk { color: var(--dim); font-size: var(--fs-sm); min-width: 170px; flex: none; }
.fair-row .fv, .fair-floats .fv { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: var(--fs-sm); color: var(--text); word-break: break-all; }
.fair-row input { flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--border-mid);
  color: var(--text); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3);
  font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-sm); }
.fair-form { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: var(--sp-2) var(--sp-3); align-items: center; margin-bottom: var(--sp-4); }
.fair-form label { color: var(--dim); font-size: var(--fs-sm); }
.fair-form input { background: var(--bg); border: 1px solid var(--border-mid); color: var(--text);
  border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3);
  font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-sm); }
.fair-form input:focus { outline: none; border-color: var(--accent-line); }
@media (max-width: 640px) { .fair-form { grid-template-columns: 1fr; } }

/* Le verdict est la SEULE chose colorée de la page. */
.fair-out { margin-top: var(--sp-4); }
.fair-ok, .fair-bad { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3);
  border-radius: var(--radius-sm); font-size: var(--fs-base); margin-bottom: var(--sp-3); }
.fair-ok  { background: var(--win-soft);  color: var(--win); }
.fair-bad { background: var(--loss-soft); color: var(--loss); }
.fair-floats { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2) 0; }
.fair-note { font-size: var(--fs-sm); margin-top: var(--sp-3); }
.fair-round { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border); }
.fair-round .fr-game { font-weight: 600; min-width: 90px; }
.fair-round .fr-nonce { color: var(--mute); font-variant-numeric: tabular-nums; min-width: 50px; }
.fair-round .fr-res { color: var(--dim); font-size: var(--fs-sm); flex: 1; }
