/* ============================================================
   APP TCG.collection — style néo-brutaliste (crème, bords épais, ombres franches)
   Tout est scopé sous .tcg
   ============================================================ */
@property --tc-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.tcg {
  --ink_: var(--ink, #14101f); --cream_: var(--cream, #fff7ee); --paper_: var(--paper, #fffdf8);
  --pink_: var(--pink, #ff1f8f); --violet_: var(--violet, #5b21b6); --purple_: var(--purple, #7c3aed);
  --blue_: var(--blue, #3b1fb8); --yellow_: var(--yellow, #ffe44d); --mint_: var(--mint, #3ee6b0);
  --fui: var(--f-ui, "Space Grotesk", system-ui, sans-serif); --ftitle: var(--f-title, "Archivo Black", "Arial Black", sans-serif);
  position: relative; height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--cream_); color: var(--ink_); font-family: var(--fui);
  background-image: radial-gradient(rgba(20, 16, 31, .07) 1px, transparent 1.2px); background-size: 14px 14px;
  container-type: inline-size; container-name: tcg; -webkit-tap-highlight-color: transparent;
}
.tcg *, .tcg *::before, .tcg *::after { box-sizing: border-box; }
.tcg button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }

/* ---------- en-tête ---------- */
.tcg .tc-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 3px solid var(--ink_); background: var(--paper_); }
.tcg .tc-tabs { display: flex; gap: 8px; flex: 1; min-width: 0; }
.tcg .tc-tabs button {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-weight: 700; font-size: 14px;
  background: var(--paper_); border: 3px solid var(--ink_); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink_);
  transition: transform .1s, box-shadow .1s, background .15s;
}
.tcg .tc-tabs button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink_); }
.tcg .tc-tabs button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink_); }
.tcg .tc-tabs button.on { background: var(--pink_); color: #fff; }
.tcg .tc-coins { padding: 7px 12px; background: var(--ink_); color: var(--yellow_); border: 0; border-radius: 8px; font-weight: 700; white-space: nowrap; box-shadow: 3px 3px 0 var(--pink_); }
.tcg .tc-body { flex: 1; min-height: 0; overflow: auto; padding: 18px; }

/* ============================================================
   LA CARTE
   cadre extérieur = rareté · panneau intérieur = thème (asso)
   ============================================================ */
.tcg .tc-card {
  --rc: #b8bfcc; --panel: #fffdf8; --txt: #14101f; --acc: var(--rc); --accInk: #14101f; --holeb: #14101f;
  position: relative; width: 100%; aspect-ratio: 5 / 7; container-type: inline-size; perspective: 900px; border-radius: 6cqw; user-select: none;
}
.tcg .tc-face {
  position: absolute; inset: 0; border-radius: 6cqw; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 1.8cqw 1.8cqw 0 var(--ink_);
}
.tcg .tc-card.is-tilting .tc-face { transition: transform .06s linear; }
.tcg .tc-frame { position: absolute; inset: 0; border-radius: inherit; border: 1.3cqw solid var(--ink_); overflow: hidden; }
.tcg .tc-in {
  position: absolute; inset: 4.6cqw; border-radius: 3.4cqw; border: 1cqw solid var(--ink_); overflow: hidden;
  display: flex; flex-direction: column; gap: 1.6cqw; padding: 2.4cqw 2.8cqw 2.2cqw; background: var(--panel); color: var(--txt);
}
/* en-tête : nom · PV · catégorie */
.tcg .tc-top { display: flex; align-items: center; gap: 1.4cqw; min-width: 0; }
.tcg .tc-name { flex: 1; min-width: 0; font: 8.4cqw/1.1 var(--ftitle); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.tcg .tc-hp { flex: none; font: 8cqw/1 var(--ftitle); color: #e5383b; text-shadow: .5cqw .5cqw 0 rgba(20, 16, 31, .25); }
.tcg .tc-hp small { font: 800 4cqw/1 var(--fui); margin-right: .5cqw; color: var(--txt); text-shadow: none; }
.tcg .tc-th { flex: none; display: grid; place-items: center; width: 9.5cqw; height: 9.5cqw; font-size: 5.6cqw; line-height: 1; border-radius: 50%; background: var(--acc); border: .7cqw solid var(--ink_); }
/* le trou (image) */
.tcg .tc-hole {
  position: relative; flex: 1 1 auto; min-height: 26cqw; border-radius: 2cqw; overflow: hidden; display: grid; place-items: center;
  border: 1.1cqw solid var(--holeb);
  background: repeating-linear-gradient(135deg, rgba(20, 16, 31, .06) 0 3cqw, transparent 3cqw 6cqw), rgba(20, 16, 31, .1);
  box-shadow: inset 0 1.2cqw 2.4cqw rgba(0, 0, 0, .35);
}
.tcg .tc-ph { font: 24cqw/1 var(--ftitle); color: currentColor; opacity: .14; letter-spacing: -.04em; }
.tcg .tc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcg .tc-img.is-logo { inset: 6%; width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 1.2cqw 0 rgba(0, 0, 0, .35)); }
.tcg .tc-hole.has-img .tc-ph { display: none; }
.tcg .tc-asso { position: absolute; right: 1.6cqw; bottom: 1.6cqw; width: 14cqw; height: 14cqw; border-radius: 50%; border: .8cqw solid #fff; box-shadow: 0 0 0 .6cqw var(--ink_); z-index: 1; }
/* bandeau du thème */
/* attaques */
.tcg .tc-atks { display: flex; flex-direction: column; gap: .6cqw; }
.tcg .tc-atk { display: flex; align-items: center; gap: 1.6cqw; padding: .7cqw .6cqw .9cqw; border-bottom: .5cqw solid color-mix(in srgb, var(--txt) 22%, transparent); }
.tcg .tc-atk:last-child { border-bottom: 0; }
.tcg .tc-cost { display: flex; gap: .5cqw; flex: none; }
.tcg .tc-cost u { display: block; width: 3.6cqw; height: 3.6cqw; border-radius: 50%; background: var(--acc); border: .5cqw solid var(--ink_); }
.tcg .tc-atk span { flex: 1; min-width: 0; font: 800 5cqw/1.1 var(--fui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcg .tc-atk b { flex: none; font: 7.2cqw/1 var(--ftitle); }
/* pied : rareté · gemmes · numéro */
.tcg .tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 1cqw; margin-top: auto; }
.tcg .tc-badge {
  display: inline-block; padding: 2px 9px; border-radius: 99px; border: 2px solid var(--rc);
  background: var(--ink_); color: var(--rc); font: 12px/1.2 var(--ftitle); letter-spacing: .04em;
}
.tcg .tc-card .tc-badge { padding: .4cqw 2.4cqw; border-width: .7cqw; font-size: 5cqw; }
.tcg .tc-gems { display: flex; gap: 1.1cqw; }
.tcg .tc-gems i { width: 2.6cqw; height: 2.6cqw; transform: rotate(45deg); background: var(--rc); border: .5cqw solid var(--ink_); }
.tcg .tc-no { font: 800 3.8cqw/1 var(--fui); opacity: .65; }
/* reflets */
.tcg .tc-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; }
.tcg .tc-card.can-tilt .tc-glare::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .2s; mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, .85), transparent 48%);
}
.tcg .tc-card.is-tilting .tc-glare::before { opacity: 1; }
.tcg .tc-count, .tcg .tc-new, .tcg .tc-dup {
  position: absolute; z-index: 3; font: 7cqw/1 var(--ftitle); padding: 1.6cqw 3cqw; border-radius: 99px; border: .9cqw solid var(--ink_);
}
.tcg .tc-count { right: -2cqw; top: -2cqw; background: var(--yellow_); }
.tcg .tc-new { --tx0: -50%; left: 50%; top: -4cqw; transform: translateX(-50%); background: var(--pink_); color: #fff; animation: tc-pop .5s cubic-bezier(.3, 1.6, .5, 1) both .3s; }
.tcg .tc-dup { left: 50%; bottom: -3cqw; transform: translateX(-50%); background: var(--mint_); white-space: nowrap; }

/* ---------- R : argent ---------- */
.tcg .r-R .tc-frame { background: linear-gradient(145deg, #f8f9fa, #adb5bd 38%, #e9ecef 58%, #868e96); }
.tcg .r-R { --panel: linear-gradient(180deg, #f8f9fb, #e9ecf1); }
/* ---------- SR : acier bleu + rivets ---------- */
.tcg .r-SR .tc-frame { background: linear-gradient(160deg, #0b3d91, #4cc9f0 42%, #1e6fd9 66%, #0b2e6e); }
.tcg .r-SR .tc-frame::after {
  content: ''; position: absolute; inset: 1.2cqw;
  background:
    radial-gradient(circle, #e0f2ff 0 .9cqw, #0b2e6e 1cqw 1.3cqw, transparent 1.4cqw) left top / 3.2cqw 3.2cqw no-repeat,
    radial-gradient(circle, #e0f2ff 0 .9cqw, #0b2e6e 1cqw 1.3cqw, transparent 1.4cqw) right top / 3.2cqw 3.2cqw no-repeat,
    radial-gradient(circle, #e0f2ff 0 .9cqw, #0b2e6e 1cqw 1.3cqw, transparent 1.4cqw) left bottom / 3.2cqw 3.2cqw no-repeat,
    radial-gradient(circle, #e0f2ff 0 .9cqw, #0b2e6e 1cqw 1.3cqw, transparent 1.4cqw) right bottom / 3.2cqw 3.2cqw no-repeat;
}
.tcg .r-SR { --panel: linear-gradient(180deg, #eef8ff, #d7ecff); }
.tcg .r-SR .tc-glare::after { content: ''; position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .45) 50%, transparent 60%); animation: tc-sweep 4.5s ease-in-out infinite; }
/* ---------- SSR : or ---------- */
.tcg .r-SSR .tc-frame {
  background: linear-gradient(135deg, #8a5a00, #ffd700 22%, #fff3b0 34%, #d4a017 48%, #ffe066 66%, #a87100 86%, #ffd700);
  box-shadow: inset 0 0 0 1cqw rgba(255, 243, 176, .8), inset 0 0 0 1.8cqw #a87100;
}
.tcg .r-SSR { --panel: linear-gradient(180deg, #fffaf0, #ffefc2); }
.tcg .r-SSR .tc-glare::after { content: ''; position: absolute; inset: -30%; background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .8) 48%, rgba(255, 236, 150, .3) 52%, transparent 62%); animation: tc-sweep 3s ease-in-out infinite; }
/* ---------- UR : holographique ---------- */
.tcg .r-UR .tc-frame { background: linear-gradient(120deg, #7c3aed, #ec4899, #3b82f6, #a855f7, #22d3ee, #7c3aed); background-size: 400% 400%; animation: tc-holo 6s linear infinite; }
.tcg .r-UR { --panel: linear-gradient(160deg, #2a1052, #170a33); --txt: #f5ecff; --holeb: #a855f7; }
.tcg .r-UR .tc-glare::after {
  content: ''; position: absolute; inset: 0; mix-blend-mode: soft-light; opacity: .45;
  background: linear-gradient(115deg, transparent 20%, #ff1f8f 32%, #ffe44d 40%, #3ee6b0 48%, #3b82f6 56%, transparent 68%);
  background-size: 300% 300%; animation: tc-holo 5s linear infinite;
}
/* ---------- LR : arc-en-ciel tournant ---------- */
.tcg .r-LR .tc-frame { background: #14101f; }
.tcg .r-LR .tc-frame::before {
  content: ''; position: absolute; inset: -50%;
  background: conic-gradient(from var(--tc-a), #ff1f8f, #ffe44d, #3ee6b0, #22d3ee, #3b82f6, #a855f7, #ff1f8f);
  animation: tc-spin 3.5s linear infinite;
}
.tcg .r-LR { --panel: linear-gradient(135deg, #ffe4f2, #e0e7ff, #d1fae5, #fef9c3, #ffe4f2); }
.tcg .r-LR:not([class*=' sk-']) .tc-in { background-size: 300% 300%; animation: tc-holo 7s ease infinite; }
.tcg .r-LR .tc-glare::after {
  content: ''; position: absolute; inset: -30%;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .7) 48%, rgba(255, 31, 143, .25) 51%, transparent 58%);
  animation: tc-sweep 2.8s ease-in-out infinite;
}
.tcg .r-LR .tc-in::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background: radial-gradient(circle at 20% 30%, #fff 0 .6cqw, transparent .8cqw) 0 0 / 9cqw 11cqw,
    radial-gradient(circle at 70% 70%, #fff 0 .5cqw, transparent .7cqw) 0 0 / 13cqw 9cqw;
}

/* ============================================================
   THÈMES DES ASSOS (couleurs et motifs de leur logo)
   ============================================================ */
/* Isen Sondage : néon bleu / rose sur nuit */
.tcg .sk-sondage { --panel: radial-gradient(circle at 50% 0%, #3a1d6e, #120a2a 62%, #07060f); --txt: #f4f0ff; --acc: #22d3ee; --holeb: #ff3ea5; }
.tcg .sk-sondage .tc-hole { box-shadow: 0 0 2.4cqw #ff3ea5, inset 0 0 3cqw rgba(34, 211, 238, .45); }
.tcg .sk-sondage .tc-name { color: #fff; text-shadow: 0 0 2cqw #22d3ee; }
/* Formul'isen : écurie F1 violette, rose, drapeau à damier */
.tcg .sk-formulisen { --panel: linear-gradient(170deg, #6b4ea0, #3b2766 70%); --txt: #fff; --acc: #ff4fa3; --accInk: #fff; --holeb: #ff4fa3; }
.tcg .sk-formulisen .tc-in::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.4cqw; background: repeating-conic-gradient(#fff 0 25%, #1a1024 0 50%) 0 0 / 2.4cqw 2.4cqw; opacity: .9; }
/* BDS Drak'isen : dragon violet, flammes roses, écailles */
.tcg .sk-bds { --panel: radial-gradient(circle at 50% 100%, rgba(255, 95, 168, .55), transparent 55%), radial-gradient(circle, rgba(255, 255, 255, .08) 0 1.4cqw, transparent 1.5cqw) 0 0 / 5cqw 4cqw, linear-gradient(165deg, #2a0f3d, #5b1d8c 70%); --txt: #fff; --acc: #ff5fa8; --accInk: #fff; --holeb: #b46cff; }
/* BDA : rose, vagues, tortue */
.tcg .sk-bda { --panel: radial-gradient(circle at 50% -40%, #fff, transparent 60%), radial-gradient(130% 60% at 50% 120%, #ff6aa8 40%, transparent 41%), linear-gradient(180deg, #ffe0ee, #ffb3d4); --txt: #5a0f35; --acc: #ff4f9a; --accInk: #fff; --holeb: #c2185b; }
/* Countrisen : cuir, bandana rouge, étoiles dorées */
.tcg .sk-countrisen { --panel: radial-gradient(circle, rgba(224, 165, 38, .5) 0 .6cqw, transparent .7cqw) 0 0 / 7cqw 7cqw, linear-gradient(180deg, #f0e0cc, #d9b892); --txt: #3d1f0a; --acc: #c62828; --accInk: #fff; --holeb: #7a4a2a; }
/* Gambl'isen : tapis noir, rouge et or */
.tcg .sk-gamblisen { --panel: radial-gradient(circle at 50% 30%, #3a0c0c, #111 70%); --txt: #f5e6b8; --acc: #d4af37; --accInk: #111; --holeb: #d4af37; }
.tcg .sk-gamblisen .tc-in { box-shadow: inset 0 0 0 .7cqw #b71c1c; }
/* Gobl'isen : bleu nuit, or, mur de pierres */
.tcg .sk-gobelisen { --panel: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 .5cqw, transparent .5cqw 7cqw), linear-gradient(180deg, #26365a, #141e36); --txt: #f3e2a9; --acc: #c9a227; --accInk: #141e36; --holeb: #c9a227; }
/* Isen Engineering : mauve, ampoule et engrenages */
.tcg .sk-engineering { --panel: radial-gradient(circle at 80% 15%, rgba(255, 255, 255, .6), transparent 30%), linear-gradient(180deg, #f3dcf5, #d9a6e0); --txt: #4a1240; --acc: #a0287a; --accInk: #fff; --holeb: #a0287a; }
/* ISEN Studio : papier crème, rouge argentique */
.tcg .sk-studio { --panel: repeating-linear-gradient(90deg, rgba(179, 38, 30, .05) 0 .4cqw, transparent .4cqw 3cqw), #f5ede3; --txt: #2b2b2b; --acc: #b3261e; --accInk: #fff; --holeb: #2b2b2b; }
/* Pinte Ronde : ambre */
.tcg .sk-pinte { --panel: radial-gradient(circle, rgba(255, 255, 255, .35) 0 .7cqw, transparent .8cqw) 0 0 / 6cqw 8cqw, linear-gradient(180deg, #ffe2b8, #f4a261); --txt: #3d2410; --acc: #3d2410; --accInk: #ffe2b8; --holeb: #3d2410; }

/* ---------- ZLR : noir et or royal (passe avant le thème) ---------- */
.tcg .r-ZLR { --panel: radial-gradient(circle at 50% 0%, #3a2a00, #0d0a14 70%); --txt: #ffe9a8; --acc: #ffd700; --accInk: #2a1600; --holeb: #b8860b; }
.tcg .r-ZLR .tc-face { animation: tc-aura 3s linear infinite; }
.tcg .r-ZLR .tc-frame {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 215, 0, .25) 0 .8cqw, transparent 1cqw) 0 0 / 5cqw 5cqw,
    linear-gradient(135deg, #0a0710, #241a05 50%, #0a0710);
  box-shadow: inset 0 0 0 1.2cqw #ffd700, inset 0 0 0 2cqw #0a0710, inset 0 0 0 2.5cqw #b8860b;
}
.tcg .r-ZLR .tc-frame::after { content: ''; position: absolute; inset: 3cqw; border-radius: 4.5cqw; border: .6cqw dashed rgba(255, 215, 0, .55); }
.tcg .r-ZLR .tc-in { inset: 6.4cqw 6cqw 6cqw; border-color: #ffd700; box-shadow: 0 0 0 .8cqw #0a0710, 0 0 4cqw rgba(255, 215, 0, .55); }
.tcg .r-ZLR .tc-hole { box-shadow: 0 0 3cqw rgba(255, 215, 0, .6), inset 0 1.5cqw 4cqw rgba(0, 0, 0, .6); }
.tcg .r-ZLR .tc-name { background: linear-gradient(180deg, #fff3b0, #ffd700 50%, #b8860b); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.tcg .r-ZLR .tc-gems i { border-color: #ffd700; }
.tcg .tc-crown { position: absolute; z-index: 4; left: 50%; top: -9cqw; width: 30cqw; transform: translateX(-50%); filter: drop-shadow(0 1cqw 0 rgba(0, 0, 0, .45)); animation: tc-float 2.4s ease-in-out infinite; }
.tcg .r-ZLR .tc-glare::after {
  content: ''; position: absolute; inset: -30%;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 240, 170, .55) 49%, rgba(255, 31, 143, .25) 52%, transparent 60%);
  animation: tc-sweep 2.6s ease-in-out infinite;
}
/* paillettes / étoiles (LR, ZLR) */
.tcg .tc-spk { position: absolute; z-index: 3; width: 5cqw; height: 5cqw; pointer-events: none; animation: tc-twinkle 1.8s ease-in-out infinite; }
.tcg .tc-spk::before, .tcg .tc-spk::after { content: ''; position: absolute; left: 50%; top: 50%; background: #fff; border-radius: 1cqw; transform: translate(-50%, -50%); }
.tcg .tc-spk::before { width: 100%; height: 18%; }
.tcg .tc-spk::after { width: 18%; height: 100%; }
.tcg .r-ZLR .tc-spk::before, .tcg .r-ZLR .tc-spk::after { background: #ffd700; box-shadow: 0 0 2cqw #ffd700; }
.tcg .tc-spk.s1 { left: 10%; top: 18%; }
.tcg .tc-spk.s2 { right: 9%; top: 34%; animation-delay: .4s; }
.tcg .tc-spk.s3 { left: 18%; top: 62%; animation-delay: .9s; }
.tcg .tc-spk.s4 { right: 16%; top: 76%; animation-delay: 1.3s; }
.tcg .tc-spk.s5 { left: 46%; top: 8%; animation-delay: .7s; }
.tcg .r-ZLR .tc-spk { animation-name: tc-starfloat; animation-duration: 3s; }

/* dos de carte */
.tcg .tc-back .tc-face {
  border: 1.3cqw solid var(--ink_); display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .09) 0 3cqw, transparent 3cqw 6cqw), linear-gradient(150deg, #ff1f8f, #a21caf 45%, #5b21b6 70%, #3b1fb8);
}
.tcg .tc-backlogo { display: grid; justify-items: center; gap: 1.5cqw; padding: 5cqw 6cqw; border: 1.2cqw solid #fff; border-radius: 7cqw; background: linear-gradient(160deg, #ff1f8f, #3b1fb8); box-shadow: 0 0 0 1.2cqw var(--ink_); }
.tcg .tc-backlogo b { font: 16cqw/1 var(--ftitle); color: #fff; letter-spacing: -.02em; }
.tcg .tc-backlogo span { font: 6cqw/1 var(--ftitle); color: #5b21b6; background: #fff; border-radius: 1.5cqw; padding: 1.2cqw 2.6cqw; letter-spacing: .18em; }
.tcg .tc-back.is-dim .tc-face { filter: grayscale(.85) brightness(.75); opacity: .55; box-shadow: 1.2cqw 1.2cqw 0 rgba(20, 16, 31, .4); }
.tcg .tc-lock { position: absolute; bottom: 7cqw; left: 50%; transform: translateX(-50%); font: 8cqw/1 var(--ftitle); color: #fff; background: var(--ink_); padding: 1.5cqw 4cqw; border-radius: 99px; }

/* ============================================================
   ONGLET BOOSTERS
   ============================================================ */
.tcg .tc-exts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.tcg .tc-ext { padding: 7px 14px; font-weight: 700; border: 3px solid var(--ink_); border-radius: 99px; background: var(--paper_); box-shadow: 3px 3px 0 var(--ink_); display: flex; align-items: center; gap: 6px; }
.tcg .tc-ext.on { background: var(--ink_); color: var(--yellow_); }
.tcg .tc-ext.is-locked { opacity: .6; border-style: dashed; box-shadow: none; }
.tcg .tc-ext small { font-size: 10px; text-transform: uppercase; background: var(--yellow_); color: var(--ink_); padding: 1px 6px; border-radius: 99px; }
.tcg .tc-packs { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 14px 0 10px; }
.tcg .tc-packs.is-locked .tc-buy, .tcg .tc-packs.is-locked .tc-price { filter: grayscale(1); opacity: .45; pointer-events: none; }
.tcg .tc-soon { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-6deg); font: 28px var(--ftitle); background: var(--yellow_); border: 3px solid var(--ink_); box-shadow: 5px 5px 0 var(--ink_); padding: 10px 22px; border-radius: 10px; }
.tcg .tc-buy { position: relative; background: none; border: 0; padding: 0; }
.tcg .tc-buy .tc-pack { --pw: clamp(150px, 24cqw, 210px); transition: transform .2s cubic-bezier(.3, 1.5, .5, 1); animation: tc-idle 3.4s ease-in-out infinite; }
.tcg .tc-buy:hover .tc-pack { transform: translateY(-8px) rotate(-2deg); }
.tcg .tc-buy:active .tc-pack { transform: scale(.96); }
.tcg .tc-stock { position: absolute; top: -12px; right: -16px; z-index: 5; font: 20px var(--ftitle); background: var(--yellow_); border: 3px solid var(--ink_); border-radius: 99px; padding: 4px 12px; box-shadow: 3px 3px 0 var(--ink_); transform: rotate(8deg); }
.tcg .tc-buyrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.tcg .tc-price { font: 18px var(--ftitle); padding: 10px 20px; border: 3px solid var(--ink_); border-radius: 10px; background: var(--pink_); color: #fff; box-shadow: 4px 4px 0 var(--ink_); }
.tcg .tc-price.is-open { background: var(--mint_); color: var(--ink_); font-size: 20px; padding: 10px 26px; }
.tcg .tc-price.is-alt { background: var(--paper_); color: var(--ink_); }
.tcg .tc-mini-btn { width: 48px; height: 48px; font: 20px var(--ftitle); background: var(--paper_); border: 3px solid var(--ink_); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink_); }
.tcg .tc-price:active, .tcg .tc-mini-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink_); }
.tcg .tc-ten { background: var(--yellow_); color: var(--ink_); }
.tcg .tc-ten b { font-size: 22px; margin-right: 6px; }
.tcg .tc-oddnote { margin: 12px 0 0; font-weight: 700; opacity: .7; }

/* le paquet (couleurs du logo ISEN Sondage) */
.tcg .tc-pack {
  --pw: 170px; position: relative; width: var(--pw); aspect-ratio: 5 / 7.4; border-radius: 14px; border: 3px solid var(--ink_);
  box-shadow: 7px 7px 0 var(--ink_); overflow: hidden; container-type: inline-size; touch-action: none;
  background:
    radial-gradient(circle at 50% 120%, rgba(34, 211, 238, .55), transparent 55%),
    linear-gradient(165deg, #ff1f8f 0%, #d0249f 30%, #7c3aed 64%, #3b1fb8 100%);
}
.tcg .tc-pack::before, .tcg .tc-pack::after {
  content: ''; position: absolute; left: 0; right: 0; height: 6%; z-index: 2;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .6) 0 4cqw, rgba(255, 255, 255, .15) 4cqw 8cqw);
}
.tcg .tc-pack::before { top: 0; } .tcg .tc-pack::after { bottom: 0; }
.tcg .tc-pack-top { position: absolute; left: 0; right: 0; top: 0; height: 16%; z-index: 3; border-bottom: .9cqw dashed rgba(255, 255, 255, .8); background: linear-gradient(180deg, rgba(20, 16, 31, .25), transparent); transition: transform .55s cubic-bezier(.4, -0.3, .6, 1), opacity .55s; }
.tcg .tc-cut { position: absolute; left: 0; bottom: -1.2cqw; height: 1.6cqw; width: calc(var(--tear, 0) * 100%); background: #fff; box-shadow: 0 0 4cqw 1cqw #fff, 0 0 8cqw 2cqw var(--glow, #fff); border-radius: 99px; }
.tcg .from-right .tc-cut { left: auto; right: 0; }
.tcg .tc-cut::after { content: ''; position: absolute; right: -4cqw; top: 50%; width: 8cqw; height: 8cqw; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, #fff 0 25%, rgba(255, 255, 255, .7) 35%, transparent 70%); opacity: 0; transition: opacity .15s; }
.tcg .from-right .tc-cut::after { right: auto; left: -4cqw; }
.tcg .is-tearing .tc-cut::after { opacity: 1; }
/* la bande se soulève pendant qu'on découpe */
.tcg .tc-packzone .tc-pack-top { transform-origin: 100% 100%; transform: translateY(calc(var(--tear, 0) * -14%)) rotate(calc(var(--tear, 0) * -4deg)); }
.tcg .tc-packzone.from-right .tc-pack-top { transform-origin: 0 100%; transform: translateY(calc(var(--tear, 0) * -14%)) rotate(calc(var(--tear, 0) * 4deg)); }
.tcg .tc-packzone.is-tearing .tc-pack-top { transition: none; }
.tcg .tc-packzone.is-tearing .tc-pack { animation: tc-jitter .09s linear infinite alternate; }
@keyframes tc-jitter { from { translate: -1px 0; } to { translate: 1px 1px; } }
/* bande arrachée qui s'envole */
.tcg .tc-strip { position: absolute; z-index: 6; pointer-events: none; border: 3px solid var(--ink_); border-radius: 12px 12px 3px 3px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 8px, rgba(255, 255, 255, .12) 8px 16px), linear-gradient(180deg, #ff1f8f, #e0259a); animation: tc-stripfly .8s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes tc-stripfly { to { transform: translate(calc(var(--d) * 70%), -260%) rotate(calc(var(--d) * -38deg)); opacity: 0; } }
.tcg .tc-pack-body { position: absolute; inset: 16% 0 6%; display: grid; place-items: center; align-content: center; gap: 7cqw; }
.tcg .tc-logo { display: grid; justify-items: center; gap: 2.5cqw; padding: 6cqw 7cqw 5cqw; border: 1.6cqw solid #fff; border-radius: 9cqw; background: linear-gradient(170deg, #ff1f8f, #a21caf 55%, #3b1fb8); box-shadow: 0 0 0 1.4cqw var(--ink_), 0 0 10cqw rgba(255, 228, 77, .45); }
.tcg .tc-logo b { font: 19cqw/1 var(--ftitle); color: #fff; letter-spacing: -.02em; }
.tcg .tc-logo span { font: 6.5cqw/1 var(--ftitle); color: #5b21b6; background: #fff; border-radius: 2cqw; padding: 1.6cqw 3cqw; letter-spacing: .2em; }
.tcg .tc-pack-n { font: 11cqw/1 var(--ftitle); color: var(--yellow_); -webkit-text-stroke: 1cqw var(--ink_); paint-order: stroke fill; text-transform: uppercase; }
.tcg .tc-pack-shine { position: absolute; inset: -30%; z-index: 4; pointer-events: none; background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .55) 48%, transparent 56%); animation: tc-sweep 3.2s ease-in-out infinite; }

/* ============================================================
   COLLECTION
   ============================================================ */
.tcg .tc-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tcg .tc-filters button { display: flex; align-items: center; gap: 5px; padding: 6px 12px; font-weight: 700; font-size: 13px; border: 3px solid var(--ink_); border-radius: 99px; background: var(--paper_); box-shadow: 2px 2px 0 var(--ink_); }
.tcg .tc-filters button.on { background: var(--ink_); color: #fff; }
.tcg .tc-progress { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.tcg .tc-progress i { width: 110px; height: 12px; border: 3px solid var(--ink_); border-radius: 99px; background: linear-gradient(90deg, var(--pink_) var(--p), var(--paper_) var(--p)); }
.tcg .tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 20px 16px; padding: 4px 6px 12px 2px; }
.tcg .tc-grid .tc-card[data-id] { cursor: pointer; transition: transform .15s; }
.tcg .tc-grid .tc-card[data-id]:hover { transform: translateY(-4px); }

/* ============================================================
   CALQUES (détail, taux)
   ============================================================ */
.tcg .tc-layer { position: absolute; inset: 0; z-index: 50; display: none; }
.tcg .tc-layer.on { display: block; }
.tcg .tc-ov { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; overflow: auto; background: rgba(20, 16, 31, .9); animation: tc-fade .2s ease both; }
.tcg .tc-x { position: absolute; top: 12px; right: 12px; z-index: 5; width: 42px; height: 42px; font-size: 18px; font-weight: 700; background: var(--paper_); border: 3px solid var(--ink_); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink_); }
.tcg .tc-panel { background: var(--paper_); border: 3px solid var(--ink_); border-radius: 12px; box-shadow: 6px 6px 0 var(--ink_); padding: 18px 20px; }
.tcg .tc-panel h3 { margin: 0 0 10px; font: 22px var(--ftitle); }
.tcg .tc-oddsbox { min-width: min(360px, 90cqw); }
.tcg .tc-oddrow { display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 2px dashed rgba(20, 16, 31, .15); }
.tcg .tc-oddrow b { font-family: var(--ftitle); }
.tcg .tc-oddrow small { opacity: .6; min-width: 64px; text-align: right; }
.tcg .tc-detail { display: flex; align-items: center; gap: 34px; max-width: 780px; }
.tcg .tc-detail-card { width: clamp(220px, 34cqw, 320px); flex: none; animation: tc-pop .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.tcg .tc-detail-txt { width: min(360px, 90cqw); }
.tcg .tc-dhead { display: flex; align-items: center; gap: 14px; }
.tcg .tc-dhead img { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--ink_); box-shadow: 3px 3px 0 var(--ink_); flex: none; }
.tcg .tc-detail-txt h3 { font-size: 28px; margin: 6px 0 0; line-height: 1.05; }
.tcg .tc-rlabel { margin-left: 8px; font-weight: 700; opacity: .7; }
.tcg .tc-badge.big { font-size: 16px; padding: 3px 12px; }
.tcg .tc-datks { display: grid; gap: 8px; }
.tcg .tc-datks div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 3px solid var(--ink_); border-radius: 10px; background: #fff; box-shadow: 3px 3px 0 var(--ink_); }
.tcg .tc-datks .tc-cost u { width: 14px; height: 14px; border-width: 2px; background: var(--pink_); }
.tcg .tc-datks span { flex: 1; font-weight: 800; }
.tcg .tc-datks b { font: 22px var(--ftitle); }
.tcg .tc-own { font: 20px var(--ftitle); color: var(--pink_); margin: 14px 0 0; }

/* ============================================================
   OUVERTURE D'UN BOOSTER
   ============================================================ */
.tcg .tc-ov.is-open { padding: 0; overflow: hidden; place-items: stretch; background: radial-gradient(circle at 50% 42%, #3a1470, #160b2e 55%, #07050d); }
.tcg .tc-open {
  position: relative; width: 100%; height: 100%; overflow: hidden; --glow: #fff;
  container-type: size; container-name: tcopen;
  --cw: min(250px, 46cqw, calc(52cqh * .714));
}
.tcg .tc-rays {
  position: absolute; left: 50%; top: 42%; width: 190cqmax; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .14; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--glow) 0 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 55%); mask: radial-gradient(circle, #000 8%, transparent 55%);
  animation: tc-rot 18s linear infinite; transition: opacity .4s; will-change: transform;
}
.tcg .tc-open.rays-on .tc-rays { animation: tc-rot 18s linear infinite, tc-rayburst 1.4s ease-out; }
/* 1. le paquet */
.tcg .tc-packzone { --zw: min(230px, 44cqw, calc(54cqh * .676)); --pw: var(--zw); position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 3; transition: opacity .45s, transform .6s cubic-bezier(.5, 0, .7, .4); }
.tcg .tc-packzone .tc-pack { --pw: var(--zw); cursor: grab; animation: tc-drop .8s cubic-bezier(.3, 1.4, .5, 1) both, tc-idle 3s ease-in-out .8s infinite; }
.tcg .tc-swipe { position: absolute; top: 3%; left: 0; font-size: 30px; pointer-events: none; animation: tc-swipe 1.6s ease-in-out .9s infinite both; filter: drop-shadow(2px 2px 0 var(--ink_)); }
.tcg .tc-packzone::before { content: ''; position: absolute; left: 50%; top: 4%; width: 160%; height: 70%; transform: translate(-50%, -50%) scaleY(0); background: radial-gradient(ellipse at 50% 100%, var(--glow), transparent 65%); opacity: 0; pointer-events: none; transition: transform .5s, opacity .5s; }
.tcg .tc-packzone.is-tearing::before { opacity: calc(var(--tear, 0) * .75); transform: translate(-50%, -50%) scaleY(calc(.3 + var(--tear, 0) * .7)); transition: none; }
.tcg .tc-packzone.is-torn::before { opacity: .9; transform: translate(-50%, -50%) scaleY(1); }
.tcg .tc-packzone.is-torn .tc-swipe, .tcg .tc-packzone.is-tearing .tc-swipe { display: none; }
.tcg .tc-pack.is-torn { animation: none; }
.tcg .tc-pack.is-torn .tc-pack-top { transform: translate(24%, -170%) rotate(-26deg); opacity: 0; }
.tcg .tc-packzone.is-gone { opacity: 0; transform: translate(-50%, 10%) scale(.92); pointer-events: none; }
.tcg .tc-open.flash::after { content: ''; position: absolute; inset: 0; background: var(--glow); pointer-events: none; animation: tc-flash .6s ease-out forwards; z-index: 6; }
/* 2. la pile */
.tcg .tc-stack { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.tcg .tc-sc {
  position: absolute; left: 50%; top: 42%; width: var(--cw); aspect-ratio: 5 / 7;
  transform: translate(-50%, -50%) translate(calc(var(--i) * 3px), calc(var(--i) * -3px)) rotate(var(--rot));
  transition: transform .35s cubic-bezier(.3, 1.3, .5, 1);
}
.tcg .tc-sc.rise { animation: tc-rise .65s cubic-bezier(.2, 1.2, .4, 1) backwards; }
.tcg .tc-sc.is-top { transform: translate(-50%, -50%) rotate(0deg) scale(1.03); }
.tcg .tc-sc.is-flying { transition: transform .38s cubic-bezier(.55, 0, .35, 1); }
.tcg .tc-flip { position: absolute; inset: 0; }
.tcg .tc-side { position: absolute; inset: 0; }
.tcg .tc-side.front { display: none; }
.tcg .tc-sc.is-flipped .tc-side.front { display: block; }
.tcg .tc-sc.is-flipped .tc-side.back { display: none; }
.tcg .tc-sc.flip-out .tc-flip { animation: tc-flipout .15s ease-in forwards; }
.tcg .tc-sc.flip-in .tc-flip { animation: tc-flipin .34s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes tc-flipout { to { transform: scaleX(0) scaleY(1.04); } }
@keyframes tc-flipin { from { transform: scaleX(0) scaleY(1.04); } to { transform: none; } }
/* lueur qui annonce la rareté avant de retourner */
.tcg .tc-sc.hint { --hc: #ffc531; }
.tcg .tc-sc.hk3 { --hc: #a855f7; } .tcg .tc-sc.hk4 { --hc: #ff1f8f; } .tcg .tc-sc.hk5 { --hc: #ffd700; }
.tcg .tc-sc.hint .tc-side.back::before { content: ''; position: absolute; inset: 0; border-radius: 7%; box-shadow: 0 0 9cqw 3cqw var(--hc); pointer-events: none; will-change: opacity; animation: tc-hintop 1.1s ease-in-out infinite; }
.tcg .tc-sc.hk4.hint .tc-side.back::before, .tcg .tc-sc.hk5.hint .tc-side.back::before { animation-duration: .7s; }
.tcg .tc-sc.hk4.hint .tc-side.back, .tcg .tc-sc.hk5.hint .tc-side.back { animation: tc-wobble .5s ease-in-out infinite; }
@keyframes tc-hintop { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.tcg .tc-sc.hk5.hint::after { content: ''; position: absolute; inset: -40%; z-index: -1; background: repeating-conic-gradient(rgba(255, 215, 0, .5) 0 8deg, transparent 8deg 20deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 60%); mask: radial-gradient(circle, #000 20%, transparent 60%); animation: tc-spin2 4s linear infinite; }
.tcg .tc-sc.is-charging { animation: tc-charge .12s ease-in-out infinite alternate; }

.tcg .tc-sc.is-hero, .tcg .tc-slot2.is-hero { animation: tc-hero .8s cubic-bezier(.3, 1.6, .5, 1); }
/* halo derrière la carte retournée */
.tcg .tc-sc::before, .tcg .tc-slot2::before { content: ''; position: absolute; inset: -22%; z-index: -1; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity .6s .25s; }
.tcg .rk2::before { background: radial-gradient(closest-side, rgba(255, 197, 49, .6), transparent); opacity: 1; }
.tcg .rk3::before { background: radial-gradient(closest-side, rgba(168, 85, 247, .8), transparent); opacity: 1; }
.tcg .rk4::before { background: radial-gradient(closest-side, rgba(255, 31, 143, .85), rgba(255, 228, 77, .35) 60%, transparent); opacity: 1; animation: tc-pulse 1.6s ease-in-out infinite; }
.tcg .rk5::before { inset: -34%; background: radial-gradient(closest-side, rgba(255, 215, 0, .95), rgba(255, 31, 143, .35) 55%, transparent); opacity: 1; animation: tc-pulse 1.3s ease-in-out infinite; }
/* indicateur « touche » */
.tcg .tc-open::before { content: '👆'; position: absolute; left: 50%; top: calc(42% + var(--cw) * .7 + 14px); transform: translateX(-50%); z-index: 5; font-size: 28px; opacity: 0; pointer-events: none; transition: opacity .2s; filter: drop-shadow(2px 2px 0 var(--ink_)); }
.tcg .tc-open.wait-flip::before, .tcg .tc-open.wait-next::before { opacity: 1; animation: tc-tap 1s ease-in-out infinite; }
.tcg .tc-open.wait-next::before { content: '👉'; }
/* 3. le plateau */
.tcg .tc-tray {
  position: absolute; left: 50%; bottom: 82px; z-index: 4; transform: translateX(-50%);
  display: flex; justify-content: center; gap: 8px; transition: bottom .55s cubic-bezier(.3, 1.2, .5, 1), transform .55s cubic-bezier(.3, 1.2, .5, 1), gap .4s;
}
.tcg .tc-slot2 { position: relative; width: min(58px, 13cqw); aspect-ratio: 5 / 7; border: 2px dashed rgba(255, 255, 255, .35); border-radius: 8px; transition: width .5s cubic-bezier(.3, 1.2, .5, 1); }
.tcg .tc-slot2.filled { border: 0; }
.tcg .tc-slot2.filled .tc-card { animation: tc-land .35s cubic-bezier(.3, 1.6, .5, 1); }
.tcg .tc-slot2 .tc-dup, .tcg .tc-slot2 .tc-new { display: none; }
/* 4. récap */
.tcg .recap .tc-tray { bottom: 50%; transform: translate(-50%, 46%); flex-wrap: wrap; width: calc(100cqw - 24px); gap: 26px 12px; }
.tcg .recap .tc-slot2 { width: min(170px, calc((100cqw - 90px) / 5), calc(62cqh * .714)); }
.tcg .recap .tc-slot2 .tc-dup, .tcg .recap .tc-slot2 .tc-new { display: block; }
.tcg .recap .tc-slot2.filled { animation: tc-fanin .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.tcg .recap .tc-slot2:nth-child(2) { animation-delay: .05s; } .tcg .recap .tc-slot2:nth-child(3) { animation-delay: .1s; }
.tcg .recap .tc-slot2:nth-child(4) { animation-delay: .15s; } .tcg .recap .tc-slot2:nth-child(5) { animation-delay: .2s; }
/* étincelles */
.tcg .tc-bst { position: absolute; left: 50%; top: 50%; z-index: 6; width: 9px; height: 9px; pointer-events: none; background: #fff; box-shadow: 0 0 8px 2px var(--glow); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: tc-bst .85s cubic-bezier(.2, .8, .3, 1) both; }
.tcg .tc-actions { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; gap: 12px; }
.tcg .tc-actions button { min-width: 64px; height: 50px; padding: 0 16px; font: 18px var(--ftitle); border: 3px solid var(--ink_); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink_); background: var(--paper_); white-space: nowrap; }
.tcg .tc-ok, .tcg .tc-again { display: none; }
.tcg .tc-ok { background: var(--pink_) !important; color: #fff; }
.tcg .tc-again { background: var(--yellow_) !important; }
.tcg .tc-open.is-done .tc-ok, .tcg .tc-open.is-done .tc-again { display: block; animation: tc-pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.tcg .tc-open.is-done .tc-skip { display: none; }
.tcg .tc-open.shake { animation: tc-bigshake .6s cubic-bezier(.36, .07, .19, .97); }
.tcg .tc-conf { position: absolute; top: -16px; left: var(--x); width: 9px; height: 14px; z-index: 7; border: 2px solid var(--ink_); border-radius: 2px; animation: tc-fall var(--d) cubic-bezier(.3, .6, .6, 1) forwards; }
/* couronne plein écran (ZLR) */
.tcg .tc-zlr { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; contain: strict; animation: tc-zlrfade 2.2s ease forwards; }
.tcg .tc-zlr-flash { position: absolute; inset: 0; background: #fff6cc; opacity: 0; animation: tc-zlrflash .45s ease-out; }
.tcg .tc-zlr-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 215, 0, .55), rgba(255, 140, 0, .15) 40%, transparent 65%); }
.tcg .tc-zlr-ring { position: absolute; left: 50%; top: 45%; width: 40cqmin; height: 40cqmin; margin: -20cqmin 0 0 -20cqmin; border-radius: 50%; border: 6px solid #ffe066; opacity: 0; animation: tc-zlrring .8s ease-out .05s; }
@keyframes tc-zlrflash { 0% { opacity: .9; } 100% { opacity: 0; } }
@keyframes tc-zlrring { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
/* ---------- compliments ---------- */
.tcg .tc-chat { max-width: 640px; height: 100%; min-height: 360px; margin: 0 auto; display: flex; flex-direction: column; background: var(--paper_); border: 3px solid var(--ink_); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink_); overflow: hidden; }
.tcg .tc-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 3px solid var(--ink_); background: var(--yellow_); }
.tcg .tc-chat-head b { display: block; }
.tcg .tc-chat-head small { opacity: .7; }
.tcg .tc-av { width: 42px; height: 42px; flex: none; display: grid; place-items: center; overflow: hidden; font: 15px var(--ftitle); color: #fff; border: 3px solid var(--ink_); border-radius: 50%; background: linear-gradient(160deg, #ff1f8f, #7c3aed 60%, #3b1fb8); }
.tcg .tc-av img { width: 100%; height: 100%; object-fit: cover; }
.tcg .tc-gauge { margin-left: auto; display: grid; gap: 3px; justify-items: end; font-weight: 700; font-size: 13px; }
.tcg .tc-gauge i { width: 120px; height: 12px; border: 3px solid var(--ink_); border-radius: 99px; background: linear-gradient(90deg, var(--pink_) var(--p), #fff var(--p)); }
.tcg .tc-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tcg .tc-msg { align-self: flex-start; max-width: 78%; padding: 9px 13px; border: 3px solid var(--ink_); border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 3px 3px 0 var(--ink_); animation: tc-pop .25s ease both; }
.tcg .tc-msg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, #ff1f8f, #7c3aed); color: #fff; }
.tcg .tc-msg em { display: inline-block; margin-left: 8px; font-style: normal; font-weight: 800; background: var(--mint_); color: var(--ink_); padding: 0 7px; border-radius: 99px; border: 2px solid var(--ink_); }
.tcg .tc-send { display: flex; gap: 8px; padding: 12px; border-top: 3px solid var(--ink_); background: var(--cream_); }
.tcg .tc-send input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 3px solid var(--ink_); border-radius: 10px; background: #fff; outline: none; }
.tcg .tc-send input:focus { box-shadow: 0 0 0 3px var(--pink_); }
.tcg .tc-send button { width: 52px; font-size: 22px; border: 3px solid var(--ink_); border-radius: 10px; background: var(--pink_); box-shadow: 3px 3px 0 var(--ink_); }

.tcg .tc-toast { position: absolute; left: 50%; top: 16px; z-index: 60; transform: translateX(-50%); padding: 10px 18px; font-weight: 700; color: #fff; background: var(--ink_); border-radius: 99px; border: 3px solid var(--ink_); box-shadow: 4px 4px 0 var(--pink_); animation: tc-toast 2.2s ease both; white-space: nowrap; }
.tcg .tc-toast.is-bad { background: #e63946; }

/* ---------- petit écran (téléphone / fenêtre étroite) ---------- */
@container tcg (max-width: 640px) {
  .tcg .tc-head { padding: 10px; gap: 8px; }
  .tcg .tc-tabs { gap: 6px; }
  .tcg .tc-tabs button { padding: 8px 10px; font-size: 18px; }
  .tcg .tc-tabs button span { display: none; }
  .tcg .tc-body { padding: 14px 12px; }
  .tcg .tc-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
  .tcg .tc-filters button span { display: none; }
  .tcg .tc-progress { margin-left: 0; width: 100%; }
  .tcg .tc-progress i { flex: 1; }
  .tcg .tc-detail { flex-direction: column; gap: 22px; }
  .tcg .tc-detail-card { width: min(250px, 66cqw); }
  .tcg .tc-gauge i { width: 70px; }
  .tcg .tc-chat-head small { display: none; }
}
@container tcopen (max-width: 560px) {
  .tcg .recap .tc-slot2 { width: min(130px, calc((100cqw - 60px) / 3), calc(30cqh * .714)); }
  .tcg .recap .tc-tray { gap: 22px 10px; }
}

/* ---------- animations ---------- */
@keyframes tc-spin { to { --tc-a: 360deg; } }
@keyframes tc-spin2 { to { transform: rotate(360deg); } }
@keyframes tc-rot { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes tc-holo { 0% { background-position: 0% 50%; } 100% { background-position: 400% 50%; } }
@keyframes tc-sweep { 0%, 55% { transform: translateX(-70%); } 100% { transform: translateX(70%); } }
@keyframes tc-aura { 0% { box-shadow: 1.8cqw 1.8cqw 0 var(--ink_), 0 0 6cqw 1.5cqw #ffd700; } 33% { box-shadow: 1.8cqw 1.8cqw 0 var(--ink_), 0 0 7cqw 2cqw #ff1f8f; } 66% { box-shadow: 1.8cqw 1.8cqw 0 var(--ink_), 0 0 7cqw 2cqw #7c3aed; } 100% { box-shadow: 1.8cqw 1.8cqw 0 var(--ink_), 0 0 6cqw 1.5cqw #ffd700; } }
@keyframes tc-float { 0%, 100% { transform: translate(-50%, 0) rotate(-3deg); } 50% { transform: translate(-50%, -2.5cqw) rotate(3deg); } }
@keyframes tc-twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes tc-starfloat { 0% { transform: translateY(4cqw) scale(0); opacity: 0; } 40% { opacity: 1; transform: translateY(0) scale(1) rotate(45deg); } 100% { transform: translateY(-10cqw) scale(.3) rotate(120deg); opacity: 0; } }
@keyframes tc-pop { from { transform: translateX(var(--tx0, 0)) scale(.6); opacity: 0; } to { opacity: 1; } }
@keyframes tc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tc-idle { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }
@keyframes tc-drop { 0% { transform: translateY(-120cqh) rotate(-14deg); } 70% { transform: translateY(10px) rotate(3deg); } 100% { transform: none; } }
@keyframes tc-swipe { 0% { transform: translateX(-30%); opacity: 0; } 15% { opacity: 1; } 75% { transform: translateX(calc(var(--pw, 200px) * .9)); opacity: 1; } 100% { transform: translateX(calc(var(--pw, 200px) * .9)); opacity: 0; } }
@keyframes tc-rise { from { transform: translate(-50%, 10%) scale(.55); opacity: 0; } }
@keyframes tc-hint { 0%, 100% { box-shadow: 1.8cqw 1.8cqw 0 var(--ink_), 0 0 3cqw .5cqw var(--hc); } 50% { box-shadow: 1.8cqw 1.8cqw 0 var(--ink_), 0 0 9cqw 3cqw var(--hc); } }
@keyframes tc-wobble { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
@keyframes tc-tap { 0%, 100% { transform: translate(-50%, 0) scale(1); } 50% { transform: translate(-50%, -6px) scale(1.12); } }
@keyframes tc-land { from { transform: scale(1.3); } to { transform: none; } }
@keyframes tc-fanin { from { transform: translateY(30px) scale(.7) rotate(-6deg); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes tc-bst { 0% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; } 100% { transform: translate(calc(-50% + var(--bx)), calc(-50% + var(--by))) scale(0) rotate(180deg); opacity: 0; } }
@keyframes tc-glow { from { filter: drop-shadow(0 0 0 var(--glow)); } to { filter: drop-shadow(0 0 30px var(--glow)) drop-shadow(0 0 60px var(--glow)) brightness(1.2); } }
@keyframes tc-pulse { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.08); } }
@keyframes tc-flash { from { opacity: .55; } to { opacity: 0; } }
@keyframes tc-rayburst { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.6); } 100% { opacity: .14; transform: translate(-50%, -50%) scale(1); } }
@keyframes tc-charge { from { translate: -2px 0; } to { translate: 2px 0; } }
@keyframes tc-hero { 0% { scale: 1; } 40% { scale: 1.16; } 100% { scale: 1; } }
@keyframes tc-bigshake { 0%, 100% { transform: none; } 15% { transform: translate(-10px, 6px) rotate(-1deg); } 30% { transform: translate(9px, -7px) rotate(1deg); } 45% { transform: translate(-7px, 4px); } 60% { transform: translate(6px, -3px); } 80% { transform: translate(-3px, 2px); } }
@keyframes tc-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 110cqh) rotate(var(--r)); opacity: .9; } }
@keyframes tc-zlrfade { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tc-crownin { from { transform: scale(0) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tc-burst { 0% { transform: translate(0, 0) scale(0) rotate(0); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(1.4) rotate(180deg); opacity: 0; } }
@keyframes tc-toast { 0% { opacity: 0; transform: translate(-50%, -20px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }

@media (prefers-reduced-motion: reduce) {
  .tcg *, .tcg *::before, .tcg *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .05s !important; }
}

/* ============================================================
   10 BOOSTERS D'UN COUP
   ============================================================ */
.tcg .tc-ten-scroll { position: absolute; inset: 0; z-index: 2; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 18px 12px 90px; -webkit-overflow-scrolling: touch; }
.tcg .tc-ten-head { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; margin-bottom: 14px; text-align: center; }
.tcg .tc-ten-head b { font: 30px var(--ftitle); color: var(--yellow_); -webkit-text-stroke: 1px var(--ink_); }
.tcg .tc-ten-head span { font-weight: 700; opacity: .9; }
.tcg .tc-ten-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(110px, 28cqw), 1fr)); gap: 16px 10px; width: min(100%, 900px); }
.tcg .tc-ten-c { position: relative; animation: tc-fanin .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d); }
/* dans la grille x10 : pas d'animations permanentes sur les cartes (fluidité) */
.tcg .tc-ten-grid .tc-card *, .tcg .tc-ten-grid .tc-card *::before, .tcg .tc-ten-grid .tc-card *::after { animation-iteration-count: 1 !important; }
.tcg .tc-ten-grid .tc-spk { display: none; }

/* x10 : 10 paquets en éventail, déchirés d'un seul geste */
.tcg .tc-packzone.is-multi { --zw: min(170px, 34cqw, calc(44cqh * .676)); width: var(--zw); aspect-ratio: 5 / 7.4; top: 46%; }
.tcg .tc-packzone.is-multi::before { top: 0; width: 260%; }
/* les 10 paquets empilés les uns derrière les autres (le dernier = devant) */
.tcg .tc-fan { position: absolute; inset: 0; transform: translate(calc((9 - var(--i)) * 5px), calc((9 - var(--i)) * -6px)); transition: transform .5s cubic-bezier(.3, 1.3, .5, 1), opacity .4s; }
.tcg .tc-fan .tc-pack { animation-delay: calc(var(--i) * 45ms), calc(.8s + var(--i) * 45ms); }
.tcg .tc-fan:not(:nth-last-child(2)) .tc-pack-shine { display: none; }
.tcg .tc-packzone.is-multi.is-torn .tc-fan { transform: translate(calc((9 - var(--i)) * 5px), calc((9 - var(--i)) * -6px - 10%)); transition-delay: calc((9 - var(--i)) * 35ms); }
.tcg .tc-packzone.is-multi { margin-left: -22px; margin-top: 26px; }
/* x10 : carte qui part, compteur, badge NEW */
.tcg .tc-sc.is-out { pointer-events: none; transition: transform .34s cubic-bezier(.5, 0, .7, .4), opacity .34s; transform: translate(-50%, 30%) scale(.55) rotate(10deg) !important; opacity: 0; }
.tcg .tc-ten-count { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 8; padding: 4px 14px; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff; font: 16px var(--ftitle); white-space: nowrap; }
.tcg .tc-ten-count:empty { display: none; }
.tcg .tc-ten-new { position: absolute; left: 50%; top: -4%; z-index: 5; transform: translateX(-50%); padding: 2px 10px; border: 2px solid var(--ink_); border-radius: 99px; background: var(--pink_); color: #fff; font: 14px var(--ftitle); animation: tc-pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.tcg .tc-packzone.is-multi .tc-swipe { z-index: 12; }
.tcg .tc-ten-open .tc-ten-scroll { display: none; }
.tcg .tc-ten-open.revealed .tc-ten-scroll { display: flex; }

/* x10 : les 10 boosters (en cours / finis) + bannière de passage au suivant */
.tcg .tc-ten-packs { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 8; display: flex; gap: 6px; }
.tcg .tc-ten-packs i { width: 16px; height: 23px; border: 2px solid var(--ink_); border-radius: 4px; background: linear-gradient(165deg, #ff1f8f, #7c3aed); box-shadow: 2px 2px 0 var(--ink_); transition: transform .3s, opacity .3s, filter .3s; }
.tcg .tc-ten-packs i.on { transform: translateY(-4px) scale(1.2); box-shadow: 0 0 10px 2px var(--yellow_), 2px 2px 0 var(--ink_); }
.tcg .tc-ten-packs i.done { opacity: .35; filter: grayscale(1); transform: scale(.85); }
.tcg .tc-ten-banner { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; background: radial-gradient(circle, rgba(20, 16, 31, .75), rgba(20, 16, 31, .35) 60%, transparent); animation: tc-banner 1.3s ease both; }
.tcg .tc-ten-banner b { font: clamp(26px, 8cqw, 44px)/1 var(--ftitle); color: var(--yellow_); -webkit-text-stroke: 2px var(--ink_); paint-order: stroke fill; animation: tc-pop .45s cubic-bezier(.3, 1.6, .5, 1) both .1s; }
.tcg .tc-ten-mini { animation: tc-minipack 1.05s cubic-bezier(.3, 1.3, .5, 1) both; }
.tcg .tc-ten-mini .tc-pack { --pw: clamp(90px, 22cqw, 130px); }
.tcg .tc-ten-mini .tc-pack-top { animation: tc-minitear .5s .55s ease-in both; }
@keyframes tc-banner { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tc-minipack { 0% { transform: translateY(-70cqh) rotate(-14deg); } 45% { transform: translateY(6px) rotate(3deg); } 60%, 100% { transform: none; } }
@keyframes tc-minitear { to { transform: translate(30%, -180%) rotate(-28deg); opacity: 0; } }

/* x10 façon TCG Pocket : plateau de 5 cartes par booster, qui part quand on passe au suivant */
.tcg .tc-ten-open .tc-ten-tray { transition: transform .4s cubic-bezier(.5, 0, .75, 0), opacity .4s; }
.tcg .tc-ten-open .tc-ten-tray.is-out { transform: translateX(calc(-50% - 100cqw)); opacity: 0; }
.tcg .tc-ten-open.revealed .tc-ten-tray { display: none; }

.tcg .tc-stack.is-pre { visibility: hidden; }

/* performances : rien ne s'anime quand on ne le voit pas */
.tcg.is-layer > :not(.tc-layer) { visibility: hidden; }
.tcg.is-layer > :not(.tc-layer) * { animation-play-state: paused !important; }
.tcg .tc-sc:not(.is-flipped) .tc-side.front, .tcg .tc-sc:not(.is-flipped) .tc-side.front * { animation: none !important; }
.tcg .tc-stack.is-pre * { animation: none !important; }

/* bouton « Passer » : un vrai bouton texte (pas d'emoji), identique sur PC et téléphone */
.tcg .tc-actions .tc-skip { display: inline-flex; align-items: center; gap: 8px; background: var(--paper_); color: var(--ink_); font: 16px var(--ftitle); letter-spacing: .03em; }
.tcg .tc-skip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tcg .tc-skip:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink_); }
