/* ---------- Reflets des cartes ----------
   Chaque carte brille selon sa version (reverse, Poké Ball, Master Ball) ou sa rareté (js/app.js : foilCls) :
     .foil              reverse : feuille irisée autour de l'illustration, éclat prismatique qui passe
     .foil-p / .foil-m  reverse Poké Ball / Master Ball : seule la grosse balle brille
     .fx-holo   Holo : bandes arc-en-ciel dans la fenêtre de l'illustration
     .fx-rr     RR (ex, V, VMAX…) : lignes de lumière diagonales sur toute la carte
     .fx-ar     AR : voile nacré pastel qui ondule
     .fx-sar    SAR : nacre plus intense et paillettes
     .fx-fa     Full Art, UR, SR : gravure fine révélée par une bande de lumière
     .fx-alt    ALT : halo irisé qui tourne et étoiles qui scintillent
     .fx-gold   Gold : or métallique, paillettes et éclat chaud
     .fx-rainbow Rainbow : arc-en-ciel pastel qui coule
     .fx-shiny  Shiny : paillettes argentées
   Deux calques : ::before (couleur, motif) et ::after (éclat qui passe, paillettes ; toujours en premier fond).
   Au repos, ils bougent seuls ; sous la souris (.fx-live, js/ui.js), l'éclat suit le pointeur (--gx, --gy) et la
   carte s'incline légèrement (--rx, --ry). */
@property --fx-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@layer fx {
.real-art.foil, .real-art.fx { isolation: isolate; --gx: 50%; --gy: 50%; --rx: 0deg; --ry: 0deg; }
/* Fenêtre de l'illustration, en % de la carte (gauche, largeur, haut, hauteur) : la holo y brille, la reverse partout
   ailleurs. Elle change selon l'époque (mesurée sur les cartes) ; par défaut Écarlate et Violet, Épée et Bouclier, Méga. */
.real-art {
  --wl: 7.5; --ww: 85.5; --wt: 9.5; --wh: 38.3;
  --win-size: calc(var(--ww) * 1%) calc(var(--wh) * 1%);
  --win-pos: calc(100% * var(--wl) / (100 - var(--ww))) calc(100% * var(--wt) / (100 - var(--wh)));
}
.real-art.win-wotc { --wl: 11; --ww: 79; --wt: 13.7; --wh: 36.8; }    /* Wizards : Set de Base, Jungle, Gym, Neo… */
.real-art.win-ecard { --wl: 11; --ww: 82; --wt: 12.5; --wh: 37.5; }   /* e-Card : Expedition, Aquapolis, Skyridge */
.real-art.win-ex { --wl: 7; --ww: 88; --wt: 9.7; --wh: 38.3; }        /* EX : Rubis et Saphir → Gardiens du Pouvoir */
.real-art.win-dp { --wl: 7; --ww: 87; --wt: 9.2; --wh: 40.8; }        /* Diamant et Perle, Platine */
.real-art.win-hgss { --wl: 4.7; --ww: 90.6; --wt: 10.3; --wh: 42.7; } /* HeartGold SoulSilver, L'Appel des Légendes */
.real-art.win-bw { --wl: 8; --ww: 86; --wt: 10.3; --wh: 39.4; }       /* Noir et Blanc, XY */
.real-art.win-sm { --wl: 6; --ww: 88; --wt: 8.3; --wh: 39.7; }        /* Soleil et Lune */
.real-art.foil::before, .real-art.foil::after, .real-art.fx::before, .real-art.fx::after {
  content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
}
/* Éclat commun (::after, premier fond) : une bande de lumière qui traverse la carte, puis une pause. */
.real-art.fx::after {
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .5) 48%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, .5) 52%, transparent 60%) 0 0 / 300% 300% no-repeat;
  mix-blend-mode: overlay; opacity: .8;
  animation: fx-sweep 6s cubic-bezier(.45, 0, .2, 1) infinite;
}
@keyframes fx-sweep {
  0% { background-position: 100% 100%, 0 0, 0 0; }
  45%, 100% { background-position: 0% 0%, 3px 2px, -2px 3px; }
}
@keyframes fx-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes fx-twinkle {
  0%, 100% { opacity: .25; background-position: 0 0, 0 0, 0 0; }
  50% { opacity: .65; background-position: 2px 1px, 3px 2px, -2px 3px; }
}

/* Holo : seulement dans la fenêtre de l'illustration ; reverse : partout sauf elle. */
.real-art.fx-holo::before, .real-art.fx-holo::after {
  -webkit-mask: linear-gradient(#000 0 0) var(--win-pos) / var(--win-size) no-repeat;
  mask: linear-gradient(#000 0 0) var(--win-pos) / var(--win-size) no-repeat;
}
.real-art.foil::before, .real-art.foil::after {
  -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  -webkit-mask-size: 100% 100%, var(--win-size); -webkit-mask-position: 0 0, var(--win-pos); -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: xor;
  mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  mask-size: 100% 100%, var(--win-size); mask-position: 0 0, var(--win-pos); mask-repeat: no-repeat; mask-composite: exclude;
}

/* Reverse : feuille irisée pailletée, et un éclat prismatique (cyan, rose, or) qui la traverse. */
.real-art.foil::before {
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .8) 0 .6px, transparent 1.2px) 0 0 / 11px 7px,
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, .6) 0 .5px, transparent 1px) 0 0 / 13px 17px,
    linear-gradient(125deg, hsl(190 95% 60%), hsl(260 90% 66%), hsl(320 95% 64%), hsl(40 100% 60%), hsl(150 85% 55%), hsl(190 95% 60%)) 0 0 / 300% 300%;
  mix-blend-mode: hard-light; opacity: .4;
  animation: fx-foil-sheet 9s ease-in-out infinite alternate;
}
@keyframes fx-foil-sheet {
  from { background-position: 0 0, 0 0, 0% 0%; }
  to { background-position: 2px 3px, -3px 2px, 100% 100%; }
}
.real-art.foil::after {
  background: linear-gradient(115deg, transparent 36%, hsla(185, 100%, 75%, .7) 44%, hsla(300, 100%, 82%, .9) 50%, hsla(45, 100%, 75%, .7) 56%, transparent 64%) 0 0 / 300% 300% no-repeat;
  mix-blend-mode: color-dodge; opacity: .9;
  animation: fx-sweep 5s cubic-bezier(.45, 0, .2, 1) infinite;
}
/* Poké Ball / Master Ball : comme les vraies (Évolutions Prismatiques, 151 japonais…), seule une grosse balle brille,
   dans la case des attaques : diamètre 44 % de la largeur, centrée à 73 % de la hauteur. Le dessin de la balle (SVG)
   sert de masque aux deux calques ; sa moitié haute est teintée. Tailles en cqw : la balle reste ronde. */
.real-art.foil-p, .real-art.foil-m { container-type: inline-size; }
.real-art.foil-p::before, .real-art.foil-p::after { --ball-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Cpath clip-rule='evenodd' d='M0 0H100V100H0ZM34 50a16 16 0 1 0 32 0a16 16 0 1 0-32 0Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23c)'%3E%3Cpath d='M2.3 45A48 48 0 0 1 97.7 45Z' fill='%23fff'/%3E%3Cpath d='M2.3 55A48 48 0 0 0 97.7 55Z' fill='%23fff' fill-opacity='.5'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='48' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3Ccircle cx='50' cy='50' r='13' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Ccircle cx='50' cy='50' r='7.5' fill='%23fff'/%3E%3C/svg%3E"); }
.real-art.foil-m::before, .real-art.foil-m::after { --ball-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Cpath clip-rule='evenodd' d='M0 0H100V100H0ZM34 50a16 16 0 1 0 32 0a16 16 0 1 0-32 0Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23c)'%3E%3Cpath d='M2.3 45A48 48 0 0 1 97.7 45Z' fill='%23fff' fill-opacity='.32'/%3E%3Cpath d='M2.3 55A48 48 0 0 0 97.7 55Z' fill='%23fff' fill-opacity='.5'/%3E%3C/g%3E%3Ccircle cx='24' cy='30' r='8' fill='%23fff'/%3E%3Ccircle cx='76' cy='30' r='8' fill='%23fff'/%3E%3Cpath d='M37 39 41 19 50 31 59 19 63 39' fill='none' stroke='%23fff' stroke-width='4.5' stroke-linejoin='round'/%3E%3Ccircle cx='50' cy='50' r='48' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3Ccircle cx='50' cy='50' r='13' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Ccircle cx='50' cy='50' r='7.5' fill='%23fff'/%3E%3C/svg%3E"); }
.real-art.foil-p::before, .real-art.foil-m::before, .real-art.foil-p::after, .real-art.foil-m::after {
  -webkit-mask-image: var(--ball-mask); -webkit-mask-size: 44cqw 44cqw; -webkit-mask-position: 50% 73%; -webkit-mask-composite: source-over;
  mask-image: var(--ball-mask); mask-size: 44cqw 44cqw; mask-position: 50% 73%; mask-composite: add;
}
.real-art.foil-p::before, .real-art.foil-m::before {
  background:
    linear-gradient(var(--ball-top) 0 50%, transparent 50%) 50% 73% / 44cqw 44cqw no-repeat,
    linear-gradient(125deg, hsl(190 90% 70%), hsl(260 90% 78%), hsl(320 90% 76%), hsl(40 95% 70%), hsl(150 80% 68%), hsl(190 90% 70%)) 0 0 / 300% 300%;
  mix-blend-mode: hard-light; opacity: .7;
  animation: fx-balls 7s ease-in-out infinite alternate;
}
@keyframes fx-balls { from { background-position: 50% 73%, 0% 0%; } to { background-position: 50% 73%, 100% 100%; } }
.real-art.foil-p::after, .real-art.foil-m::after { opacity: .95; }
.real-art.foil-p { --ball-top: rgba(255, 45, 45, .8); }
.real-art.foil-m { --ball-top: rgba(150, 60, 240, .85); }

/* Holo : bandes arc-en-ciel verticales qui glissent dans l'illustration. */
.real-art.fx-holo::before {
  background: repeating-linear-gradient(100deg,
    hsl(0 100% 70%) 0%, hsl(45 100% 65%) 4%, hsl(110 90% 62%) 8%, hsl(190 100% 66%) 12%,
    hsl(250 100% 72%) 16%, hsl(310 100% 70%) 20%, hsl(360 100% 70%) 24%) 0 0 / 300% 100%;
  mix-blend-mode: overlay; opacity: .5;
  animation: fx-drift 8s ease-in-out infinite alternate;
}

/* RR : fines lignes de lumière diagonales, irisées, sur toute la carte. */
.real-art.fx-rr::before {
  background:
    repeating-linear-gradient(135deg, transparent 0 5px, rgba(255, 255, 255, .5) 5px 6px, transparent 6px 11px),
    linear-gradient(135deg, hsl(200 100% 70%), hsl(280 100% 76%), hsl(340 100% 72%), hsl(50 100% 68%), hsl(140 90% 64%), hsl(200 100% 70%)) 0 0 / 300% 300%;
  mix-blend-mode: color-dodge; opacity: .2;
  animation: fx-rr-lines 10s ease-in-out infinite alternate;
}
@keyframes fx-rr-lines { from { background-position: 0 0, 0% 0%; } to { background-position: 22px 0, 100% 100%; } }
.real-art.fx-rr::after { animation-duration: 5s; }

/* AR / SAR : voile nacré pastel (rose, bleu, jaune, lilas) qui ondule ; la SAR ajoute des paillettes. */
.real-art.fx-ar::before, .real-art.fx-sar::before {
  background: linear-gradient(135deg, hsl(330 100% 82%), hsl(200 100% 80%), hsl(55 100% 80%), hsl(275 100% 84%), hsl(170 90% 80%), hsl(330 100% 82%)) 0 0 / 300% 300%;
  mix-blend-mode: soft-light; opacity: .6;
  animation: fx-drift 11s ease-in-out infinite alternate;
}
.real-art.fx-sar::before { mix-blend-mode: overlay; opacity: .5; animation-duration: 8s; }
.real-art.fx-sar::after {
  background:
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .5) 48%, rgba(255, 255, 255, .9) 50%, rgba(255, 255, 255, .5) 52%, transparent 60%) 0 0 / 300% 300% no-repeat,
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .9) 0 .6px, transparent 1.2px) 0 0 / 13px 11px,
    radial-gradient(circle at 70% 80%, rgba(255, 235, 255, .8) 0 .5px, transparent 1px) 0 0 / 17px 19px,
    radial-gradient(circle at 45% 60%, rgba(220, 245, 255, .7) 0 .4px, transparent .9px) 0 0 / 7px 23px;
  mix-blend-mode: color-dodge; opacity: .55;
}

/* Full Art, UR, SR : gravure fine (lignes à 45°) teintée arc-en-ciel, révélée par une bande de lumière qui passe. */
.real-art.fx-fa::before {
  background:
    repeating-linear-gradient(45deg, transparent 0 2px, rgba(255, 255, 255, .7) 2px 2.6px),
    repeating-linear-gradient(-45deg, transparent 0 3px, rgba(255, 255, 255, .35) 3px 3.5px),
    linear-gradient(115deg, hsl(190 100% 70%), hsl(280 100% 76%), hsl(340 100% 72%), hsl(50 100% 66%), hsl(190 100% 70%)) 0 0 / 300% 300%;
  mix-blend-mode: color-dodge; opacity: .42;
  -webkit-mask: linear-gradient(115deg, transparent 30%, #000 45%, #000 55%, transparent 70%) 0 0 / 300% 300% no-repeat;
  mask: linear-gradient(115deg, transparent 30%, #000 45%, #000 55%, transparent 70%) 0 0 / 300% 300% no-repeat;
  animation: fx-band 6s cubic-bezier(.45, 0, .2, 1) infinite;
}
@keyframes fx-band {
  0% { -webkit-mask-position: 100% 100%; mask-position: 100% 100%; background-position: 0 0, 0 0, 0% 0%; }
  50%, 100% { -webkit-mask-position: 0% 0%; mask-position: 0% 0%; background-position: 0 0, 0 0, 100% 100%; }
}
.real-art.fx-fa::after { animation-delay: .25s; }

/* ALT : halo irisé qui tourne lentement, étoiles à quatre branches qui scintillent, éclat qui passe. */
.real-art.fx-alt::before {
  background: conic-gradient(from var(--fx-a) at 50% 45%,
    hsl(330 100% 75%), hsl(30 100% 72%), hsl(70 100% 70%), hsl(160 90% 68%), hsl(210 100% 72%), hsl(275 100% 76%), hsl(330 100% 75%));
  mix-blend-mode: soft-light; opacity: .75;
  animation: fx-spin 14s linear infinite;
}
@keyframes fx-spin { to { --fx-a: 360deg; } }
.real-art.fx-alt::after {
  background:
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .5) 48%, rgba(255, 255, 255, .9) 50%, rgba(255, 255, 255, .5) 52%, transparent 60%) 0 0 / 300% 300% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath fill='%23fff' d='M12 6c.6 3.4.6 3.4 4 4-3.4.6-3.4.6-4 4-.6-3.4-.6-3.4-4-4 3.4-.6 3.4-.6 4-4ZM44 30c.4 2.2.4 2.2 2.6 2.6-2.2.4-2.2.4-2.6 2.6-.4-2.2-.4-2.2-2.6-2.6 2.2-.4 2.2-.4 2.6-2.6ZM24 46c.3 1.7.3 1.7 2 2-1.7.3-1.7.3-2 2-.3-1.7-.3-1.7-2-2 1.7-.3 1.7-.3 2-2Z'/%3E%3C/svg%3E") 0 0 / 46px 46px,
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, .7) 0 .5px, transparent 1px) 0 0 / 13px 17px;
  mix-blend-mode: color-dodge; opacity: .6;
  animation: fx-sweep 6s cubic-bezier(.45, 0, .2, 1) infinite, fx-glow 3s ease-in-out infinite;
}
@keyframes fx-glow { 0%, 100% { opacity: .35; } 50% { opacity: .75; } }

/* Gold : or métallique qui ondule, paillettes et éclat chaud. */
.real-art.fx-gold::before {
  background: linear-gradient(120deg, #5a3c0c, #f7e08a 18%, #b8862b 34%, #fff3c4 50%, #a8741c 66%, #f2d270 82%, #5a3c0c) 0 0 / 300% 300%;
  mix-blend-mode: overlay; opacity: .5;
  animation: fx-drift 7s ease-in-out infinite alternate;
}
.real-art.fx-gold::after {
  background:
    linear-gradient(115deg, transparent 40%, rgba(255, 236, 170, .6) 47%, rgba(255, 252, 235, .95) 50%, rgba(255, 236, 170, .6) 53%, transparent 60%) 0 0 / 300% 300% no-repeat,
    radial-gradient(circle at 20% 30%, rgba(255, 245, 200, 1) 0 .6px, transparent 1.2px) 0 0 / 11px 13px,
    radial-gradient(circle at 70% 80%, rgba(255, 220, 140, .9) 0 .5px, transparent 1px) 0 0 / 17px 7px;
  mix-blend-mode: color-dodge; opacity: .55;
  animation-duration: 4.5s;
}

/* Rainbow : arc-en-ciel pastel qui coule en diagonale. */
.real-art.fx-rainbow::before {
  background: linear-gradient(125deg, hsl(350 100% 72%), hsl(30 100% 68%), hsl(60 100% 66%), hsl(130 85% 64%), hsl(190 100% 66%), hsl(240 100% 74%), hsl(290 100% 74%), hsl(350 100% 72%)) 0 0 / 400% 400%;
  mix-blend-mode: soft-light; opacity: .75;
  animation: fx-drift 9s ease-in-out infinite alternate;
}

/* Shiny : paillettes argentées qui scintillent. */
.real-art.fx-shiny::before {
  background:
    radial-gradient(circle at 25% 35%, #fff 0 .7px, transparent 1.3px) 0 0 / 7px 11px,
    radial-gradient(circle at 75% 65%, rgba(220, 235, 255, .9) 0 .5px, transparent 1px) 0 0 / 13px 5px,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .8) 0 .6px, transparent 1.2px) 0 0 / 17px 19px;
  mix-blend-mode: screen; opacity: .5;
  animation: fx-twinkle 2.4s ease-in-out infinite;
}
}

/* ---------- Performances ----------
   Une page montre des centaines de cartes : si chacune s'animait en continu, le navigateur redessinerait sans cesse
   (le site rame, les autres onglets aussi). Les vignettes sont donc immobiles : leur reflet ne bouge que sous la
   souris (.fx-live, qui suit le pointeur), dans la liste comme dans la fiche d'une carte.
   Téléphone : dans la fiche, le doigt posé sur la carte fait office de souris (js/ui.js : tilt).
   Les effets sont dans la couche « fx » ci-dessus ; ces règles hors couche l'emportent, revert-layer les rétablit. */
.real-art.foil::before, .real-art.foil::after, .real-art.fx::before, .real-art.fx::after, .card-stamp i { animation-name: none; }
/* Au repos, aucun reflet : il apparaît (en fondu) quand la souris (ou le doigt, dans la fiche) passe sur la carte. */
.real-art.foil::before, .real-art.foil::after, .real-art.fx::before, .real-art.fx::after, .card-stamp i {
  opacity: 0; transition: opacity .25s ease;
}
.real-art.fx-live::before, .real-art.fx-live::after, .real-art.fx-live .card-stamp i { opacity: revert-layer; }
/* Fiche sur téléphone : faire glisser le doigt sur la carte bouge le reflet au lieu de faire défiler la fenêtre. */
.real-form-art .real-art.fx, .real-form-art .real-art.foil { touch-action: none; }
/* Positions de départ (avant le premier mouvement du pointeur). */
.real-art.fx::after, .real-art.foil::after { background-position: 35% 35%, 0 0, 0 0; }
.real-art.fx-fa::before { -webkit-mask-position: 50% 50%; mask-position: 50% 50%; }

/* Sous la souris : l'éclat et les couleurs suivent le pointeur, la carte s'incline. */
.real-art.fx-live.fx-live {
  transform: perspective(700px) rotateX(var(--ry)) rotateY(var(--rx)) translateY(-4px);
  transition: transform .1s ease-out, box-shadow .18s ease;
}
.real-art.fx-live::after { animation-play-state: paused; background-position: var(--gx) var(--gy), 0 0, 0 0; opacity: 1; mix-blend-mode: overlay; }
.real-art.foil.fx-live::after { mix-blend-mode: color-dodge; }
.real-art.fx-live:not(.fx-alt):not(.fx-shiny):not(.foil)::before { animation-play-state: paused; background-position: var(--gx) var(--gy), var(--gx) var(--gy), var(--gx) var(--gy); }
.real-art.foil.fx-live::before { animation-play-state: paused; background-position: 0 0, 0 0, var(--gx) var(--gy); }
.real-art.foil-p.fx-live::before, .real-art.foil-m.fx-live::before { background-position: 50% 73%, var(--gx) var(--gy); }
.real-art.fx-fa.fx-live::before { -webkit-mask-position: var(--gx) var(--gy); mask-position: var(--gx) var(--gy); background-position: 0 0, 0 0, var(--gx) var(--gy); }

@media (prefers-reduced-motion: reduce) {
  .real-art.foil::before, .real-art.foil::after, .real-art.fx::before, .real-art.fx::after { animation: none; }
  .real-art.fx::after, .real-art.foil::after { background-position: 30% 30%, 0 0, 0 0; }
  .real-art.fx-fa::before { -webkit-mask-position: 50% 50%; mask-position: 50% 50%; }
  .real-art.fx-live.fx-live { transform: translateY(-4px); }
}
html.no-foil .real-art.foil::before, html.no-foil .real-art.foil::after,
html.no-foil .real-art.fx::before, html.no-foil .real-art.fx::after { display: none; }
html.no-foil .real-art.fx-live.fx-live { transform: translateY(-4px); }

/* ---------- Tampon (version « Tampon ») ----------
   Logo de l'extension en bas à droite de l'illustration, comme les tampons d'avant-première et Build & Battle
   (bord droit et bas de la fenêtre .win-*), avec un reflet métallisé qui le traverse. */
.card-stamp {
  position: absolute; z-index: 2; pointer-events: none;
  right: calc((100 - var(--wl) - var(--ww)) * 1% + 2.5%); bottom: calc((100 - var(--wt) - var(--wh)) * 1% + 1.6%);
  width: 27%; height: 10.5%; display: flex; align-items: flex-end; justify-content: flex-end;
}
.card-stamp img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0;
  filter: drop-shadow(0 0 .6px rgba(0, 0, 0, .85)) drop-shadow(0 1px 2px rgba(0, 0, 0, .5));
}
@layer fx {
.card-stamp i {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .85) 50%, transparent 62%) 0 0 / 300% 100% no-repeat;
  -webkit-mask: var(--logo) right bottom / contain no-repeat; mask: var(--logo) right bottom / contain no-repeat;
  animation: stamp-shine 4.5s cubic-bezier(.45, 0, .2, 1) infinite;
}
@keyframes stamp-shine { 0% { background-position: 100% 0; } 40%, 100% { background-position: 0% 0; } }
}
/* Cartes asiatiques (pas de logo) : le code de l'extension, en lettres argentées. */
.card-stamp-text { container-type: size; }
.card-stamp-text b {
  font-size: 62cqh; font-weight: 900; letter-spacing: .02em; line-height: 1; padding: 0 .25em;
  background: linear-gradient(115deg, #e9edf5, #9aa3b5 40%, #ffffff 55%, #8c95a8); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-stroke: .5px rgba(0, 0, 0, .55);
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .6));
}
@media (prefers-reduced-motion: reduce) { .card-stamp i { animation: none; opacity: 0; } }

/* ---------- Carte gradée dans son boîtier (js/app.js, slabHtml) ----------
   Proportions d'un vrai boîtier (comme dans BinDex_Game, jeu/css/style.css .slab) : plus étroit et plus haut qu'une
   carte, étiquette en haut, carte presque pleine largeur dans sa fenêtre. Même hauteur que les cartes voisines dans
   les grilles (86 % de la largeur × 0,62 ≈ la hauteur d'une carte). Mesures en cqw : % de la largeur du boîtier. */
.real-art.slab {
  container-type: inline-size;
  width: 86%; margin-inline: auto; aspect-ratio: 100 / 161.5;
  border-radius: 6% / 3.7%; /* (pas de cqw ici : ils renvoient au conteneur parent) */
  background: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .03) 38%, rgba(255, 255, 255, .02) 62%, rgba(255, 255, 255, .14)), rgba(210, 225, 245, .10);
  border: 1px solid rgba(220, 230, 245, .5);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .05), inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 24px rgba(0, 0, 0, .5);
}
.real-form-art .real-art.slab { width: 100%; }
/* La carte, dans la fenêtre */
.real-art.slab > img:not(.real-over), .real-art.slab > img.real-over, .real-art.slab > .real-blank {
  position: absolute; z-index: 1; top: 35.5cqw; left: 7.5cqw; width: 85cqw; height: 118.4cqw; border-radius: 4.55% / 3.5%;
  box-shadow: 0 1.5cqw 3cqw rgba(0, 0, 0, .45);
}
.real-art.slab::before, .real-art.slab::after {
  top: 35.5cqw !important; left: 7.5cqw !important; right: auto !important; bottom: auto !important;
  width: 85cqw !important; height: 118.4cqw !important; border-radius: 4.55% / 3.5% !important; z-index: 2 !important;
}
.slab-window {
  position: absolute; z-index: 0; top: 32.5cqw; left: 4.5cqw; width: 91cqw; height: 124.4cqw; border-radius: 3.6cqw; pointer-events: none;
  background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 2cqw 4cqw rgba(0, 0, 0, .35);
}
/* Encoches de prise sur les côtés, et reflet du plastique par-dessus tout */
.slab-window::before, .slab-window::after {
  content: ''; position: absolute; top: 40%; width: 1.4cqw; height: 16%; border-radius: 2cqw; background: rgba(255, 255, 255, .2);
}
.slab-window::before { left: -3.2cqw; }
.slab-window::after { right: -3.2cqw; }
.slab-glare {
  position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .14), transparent 40%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .1) 42%, transparent 48%, transparent 60%, rgba(255, 255, 255, .06) 66%, transparent 72%);
}
.slab-label {
  position: absolute; z-index: 3; top: 4.5cqw; left: 4.5cqw; width: 91cqw; height: 24.5cqw;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; column-gap: 2.5cqw;
  padding: 2.4cqw 3cqw; border-radius: 3cqw; overflow: hidden;
  font-family: Arial, Helvetica, sans-serif; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em;
  background: #f6f6f2; color: #151515; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}
.slab-info { grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: .8cqw; }
.slab-info i, .slab-info b { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slab-info i { font-size: 3.4cqw; opacity: .78; }
.slab-info b { font-size: 4.8cqw; font-weight: 800; }
.slab-score { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.slab-score i { font-style: normal; font-size: 3.1cqw; font-weight: 700; white-space: nowrap; }
.slab-score b { font-size: 10cqw; font-weight: 900; line-height: .92; font-variant-numeric: tabular-nums; }
.slab-co { font-size: 3.2cqw; font-weight: 900; text-align: right; letter-spacing: .06em; white-space: nowrap; }
/* PSA : étiquette blanche, cadre et nom rouges */
.slab-psa .slab-label { background: #fbfbf8; box-shadow: inset 0 0 0 .9cqw #d71920; }
.slab-psa .slab-co { color: #d71920; }
/* CGC : étiquette bleu nuit, texte blanc, bande dorée */
.slab-cgc .slab-label { background: linear-gradient(180deg, #13306b, #0b1f4a); color: #fff; box-shadow: inset 0 -1cqw 0 #c9a227; }
.slab-cgc .slab-co { color: #e8c45a; }
/* Beckett (BGS) : argent ; or pour 9,5 et plus, noir pour 10 */
.slab-bgs .slab-label { background: linear-gradient(135deg, #e9ebee, #b9bec6 55%, #eef0f2); color: #1b1e22; }
.slab-bgs .slab-co { color: #4a4f57; }
/* SGC : étiquette noire « smoking », texte blanc */
.slab-sgc .slab-label { background: #111; color: #f2f2f2; box-shadow: inset 0 0 0 .7cqw #3a3a3a; }
.slab-sgc .slab-co { color: #9ad15a; }
/* PCA : blanche, bande bleue */
.slab-pca .slab-label { background: #fbfcff; box-shadow: inset 0 1.2cqw 0 #1f6fd1; }
.slab-pca .slab-co { color: #1f6fd1; }
/* Collect Aura : dégradé violet */
.slab-aura .slab-label { background: linear-gradient(135deg, #3b1e6e, #6b3fb8); color: #fff; }
.slab-aura .slab-co { color: #f3d27a; }
.slab-other .slab-label { background: #e9ecf1; color: #1b1f27; }
.slab-other .slab-co { color: #5a6170; }
/* Note déjà sur l'étiquette ; tampon d'extension masqué (il ne tomberait plus sur l'illustration) */
.real-art.slab .card-stamp, .real-art.slab .real-grade { display: none; }
