/* DataCard — le booster, l'ouverture carte par carte, la pile et le récapitulatif */

/* ───── Le booster : emballage foil holographique ───── */
.pack3d { position: relative; perspective: 900px; z-index: 2; }
.pack {
  --pw: 240px; --tear: 0; --td: calc(var(--pw) * .028);
  --c1: #2a6bff; --c2: #7a3bff; --c3: #ff3fd0; --glow: 122, 90, 255; --ink: #fff; --ink2: #2b0f7a; --edge: #cdbbff;
  width: var(--pw); height: calc(var(--pw) * 1.55); position: relative; cursor: pointer; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out; filter: drop-shadow(0 26px 44px rgba(var(--glow), .6));
}
.pack.t-free { --c1: #12d6c0; --c2: #2a6bff; --c3: #7a3bff; --glow: 42, 150, 255; --ink2: #0a2f7a; --edge: #aef3ff; }
.pack.gold { --c1: #ffd54a; --c2: #ff9f1c; --c3: #ff4d2e; --glow: 255, 170, 40; --ink: #fff7d6; --ink2: #5a2600; --edge: #fff3b0; }
.pack::before { content: ""; position: absolute; inset: -16% -22%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(var(--glow), .55), transparent 72%); animation: packAura 2.6s ease-in-out infinite; }
@keyframes packAura { 50% { opacity: .55; transform: scale(1.08); } }
.pack3d.hover .pack { transition: none; }
.pack-float { animation: packFloat 4.2s ease-in-out infinite; }
@keyframes packFloat { 50% { transform: translateY(-12px); } }
.pack.locked { filter: grayscale(.85) brightness(.55); cursor: default; }
.pack.locked::before { display: none; }
.pack.locked .pack-face, .pack.locked .pk-star, .pack.locked .pk-rays { opacity: .12; }
.pack.locked .pk-shine, .pack.locked .pk-foil { display: none; }

.pk {
  position: absolute; left: 0; right: 0; overflow: hidden; background-size: 100% calc(var(--pw) * 1.55);
  background-image: linear-gradient(165deg, var(--c1) 0%, var(--c2) 52%, var(--c3) 100%);
}
.pk-top {
  top: 0; height: 12.5%; z-index: 2; transform-origin: 0 100%; transform: translateY(calc(var(--tear) * -5px)) rotate(calc(var(--tear) * -6deg)); transition: transform .12s;
  clip-path: polygon(0% var(--td), 4.167% 0, 8.333% var(--td), 12.5% 0, 16.667% var(--td), 20.833% 0, 25% var(--td), 29.167% 0, 33.333% var(--td), 37.5% 0, 41.667% var(--td), 45.833% 0, 50% var(--td), 54.167% 0, 58.333% var(--td), 62.5% 0, 66.667% var(--td), 70.833% 0, 75% var(--td), 79.167% 0, 83.333% var(--td), 87.5% 0, 91.667% var(--td), 95.833% 0, 100% var(--td), 100% 100%, 0 100%);
  display: grid; place-items: end center; padding-bottom: calc(var(--pw) * .028);
}
.pk-body { top: 12%; bottom: 0; background-position: 0 calc(var(--pw) * -0.186); clip-path: polygon(0 0, 100% 0, 100% 100%, 95.833% calc(100% - var(--td)), 91.667% 100%, 87.5% calc(100% - var(--td)), 83.333% 100%, 79.167% calc(100% - var(--td)), 75% 100%, 70.833% calc(100% - var(--td)), 66.667% 100%, 62.5% calc(100% - var(--td)), 58.333% 100%, 54.167% calc(100% - var(--td)), 50% 100%, 45.833% calc(100% - var(--td)), 41.667% 100%, 37.5% calc(100% - var(--td)), 33.333% 100%, 29.167% calc(100% - var(--td)), 25% 100%, 20.833% calc(100% - var(--td)), 16.667% 100%, 12.5% calc(100% - var(--td)), 8.333% 100%, 4.167% calc(100% - var(--td)), 0% 100%); }
/* sertissage métallique */
.pk-top::before, .pk-body::after { content: ""; position: absolute; left: 0; right: 0; height: calc(var(--pw) * .075); z-index: 4; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 1.5px, rgba(0, 0, 0, .28) 1.5px 3.5px), linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%, rgba(0, 0, 0, .25)); background-blend-mode: overlay, normal; }
.pk-top::before { top: 0; }
.pk-body::after { bottom: 0; }
.pk-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 4; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent); box-shadow: 0 0 8px 1px rgba(255, 255, 255, .7); }
.pk-topin { position: relative; z-index: 3; font-size: calc(var(--pw) * .052); font-weight: 900; letter-spacing: .42em; padding-left: .42em; text-transform: uppercase; color: var(--ink); text-shadow: 0 1px 0 var(--ink2), 0 0 10px rgba(255, 255, 255, .6); }
.pk-body { box-shadow: inset 7px 0 9px -5px rgba(255, 255, 255, .5), inset -7px 0 9px -5px rgba(0, 0, 0, .4); }
.crack { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #fff; box-shadow: 0 0 18px 6px #fff, 0 0 40px 12px rgba(var(--glow), .95); opacity: var(--tear); z-index: 6; }

/* feuille holographique + rayons + motif */
.pk-foil { position: absolute; inset: 0; mix-blend-mode: overlay; opacity: .62; pointer-events: none;
  background: linear-gradient(115deg, #ff3fd0, #ffd84a, #3ddc97, #4fd1ff, #7a6bff, #ff3fd0, #ffd84a, #3ddc97); background-size: 320% 320%; animation: foilMove 6s linear infinite; }
@keyframes foilMove { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.pk-rays { position: absolute; left: 50%; top: 36%; width: calc(var(--pw) * 2.6); height: calc(var(--pw) * 2.6); margin: calc(var(--pw) * -1.3) 0 0 calc(var(--pw) * -1.3); pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .3) 0 4deg, transparent 4deg 12deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 40%); mask-image: radial-gradient(circle, #000 0, transparent 40%); animation: spin 26s linear infinite; }
.pack-deco { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .1) 0 1px, transparent 1px calc(var(--pw) * .09)),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .1) 0 1px, transparent 1px calc(var(--pw) * .09)),
    radial-gradient(circle at 50% 36%, transparent 0 28%, rgba(0, 0, 0, .28) 100%); }
.pk-shine { position: absolute; inset: 0; z-index: 5; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, .95) 46%, rgba(160, 255, 245, .7) 52%, transparent 66%); background-size: 280% 100%; animation: sweep 3.2s linear infinite; }
@keyframes sweep { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.pk-star { position: absolute; left: var(--x); top: var(--y); width: calc(var(--pw) * .09 * var(--s)); height: calc(var(--pw) * .09 * var(--s)); margin: -.5em; z-index: 2; pointer-events: none;
  background: #fff; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: 0; animation: twinkle 2.6s ease-in-out infinite; animation-delay: var(--dl); }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }

/* contenu */
.pack-face { position: absolute; inset: 0 0 calc(var(--pw) * .06); z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 10px; pointer-events: none; color: var(--ink); }
.pack-emblem { position: relative; width: calc(var(--pw) * .56); height: calc(var(--pw) * .56); display: grid; place-items: center; }
.pack-emblem > i, .pack-emblem .em-core { position: absolute; border-radius: 50%; }
.em-halo { inset: -22%; background: radial-gradient(closest-side, rgba(255, 255, 255, .85), rgba(var(--glow), .45) 55%, transparent 100%); animation: packAura 2.2s ease-in-out infinite; }
.em-ring { inset: 0; background: conic-gradient(from 0deg, #ff3fd0, #ffd84a, #3ddc97, #4fd1ff, #7a6bff, #ff3fd0); animation: spin 5s linear infinite;
  -webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - var(--pw) * .028), #000 calc(100% - var(--pw) * .026)); mask-image: radial-gradient(farthest-side, transparent calc(100% - var(--pw) * .028), #000 calc(100% - var(--pw) * .026)); }
.em-orbit { inset: -9%; animation: spin 7s linear infinite reverse; }
.em-orbit::before, .em-orbit::after { content: ""; position: absolute; left: 50%; top: 0; width: calc(var(--pw) * .04); height: calc(var(--pw) * .04); margin: calc(var(--pw) * -.02) 0 0 calc(var(--pw) * -.02); border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px rgba(255, 255, 255, .85); }
.em-orbit::after { top: auto; bottom: 0; margin: 0 0 calc(var(--pw) * -.02) calc(var(--pw) * -.02); }
.em-core { inset: 7%; display: grid; place-items: center; background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .85), rgba(var(--glow), .75) 52%, rgba(var(--glow), .95)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7), inset 0 -10px 18px rgba(0, 0, 0, .22), 0 6px 18px rgba(0, 0, 0, .35); }
.pack.gold .em-core { background: radial-gradient(circle at 34% 26%, #fffbe0, #ffd24a 52%, #f08a10); }
.pack-mark { width: 66%; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5)); animation: markPulse 2.4s ease-in-out infinite; }
@keyframes markPulse { 50% { transform: scale(1.08); } }
.pack-name { margin-top: calc(var(--pw) * .035); font-size: calc(var(--pw) * .15); font-weight: 900; letter-spacing: .02em; line-height: 1; color: #fff;
  text-shadow: 0 1px 0 var(--ink2), 0 2px 0 var(--ink2), 0 3px 0 var(--ink2), 0 4px 0 rgba(0, 0, 0, .35), 0 8px 16px rgba(0, 0, 0, .45), 0 0 22px rgba(255, 255, 255, .55); }
.pack.gold .pack-name { color: #fffbe8; }
.pack-sub { position: relative; overflow: hidden; margin-top: calc(var(--pw) * .045); white-space: nowrap; font-size: calc(var(--pw) * .052); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; padding: calc(var(--pw) * .028) calc(var(--pw) * .07); border-radius: 99px;
  color: var(--ink2); background: linear-gradient(180deg, #fff, var(--edge)); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8), 0 4px 14px rgba(0, 0, 0, .35), 0 0 20px rgba(255, 255, 255, .45); }
.pack-sub::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .95) 50%, transparent 65%); background-size: 260% 100%; animation: sweep 2.4s linear infinite; mix-blend-mode: overlay; }
.pack.gold .pack-sub { color: #ffe08a; background: linear-gradient(180deg, #5a2e00, #2a1400); box-shadow: 0 0 0 1.5px #ffd36a, 0 4px 14px rgba(0, 0, 0, .35), 0 0 20px rgba(255, 210, 90, .7); }
.pack-gems { display: flex; gap: calc(var(--pw) * .032); margin-top: calc(var(--pw) * .05); }
.pack-gems i { width: calc(var(--pw) * .042); height: calc(var(--pw) * .042); transform: rotate(45deg); border-radius: 18%; background: linear-gradient(135deg, #fff, var(--g) 55%); box-shadow: 0 0 9px 1px var(--g), 0 0 0 1px rgba(255, 255, 255, .55); animation: gemGlow 2s ease-in-out infinite; }
.pack-gems i:nth-child(2) { animation-delay: .2s; } .pack-gems i:nth-child(3) { animation-delay: .4s; } .pack-gems i:nth-child(4) { animation-delay: .6s; } .pack-gems i:nth-child(5) { animation-delay: .8s; }
@keyframes gemGlow { 50% { box-shadow: 0 0 16px 4px var(--g), 0 0 0 1px #fff; } }
.pack.gold .pack-gems i:first-child { opacity: .22; animation: none; box-shadow: none; }
.pack-cards { position: absolute; bottom: calc(var(--pw) * .02); font-size: calc(var(--pw) * .052); font-weight: 800; letter-spacing: .2em; padding-left: .2em; white-space: nowrap; text-transform: uppercase; color: var(--ink); text-shadow: 0 1px 0 var(--ink2), 0 0 10px rgba(0, 0, 0, .35); }
.pack-cards::before, .pack-cards::after { content: "◆"; font-size: .7em; margin: 0 .7em; opacity: .85; }
.pack-lock { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; pointer-events: none; }
.pack-lock .ic { width: 2.2rem; height: 2.2rem; color: #cfd6ff; }
.pack-lock small { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: #b6c0f5; font-weight: 700; }
.pack-lock b { font-size: 1.7rem; font-variant-numeric: tabular-nums; font-weight: 800; }

/* ───── Écran d'ouverture ───── */
.overlay { position: fixed; inset: 0; z-index: 70; overflow: hidden; --rc: #6f8dff; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.ov-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rc) 30%, #0c1130) 0%, #04060f 70%); transition: background .7s; animation: fadeIn .4s; }
.ov-rays {
  position: absolute; left: 50%; top: 42%; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 60%, transparent) 0 4deg, transparent 4deg 14deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 38%); mask-image: radial-gradient(circle, #000 0, transparent 38%); animation: spin 16s linear infinite;
}
.ov-rays.on { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.ov-stage { --cw: min(300px, 66vw, 36vh); position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: max(14px, env(safe-area-inset-top)) 14px 0; }
.ov-stage.shake { animation: bigShake .7s; }
@keyframes bigShake { 10% { transform: translate(-12px, 6px); } 25% { transform: translate(10px, -8px); } 40% { transform: translate(-8px, -5px); } 55% { transform: translate(7px, 6px); } 75% { transform: translate(-3px, 2px); } }

/* Phase 1 : le booster */
.ov-center { flex: 1; display: grid; place-items: center; width: 100%; align-content: center; gap: 26px; }
.ov-pack-wrap { position: relative; display: grid; place-items: center; touch-action: none; cursor: grab; }
.ov-pack-wrap.grab { cursor: grabbing; }
.ov-pack-wrap .pack { --pw: min(250px, 56vw); animation: packWiggle 1.8s ease-in-out infinite; }
.ov-pack-wrap.grab .pack, .tearing .pack { animation: none; }
@keyframes packWiggle { 0%, 100% { transform: rotate(-2deg) scale(1); } 50% { transform: rotate(2deg) scale(1.04); } }
.swipe-hint { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #b5c0f5; font-weight: 700; letter-spacing: .03em; }
.swipe-hint i { display: block; flex: none; width: 60px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, #fff, transparent); background-size: 200% 100%; animation: swipeLine 1.6s linear infinite; }
@keyframes swipeLine { from { background-position: 200% 0; } to { background-position: -100% 0; } }
.tearing .pack { animation: shakePack .5s linear; }
.tearing .pk-top { animation: tearTop .9s .35s cubic-bezier(.5, 0, .9, .6) forwards; }
.tearing .pk-body { animation: bodyBurst .7s .65s ease-in forwards; }
.tearing .crack { opacity: 1; }
@keyframes shakePack { 10%, 50%, 90% { transform: translateX(-8px) rotate(-2deg); } 30%, 70% { transform: translateX(8px) rotate(2deg); } }
@keyframes tearTop { to { transform: translate(70%, -190%) rotate(40deg); opacity: 0; } }
@keyframes bodyBurst { to { transform: scale(1.4); opacity: 0; filter: brightness(3); } }

/* Phase 2 : le paquet de cartes */
.ov-top { width: 100%; max-width: 560px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.ov-dots { display: flex; gap: 8px; flex: 1; }
.ov-dots i { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .15); position: relative; overflow: hidden; transition: background .3s, box-shadow .3s; }
.ov-dots i.cur { background: rgba(255, 255, 255, .5); }
.ov-dots i.done { background: var(--dc, #fff); box-shadow: 0 0 12px var(--dc, #fff); }
.ov-skip { background: rgba(255, 255, 255, .08); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: 6px; color: #c5cdf5; }
.ov-skip:hover { background: rgba(255, 255, 255, .16); }
.deck-area { position: relative; flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.deck { position: relative; width: var(--cw); height: calc(var(--cw) * 1.42); }
.deck .card { --w: var(--cw); position: absolute; inset: 0; --d: 0; z-index: calc(20 - var(--d));
  transform: translate(calc(var(--d) * 8px), calc(var(--d) * -6px)) rotate(calc(var(--d) * 2.6deg));
  transition: transform .55s cubic-bezier(.2, 1.15, .3, 1), scale .3s; pointer-events: none; }
.deck .card.top { pointer-events: auto; cursor: pointer; }
.deck .card.top:not(.up):hover { scale: 1.03; }
.deck .card.charging { cursor: default; animation: chargeShake .08s linear infinite; }
@keyframes chargeShake {
  0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(calc(var(--ci) * -2px), calc(var(--ci) * 1.2px)) rotate(calc(var(--ci) * -.5deg)); }
  50% { transform: translate(calc(var(--ci) * 1.6px), calc(var(--ci) * -1.5px)) rotate(calc(var(--ci) * .4deg)); } 75% { transform: translate(calc(var(--ci) * -1px), calc(var(--ci) * -1px)) rotate(calc(var(--ci) * -.3deg)); } 100% { transform: translate(0, 0) rotate(0); }
}
.charge-aura { position: absolute; width: calc(var(--cw) * 1.9); height: calc(var(--cw) * 1.9); border-radius: 50%; pointer-events: none; opacity: 0; transform: scale(.3);
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 85%, #fff) 0%, color-mix(in srgb, var(--rc) 40%, transparent) 40%, transparent 68%); }
.charge-aura.on { opacity: .95; transform: scale(1.15); transition: transform var(--cd, 1s) cubic-bezier(.4, 0, 1, 1), opacity .4s; }
.charge-aura.out { opacity: 0; transition: opacity .6s; }
.gather { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 10px var(--rc); pointer-events: none; animation: gather var(--g, .9s) ease-in forwards; }
@keyframes gather { from { transform: translate(var(--sx), var(--sy)) scale(1.4); opacity: 0; } 20% { opacity: 1; } to { transform: translate(0, 0) scale(.2); opacity: 1; } }
.shock { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 5px solid var(--rc); box-shadow: 0 0 30px var(--rc), inset 0 0 30px var(--rc); pointer-events: none; animation: shock .8s ease-out forwards; }
.shock.s2 { animation-delay: .12s; border-width: 3px; }
@keyframes shock { from { transform: scale(.4); opacity: 1; } to { transform: scale(var(--ss, 14)); opacity: 0; } }

/* Infos sous la carte révélée */
.rinfo { min-height: 128px; width: 100%; max-width: 560px; display: grid; justify-items: center; align-content: start; gap: 9px; text-align: center; padding: 8px 0 4px; }
.r-rar { font-size: .8rem; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: var(--rc); text-shadow: 0 0 22px var(--rc); animation: rise .5s both; }
.r-name { font-size: clamp(1.4rem, 4.4vw, 2rem); font-weight: 800; letter-spacing: -.01em; animation: rise .5s .05s both; }
.r-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.stamp { font-weight: 800; letter-spacing: .08em; font-size: .9rem; padding: 6px 15px; border-radius: 10px; display: inline-flex; align-items: center; gap: 7px; transform: rotate(-3deg); animation: slam .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.stamp.new { color: #1b0b1f; background: linear-gradient(90deg, #ff5fd2, #ffb12b); box-shadow: 0 6px 24px rgba(255, 95, 210, .6); }
.stamp.lvl { color: #04122a; background: linear-gradient(90deg, #3ddc97, #4fd1ff); box-shadow: 0 6px 24px rgba(61, 220, 151, .55); }
.stamp.shards { color: #3a2400; background: linear-gradient(90deg, #ffe48a, #ffb12b); box-shadow: 0 6px 24px rgba(255, 177, 43, .5); }
.stamp.plain { color: #dbe2ff; background: rgba(255, 255, 255, .12); box-shadow: none; }
@keyframes slam { 0% { transform: scale(3.2) rotate(-14deg); opacity: 0; } 55% { transform: scale(.88) rotate(-3deg); opacity: 1; } 100% { transform: scale(1) rotate(-3deg); } }
.meter { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; color: #b9c4f5; min-width: 230px; }
.meter .bar { flex: 1; height: 10px; }
.meter .bar i { transition: width .9s .25s cubic-bezier(.2, .8, .2, 1); }
.ov-hint { color: #aab4e6; font-weight: 600; letter-spacing: .02em; animation: hintBlink 1.8s ease-in-out infinite; text-align: center; font-size: .95rem; padding: 4px 0; }
@keyframes hintBlink { 50% { opacity: .4; } }

/* La pile des cartes déjà révélées */
.pile { display: flex; gap: 8px; justify-content: center; padding: 10px 0 max(16px, env(safe-area-inset-bottom)); }
.pile-slot { width: 50px; height: 70px; border-radius: 9px; border: 1.5px dashed rgba(255, 255, 255, .2); display: grid; place-items: center; position: relative; }
.pile-slot .card { --w: 50px; position: absolute; inset: 0; animation: pop .45s cubic-bezier(.2, 1.6, .3, 1); pointer-events: none; }
.pile-slot .card.sm .c-name, .pile-slot .card .c-head, .pile-slot .card .c-type, .pile-slot .card .c-foot, .pile-slot .card .c-chip { display: none; }

/* Récapitulatif */
.recap-wrap { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 20px; overflow: auto; padding: 18px 0 24px; }
.recap-wrap h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.01em; animation: rise .5s both; }
.recap-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 16px; max-width: 1180px; }
.recap-row .card { --w: min(196px, 17.2vw); animation: recapIn .6s cubic-bezier(.2, 1.3, .3, 1) both; animation-delay: calc(var(--i) * .1s); }
@keyframes recapIn { from { opacity: 0; transform: translateY(40px) scale(.7) rotate(-6deg); } }
.recap-sum { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 700px; }
.recap-sum .stamp { transform: none; animation: rise .5s both; }
.recap-sum .mut { width: 100%; text-align: center; font-size: .88rem; }

@media (max-width: 760px) {
  .pack { --pw: 200px; }
  .swipe-hint i { display: none; }
  .recap-row { gap: 16px 10px; } .recap-row .card { --w: 29vw; }
  .pile-slot { width: 42px; height: 59px; } .pile-slot .card { --w: 42px; }
}
@media (max-height: 640px) {
  .ov-stage { --cw: min(300px, 66vw, 31vh); }
  .rinfo { min-height: 100px; }
}

/* ───── Récapitulatif « Butin » ───── */
.recap-wrap { gap: 22px; }
.rc-head { display: grid; justify-items: center; gap: 8px; text-align: center; }
.rc-head small { letter-spacing: .28em; text-transform: uppercase; font-weight: 800; font-size: .78rem; color: #aab4e6; }
.rc-head h2 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; letter-spacing: -.02em; line-height: 1; background: linear-gradient(180deg, #fff 20%, var(--rc)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--rc) 70%, transparent)); }
.rc-rare { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: center; padding: 8px 18px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); animation: rise .5s .4s both; }
.rc-rare span { color: #aab4e6; font-size: .86rem; }
.rc-rare b { font-size: 1.05rem; }
.rc-rare em { font-style: normal; font-weight: 800; color: #fff; padding: 2px 10px; border-radius: 99px; background: linear-gradient(90deg, #ff5fd2, #6c8cff); font-size: .86rem; }
.recap-row { --cw2: min(196px, calc((100vw - 130px - (var(--n, 5) - 1) * 14px) / var(--n, 5))); gap: 26px 14px; align-items: flex-start; padding: 16px 12px 0; }
.recap-wrap { padding-inline: 16px; overflow-x: hidden; }
.recap-row .card { animation: none; }
.rc-item { position: relative; width: var(--cw2); display: grid; gap: 10px; justify-items: center; animation: recapIn .6s cubic-bezier(.2, 1.3, .3, 1) both; animation-delay: calc(var(--i) * .12s); }
.rc-item .card { --w: var(--cw2); }
.rc-item.best .card .front { box-shadow: 0 0 2.4em var(--rc), 0 0 0 .22em var(--rc); }
.rc-item.best { animation-name: recapIn, bestPulse; animation-duration: .6s, 2s; animation-iteration-count: 1, infinite; animation-delay: calc(var(--i) * .12s), 1.2s; }
@keyframes bestPulse { 50% { transform: translateY(-6px); } }
.rc-crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-3deg); z-index: 5; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-style: normal; font-weight: 900; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 99px; color: #2a1700; background: linear-gradient(90deg, #ffe48a, #ffb12b); box-shadow: 0 4px 16px rgba(255, 177, 43, .7); animation: slam .6s .9s cubic-bezier(.2, 1.5, .4, 1) both; }
.rc-crown .ic { width: 1.1em; height: 1.1em; }
.rc-cap { display: grid; gap: 4px; justify-items: center; text-align: center; width: 100%; }
.rc-cap b { font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rc); text-shadow: 0 0 14px color-mix(in srgb, var(--rc) 70%, transparent); }
.rc-cap span { font-weight: 800; font-size: .92rem; color: #fff; }
.rc-tag { font-style: normal; display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: .74rem; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #dbe2ff; }
.rc-tag .ic { width: 1em; height: 1em; }
.rc-tag.new { color: #1b0b1f; background: linear-gradient(90deg, #ff5fd2, #ffb12b); }
.rc-tag.lvl { color: #04122a; background: linear-gradient(90deg, #3ddc97, #4fd1ff); }
.rc-tag.sh { color: #3a2400; background: linear-gradient(90deg, #ffe48a, #ffb12b); }
.r-odds { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); font-size: .92rem; animation: rise .5s .1s both; }
.r-odds .ic { width: 1em; height: 1em; color: var(--rc); }
.card .c-no { font-size: .66em; font-weight: 800; letter-spacing: .04em; color: var(--rc); opacity: .95; }
@media (max-width: 760px) { .recap-row { --cw2: calc((100vw - 64px) / 3); gap: 22px 10px; } .rc-cap span { font-size: .72rem; } .rc-cap b { font-size: .66rem; letter-spacing: .1em; } .rc-tag { font-size: .62rem; padding: 2px 7px; } }

/* Le bouton « Continuer » du butin est en haut : plus besoin de défiler pour le trouver */
.rc-head #btn-done { margin-top: 6px; animation: rise .5s .5s both; }
.recap-wrap { gap: 16px; }
