/* How it works : trois explications animées (jeu immédiat, salons multijoueur, provably fair).
   Chaque fenêtre a une scène de 520 × 230 (mise à l'échelle par --k selon la largeur) pilotée par how.js :
   la scène porte `data-step` (0, 1, 2) et des classes d'état posées au fil de la chronologie ; les trois étapes
   affichées dessous suivent la scène (barre de progression) et permettent d'y sauter. */
.hw-back { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,4,6,.78); -webkit-backdrop-filter: blur(8px) saturate(.8); backdrop-filter: blur(8px) saturate(.8); animation: hwFade .2s ease-out; }
@keyframes hwFade { from { opacity: 0; } to { opacity: 1; } }
.hw-box { position: relative; width: min(600px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; border-radius: 24px; color: #fff; border: 1px solid transparent;
  background: linear-gradient(180deg, #1d1d24, #111115) padding-box, linear-gradient(160deg, rgba(255,77,109,.9), rgba(255,255,255,.08) 35%, rgba(255,255,255,.06) 65%, rgba(255,77,109,.55)) border-box;
  box-shadow: 0 40px 100px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4), 0 0 80px rgba(229,5,57,.16); animation: hwPop .42s cubic-bezier(.2,1.25,.3,1); }
@keyframes hwPop { from { transform: translateY(26px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.hw-x { position: absolute; top: 10px; right: 10px; z-index: 6; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.hw-x:hover { background: rgba(0,0,0,.8); }

/* ---------- scène ---------- */
.hw-stage { position: relative; height: calc(230px * var(--k, 1)); overflow: hidden; border-radius: 23px 23px 0 0; background: radial-gradient(90% 120% at 50% 0%, #24101a, #0b0b0f 62%); }
.hw-stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask: radial-gradient(80% 90% at 50% 30%, #000, transparent 75%); mask: radial-gradient(80% 90% at 50% 30%, #000, transparent 75%); }
.hw-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: linear-gradient(180deg, transparent, #1b1b22); pointer-events: none; z-index: 4; }
.hw-scene { position: absolute; left: 0; top: 0; width: 520px; height: 230px; transform-origin: 0 0; transform: scale(var(--k, 1)); font-family: var(--font); }
.hw-scene * { box-sizing: border-box; }
.hw-pill { position: absolute; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px; border-radius: 999px; background: rgba(12,12,16,.78); border: 1px solid rgba(255,255,255,.13); color: #d7d7de; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.hw-pill svg { color: #ff4d6d; flex: 0 0 auto; }
/* curseur qui montre le geste */
.hw-cur { position: absolute; left: 0; top: 0; z-index: 9; width: 24px; height: 24px; opacity: 0; transform: translate(var(--x, 440px), var(--y, 210px)); transition: transform .75s cubic-bezier(.4,0,.2,1), opacity .3s; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(0,0,0,.6)); }
.hw-cur.show { opacity: 1; }
.hw-cur svg { display: block; transition: transform .14s; transform-origin: 4px 3px; }
.hw-cur.tap svg { transform: scale(.78); }
.hw-cur::after { content: ""; position: absolute; left: -9px; top: -10px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; opacity: 0; }
.hw-cur.tap::after { animation: hwRipple .5s ease-out; }
@keyframes hwRipple { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- 1. Jeu immédiat : choisir un jeu, miser, encaisser ---------- */
.hi-tag { left: 14px; top: 12px; }
.hi-bal { position: absolute; right: 62px; top: 10px; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 5px; border-radius: 11px; background: rgba(20,20,26,.92); border: 1px solid #2f2f38; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; transition: border-color .25s, box-shadow .25s, transform .25s cubic-bezier(.2,1.8,.4,1); }
.hi-bal i { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 12px; color: #5a3a00; background: radial-gradient(circle at 35% 30%, #fff2a8, #f5c531 45%, #c98a06); }
.hi-bal.down b { color: #ff8a9c; }
.hi-bal.up { border-color: #19b24a; box-shadow: 0 0 0 3px rgba(25,178,74,.25), 0 0 22px rgba(25,178,74,.4); transform: scale(1.08); }
.hi-bal.up b { color: #4dff8e; }
.hi-cards { position: absolute; left: 0; top: 58px; width: 520px; height: 130px; transition: opacity .45s, transform .55s cubic-bezier(.3,.8,.3,1); }
.hi-card { position: absolute; top: 0; left: calc(31px + var(--i) * 93px); width: 86px; height: 118px; margin: 0; border-radius: 13px; overflow: hidden; background: #17171c; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 22px rgba(0,0,0,.55); animation: hiDeal .6s calc(.12s * var(--i) + .1s) cubic-bezier(.2,1.3,.4,1) both, hiBob 3.6s calc(.4s * var(--i) + .9s) ease-in-out infinite; transition: transform .4s cubic-bezier(.2,1.5,.4,1), opacity .35s, box-shadow .3s, border-color .3s, filter .35s; }
.hi-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes hiDeal { from { opacity: 0; translate: 0 26px; rotate: 8deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes hiBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.hi-card.alt { background: radial-gradient(120% 80% at 50% 100%, #3a3a3d, #151517 70%); display: flex; flex-direction: column; align-items: center; padding-top: 12px; }
.hi-card.alt small { font-size: 6.5px; font-weight: 700; letter-spacing: .6px; color: rgba(255,255,255,.75); }
.hi-card.alt b { margin-top: 3px; font-size: 14px; font-weight: 900; font-style: italic; letter-spacing: -.3px; color: #ff1e45; }
.hi-card.alt img { inset: auto 0 10px 0; height: auto; object-fit: contain; }
.hi-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.3) 50%, transparent 60%); background-size: 250% 100%; background-position: 130% 0; animation: hiGlint 3.2s calc(.5s * var(--i) + 1s) ease-in-out infinite; }
@keyframes hiGlint { 0%, 60% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
.hw-scene.picked .hi-card { filter: brightness(.45) saturate(.6); transform: scale(.94); }
.hw-scene.picked .hi-card.alt { filter: none; transform: scale(1.16) translateY(-4px); border-color: #ff4d6d; box-shadow: 0 0 0 3px rgba(229,5,57,.35), 0 18px 34px rgba(229,5,57,.45); z-index: 2; }
.hw-scene.hi:not([data-step="0"]) .hi-cards { opacity: 0; transform: scale(.86) translateY(-14px); pointer-events: none; }
.hi-game { position: absolute; left: 20px; top: 50px; width: 480px; height: 168px; display: grid; grid-template-columns: 298px 1fr; gap: 12px; padding: 10px; border-radius: 16px; background: linear-gradient(180deg, #1a1a21, #121217); border: 1px solid #2b2b33; box-shadow: 0 18px 40px rgba(0,0,0,.55); opacity: 0; transform: scale(.9) translateY(16px); transition: opacity .45s .12s, transform .6s .12s cubic-bezier(.2,1.2,.3,1); }
.hw-scene.hi:not([data-step="0"]) .hi-game { opacity: 1; transform: none; }
.hi-graph { position: relative; height: 148px; border-radius: 11px; overflow: hidden; background: radial-gradient(120% 110% at 0% 100%, #2a0c14, #0c0c10 65%); border: 1px solid #24242b; }
.hi-graph::before { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 270deg at 0% 100%, rgba(255,255,255,.035) 0 5deg, transparent 5deg 10deg); animation: hiSun 14s linear infinite; transform-origin: 0 100%; }
@keyframes hiSun { to { transform: rotate(10deg); } }
.hi-graph svg { position: absolute; inset: 0; width: 298px; height: 148px; overflow: visible; }
.hi-curve { fill: none; stroke: #ff2f55; stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255,47,85,.7)); transition: stroke .3s; }
.hi-area { fill: url(#hiFill); transition: opacity .3s; }
.hi-plane { position: absolute; left: 0; top: 0; width: 52px; margin: -24px 0 0 -30px; transform: translate(30px, 130px) rotate(-4deg); will-change: transform; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.hi-mult { position: absolute; left: 14px; top: 9px; font-size: 34px; font-weight: 900; letter-spacing: -1px; font-variant-numeric: tabular-nums; text-shadow: 0 3px 14px rgba(0,0,0,.6); transition: color .25s, transform .3s cubic-bezier(.2,1.8,.4,1); transform-origin: 0 50%; }
.hw-scene.won .hi-mult { color: #4dff8e; transform: scale(1.14); }
.hw-scene.won .hi-curve { stroke: #2fe07a; filter: drop-shadow(0 0 7px rgba(47,224,122,.7)); }
.hi-side { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hi-title { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 900; font-style: italic; color: #ff1e45; }
.hi-title i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #2fe07a; box-shadow: 0 0 8px #2fe07a; }
.hi-title span { margin-left: auto; font-style: normal; font-weight: 700; font-size: 10px; color: #8a8a96; }
.hi-amt { position: relative; height: 44px; padding: 6px 10px; border-radius: 10px; background: #0c0c10; border: 1px solid #2b2b33; }
.hi-amt small { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: 1px; color: #74747f; }
.hi-amt b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hi-chip { position: absolute; right: 9px; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #15151a 0 42%, transparent 44%), repeating-conic-gradient(#fff4e2 0 22.5deg, #e50539 22.5deg 45deg); box-shadow: 0 3px 6px rgba(0,0,0,.6), inset 0 0 0 1.5px rgba(0,0,0,.3); opacity: 0; transform: translateY(-34px) rotate(-90deg); }
.hw-scene.bet .hi-chip { opacity: 1; transform: none; transition: transform .45s cubic-bezier(.3,1.7,.5,1), opacity .15s; }
.hi-btn { position: relative; flex: 1 1 auto; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 11px; background: linear-gradient(180deg, #ff2f55, #c40030); border: 1px solid #ff5c7a; font-weight: 900; font-size: 15px; letter-spacing: .5px; box-shadow: 0 8px 18px rgba(229,5,57,.4), inset 0 1px 0 rgba(255,255,255,.35); transition: background .3s, border-color .3s, box-shadow .3s, transform .14s, color .3s; }
.hi-btn small { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; opacity: .92; }
.hi-btn.press { transform: scale(.94); }
.hw-scene.bet .hi-btn { background: linear-gradient(180deg, #ffc93c, #e08a00); border-color: #ffe08a; color: #2b1a00; box-shadow: 0 8px 20px rgba(245,170,30,.45), inset 0 1px 0 rgba(255,255,255,.5); }
.hw-scene.won .hi-btn { background: linear-gradient(180deg, #27cc69, #0d8a3e); border-color: #63ffa5; color: #fff; box-shadow: 0 8px 22px rgba(25,178,74,.5), inset 0 1px 0 rgba(255,255,255,.4); }
.hi-gain { position: absolute; left: 300px; top: 138px; z-index: 5; font-size: 18px; font-weight: 900; color: #4dff8e; text-shadow: 0 2px 10px rgba(0,0,0,.8), 0 0 14px rgba(77,255,142,.6); opacity: 0; pointer-events: none; white-space: nowrap; }
.hw-scene.won .hi-gain { animation: hiGain 1.25s cubic-bezier(.3,.7,.3,1) both; }
@keyframes hiGain { 0% { opacity: 0; transform: translate(0, 10px) scale(.6); } 18% { opacity: 1; transform: translate(0, -8px) scale(1.2); } 55% { opacity: 1; transform: translate(30px, -56px) scale(1); } 100% { opacity: 0; transform: translate(92px, -124px) scale(.7); } }
.hi-coin { position: absolute; left: 424px; top: 176px; z-index: 5; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c0, #f5c531 55%, #b97a00); box-shadow: 0 0 8px rgba(245,197,49,.7); opacity: 0; pointer-events: none; }
.hw-scene.won .hi-coin { animation: hiCoin .85s calc(.18s + .07s * var(--i)) cubic-bezier(.5,0,.3,1) both; }
@keyframes hiCoin { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: 1; transform: translate(calc(var(--dx) * 1px), -24px) scale(1); } 100% { opacity: 0; transform: translate(-28px, -154px) scale(.6); } }

/* ---------- 2. Salons multijoueur : créer, partager, jouer ensemble ---------- */
.hm-live { left: 14px; top: 12px; }
.hm-live i { width: 7px; height: 7px; border-radius: 50%; background: #5a5a68; transition: background .3s, box-shadow .3s; }
.hw-scene.host .hm-live i { background: #2fe07a; animation: hmDot 1.8s ease-out infinite; }
@keyframes hmDot { 0% { box-shadow: 0 0 0 0 rgba(47,224,122,.7); } 80%, 100% { box-shadow: 0 0 0 7px rgba(47,224,122,0); } }
.hm-live b { color: #fff; font-variant-numeric: tabular-nums; }
.hm-top { position: absolute; left: 50%; top: 9px; width: 200px; height: 32px; margin-left: -100px; }
.hm-create { position: absolute; inset: 0; margin: auto; width: 150px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(180deg, #ff2f55, #c40030); border: 1px solid #ff5c7a; font-size: 12px; font-weight: 900; box-shadow: 0 8px 18px rgba(229,5,57,.42), inset 0 1px 0 rgba(255,255,255,.35); transition: opacity .25s, transform .3s; animation: hmInvite 1.6s ease-in-out infinite; }
@keyframes hmInvite { 0%, 100% { box-shadow: 0 8px 18px rgba(229,5,57,.42), 0 0 0 0 rgba(255,77,109,.5), inset 0 1px 0 rgba(255,255,255,.35); } 50% { box-shadow: 0 8px 18px rgba(229,5,57,.42), 0 0 0 7px rgba(255,77,109,0), inset 0 1px 0 rgba(255,255,255,.35); } }
.hm-create.press { transform: scale(.93); }
.hw-scene.room .hm-create { opacity: 0; transform: scale(.7); animation: none; }
.hm-code { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; opacity: 0; transition: opacity .2s; }
.hw-scene.room .hm-code { opacity: 1; }
.hm-code small { margin-right: 6px; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: #8a8a96; }
.hm-code b { width: 21px; height: 28px; border-radius: 5px; display: grid; place-items: center; background: linear-gradient(180deg, #2a2a33 0 49%, #0e0e12 50% 51%, #23232b 52%); border: 1px solid #3a3a46; font: 800 15px/1 ui-monospace, Menlo, monospace; color: #fff; transform: rotateX(90deg); }
.hw-scene.room .hm-code b { transform: none; transition: transform .35s calc(.07s * var(--i)) cubic-bezier(.3,1.6,.5,1); }
.hm-link { position: absolute; left: 50%; top: 47px; width: 262px; height: 28px; margin-left: -131px; display: flex; align-items: center; gap: 7px; padding: 0 5px 0 10px; border-radius: 999px; background: #17171c; border: 1px solid #2f2f38; color: #a1a1ad; font: 600 11px/1 ui-monospace, Menlo, monospace; opacity: 0; transform: translateY(-10px) scale(.9); transition: opacity .35s, transform .45s cubic-bezier(.2,1.5,.4,1), border-color .3s; }
.hw-scene.hmm:not([data-step="0"]) .hm-link { opacity: 1; transform: none; }
.hm-link > svg { color: #ff4d6d; flex: 0 0 auto; }
.hm-link span { flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hm-link span b { color: #fff; letter-spacing: 1px; }
.hm-copy { flex: 0 0 auto; width: 30px; height: 20px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; transition: background .2s, transform .14s; }
.hm-copy.press { transform: scale(.86); }
.hw-scene.copied .hm-link { border-color: #19b24a; } .hw-scene.copied .hm-copy { background: #19b24a; }
.hm-toast { position: absolute; left: 372px; top: 30px; z-index: 3; padding: 4px 9px; border-radius: 999px; background: #19b24a; color: #fff; font-size: 10.5px; font-weight: 800; box-shadow: 0 4px 12px rgba(25,178,74,.5); transform: scale(0); transform-origin: 20% 100%; }
.hw-scene.toast .hm-toast { animation: hmToast 1.9s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes hmToast { 0% { transform: scale(0); } 14% { transform: scale(1); } 82% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9) translateY(-6px); opacity: 0; } }
.hm-wires { position: absolute; inset: 0; width: 520px; height: 230px; overflow: visible; pointer-events: none; }
.hm-wires path { fill: none; stroke: #ff4d6d; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 7; opacity: 0; transition: opacity .3s; }
.hw-scene.send .hm-wires path { opacity: .7; animation: hmFlow .5s linear infinite; }
@keyframes hmFlow { to { stroke-dashoffset: -10; } }
.hm-wires circle { fill: #fff; filter: drop-shadow(0 0 6px #ff4d6d); opacity: 0; }
.hm-table { position: absolute; left: 106px; top: 90px; width: 308px; height: 110px; border-radius: 50%; background: radial-gradient(70% 80% at 50% 38%, #1f7a4d, #0e4a2c 62%, #072c1a); border: 6px solid #7b5320; box-shadow: 0 0 0 1.5px #d7a94e, inset 0 0 0 1.5px rgba(255,220,150,.35), inset 0 10px 30px rgba(0,0,0,.55), 0 18px 30px rgba(0,0,0,.6); filter: saturate(.35) brightness(.6); transition: filter .6s; }
.hw-scene.host .hm-table { filter: none; }
.hm-table::before { content: ""; position: absolute; inset: 12px 22px; border-radius: 50%; border: 1px dashed rgba(255,235,190,.3); }
.hm-seat { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; opacity: 0; transform: scale(.3); transition: opacity .25s, transform .5s cubic-bezier(.2,1.7,.4,1); }
.hm-seat img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 3px solid #e50539; box-shadow: 0 0 0 4px rgba(229,5,57,.18), 0 8px 16px rgba(0,0,0,.6); transition: border-color .3s, box-shadow .3s; }
.hm-seat small { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); padding: 2px 7px; border-radius: 999px; background: #0c0c10; border: 1px solid #2f2f38; font-size: 9.5px; font-weight: 800; white-space: nowrap; }
.hm-seat::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #ff4d6d; opacity: 0; }
.hm-seat.s1 { left: 260px; top: 197px; } .hm-seat.s2 { left: 84px; top: 142px; } .hm-seat.s3 { left: 436px; top: 142px; }
.hw-scene.host .hm-seat.s1, .hw-scene.p2 .hm-seat.s2, .hw-scene.p3 .hm-seat.s3 { opacity: 1; transform: none; }
.hw-scene.host .hm-seat.s1::after, .hw-scene.p2 .hm-seat.s2::after, .hw-scene.p3 .hm-seat.s3::after { animation: hmJoin .8s ease-out; }
@keyframes hmJoin { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.hm-seat.s1 small { left: auto; right: 50px; top: 15px; transform: none; background: linear-gradient(180deg, #ffe58a, #e0a100); border-color: #fff2b0; color: #3a2600; }
.hw-scene.win .hm-seat.s1 img { border-color: #ffd45e; box-shadow: 0 0 0 4px rgba(255,212,94,.3), 0 0 26px rgba(255,212,94,.7); }
.hm-chip { position: absolute; z-index: 2; width: 17px; height: 17px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle, rgba(0,0,0,.55) 0 36%, transparent 38%), repeating-conic-gradient(#fff4e2 0 22.5deg, var(--c) 22.5deg 45deg); box-shadow: 0 2px 4px rgba(0,0,0,.6); opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.6); }
.hw-scene.bets .hm-chip { opacity: 1; transform: translate(0, 0) scale(1); transition: transform .65s calc(.12s * var(--i)) cubic-bezier(.3,.9,.3,1.15), opacity .2s calc(.12s * var(--i)); }
.hw-scene.win .hm-chip { opacity: 0; transform: translate(calc((260px - var(--px)) * 1), 40px) scale(.7); transition: transform .5s calc(.08s * var(--i)) cubic-bezier(.5,0,.4,1), opacity .2s calc(.08s * var(--i) + .38s); }
.hm-cards { position: absolute; left: 221px; top: 101px; display: flex; gap: 5px; }
.hm-cards span { width: 23px; height: 32px; border-radius: 4px; background: #fbfaf6; color: #15151a; display: grid; place-items: center; font: 800 12px/1 var(--font); box-shadow: 0 3px 6px rgba(0,0,0,.5); opacity: 0; transform: translateY(-16px) rotateY(180deg) scale(.7); }
.hm-cards span.r { color: #d4002b; }
.hw-scene.deal .hm-cards span { opacity: 1; transform: none; transition: transform .5s calc(.16s * var(--i)) cubic-bezier(.3,1.4,.5,1), opacity .2s calc(.16s * var(--i)); }
.hm-bub { position: absolute; z-index: 3; max-width: 150px; padding: 6px 11px; font-size: 11px; font-weight: 700; line-height: 1.25; opacity: 0; transform: scale(.4) translateY(8px); transition: opacity .25s, transform .45s cubic-bezier(.2,1.6,.4,1); }
.hm-bub.b1 { left: 22px; top: 84px; background: #26262e; border-radius: 13px 13px 13px 3px; transform-origin: 20% 100%; }
.hm-bub.b2 { right: 22px; top: 84px; background: linear-gradient(180deg, #ff2f55, #c40030); border-radius: 13px 13px 3px 13px; transform-origin: 80% 100%; }
.hw-scene.chat1 .hm-bub.b1, .hw-scene.chat2 .hm-bub.b2 { opacity: 1; transform: none; }
.hm-win { position: absolute; left: 292px; top: 185px; z-index: 4; padding: 4px 10px; border-radius: 999px; background: linear-gradient(180deg, #ffe58a, #e0a100); color: #3a2600; font-size: 14px; font-weight: 900; box-shadow: 0 6px 16px rgba(245,197,49,.5); opacity: 0; transform-origin: 0 50%; white-space: nowrap; }
.hw-scene.win .hm-win { animation: hmWin .55s .35s cubic-bezier(.2,1.7,.4,1) both; }
@keyframes hmWin { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }

/* ---------- 3. Provably fair : sceller, mélanger, vérifier ---------- */
.hf-phase { left: 14px; top: 10px; }
.hf-phase b { color: #fff; }
.hf-card { position: absolute; padding: 9px 11px; border-radius: 13px; background: linear-gradient(180deg, #1c1c23, #131318); border: 1px solid #2b2b33; box-shadow: 0 12px 24px rgba(0,0,0,.45); transition: border-color .35s, box-shadow .35s, opacity .4s, transform .5s cubic-bezier(.2,1.4,.4,1); }
.hf-card small { display: block; margin-bottom: 5px; font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #8a8a96; white-space: nowrap; }
.hf-card code { display: block; font: 700 12.5px/1.2 ui-monospace, Menlo, monospace; color: #fff; white-space: nowrap; overflow: hidden; }
.hf-seed { left: 14px; top: 50px; width: 172px; height: 62px; }
.hf-seed code { letter-spacing: 1px; color: #6d6d7a; transition: color .3s; }
.hw-scene.unlocked .hf-seed { border-color: #19b24a; box-shadow: 0 0 0 3px rgba(25,178,74,.16), 0 12px 24px rgba(0,0,0,.45); }
.hw-scene.unlocked .hf-seed code { color: #7dffa9; letter-spacing: 0; }
.hf-lock { position: absolute; right: 9px; top: 7px; width: 22px; height: 24px; color: #ffd45e; transition: color .3s; }
.hf-lock .sh { transform: translateY(-4px) rotate(-28deg); transform-origin: 17px 11px; transition: transform .35s cubic-bezier(.3,1.7,.5,1); }
.hw-scene.locked .hf-lock .sh { transform: none; }
.hw-scene.locked .hf-lock { animation: hfClack .35s .12s ease-out; }
@keyframes hfClack { 0% { transform: translateY(0); } 40% { transform: translateY(2px) scale(1.12); } 100% { transform: none; } }
.hw-scene.unlocked .hf-lock { color: #4dff8e; }
.hf-down { position: absolute; left: 96px; top: 114px; width: 12px; height: 20px; color: #5a5a68; }
.hf-hash { left: 14px; top: 136px; width: 172px; height: 62px; opacity: .3; transform: translateY(6px); }
.hw-scene.locked .hf-hash, .hw-scene.unlocked .hf-hash { opacity: 1; transform: none; }
.hf-hash code { color: #ffd45e; }
.hf-hash::after { content: ""; position: absolute; right: 9px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: #5a5a68; transition: background .3s, box-shadow .3s; }
.hw-scene.published .hf-hash { border-color: rgba(255,212,94,.55); }
.hw-scene.published .hf-hash::after { background: #ffd45e; box-shadow: 0 0 8px #ffd45e; }
.hw-scene.check .hf-hash { border-color: #19b24a; box-shadow: 0 0 0 3px rgba(25,178,74,.16), 0 12px 24px rgba(0,0,0,.45); }
.hw-scene.check .hf-hash code { color: #7dffa9; }
.hw-scene.check .hf-hash::after { background: #2fe07a; box-shadow: 0 0 8px #2fe07a; }
.hf-scan { position: absolute; left: 14px; top: 50px; width: 172px; height: 148px; border-radius: 13px; overflow: hidden; pointer-events: none; }
.hf-scan::before { content: ""; position: absolute; left: 0; right: 0; top: -30px; height: 26px; background: linear-gradient(180deg, transparent, rgba(77,255,142,.45), transparent); opacity: 0; }
.hw-scene.check .hf-scan::before { animation: hfScan .9s ease-in-out both; }
@keyframes hfScan { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(190px); opacity: 0; } }
.hf-wires { position: absolute; inset: 0; width: 520px; height: 230px; pointer-events: none; }
.hf-wires path { fill: none; stroke: #3a3a46; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 4 6; transition: stroke .3s; }
.hw-scene.mix .hf-wires .w1, .hw-scene.hashed .hf-wires .w1, .hw-scene.hashed .hf-wires .w2 { stroke: #ff4d6d; animation: hmFlow .45s linear infinite; }
.hf-mixer { position: absolute; left: 216px; top: 84px; width: 88px; height: 88px; opacity: .35; transition: opacity .4s; }
.hw-scene.clients .hf-mixer, .hw-scene.hashed .hf-mixer { opacity: 1; }
.hf-mixer::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#ff2f55, #ffb067, #ffd45e, #ff2f55); -webkit-mask: radial-gradient(circle, transparent 0 60%, #000 62%); mask: radial-gradient(circle, transparent 0 60%, #000 62%); animation: hfSpin 9s linear infinite; }
.hw-scene.mix .hf-mixer::before { animation-duration: .7s; }
@keyframes hfSpin { to { transform: rotate(360deg); } }
.hf-mixer::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #2a2a33, #0c0c10); border: 1px solid #3a3a46; }
.hf-mixer b { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; font: 900 12px/1.05 ui-monospace, Menlo, monospace; letter-spacing: .5px; color: #fff; }
.hw-scene.mix .hf-mixer b { animation: hfThrob .35s ease-in-out infinite alternate; }
@keyframes hfThrob { to { transform: scale(1.1); color: #ffd45e; } }
.hf-client { position: absolute; top: 40px; left: calc(214px + var(--i) * 32px); z-index: 2; width: 28px; height: 28px; opacity: 0; transform: translateY(-22px) scale(.5); }
.hf-client img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #ff4d6d; box-shadow: 0 4px 8px rgba(0,0,0,.6); }
.hw-scene.clients .hf-client { animation: hfDrop 1.5s calc(.22s * var(--i)) cubic-bezier(.3,.8,.3,1) both; }
@keyframes hfDrop { 0% { opacity: 0; transform: translateY(-22px) scale(.5); } 22% { opacity: 1; transform: none; } 62% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(calc((1 - var(--i)) * 32px), 72px) scale(.25); } }
.hw-scene.hashed .hf-client { animation: none; opacity: 1; transform: translateY(0) scale(.8); }
.hf-clbl { position: absolute; left: 200px; top: 18px; width: 120px; text-align: center; font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #8a8a96; opacity: 0; transition: opacity .3s; }
.hw-scene.clients .hf-clbl, .hw-scene.hashed .hf-clbl { opacity: 1; }
.hf-strip { position: absolute; left: 196px; top: 182px; width: 128px; height: 26px; padding: 0 8px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: #0c0c10; border: 1px solid #2b2b33; font: 700 11px/1 ui-monospace, Menlo, monospace; color: #6d6d7a; white-space: nowrap; overflow: hidden; opacity: .3; transition: opacity .3s, border-color .3s; }
.hw-scene.mix .hf-strip, .hw-scene.hashed .hf-strip { opacity: 1; }
.hf-strip em { font-style: normal; color: #ffd45e; }
.hw-scene.hashed .hf-strip { border-color: rgba(255,212,94,.55); }
.hf-res { left: 340px; top: 58px; width: 166px; height: 92px; opacity: .3; transform: scale(.94); }
.hw-scene.result .hf-res { opacity: 1; transform: none; border-color: rgba(255,77,109,.6); box-shadow: 0 0 0 3px rgba(229,5,57,.14), 0 12px 24px rgba(0,0,0,.45); }
.hf-res strong { display: block; margin-top: 2px; font-size: 40px; font-weight: 900; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; color: #3a3a46; transition: color .3s; }
.hw-scene.result .hf-res strong { color: #fff; }
.hf-res span { display: block; margin-top: 5px; font-size: 9.5px; font-weight: 700; color: #8a8a96; white-space: nowrap; transition: opacity .2s; }
.hw-scene.verified .hf-res span { opacity: 0; }
.hf-stamp { position: absolute; left: 350px; top: 118px; z-index: 3; padding: 3px 9px 3px 7px; border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; border: 2px solid #2fe07a; color: #2fe07a; background: rgba(6,30,16,.9); font-size: 11.5px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: rotate(-4deg) scale(2.4); transform-origin: 20% 50%; }
.hw-scene.verified .hf-stamp { animation: hfStamp .45s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes hfStamp { 0% { opacity: 0; transform: rotate(-4deg) scale(2.4); } 60% { opacity: 1; transform: rotate(-4deg) scale(.92); } 100% { opacity: 1; transform: rotate(-4deg) scale(1); } }
.hw-scene.verified .hf-res { border-color: #19b24a; box-shadow: 0 0 0 3px rgba(25,178,74,.16), 0 12px 24px rgba(0,0,0,.45); }
.hf-rtp { left: 340px; top: 158px; width: 166px; height: 54px; display: flex; align-items: center; gap: 10px; padding: 8px 11px; opacity: .3; }
.hw-scene.rtp .hf-rtp { opacity: 1; }
.hf-rtp svg { flex: 0 0 auto; width: 38px; height: 38px; transform: rotate(-90deg); }
.hf-rtp circle { fill: none; stroke-width: 5; }
.hf-rtp .tr { stroke: #2b2b33; }
.hf-rtp .fg { stroke: #2fe07a; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s cubic-bezier(.3,.8,.3,1); }
.hw-scene.rtp .hf-rtp .fg { stroke-dashoffset: 3; }
.hf-rtp div { min-width: 0; }
.hf-rtp small { margin-bottom: 2px; letter-spacing: .7px; }
.hf-rtp b { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- texte, étapes, action ---------- */
.hw-body { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.hw-head small { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #ff6b85; }
.hw-head h3 { margin: 0; font-size: 25px; font-weight: 900; letter-spacing: -.4px; line-height: 1.08; }
.hw-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hw-step { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 5px; padding: 10px 11px 14px; border-radius: 14px; text-align: left; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); opacity: .62; transition: opacity .3s, border-color .3s, background .3s, transform .2s; }
.hw-step:hover { opacity: .9; }
.hw-step.on { opacity: 1; border-color: rgba(255,77,109,.6); background: rgba(229,5,57,.09); transform: translateY(-2px); }
.hw-step.done { opacity: .82; }
.hw-step > b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; line-height: 1.2; }
.hw-step > b i { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 900; background: #2b2b33; color: #c9c9d2; transition: background .3s, color .3s; }
.hw-step.on > b i { background: linear-gradient(180deg, #ff2f55, #c40030); color: #fff; }
.hw-step.done > b i { background: #19b24a; color: #fff; }
.hw-step > span { font-size: 12px; line-height: 1.42; color: #b9b9c4; }
.hw-step > em { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.06); }
.hw-step > em::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #ff2f55, #ffb067); transform: scaleX(0); transform-origin: 0 50%; }
.hw-step.on > em::after { animation: hwBar var(--d, 4s) linear forwards; }
.hw-step.done > em::after { transform: scaleX(1); background: #19b24a; opacity: .55; }
.hw-still .hw-step.on > em::after { animation: none; transform: scaleX(1); }
@keyframes hwBar { to { transform: scaleX(1); } }
.hw-fine { margin: 0; color: #8a8a96; font-size: 12px; line-height: 1.5; }
.hw-cta { position: relative; overflow: hidden; width: 100%; height: 50px; border-radius: 14px; background: linear-gradient(180deg, #ff2f55, #c40030); border: 1px solid #ff5c7a; color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .3px; box-shadow: 0 12px 28px rgba(229,5,57,.42), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .12s, filter .15s; }
.hw-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-18deg); animation: hwShine 3.2s ease-in-out infinite; }
@keyframes hwShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.hw-cta:hover { filter: brightness(1.08); } .hw-cta:active { transform: scale(.985); }

@media (max-width: 560px) {
  .hw-back { padding: 0; align-items: flex-end; }
  .hw-box { width: 100%; max-height: 94dvh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: hwSheet; }
  .hw-x { top: 7px; right: 7px; width: 32px; height: 32px; }
  .hw-body { padding: 12px 16px 16px; gap: 10px; }
  .hw-head h3 { font-size: 22px; }
  .hw-steps { grid-template-columns: 1fr; gap: 6px; }
  .hw-step { padding: 9px 11px 12px; gap: 3px; } .hw-step.on { transform: none; }
  .hw-step > span { padding-left: 30px; }
}
@keyframes hwSheet { from { transform: translateY(100%); } to { transform: none; } }
@media (orientation: landscape) and (max-height: 520px) {
  .hw-back { padding: 8px; align-items: center; }
  .hw-box { width: min(820px, 100%); max-height: calc(100dvh - 16px); border-radius: 20px; display: grid; grid-template-columns: 46% 1fr; align-items: center; padding-bottom: 0; animation-name: hwPop; }
  .hw-stage { border-radius: 19px 0 0 19px; align-self: stretch; height: auto; min-height: calc(230px * var(--k, 1)); display: flex; align-items: center; }
  .hw-stage::after { display: none; }
  .hw-scene { position: relative; flex: 0 0 auto; margin-bottom: calc(230px * (var(--k, 1) - 1)); }
  .hw-body { padding: 12px 46px 12px 14px; gap: 8px; }
  .hw-head h3 { font-size: 19px; }
  .hw-steps { grid-template-columns: 1fr; gap: 5px; }
  .hw-step { padding: 7px 10px 10px; gap: 2px; } .hw-step.on { transform: none; }
  .hw-step > b { font-size: 12.5px; } .hw-step > span { font-size: 11px; padding-left: 30px; }
  .hw-fine { display: none; }
  .hw-cta { height: 42px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-back, .hw-box, .hw-scene *, .hw-scene *::before, .hw-scene *::after, .hw-cta::after { animation: none !important; transition: none !important; }
  .hw-cur, .hi-gain, .hi-coin, .hm-toast, .hf-client, .hm-wires circle { display: none; }
  .hw-scene.win .hm-win { opacity: 1; }
  .hw-scene.verified .hf-stamp { opacity: 1; transform: rotate(-4deg); }
}
