/*
 * Cardkun — direction artistique « Arcade vive ».
 * Interface en pixel art (cadres crantés, police pixel), cartes cartoon (gros contours, police ronde).
 * Les « pixels » de l'interface mesurent var(--px).
 */

:root {
  /* fonds */
  --nuit: #0d0a1c;
  --fond: #161030;
  --panneau: #211946;
  --panneau-haut: #2d235d;
  --panneau-creux: #120d27;
  --trait: #07050f;
  /* texte */
  --texte: #f6f2ff;
  --texte-doux: #a99fd0;
  /* néons */
  --cyan: #29e6ff;
  --rose: #ff3ea5;
  --jaune: #ffe14d;
  --vert: #5dff8f;
  --orange: #ff8c42;
  --violet: #b26bff;
  --or: #ffc43d;
  /* raretés */
  --r-commune: #b8bfd6;
  --r-peu_commune: #5dff8f;
  --r-rare: #3fa9ff;
  --r-epique: #c26bff;
  --r-legendaire: #ffb020;
  /* unité pixel et polices */
  --px: 3px;
  /* Police pixel : nette seulement à des tailles alignées sur sa grille (Silkscreen : multiples de 4 px, 12 px minimum). */
  --police-pixel: 'Silkscreen', monospace;
  --tp-s: 12px;  /* étiquettes, petits boutons */
  --tp-m: 16px;  /* boutons, titres de fenêtre, onglets */
  --tp-l: 24px;  /* titres, compteurs */
  --tp-xl: 32px; /* pièces, logo */
  --police-ronde: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
  --police-carte: 'Permanent Marker', 'Comic Sans MS', cursive; /* nom des cartes (réglable dans l'atelier) */
}


/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; }

html { background: var(--nuit); }

body.arcade {
  margin: 0;
  color: var(--texte);
  font-family: var(--police-ronde);
  font-size: 15px;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #3a2380 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, #0f3a5c 0%, transparent 60%),
    var(--nuit);
  background-attachment: fixed;
  min-height: 100vh;
}

/* lignes de balayage très discrètes (écran cathodique) */
body.arcade::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  z-index: 1000;
}

.pixel, .icone, .booster-sprite { image-rendering: pixelated; display: inline-block; vertical-align: middle; }

.texte-pixel {
  font-family: var(--police-pixel);
  font-size: var(--tp-m);
  letter-spacing: 0.02em;
}

/* texte lu par les lecteurs d'écran (et présent dans textContent) mais invisible : libellé d'un bouton à icône */
.texte-masque {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* logo « CARDKUN » (jeu, planche) */
.logo {
  font-family: var(--police-pixel);
  font-weight: 700;
  font-size: var(--tp-xl);
  letter-spacing: 0.04em;
  color: var(--jaune);
  text-shadow: 3px 0 0 var(--rose), -3px 0 0 var(--cyan), 0 4px 0 var(--trait), 0 0 18px rgba(255, 62, 165, 0.6);
  white-space: nowrap;
}

.logo span { color: var(--texte); }

/* hausse / baisse (cotes, tendances) */
.hausse { color: var(--vert); }
.baisse { color: var(--rose); }

/* ------------------------------------------------------------------ cadre cranté (bord pixel aux coins échancrés) */

.cran {
  --bord: var(--trait);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--bord),
    0 var(--px) 0 0 var(--bord),
    calc(var(--px) * -1) 0 0 0 var(--bord),
    var(--px) 0 0 0 var(--bord);
}

/* ------------------------------------------------------------------ fenêtre */

.fenetre {
  --accent: var(--cyan);
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 40%),
    var(--panneau);
  padding: 22px 14px 14px;
  margin: calc(var(--px) * 3) var(--px) var(--px);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--trait),
    0 var(--px) 0 0 var(--trait),
    calc(var(--px) * -1) 0 0 0 var(--trait),
    var(--px) 0 0 0 var(--trait),
    inset 0 0 0 var(--px) color-mix(in srgb, var(--accent) 55%, var(--panneau)),
    0 0 22px -6px var(--accent);
}

.fenetre__titre {
  position: absolute;
  top: calc(var(--px) * -3);
  left: 12px;
  padding: 3px 10px 4px;
  background: var(--accent);
  color: var(--trait);
  font-family: var(--police-pixel);
  font-weight: 600;
  font-size: var(--tp-s);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--trait),
    0 var(--px) 0 0 var(--trait),
    calc(var(--px) * -1) 0 0 0 var(--trait),
    var(--px) 0 0 0 var(--trait);
}

.fenetre.rose { --accent: var(--rose); }
.fenetre.jaune { --accent: var(--jaune); }
.fenetre.vert { --accent: var(--vert); }
.fenetre.violet { --accent: var(--violet); }
.fenetre.orange { --accent: var(--orange); }

.creux {
  background: var(--panneau-creux);
  box-shadow: inset 0 var(--px) 0 0 rgba(0, 0, 0, 0.6), inset 0 0 0 var(--px) var(--trait);
  padding: 10px;
}

/* ------------------------------------------------------------------ boutons (touche d'arcade) */

.btn {
  --c: var(--jaune);
  --c-ombre: #b39400;
  --c-texte: var(--trait);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: calc(var(--px) * 1) var(--px) calc(var(--px) * 3);
  padding: 7px 14px 8px;
  border: 0;
  background: var(--c);
  color: var(--c-texte);
  font-family: var(--police-pixel);
  font-weight: 600;
  font-size: var(--tp-m);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--trait),
    0 calc(var(--px) * 3) 0 0 var(--trait),
    calc(var(--px) * -1) 0 0 0 var(--trait),
    var(--px) 0 0 0 var(--trait),
    calc(var(--px) * -1) calc(var(--px) * 2) 0 0 var(--trait),
    var(--px) calc(var(--px) * 2) 0 0 var(--trait),
    inset 0 calc(var(--px) * -2) 0 0 var(--c-ombre),
    inset 0 var(--px) 0 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.05s, filter 0.15s;
}

.btn:hover:not(:disabled) { filter: brightness(1.08) drop-shadow(0 0 8px var(--c)); }

.btn:active:not(:disabled), .btn.enfonce {
  transform: translateY(calc(var(--px) * 2));
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--trait),
    0 var(--px) 0 0 var(--trait),
    calc(var(--px) * -1) 0 0 0 var(--trait),
    var(--px) 0 0 0 var(--trait),
    inset 0 calc(var(--px) * -1) 0 0 var(--c-ombre),
    inset 0 var(--px) 0 0 rgba(255, 255, 255, 0.35);
}


.btn.cyan { --c: var(--cyan); --c-ombre: #0b8fb0; }
.btn.rose { --c: var(--rose); --c-ombre: #a8186a; --c-texte: #fff; }
.btn.vert { --c: var(--vert); --c-ombre: #1f9e4a; }
.btn.violet { --c: var(--violet); --c-ombre: #6d2fc2; --c-texte: #fff; }
.btn.gris { --c: #5a5285; --c-ombre: #3a3360; --c-texte: var(--texte); }
.btn.orange { --c: var(--orange); --c-ombre: #b5561c; }
.btn:disabled { --c: #3a3360; --c-ombre: #2a2448; --c-texte: #8079a6; cursor: default; }
.btn.petit { font-size: var(--tp-s); padding: 4px 9px 5px; }
.btn.grand { font-size: var(--tp-l); padding: 11px 22px 12px; }
.btn.carre { padding: 4px 5px 3px; } /* bouton à icône seule (libellé en .texte-masque et en infobulle) */
.btn > .icone, .btn > .pixel { flex: none; }

/* interrupteur marche / arrêt */
.interrupteur { --c: #3a3360; --c-ombre: #2a2448; --c-texte: #8079a6; }
.interrupteur.marche { --c: var(--vert); --c-ombre: #1f9e4a; --c-texte: var(--trait); }

/* ------------------------------------------------------------------ onglets */

.onglets { display: flex; gap: 10px; flex-wrap: wrap; padding: var(--px) var(--px) 0; }

.onglet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 7px;
  border: 0;
  background: var(--panneau);
  color: var(--texte-doux);
  font-family: var(--police-pixel);
  font-weight: 500;
  font-size: var(--tp-m);
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--trait),
    calc(var(--px) * -1) 0 0 0 var(--trait),
    var(--px) 0 0 0 var(--trait);
}

.onglet:hover { color: var(--texte); }
.onglet.actif { background: var(--cyan); color: var(--trait); }
.onglet .compteur-onglet {
  background: var(--rose);
  color: #fff;
  font-size: var(--tp-s);
  padding: 1px 5px;
}

/* ------------------------------------------------------------------ chiffres, pièces, jauges */

.pieces {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--police-pixel);
  font-weight: 700;
  font-size: var(--tp-xl);
  color: var(--jaune);
  text-shadow: 0 0 10px rgba(255, 225, 77, 0.55), 0 3px 0 var(--trait);
}

.etiquette {
  font-family: var(--police-pixel);
  font-weight: 400;
  font-size: var(--tp-s);
  color: var(--texte-doux);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.jauge {
  height: 16px;
  padding: var(--px);
  background: var(--trait);
}

.jauge > i {
  display: block;
  height: 100%;
  width: var(--valeur, 50%);
  background: repeating-linear-gradient(90deg, var(--c, var(--vert)) 0 7px, transparent 7px 9px);
  box-shadow: 0 0 8px var(--c, var(--vert));
  transition: width 0.25s steps(6);
}

.pastille-rarete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--police-pixel);
  font-weight: 500;
  font-size: var(--tp-s);
  text-transform: uppercase;
  color: var(--r);
}

.pastille-rarete::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--r);
  transform: rotate(45deg);
  box-shadow: 0 0 0 2px var(--trait), 0 0 8px var(--r);
}

/* ------------------------------------------------------------------ bandeau d'événement (défilant) */

.bandeau {
  --c: var(--rose);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  background: var(--c);
  color: var(--trait);
  font-family: var(--police-pixel);
  font-weight: 600;
  font-size: var(--tp-s);
  padding: 5px 0;
  box-shadow: 0 0 18px -2px var(--c);
}

.bandeau > span { display: inline-block; padding-left: 100%; animation: defiler 14s linear infinite; }

@keyframes defiler { to { transform: translateX(-100%); } }

/* ------------------------------------------------------------------ notifications */

.toasts { display: flex; flex-direction: column; gap: 8px; }

.toast {
  --c: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: var(--panneau-haut);
  color: var(--texte);
  font-size: 14px;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--trait),
    0 var(--px) 0 0 var(--trait),
    calc(var(--px) * -1) 0 0 0 var(--trait),
    var(--px) 0 0 0 var(--trait),
    inset calc(var(--px) * 2) 0 0 0 var(--c);
  animation: toast-entree 0.25s steps(5);
}

.toast.vente, .toast.succes { --c: var(--vert); }
.toast.evenement { --c: var(--rose); }
.toast.expertise { --c: var(--violet); }
.toast.erreur { --c: #ff4d5e; }
.toast.info { --c: var(--cyan); }
.toast.revelation { --c: var(--or); } /* « LÉGENDAIRE ! », carte spéciale révélée */

@keyframes toast-entree { from { transform: translateX(-30px); opacity: 0; } }

/* ------------------------------------------------------------------ infobulle */

.infobulle {
  position: relative;
  display: inline-block;
  padding: 6px 10px;
  background: var(--trait);
  color: var(--texte);
  font-size: 13px;
  max-width: 260px;
  box-shadow: 0 0 0 var(--px) var(--cyan);
}

/* ------------------------------------------------------------------ boosters (boutique) */

.booster {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 6px;
  min-width: 120px;
  text-align: center;
}

.booster .booster-sprite { filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.45)); transition: transform 0.15s; }
.booster:hover .booster-sprite { transform: translateY(-4px) rotate(-3deg); }
.booster.verrouille .booster-sprite { filter: grayscale(1) brightness(0.45); }
.booster__nom { font-family: var(--police-pixel); font-weight: 500; font-size: var(--tp-s); text-transform: uppercase; }

/* ------------------------------------------------------------------ cartes (modèle « illustration maximale ») */

@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 40%; }

.tcg {
  --l: 200px;
  --m1: #f1f3f8; --m2: #a3abbd; --m3: #5c6578;   /* métal du cadre (clair, moyen, sombre) */
  position: relative;
  width: var(--l);
  height: calc(var(--l) * 1.4);
  perspective: 1100px;
  isolation: isolate;
  flex: none;
  user-select: none;
}

.tcg[data-rarete='peu_commune'] { --m1: #d7ffe8; --m2: #3fcf83; --m3: #187a47; }
.tcg[data-rarete='rare'] { --m1: #d6ebff; --m2: #3d8cf0; --m3: #1b4fa3; }
.tcg[data-rarete='epique'] { --m1: #f1ddff; --m2: #a35cff; --m3: #5c1fb3; }
.tcg[data-rarete='legendaire'] { --m1: #fff1c4; --m2: #ffb020; --m3: #b06a00; }

.tcg__tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s ease-out;
}
.tcg.survol .tcg__tilt { transition: transform 0.08s linear; }

.tcg__pivot {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.tcg.revelee .tcg__pivot { transform: rotateY(180deg); }

.tcg__face {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--l) * 0.055);
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: 0 calc(var(--l) * 0.05) calc(var(--l) * 0.1) rgba(0, 0, 0, 0.55);
}
.tcg__recto { transform: rotateY(180deg); }

/* dos */
.tcg__dos {
  background: radial-gradient(circle at 50% 42%, #3b2a8a 0%, #160f35 58%, #0b0819 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tcg__dos::before {
  content: '';
  position: absolute;
  inset: calc(var(--l) * 0.045);
  border: 2px solid rgba(255, 196, 61, 0.45);
  border-radius: calc(var(--l) * 0.035);
}
/* nom du jeu sur deux lignes, dans le style du logo (.logo) mis à l'échelle de la carte */
.tcg__embleme {
  font-family: var(--police-pixel);
  font-weight: 700;
  font-size: calc(var(--l) * 0.2);
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  color: var(--jaune);
  text-shadow:
    calc(var(--l) * 0.016) 0 0 var(--rose), calc(var(--l) * -0.016) 0 0 var(--cyan),
    0 calc(var(--l) * 0.022) 0 var(--trait), 0 0 calc(var(--l) * 0.1) rgba(255, 62, 165, 0.6);
}
.tcg__embleme span { color: var(--texte); }

/* recto */
.tcg__cadre {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, var(--m1) 0%, var(--m2) 22%, var(--m3) 48%, var(--m2) 72%, var(--m1) 100%);
}
.tcg__art {
  position: absolute;
  inset: calc(var(--l) * 0.038);
  border-radius: calc(var(--l) * 0.03);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1.5px rgba(7, 5, 15, 0.85);
}
.tcg__art > img, .tcg__art > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.tcg__art > canvas, .tcg__art > img.art-pixel { image-rendering: pixelated; }
.tcg__effet { position: absolute; inset: 0; pointer-events: none; }
.tcg__eclat {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.55), transparent 48%);
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.25s;
}
.tcg.survol .tcg__eclat { opacity: 1; }

.tcg__gemme {
  position: absolute;
  top: calc(var(--l) * 0.07);
  width: calc(var(--l) * 0.13);
  height: calc(var(--l) * 0.13);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 5, 15, 0.62);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  z-index: 2;
}
.tcg__gemme { left: calc(var(--l) * 0.07); color: var(--m2); }
.tcg__gemme svg { width: 64%; height: 64%; overflow: visible; }

/* nom : police « marqueur » (variable --police-carte), sans fond, contour sombre pour rester lisible */
.tcg__ruban {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--l) * 0.07);
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
/* nom dessiné en pixel art sur la grille de l'illustration (js/vue/cartes.js, nomPixel) */
.tcg__nom-pixel { display: block; height: auto; image-rendering: pixelated; }
.tcg__nom {
  --contour: max(1.5px, calc(var(--l) * 0.011));
  display: block;
  font-family: var(--police-carte);
  font-weight: 400;
  font-size: max(11px, calc(var(--l) * 0.1 * var(--taille-nom, 1)));
  line-height: 1.05;
  color: #fff;
  max-width: 88%;
  text-align: center;
  transform: rotate(-3deg);
  transform-origin: 50% 100%;
  text-shadow:
    var(--contour) 0 0 #07050f, calc(var(--contour) * -1) 0 0 #07050f, 0 var(--contour) 0 #07050f, 0 calc(var(--contour) * -1) 0 #07050f,
    var(--contour) var(--contour) 0 #07050f, calc(var(--contour) * -1) calc(var(--contour) * -1) 0 #07050f,
    var(--contour) calc(var(--contour) * -1) 0 #07050f, calc(var(--contour) * -1) var(--contour) 0 #07050f,
    0 calc(var(--contour) * 2.5) calc(var(--contour) * 3) rgba(0, 0, 0, 0.6);
}
.tcg__nom.long { font-size: max(10px, calc(var(--l) * 0.084 * var(--taille-nom, 1))); }

/* halo des hautes raretés (cartes révélées) */
.tcg.revelee[data-rarete='rare'] .tcg__recto { box-shadow: 0 calc(var(--l) * 0.05) calc(var(--l) * 0.1) rgba(0, 0, 0, 0.55), 0 0 18px -2px var(--m2); }
.tcg.revelee[data-rarete='epique'] .tcg__recto,
.tcg.revelee[data-rarete='legendaire'] .tcg__recto { animation: halo-tcg 1.8s ease-in-out infinite; }
@keyframes halo-tcg {
  0%, 100% { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.55), 0 0 14px 0 var(--m2); }
  50% { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.55), 0 0 32px 6px var(--m2); }
}

/* suspense avant la révélation d'une haute rareté */
.tcg.suspense .tcg__dos { box-shadow: 0 0 0 3px var(--lueur), 0 0 30px 6px var(--lueur); }

/* ---------- cartes spéciales ---------- */

/* Holographique : reflets arc-en-ciel qui suivent le pointeur (et ondulent au repos), cadre irisé */
.tcg[data-variante='holo'] .tcg__cadre {
  background: linear-gradient(115deg, #ff9ad5, #9fe7ff, #c8ffb0, #ffe59a, #d6a8ff, #9fe7ff, #ff9ad5);
  background-size: 300% 300%;
  background-position: var(--mx) var(--my);
}
.tcg[data-variante='holo'] .tcg__effet {
  background:
    linear-gradient(115deg, transparent 5%, rgba(255, 62, 165, 0.55) 20%, rgba(255, 225, 77, 0.55) 32%, rgba(93, 255, 143, 0.55) 44%,
      rgba(41, 230, 255, 0.55) 56%, rgba(178, 107, 255, 0.55) 68%, transparent 88%),
    repeating-linear-gradient(55deg, rgba(255, 255, 255, 0.16) 0 1.5px, transparent 1.5px 6px);
  background-size: 260% 260%, 100% 100%;
  background-position: var(--mx) var(--my), 0 0;
  mix-blend-mode: color-dodge;
  opacity: 0.75;
}

/* Noir et blanc : illustration monochrome tramée, cadre argent et noir */
.tcg[data-variante='noir_et_blanc'] .tcg__art > img,
.tcg[data-variante='noir_et_blanc'] .tcg__art > canvas { filter: grayscale(1) contrast(1.35) brightness(1.08); }
.tcg[data-variante='noir_et_blanc'] .tcg__cadre { background: linear-gradient(140deg, #ffffff 0%, #c4c4c4 22%, #151515 48%, #c4c4c4 74%, #ffffff 100%); }
.tcg[data-variante='noir_et_blanc'] .tcg__effet {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.42) 0.9px, transparent 1.4px) 0 0 / 4px 4px;
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.tcg[data-variante='noir_et_blanc'] .tcg__gemme { color: #fff; }

/* Full art : l'illustration couvre toute la carte, surface gravée */
.tcg[data-variante='full_art'] .tcg__art { inset: 0; border-radius: 0; box-shadow: none; }
.tcg[data-variante='full_art'] .tcg__art > img,
.tcg[data-variante='full_art'] .tcg__art > canvas { transform: scale(1.08); }
.tcg[data-variante='full_art'] .tcg__effet {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 3px),
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.35), transparent 55%);
  mix-blend-mode: overlay;
}
/* Gold : toute la carte dorée, reflet qui balaie */
.tcg[data-variante='gold'] .tcg__cadre { background: linear-gradient(140deg, #fff6c8 0%, #f0c040 22%, #8a5c06 48%, #f7d36a 74%, #fff6c8 100%); }
.tcg[data-variante='gold'] .tcg__art > img,
.tcg[data-variante='gold'] .tcg__art > canvas { filter: grayscale(1) sepia(1) saturate(2.8) hue-rotate(-8deg) brightness(1.06) contrast(1.15); }
.tcg[data-variante='gold'] .tcg__effet {
  background: linear-gradient(110deg, transparent 35%, rgba(255, 250, 225, 0.8) 47%, transparent 60%);
  background-size: 300% 100%;
  mix-blend-mode: overlay;
  animation: balayage-or 3.4s ease-in-out infinite;
}
.tcg[data-variante='gold'] .tcg__nom { color: #ffe27a; }
.tcg[data-variante='gold'] .tcg__gemme { color: #ffd65a; background: rgba(58, 36, 0, 0.7); }
@keyframes balayage-or { from { background-position: 120% 0; } to { background-position: -20% 0; } }

/* Girly : comme la Gold, mais toute rose */
.tcg[data-variante='girly'] .tcg__cadre { background: linear-gradient(140deg, #ffe3f2 0%, #ff6fb5 22%, #9c1659 48%, #ff9fd0 74%, #ffe3f2 100%); }
.tcg[data-variante='girly'] .tcg__art > img,
.tcg[data-variante='girly'] .tcg__art > canvas { filter: grayscale(1) sepia(1) saturate(3.2) hue-rotate(-62deg) brightness(1.1) contrast(1.12); }
.tcg[data-variante='girly'] .tcg__effet {
  background: linear-gradient(110deg, transparent 35%, rgba(255, 232, 246, 0.85) 47%, transparent 60%);
  background-size: 300% 100%;
  mix-blend-mode: overlay;
  animation: balayage-or 3.4s ease-in-out infinite;
}
.tcg[data-variante='girly'] .tcg__nom { color: #ffc4e4; }
.tcg[data-variante='girly'] .tcg__gemme { color: #ff8fd0; background: rgba(70, 0, 40, 0.7); }

/* Reverse : full art aux couleurs inversées (illustration, nom, joyau ; les reflets restent clairs) */
.tcg[data-variante='reverse'] .tcg__art { inset: 0; border-radius: 0; box-shadow: none; }
.tcg[data-variante='reverse'] .tcg__art > img,
.tcg[data-variante='reverse'] .tcg__art > canvas { transform: scale(1.08); filter: invert(1); }
.tcg[data-variante='reverse'] .tcg__gemme,
.tcg[data-variante='reverse'] .tcg__ruban { filter: invert(1); }
.tcg[data-variante='reverse'] .tcg__effet {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 3px),
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.4), transparent 55%);
  mix-blend-mode: overlay;
}

/* ondulation des reflets au repos (pointeur ailleurs) */
.tcg.revelee[data-variante='holo']:not(.survol),
.tcg.revelee[data-variante='full_art']:not(.survol),
.tcg.revelee[data-variante='reverse']:not(.survol) { animation: ondulation 7s ease-in-out infinite; }
@keyframes ondulation { 0%, 100% { --mx: 15%; --my: 25%; } 50% { --mx: 85%; --my: 75%; } }

/* emplacement vide d'album */
.tcg-vide {
  --l: 200px;
  --m2: #a3abbd;
  width: var(--l);
  height: calc(var(--l) * 1.4);
  border-radius: calc(var(--l) * 0.055);
  border: 3px dashed color-mix(in srgb, var(--m2) 70%, transparent);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--texte-doux);
  font-family: var(--police-pixel);
  font-size: var(--tp-s);
  text-transform: uppercase;
  text-align: center;
}
.tcg-vide svg { width: 26%; color: var(--m2); opacity: 0.85; }
.tcg-vide[data-rarete='peu_commune'] { --m2: #3fcf83; }
.tcg-vide[data-rarete='rare'] { --m2: #3d8cf0; }
.tcg-vide[data-rarete='epique'] { --m2: #a35cff; }
.tcg-vide[data-rarete='legendaire'] { --m2: #ffb020; }

/* sous la carte (hors de la carte) : qualité et prix, côté interface */
.sous-carte {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--police-pixel);
  font-size: var(--tp-s);
  text-transform: uppercase;
  color: var(--texte-doux);
  white-space: nowrap;
}
.sous-carte .prix-carte { color: var(--jaune); display: inline-flex; align-items: center; gap: 4px; }

/* ------------------------------------------------------------------ effets */

.nombre-flottant {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  font-family: var(--police-pixel);
  font-weight: 700;
  font-size: var(--tp-l);
  color: var(--jaune);
  text-shadow: 0 3px 0 var(--trait), 0 0 10px rgba(255, 225, 77, 0.7);
}

.particule {
  position: fixed;
  z-index: 1999;
  width: 8px;
  height: 8px;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--trait);
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 1998;
  pointer-events: none;
  background: #fff;
}

/* « +2 500 » d'une vente au collectionneur ou groupée ; « SET COMPLET ! » */
.nombre-flottant.fort { font-size: var(--tp-xl); }
.nombre-flottant.banniere {
  font-size: var(--tp-xl);
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-shadow: 0 4px 0 var(--trait), 0 0 18px currentColor;
}

/* copie d'une carte (ou pièce) qui vole vers sa cible (Game.effets.copier / piece) */
.volante, .tcg.volante {
  position: fixed;
  z-index: 1997;
  margin: 0;
  pointer-events: none;
}
.piece-volante { width: 36px; height: 36px; filter: drop-shadow(0 3px 0 var(--trait)); }

/* grand booster qui s'ouvre (Game.effets.ouvrirBooster) et sa bande arrachée */
.booster-anim { position: relative; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 26px rgba(41, 230, 255, 0.35)); }
.booster-anim > svg { display: block; }
.bande-arrachee { position: absolute; left: 0; top: 0; }

/* rayons derrière une légendaire révélée (Game.effets.reveler) : ils tournent un peu, puis s'effacent (2,6 s, pas de boucle).
   Dans la carte (planche) ou posés sur un calque à son centre (.rayons--calque, jeu). */
.rayons {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--l) * 2.4);
  aspect-ratio: 1;
  z-index: -1;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 196, 61, 0.55) 0deg 7deg, rgba(255, 196, 61, 0) 7deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%);
  mask: radial-gradient(circle, #000 20%, transparent 68%);
  animation: rayons 2.6s linear forwards;
}
.rayons--calque { z-index: auto; }
@keyframes rayons {
  from { transform: translate(-50%, -50%) rotate(0deg) scale(0.4); opacity: 0; }
  12% { transform: translate(-50%, -50%) rotate(6deg) scale(1); opacity: 1; }
  70% { opacity: 0.85; }
  to { transform: translate(-50%, -50%) rotate(55deg) scale(1.12); opacity: 0; }
}

/* défilement pixel */
.defilant { overflow: auto; scrollbar-color: var(--cyan) var(--panneau-creux); }
.defilant::-webkit-scrollbar { width: 12px; height: 12px; }
.defilant::-webkit-scrollbar-track { background: var(--panneau-creux); }
.defilant::-webkit-scrollbar-thumb { background: var(--cyan); border: 3px solid var(--panneau-creux); }

/* Animations réduites (préférence du système, ou réglage du jeu : Game.effets) : les animations CSS sautent à leur fin (et
   préviennent encore de leur fin : animationend), les transitions n'existent plus (une durée minuscule en ferait naître une
   sur chaque propriété qui change, visibilité comprise, qui resterait l'espace d'une image à sa valeur de départ). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}
:root[data-animations='reduites'] *,
:root[data-animations='reduites'] *::before,
:root[data-animations='reduites'] *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; transition-delay: 0s !important; }
