/* Caisses : roulette façon « case opening » */
:root { --it: 150px; --gap: 10px;
  --r-perdu: #6B7280; --r-commun: #5B8DB8; --r-peu: #3E7BFA; --r-rare: #8B5CF6; --r-epique: #D946EF; --r-legend: #F5B83D; --r-myth: #FF3B5C; }
.opener { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center; }
.crate { width: 200px; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)) drop-shadow(0 0 30px rgba(139, 108, 240, .45)); animation: float 3.2s ease-in-out infinite; }
.crate svg { width: 100%; display: block; overflow: visible; }
.crate .lid { transform-origin: 100px 52px; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.crate.shake { animation: shake .5s linear infinite; }
.crate.open .lid { transform: translateY(-34px) rotate(-14deg); }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg) translateY(-2px); } 75% { transform: rotate(3deg) translateY(-2px); } }
.lead { font-size: 18px; margin: 0 0 14px; }
.lead b { color: var(--gold); }
.btn.big { font-size: 18px; padding: 14px 26px; border-radius: 12px; }
.row.center { justify-content: center; }

.roulette { position: relative; margin-top: 22px; height: calc(var(--it) + 40px); overflow: hidden; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(10, 8, 22, .95), rgba(18, 14, 36, .6) 20%, rgba(18, 14, 36, .6) 80%, rgba(10, 8, 22, .95)); box-shadow: inset 0 0 40px rgba(0, 0, 0, .6); }
.strip { position: absolute; top: 20px; left: 0; display: flex; gap: var(--gap); will-change: transform; }
.marker { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%); background: var(--gold); box-shadow: 0 0 14px var(--gold), 0 0 4px #fff; z-index: 2; }
.marker::before, .marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 9px solid transparent; }
.marker::before { top: 0; border-top-color: var(--gold); }
.marker::after { bottom: 0; border-bottom-color: var(--gold); }

.item { --c: var(--r-commun); position: relative; flex: none; width: var(--it); height: var(--it); border-radius: 12px; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 45%, transparent), rgba(14, 11, 28, .95) 72%); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: inset 0 -4px 0 var(--c); overflow: hidden; }
.item .ic { font-size: 56px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.item .am { position: absolute; bottom: 12px; left: 0; right: 0; font-weight: 800; font-size: 15px; color: #fff; text-shadow: 0 1px 3px #000; }
.item.win { animation: winGlow 1s ease-in-out infinite alternate; }
@keyframes winGlow { to { box-shadow: inset 0 -4px 0 var(--c), 0 0 26px var(--c); transform: scale(1.04); } }
.r-perdu { --c: var(--r-perdu); } .r-commun { --c: var(--r-commun); } .r-peu { --c: var(--r-peu); } .r-rare { --c: var(--r-rare); }
.r-epique { --c: var(--r-epique); } .r-legend { --c: var(--r-legend); } .r-myth { --c: var(--r-myth); }

/* Jetons et carte cadeau */
.coins { width: 74px; height: 64px; }
.gift { width: 112px; height: 72px; border-radius: 9px; position: relative; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #1B2838, #2A475E 55%, #66C0F4); box-shadow: 0 6px 14px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }
.gift small { position: absolute; top: 6px; left: 8px; font-size: 9px; letter-spacing: .12em; opacity: .85; }
.gift b { font-size: 22px; }
.gift i { position: absolute; bottom: 6px; right: 8px; font-style: normal; font-size: 10px; letter-spacing: .08em; }

.tiers { display: grid; gap: 8px; }
.tier { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border-left: 4px solid var(--c); }
.tier .mini { width: 54px; height: 40px; display: grid; place-items: center; font-size: 26px; }
.tier .mini .coins { width: 40px; height: 34px; }
.tier .mini .gift { width: 54px; height: 34px; font-size: 0; }
.tier .mini .gift b { font-size: 11px; }
.tier .mini .gift small, .tier .mini .gift i { display: none; }
.tier .nm { font-weight: 700; }
.tier .nm small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; text-transform: capitalize; }
.tier .pc { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.recent li { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.recent li .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
.recent li b { margin-left: auto; color: var(--c); }

/* Révélation */
.reveal-bg { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(6, 4, 14, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.reveal-box { width: min(440px, 100%); text-align: center; padding: 26px 22px; border-radius: 20px; background: linear-gradient(180deg, rgba(36, 26, 66, .98), rgba(16, 12, 32, .98));
  border: 1px solid color-mix(in srgb, var(--c, #8B6CF0) 70%, transparent); box-shadow: 0 0 60px color-mix(in srgb, var(--c, #8B6CF0) 45%, transparent); animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.reveal-box h2 { font-family: 'Montserrat', sans-serif; font-size: 30px; margin: 10px 0 6px; color: var(--c, #fff); text-shadow: 0 0 18px var(--c); }
.reveal-box p { color: var(--text); margin: 0 0 18px; }
.reveal-art { display: grid; place-items: center; min-height: 150px; }
.reveal-art .big { font-size: 130px; line-height: 1; animation: fuck 1s ease-out; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); }
.reveal-art .coins { width: 140px; height: 120px; animation: pop .6s cubic-bezier(.3, 1.6, .5, 1); }
.reveal-art .gift { width: 220px; height: 140px; animation: pop .7s cubic-bezier(.3, 1.6, .5, 1); }
.reveal-art .gift b { font-size: 40px; } .reveal-art .gift small { font-size: 13px; } .reveal-art .gift i { font-size: 14px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes fuck { 0% { transform: translateY(140px) scale(.3) rotate(-20deg); opacity: 0; } 45% { transform: translateY(-14px) scale(1.25) rotate(8deg); opacity: 1; }
  60% { transform: rotate(-8deg) scale(1.1); } 75% { transform: rotate(6deg); } 90% { transform: rotate(-3deg); } 100% { transform: none; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 700px) {
  :root { --it: 112px; }
  .opener { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .opener .row { justify-content: center; }
  .crate { width: 110px; }
  .lead { font-size: 16px; }
  .item .ic { font-size: 42px; }
  .item .am { font-size: 13px; bottom: 8px; }
  .item .coins { width: 56px; height: 48px; }
  .item .gift { width: 90px; height: 58px; } .item .gift b { font-size: 17px; }
  .btn.big { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .crate, .crate.shake { animation: none; } }

/* Choix de la caisse */
.kinds { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kind { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 14px; cursor: pointer; font: inherit; color: var(--text); text-align: left;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, transform .15s; }
.kind:hover { transform: translateY(-2px); }
.kind.sel { border-color: var(--gold); box-shadow: 0 0 22px rgba(245, 184, 61, .3); background: rgba(245, 184, 61, .1); }
.kind .k-art { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; font-size: 34px; overflow: hidden; background: rgba(0, 0, 0, .3); }
.kind .k-art img { width: 100%; height: 100%; object-fit: cover; }
.kind b { display: block; }
.kind small { color: var(--muted); }
.bisou-crate { position: relative; width: 170px; aspect-ratio: 288 / 536; border-radius: 18px; overflow: hidden; border: 3px solid #FF6FA8;
  box-shadow: 0 0 30px rgba(255, 111, 168, .55), 0 18px 24px rgba(0, 0, 0, .55); filter: none; }
.bisou-crate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bisou-crate .lips { position: absolute; right: 6px; bottom: 6px; font-size: 34px; animation: beat 1.1s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.25); } }
.item .face { width: 78%; height: 78%; object-fit: cover; border-radius: 10px; margin-bottom: 18px; }
.reveal-art .face { width: 190px; height: 240px; object-fit: cover; border-radius: 16px; border: 3px solid #FF6FA8; box-shadow: 0 0 30px rgba(255, 111, 168, .6); animation: fuck 1s ease-out; }
@media (max-width: 700px) { .bisou-crate { width: 120px; } .kind { flex: 1 1 100%; } }
