/* Cartes « Classique sombre » (12/11/2026, validé par Simon sur la page d'aperçu). Chargé après cards.css.
   :is(#v2, .tc) donne à chaque règle la priorité d'un identifiant : elle passe devant toutes les couches de cards.css
   sans avoir à les réécrire. Retour arrière : retirer la ligne <link> de cartes-v2.css dans index.html.
   Variables posées par lib/tilt.js : --irx / --iry (degrés), --ix / --iy (reflet, %), --im (0 au repos → 1). */
:is(#v2, .tc) { --ix: 50%; --iy: 50%; --im: 0; --irx: 0deg; --iry: 0deg; }
:is(#v2, .tc).r-C { --rc2: #e2e1ea; --enc2: #1d1930; }
:is(#v2, .tc).r-PCm { --rc2: #8d8a9b; --enc2: #fff; }
:is(#v2, .tc).r-R { --rc2: #c27c3a; --enc2: #2a1400; } /* bronze (13/11, Simon) ; plus de coins blancs sur la photo */
:is(#v2, .tc).r-UR { --rc2: #3d8cf2; --enc2: #fff; }
:is(#v2, .tc).r-E { --rc2: #a865e6; --enc2: #fff; }
:is(#v2, .tc).r-L { --rc2: #e7b53c; --enc2: #1d1830; }
:is(#v2, .tc).r-S { --rc2: #b48bff; --enc2: #1d1830; }

/* Cadre : sombre, coins presque droits, liseré à la couleur de la rareté. */
/* Rendu « premium » (12/11, retour de Simon) : liseré de rareté très fin, halo discret de la même teinte, cadre en dégradé
   sombre avec un filet de lumière en haut ; plus de gros bord coloré. */
/* Les mesures du cadre sont en px : sur .tc lui-même, l'unité cqw se rapporte à l'écran et non à la carte
   (c'est ce qui arrondissait trop les miniatures et laissait la photo carrée dépasser des coins). */
:is(#v2, .tc) { border-radius: 9px; outline: 0; filter: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc2) 82%, #000), 0 0 18px color-mix(in srgb, var(--rc2) 26%, transparent), 0 10px 28px rgba(0, 0, 0, .6),
    inset 0 1px 0 rgba(255, 255, 255, .13), inset 0 0 0 1px rgba(255, 255, 255, .06); }
:is(#v2, .tc):not(.tc-fullart) { background: radial-gradient(130% 75% at 50% 0%, #292445, #15121f 58%, #0b0913); animation: none; }
:is(#v2, .tc).r-S { box-shadow: 0 0 0 1px #ffc2d6, 0 0 20px rgba(107, 208, 255, .4), 0 10px 28px rgba(0, 0, 0, .6); }
/* Miniatures : même forme que le grand format (coins à peine arrondis), liseré d'un pixel, léger halo de rareté, filet de lumière. */
:is(#v2, .tc).tc-mini { border-radius: 3px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc2) 82%, #000), 0 0 7px color-mix(in srgb, var(--rc2) 22%, transparent), 0 3px 8px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); }
:is(#v2, .tc).tc-mini.r-S { box-shadow: 0 0 0 1px #ffc2d6, 0 0 8px rgba(107, 208, 255, .4), 0 3px 8px rgba(0, 0, 0, .55); }
:is(#v2, .tc).tc-mini .tc-in { border-radius: 3px; }
:is(#v2, .tc).tc-mini:not(.tc-fullart) .tc-art { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
:is(#v2, .tc) .tc-in { border-radius: 2cqw; }

/* Commune → Épique : photo au-dessus, titre sur une ligne sur fond de rareté, texte et slogan dans un cadre blanc. */
:is(#v2, .tc):not(.tc-fullart) .tc-in { gap: 2cqw; }
:is(#v2, .tc):not(.tc-fullart) .tc-bas { display: grid; gap: 2cqw; }
:is(#v2, .tc):not(.tc-fullart) .tc-art { position: relative; z-index: 2; border-radius: 1.4cqw; box-shadow: 0 0 0 max(1px, .25cqw) rgba(0, 0, 0, .65), 0 1cqw 3cqw rgba(0, 0, 0, .45); }
:is(#v2, .tc):not(.tc-fullart) .tc-bas .tc-title { padding: 1.6cqw 3cqw; border: 0; border-radius: 1cqw;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc2) 86%, #fff), var(--rc2) 48%, color-mix(in srgb, var(--rc2) 80%, #000));
  box-shadow: inset 0 max(1px, .25cqw) 0 rgba(255, 255, 255, .38), 0 .6cqw 1.6cqw rgba(0, 0, 0, .35); }
:is(#v2, .tc):not(.tc-fullart) .tc-bas .tc-title .tc-name { color: var(--enc2); text-shadow: none; }
:is(#v2, .tc).tc-full:not(.tc-fullart) .tc-bas .tc-text { border: 0; border-radius: 1cqw; background: linear-gradient(180deg, #fff, #f3f0e9);
  box-shadow: inset 0 0 0 max(1px, .2cqw) rgba(20, 16, 40, .14), 0 .6cqw 1.6cqw rgba(0, 0, 0, .3); }
:is(#v2, .tc).tc-mini:not(.tc-fullart) .tc-bas .tc-title { border-radius: 1cqw; }
/* Peu commune : bandeau en acier brossé (plus de filet dans la photo). */
:is(#v2, .tc).r-PCm:not(.tc-fullart) .tc-bas .tc-title { background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .14) 0 1px, transparent 1px 4px), linear-gradient(180deg, #a3a0b3, #6f6c80); }

/* Pied : rareté à gauche, logo centré, numéro à droite, chacun sur une ligne. */
:is(#v2, .tc) .tc-finish, :is(#v2, .tc) .tc-uid { white-space: nowrap; color: color-mix(in srgb, var(--rc2) 78%, #fff); opacity: .92; font-weight: 700; letter-spacing: .08em; }
:is(#v2, .tc).tc-full .tc-finish, :is(#v2, .tc).tc-full .tc-uid { bottom: 3.4cqw; font-size: 2.5cqw; font-family: inherit; text-transform: uppercase; }
:is(#v2, .tc).tc-full .tc-finish { left: 4.5cqw; max-width: 41cqw; overflow: hidden; font-size: 2.3cqw; letter-spacing: .03em; }
:is(#v2, .tc).tc-full .tc-uid { right: 4.5cqw; }
:is(#v2, .tc) .tc-sym .rsym { animation: none; filter: none; }

/* Signes par rareté, posés sur la photo (jamais sur le contour). */
:is(#v2, .tc).r-UR:not(.tc-fullart) .tc-art::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: calc(var(--im) * 1.2); mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent 40%, rgba(160, 205, 255, .55) 48%, rgba(255, 255, 255, .7) 50%, rgba(160, 205, 255, .55) 52%, transparent 60%) var(--ix) 0 / 260% 100% no-repeat; }

/* Anciens reflets (cards.css) neutralisés : les nouveaux effets sont ci-dessous. */
:is(#v2, .tc) .tc-sheen { inset: 0; opacity: 0; background: none; animation: none; mix-blend-mode: normal; }
:is(#v2, .tc).f-reverse:not(.tc-fullart) .tc-bas .tc-title::after, :is(#v2, .tc).f-reverse:not(.tc-fullart) .tc-bas .tc-text::after { content: none; }

/* Grand format : la carte s'incline ; un reflet de lumière suit le doigt (invisible au repos). */
:is(#v2, .tc).tc-full { transform: perspective(900px) rotateX(var(--irx)) rotateY(var(--iry)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
:is(#v2, .tc).tc-full.touchee { transition: transform .06s linear; }
.card-viewer-card :is(#v2, .tc), .scene :is(#v2, .tc) { touch-action: none; }
:is(#v2, .tc) .tc-gl { position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: inherit; opacity: var(--im); mix-blend-mode: screen;
  background: radial-gradient(circle at var(--ix) var(--iy), rgba(255, 255, 255, .34), rgba(255, 255, 255, .06) 34%, transparent 58%); }

/* Relief : copie de la photo passée dans le filtre, superposée ; absente au repos (jamais calculée), visible en mouvement. */
:is(#v2, .tc) .art-relief { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; pointer-events: none; }
:is(#v2, .tc).incline .art-relief { display: block; filter: url(#pm-relief) saturate(1.1); opacity: calc(var(--im) * 1.25); }
/* Légendaire, Secrète : relief seulement là où tombe la lumière. */
:is(#v2, .tc).tc-fullart.incline .art-relief { opacity: calc(var(--im) * 1.4);
  -webkit-mask: radial-gradient(circle at var(--ix) var(--iy), #000 0 20%, transparent 46%); mask: radial-gradient(circle at var(--ix) var(--iy), #000 0 20%, transparent 46%); }
/* Holo : relief sur quelques grains (≈ 10 % de l'image), sous la lumière. */
:is(#v2, .tc).f-holo.incline .art-relief { opacity: calc(var(--im) * 1.3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'240'%20height%3D'240'%3E%3Cfilter%20id%3D'n'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.42'%20numOctaves%3D'2'%20seed%3D'3'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20type%3D'luminanceToAlpha'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D'linear'%20slope%3D'10'%20intercept%3D'-6.1'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D'240'%20height%3D'240'%20filter%3D'url(%23n)'%2F%3E%3C%2Fsvg%3E") 0 0 / 240px 240px, radial-gradient(circle at var(--ix) var(--iy), #000 0 26%, transparent 70%); -webkit-mask-composite: source-in;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'240'%20height%3D'240'%3E%3Cfilter%20id%3D'n'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.42'%20numOctaves%3D'2'%20seed%3D'3'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20type%3D'luminanceToAlpha'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D'linear'%20slope%3D'10'%20intercept%3D'-6.1'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D'240'%20height%3D'240'%20filter%3D'url(%23n)'%2F%3E%3C%2Fsvg%3E") 0 0 / 240px 240px, radial-gradient(circle at var(--ix) var(--iy), #000 0 26%, transparent 70%); mask-composite: intersect; }

/* Holo « feuille » : arc-en-ciel large et doux (aucune bande), paillettes irrégulières sous le reflet, liseré irisé au repos. */
:is(#v2, .tc).f-holo .tc-sheen { z-index: 2; opacity: calc(.26 + var(--im) * .3); mix-blend-mode: color-dodge;
  background:
    radial-gradient(circle at var(--ix) var(--iy), rgba(255, 255, 255, .5), transparent 46%),
    linear-gradient(118deg, rgba(255, 60, 140, .8), rgba(255, 190, 70, .8) 16%, rgba(120, 255, 170, .8) 33%, rgba(70, 200, 255, .8) 50%, rgba(170, 120, 255, .8) 66%, rgba(255, 60, 140, .8) 83%, rgba(255, 190, 70, .8)) var(--ix) var(--iy) / 420% 420%; }
:is(#v2, .tc).tc-full.f-holo .tc-sheen::after { content: ""; position: absolute; inset: 0; opacity: calc(.1 + var(--im) * .9); background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'180'%20height%3D'180'%3E%3Cfilter%20id%3D'n'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'1.4'%20numOctaves%3D'2'%20seed%3D'7'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20type%3D'luminanceToAlpha'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D'linear'%20slope%3D'14'%20intercept%3D'-9.3'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D'180'%20height%3D'180'%20filter%3D'url(%23n)'%2F%3E%3C%2Fsvg%3E") var(--ix) var(--iy) / 180px 180px, radial-gradient(circle at var(--ix) var(--iy), #000 0 18%, transparent 62%); -webkit-mask-composite: source-in;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'180'%20height%3D'180'%3E%3Cfilter%20id%3D'n'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'1.4'%20numOctaves%3D'2'%20seed%3D'7'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20type%3D'luminanceToAlpha'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D'linear'%20slope%3D'14'%20intercept%3D'-9.3'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D'180'%20height%3D'180'%20filter%3D'url(%23n)'%2F%3E%3C%2Fsvg%3E") var(--ix) var(--iy) / 180px 180px, radial-gradient(circle at var(--ix) var(--iy), #000 0 18%, transparent 62%); mask-composite: intersect; }
:is(#v2, .tc).f-holo:not(.tc-fullart) .tc-art::before { content: ""; position: absolute; inset: 0; z-index: 4; padding: max(2px, 1.1cqw); pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, #ff6b9a, #ffd36b 20%, #7dffb2 40%, #6bd0ff 60%, #b48bff 80%, #ff6b9a) var(--ix) var(--iy) / 200% 200%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }

/* Reverse : feuille irisée sur le cadre, le titre et le texte ; la photo passe au-dessus et reste intacte. */
:is(#v2, .tc).f-reverse:not(.tc-fullart) .tc-in::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; opacity: calc(.12 + var(--im) * .3); mix-blend-mode: hard-light;
  background: linear-gradient(115deg, #ff6b9a, #ffd36b 18%, #7dffb2 36%, #6bd0ff 54%, #b48bff 72%, #ff6b9a 90%) var(--ix) var(--iy) / 300% 300%; }

/* Légendaire : lame dorée sur la photo en mouvement (le titre « brush » de cards.css est conservé tel quel).
   Secrète : voile prismatique, léger au repos. */
:is(#v2, .tc).r-L .tc-sheen { z-index: 1; opacity: calc(var(--im) * .8); mix-blend-mode: color-dodge;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 224, 138, .8) 47%, rgba(255, 255, 255, .9) 50%, rgba(255, 224, 138, .8) 53%, transparent 62%) var(--ix) 0 / 260% 100% no-repeat; }
:is(#v2, .tc).r-S .tc-sheen { z-index: 1; opacity: calc(.12 + var(--im) * .5); mix-blend-mode: color-dodge;
  background: linear-gradient(118deg, rgba(255, 60, 140, .8), rgba(255, 190, 70, .8) 16%, rgba(120, 255, 170, .8) 33%, rgba(70, 200, 255, .8) 50%, rgba(170, 120, 255, .8) 66%, rgba(255, 60, 140, .8) 83%, rgba(255, 190, 70, .8)) var(--ix) var(--iy) / 420% 420%; }

.pm-relief-defs { position: absolute; }
@media (prefers-reduced-motion: reduce) { :is(#v2, .tc).tc-full { transition: none; } }
.reduce-motion :is(#v2, .tc).tc-full { transition: none; }
:is(#v2, .tc):not(.tc-fullart) .tc-bas, :is(#v2, .tc):not(.tc-fullart) .tc-bas .tc-title, :is(#v2, .tc):not(.tc-fullart) .tc-bas .tc-text { margin: 0; }
:is(#v2, .tc):not(.tc-fullart) .tc-art { margin: 0; }

/* ---------- Ouverture des boosters : propre et réaliste (12/11/2026, Simon) ----------
   Aucun fond derrière ni autour du booster : plus de halo lumineux, plus de blocs gris derrière la pile, plus d'ombre
   portée sombre autour du paquet. La languette se déchire le long d'une ligne irrégulière (fine, comme un vrai sachet). */
.scene .scene-glow { display: none !important; }
/* Paquet de cartes : deux tranches de cartes fines sous la carte du dessus (plus de blocs gris). */
.scene .stack-depth::before, .scene .stack-depth::after { left: 0; right: 0; opacity: 1; border-radius: 9px; background: #15121f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 6px 14px rgba(0, 0, 0, .45); }
.scene .stack-depth::before { top: 4px; }
.scene .stack-depth::after { top: 8px; }
.scene .pack3d { filter: none; }
/* Haut du booster : une seule bande coupée net (au doigt ou d'un toucher), qui se soulève au point de coupe puis s'envole.
   Ligne de coupe en pointillé tant que le booster est scellé ; glisser horizontal autorisé (pan-y).
   Brillance : point de lumière qui suit la coupe, puis éclair à l'ouverture et reflet qui traverse le booster. */
.scene[data-step="sealed"] { touch-action: pan-y; }
/* Booster de la même largeur que les cartes (12/11, Simon) : hauteur 1,62 × la carte, largeur déduite des proportions de l'image
   (--pr, posé par pack-scene.js) ; un sachet plus étroit que la carte (Doublons) garde ses proportions sans être étiré. */
.scene { --pr: 1.62; --ph: calc(var(--cw) * 1.62); --pw: min(var(--cw), calc(var(--ph) / var(--pr))); }
.scene .pack3d { width: var(--pw); margin-left: calc(var(--pw) / -2); height: var(--ph); top: calc(var(--top) - var(--cw) * .15); }
.scene .pack3d-top, .scene .pack3d-body { background-size: 100% var(--ph); }
.scene .pack3d-top { height: 13%; background: none; clip-path: none; border-radius: 0; transform: none; transform-origin: 50% 100%; }
.scene .pack3d-bande { position: absolute; inset: 0; will-change: transform, clip-path;
  background-image: var(--pack-image); background-repeat: no-repeat; background-position: 0 0; background-size: var(--pw) var(--ph); }
.scene .pack3d-top::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; border-bottom: 2px dashed rgba(255, 255, 255, .6);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .6)); pointer-events: none; }
.scene .pack3d-top.en-cours::after, .scene:not([data-step="sealed"]) .pack3d-top::after { display: none; }
.scene .pack3d-body { top: 13%; border-radius: 0; clip-path: none; }
.scene .pack3d-eclat { position: absolute; top: 13%; left: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0 10%, rgba(255, 255, 255, .85) 18%, rgba(255, 236, 170, .45) 38%, transparent 68%),
    linear-gradient(90deg, transparent 8%, rgba(255, 255, 255, .9) 50%, transparent 92%) center / 100% 3px no-repeat,
    linear-gradient(0deg, transparent 20%, rgba(255, 255, 255, .8) 50%, transparent 80%) center / 3px 100% no-repeat; }
.scene .pack3d-top.en-cours ~ .pack3d-eclat { opacity: 1; }
.scene .pack3d.brille .pack3d-eclat { left: 50% !important; opacity: 1; animation: pack-eclair .8s ease-out both; }
.scene .pack3d.brille .pack3d-body::after { content: ""; position: absolute; inset: 0; mix-blend-mode: screen; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .9) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  -webkit-mask: var(--pack-image) bottom / 100% var(--ph) no-repeat; mask: var(--pack-image) bottom / 100% var(--ph) no-repeat;
  animation: pack-reflet .75s ease-out both; }
/* Lueur qui sort de l'ouverture (dorée, ou bleutée pour un Diamant) ; elle suit le booster quand il se retire. */
.scene .pack3d-lueur { position: absolute; left: -10%; right: -10%; bottom: 87%; height: calc(var(--cw) * .8); opacity: 0; pointer-events: none;
  transform-origin: 50% 100%; mix-blend-mode: screen; filter: blur(5px); --l1: rgba(255, 236, 170, .95); --l2: rgba(255, 205, 110, .5);
  background: linear-gradient(0deg, rgba(255, 255, 255, .95), transparent 7%) center bottom / 78% 100% no-repeat,
    radial-gradient(52% 100% at 50% 100%, #fff 0, var(--l1) 26%, var(--l2) 56%, transparent 80%); }
.scene.is-diamant .pack3d-lueur { --l1: rgba(170, 236, 255, .95); --l2: rgba(110, 200, 255, .5); }
@keyframes pack-eclair { 0% { transform: scale(1); opacity: 1; } 35% { transform: scale(7, 2.6); opacity: 1; } 100% { transform: scale(10, .8); opacity: 0; } }
@keyframes pack-reflet { to { background-position: -30% 0; } }
/* Dos de carte : les cartes sortent du booster face cachée avant que le paquet ne se retourne. */
.scene .sc-dos { z-index: 150; aspect-ratio: 5 / 7; border-radius: 9px; overflow: hidden;
  background: url("../assets/logo-collection-des-potes.svg") center 46% / 74% auto no-repeat,
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 9px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 9px),
    radial-gradient(circle at 50% 44%, #40308a, #1b1538 58%, #0c0a16);
  box-shadow: 0 0 0 1px #7a66dc, inset 0 0 0 7px #120f22, inset 0 0 0 8px rgba(170, 150, 255, .55), inset 0 0 0 11px #120f22, 0 10px 28px rgba(0, 0, 0, .6); }
/* Carte spéciale en attente : plus de halo de scène, la carte elle-même garde sa pulsation. */
/* Miniatures compactes (13/11, Simon) : bandeau du titre bas, sur une seule ligne (la police rétrécit pour les titres longs,
   jusqu'à 29 caractères), petit logo de rareté et pied de carte réduit : la hauteur gagnée revient à la photo. */
:is(#v2, .tc).tc-mini .tc-bas .tc-title { display: flex; align-items: center; box-sizing: border-box; height: 10cqw; padding: 0 2.5cqw; }
:is(#v2, .tc).tc-mini .tc-bas .tc-title .tc-name { display: block; width: 100%; font-size: min(6.2cqw, calc(142cqw / var(--len, 20))); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: clip; }
:is(#v2, .tc).tc-mini .tc-in { gap: 1.6cqw; padding-bottom: 1.4cqw; }
:is(#v2, .tc).tc-mini:not(.tc-fullart) .tc-bas { gap: 0; }
:is(#v2, .tc).tc-mini .tc-sym .rsym { width: 8cqw; height: 8cqw; min-width: 0; min-height: 0; }
:is(#v2, .tc).tc-mini .tc-finish { bottom: 2.2cqw; font-size: 4.4cqw; }
/* Secrète détourée (14/11/2026) : la carte a exactement la forme du cadre dessiné sur l'image (coins transparents),
   sans arrondi, fond ni contour ; l'image (déjà au format 5:7) remplit la carte sans recadrage ni zoom. */
:is(#v2, .tc).r-S.tc-fullart.tc-detoure { border-radius: 0; background: none; box-shadow: none;
  -webkit-mask: var(--masque) center / 100% 100% no-repeat; mask: var(--masque) center / 100% 100% no-repeat; }
:is(#v2, .tc).tc-detoure .art-photo { background: none; }
:is(#v2, .tc).tc-detoure .art-photo .art-img, :is(#v2, .tc).tc-detoure .art-relief { object-fit: fill !important; object-position: center !important; transform: none !important; }
/* Secrète détourée : « Secrète » et le numéro rentrent dans le cadre dessiné (sinon coupés par la découpe) et restent lisibles. */
:is(#v2, .tc).r-S.tc-detoure .tc-finish, :is(#v2, .tc).r-S.tc-detoure .tc-uid { bottom: 2.6cqw; padding: .4cqw 1.8cqw; border-radius: 99px;
  background: rgba(10, 8, 20, .7); color: #fff; opacity: 1; text-shadow: none; }
:is(#v2, .tc).r-S.tc-detoure .tc-finish { left: 10cqw; }
:is(#v2, .tc).r-S.tc-detoure .tc-uid { right: 10cqw; }

/* ===== Animations d'ouverture (14/11/2026) ===== */
/* Booster scellé : il flotte doucement en attendant le joueur. */
.scene[data-step="sealed"]:not(.is-busy) .pack3d { animation: pack-flotte 3.4s ease-in-out infinite; }
@keyframes pack-flotte { 50% { transform: translate3d(0, -1.6%, 0) rotate(.6deg); } }
/* Transformation : halo qui monte pendant la charge, onde de choc au retournement, étincelles. */
.scene .pack3d::before { content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, var(--halo, rgba(255, 210, 90, .85)), transparent 72%); }
.scene.charge-dore .pack3d::before, .scene.charge-diamant .pack3d::before { animation: pack-charge .56s ease-in both; }
.scene.charge-diamant .pack3d::before, .scene.is-diamant .pack3d::before { --halo: rgba(140, 225, 255, .9); }
.scene.transforme .pack3d::before { animation: pack-onde .7s cubic-bezier(.1,.7,.3,1) both; }
@keyframes pack-charge { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1.05); } }
@keyframes pack-onde { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2.1); } }
.scene-etincelle { position: absolute; left: 50%; top: calc(var(--top) + var(--cw) * .7); z-index: 320; width: 9px; height: 9px; border-radius: 50%;
  pointer-events: none; box-shadow: 0 0 8px 2px currentColor; color: rgba(255, 255, 255, .7);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }

/* ===== Secrète : le jeu « plante » ===== */
/* Attente : la pile tressaille, la carte du dessus se dédouble en rouge et cyan par à-coups. */
.scene.bug-S .stack { animation: bug-secousse 1.7s steps(1) infinite; }
.scene.bug-S .sc:not(.is-teasing) .tc { animation: bug-rvb 1.3s steps(1) infinite; }
.scene.bug-S .scene-hint { font-family: ui-monospace, monospace; letter-spacing: .04em; color: #7dfeb3; animation: none; }
@keyframes bug-secousse { 0%, 100% { translate: 0 0; } 8% { translate: -3px 1px; } 10% { translate: 4px -2px; } 12% { translate: 0 0; }
  55% { translate: 2px 2px; } 57% { translate: -5px 0; } 60% { translate: 0 0; } }
@keyframes bug-rvb { 0%, 100% { filter: none; clip-path: none; }
  9% { filter: drop-shadow(-5px 0 0 rgba(255, 0, 80, .8)) drop-shadow(5px 0 0 rgba(0, 230, 255, .8)); }
  12% { filter: none; }
  56% { filter: drop-shadow(6px 0 0 rgba(255, 0, 80, .8)) drop-shadow(-6px 0 0 rgba(0, 230, 255, .8)) hue-rotate(60deg); clip-path: inset(0 0 38% 0); }
  59% { filter: invert(1); clip-path: inset(22% 0 0 0); }
  61% { filter: none; clip-path: none; } }
/* Écran d'erreur plein écran. */
.secret-bug { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; overflow: hidden; pointer-events: none;
  background: #04020a; color: #7dfeb3; animation: bug-entree .5s steps(1) both; transition: opacity .6s ease-out; }
.secret-bug.sort { opacity: 0; }
@keyframes bug-entree { 0% { clip-path: inset(0 0 100% 0); } 12% { clip-path: inset(40% 0 52% 0); } 24% { clip-path: inset(10% 0 78% 0); }
  36% { clip-path: inset(62% 0 20% 0); } 48% { clip-path: inset(0 0 100% 0); } 60% { clip-path: inset(18% 0 30% 0); }
  72% { clip-path: inset(0 0 55% 0); } 84% { clip-path: inset(70% 0 0 0); } 100% { clip-path: inset(0); } }
.bug-lignes { position: absolute; inset: -4px 0; opacity: .5; animation: bug-defile .5s linear infinite;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 4px); }
@keyframes bug-defile { to { transform: translateY(4px); } }
.bug-term { position: absolute; left: 6vw; top: 12vh; right: 6vw; font: 600 clamp(12px, 3.6vw, 17px)/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; text-shadow: 0 0 8px rgba(125, 254, 179, .7); }
.bug-term p { margin: 0; white-space: nowrap; overflow: hidden; }
.bug-mot { position: relative; font: 900 clamp(38px, 15vw, 96px)/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; color: #fff;
  text-shadow: -3px 0 0 rgba(255, 0, 80, .85), 3px 0 0 rgba(0, 230, 255, .85); animation: bug-mot 0.42s steps(1) infinite; }
@keyframes bug-mot { 0%, 100% { transform: none; } 30% { transform: translate(-4px, 1px) skewX(-6deg); } 34% { transform: translate(5px, -1px); } 38% { transform: none; }
  78% { transform: translate(2px, 2px) skewX(5deg); } 82% { transform: none; } }
.bug-mot.ok { animation: bug-mot-ok .6s cubic-bezier(.2,.8,.2,1) both; text-shadow: 0 0 28px rgba(190, 150, 255, .9);
  background: linear-gradient(90deg, #ff9ecb, #ffe08a, #8affc8, #7fd4ff, #c9a2ff, #ff9ecb); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@keyframes bug-mot-ok { from { transform: scale(.9); background-position: 0 0; } to { transform: scale(1.14); background-position: 100% 0; } }
.bug-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.secret-bug.eclat .bug-flash { animation: bug-flash .28s ease-out both; }
@keyframes bug-flash { from { opacity: 0; } to { opacity: 1; } }
/* Après la révélation : aura prismatique autour de la Secrète. */
/* En position fixe (hors du overflow de .scene) : les lueurs couvrent toute la fenêtre, derrière la carte. */
.scene.secrete-revelee::before { content: ""; position: fixed; left: 50%; top: 50%; width: 150vmax; aspect-ratio: 1; z-index: -1; pointer-events: none; border-radius: 50%;
  translate: -50% -50%; opacity: .55; filter: blur(22px); animation: rays-spin 9s linear infinite;
  background: conic-gradient(#ff9ecb, #ffe08a, #8affc8, #7fd4ff, #c9a2ff, #ff9ecb); }
@media (prefers-reduced-motion: reduce) { .scene.bug-S .stack, .scene.bug-S .sc .tc, .scene.secrete-revelee::before, .bug-mot, .bug-lignes { animation: none !important; } }
.scene .sc-best { cursor: zoom-in; } /* toucher la meilleure carte : grand format (14/11/2026) */
