/* Pryve Slots : la machine dorée fournie, découpée en calques et animée (rouleaux en tambour derrière le cadre ajouré,
   levier en deux pièces, ampoules en chenillard, enseigne qui scintille), dans une salle sombre aux reflets chauds.
   Pupitre de commandes en laque noire et or. */
:root {
  --bg: #0d0305; --panel: #1b0a0e; --panel-2: #14070a; --panel-3: #0f0507; --border: #3a1a20; --border-light: #5e2c34;
  --muted: #c9a7a6; --accent: #e50539;
  --gold: #ffd45e; --gold-2: #c98a12; --gold-3: #fff0b4;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Fond : salle de casino hors mise au point. Un projecteur tombe sur la machine, des lueurs chaudes flottent au loin,
   le sol laqué renvoie un peu de lumière. Statique, sauf deux nappes de lueurs qui dérivent très lentement. */
body { font-family: var(--font);
  --page-bg:
    radial-gradient(ellipse 120% 95% at 50% 40%, rgba(0,0,0,0) 44%, rgba(0,0,0,.7) 100%),
    radial-gradient(ellipse 46% 60% at 36% 30%, rgba(255,186,84,.16), rgba(255,186,84,0) 70%),
    radial-gradient(ellipse 60% 26% at 36% 96%, rgba(255,150,60,.13), rgba(255,150,60,0) 70%),
    radial-gradient(110% 70% at 50% 0%, #3c0a12, rgba(60,10,18,0) 62%),
    linear-gradient(180deg, #120406 0, #170609 60%, #220a0d 100%); }
body::after { content: ""; position: fixed; inset: -10%; z-index: 0; pointer-events: none; opacity: .9;
  background:
    radial-gradient(circle at 8% 22%, rgba(255,214,150,.12) 0 14px, rgba(255,214,150,0) 30px),
    radial-gradient(circle at 15% 58%, rgba(255,120,90,.1) 0 20px, rgba(255,120,90,0) 44px),
    radial-gradient(circle at 5% 80%, rgba(255,200,110,.09) 0 12px, rgba(255,200,110,0) 28px),
    radial-gradient(circle at 62% 14%, rgba(255,214,150,.08) 0 10px, rgba(255,214,150,0) 24px),
    radial-gradient(circle at 70% 70%, rgba(255,110,120,.08) 0 22px, rgba(255,110,120,0) 48px),
    radial-gradient(circle at 92% 30%, rgba(255,200,110,.1) 0 16px, rgba(255,200,110,0) 36px),
    radial-gradient(circle at 96% 78%, rgba(255,160,90,.09) 0 18px, rgba(255,160,90,0) 40px);
  animation: slBokeh 26s ease-in-out infinite alternate; }
@keyframes slBokeh { from { transform: translate3d(-1.2%, .6%, 0) scale(1); } to { transform: translate3d(1.4%, -.8%, 0) scale(1.05); } }
.app { position: relative; z-index: 1; }
.logo { color: #fff; font-style: normal; gap: 8px; }
.howto-btn { display: none; }

/* ========= Disposition ========= */
.slots { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; padding: 12px 14px; max-width: 1380px; width: 100%; margin: 0 auto; align-items: start; }
.scene { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.scene .toasts { top: 44px; }
.scene-hint { position: relative; z-index: 1; color: var(--muted); font-size: 12px; text-align: center; min-height: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }

/* ========= Historique ========= */
.history-bar { width: 100%; max-width: 720px; height: 30px; background: linear-gradient(180deg, #14060a, #1c0a0f); border: 1px solid rgba(255,196,84,.2); border-radius: 12px; padding: 3px 6px; display: flex; align-items: center; overflow: hidden; box-shadow: inset 0 2px 5px rgba(0,0,0,.55); position: relative; z-index: 1; }
.history-chips { gap: 5px; }
.chip.win { color: #b2f2a3; }
.chip.big { color: var(--gold); text-shadow: 0 0 6px rgba(255,212,94,.6); }
.chip.jackpot { color: #140a00; background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); }
.chip.lose { color: #7b6466; }

/* ========= Machine =========
   Boîte au format de l'image (1207 × 1303). Tous les calques sont posés en pourcentage de cette boîte, les textes en `cqw`. */
.machine { position: relative; z-index: 1; flex: 0 0 auto; width: min(100%, calc((100dvh - 96px) * .9263)); margin: -5.5% 0 -2.5%; aspect-ratio: 1207 / 1303; container-type: inline-size; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.machine > * { position: absolute; }
.m-frame { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.machine.thud .m-frame, .machine.thud .m-reels { animation: slThud .14s ease-out; }
@keyframes slThud { 0% { transform: translateY(0); } 40% { transform: translateY(.28%); } 100% { transform: none; } }
/* ombre au sol et halo doré derrière la machine (le halo monte avec les gains) */
.m-floor { left: 6%; right: 9%; bottom: -1.2%; height: 6%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.78), rgba(0,0,0,0) 68%); }
.m-halo { left: 4%; right: 8%; top: 12%; bottom: 6%; border-radius: 46%; background: radial-gradient(ellipse at 50% 50%, rgba(255,196,70,.5), rgba(255,120,40,.16) 55%, rgba(255,120,40,0) 72%); opacity: .22; transition: opacity .5s; transform: scale(1.12); }
.machine.spinning .m-halo { opacity: .34; }
.machine.winning .m-halo { opacity: .7; animation: slHalo 1s ease-in-out infinite; }
.machine.big .m-halo, .machine.jackpot .m-halo { opacity: 1; animation-duration: .55s; }
@keyframes slHalo { 0%, 100% { transform: scale(1.12); } 50% { transform: scale(1.22); } }
/* rouleaux et ligne gagnante : derrière le cadre, vus par les fenêtres */
.m-reels { left: 16.2386%; top: 30.0844%; width: 65.1201%; height: 43.7452%; }
.m-lines, .m-badges { inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.m-lines .pl-glow { opacity: .85; filter: blur(5px); animation: slLine .5s ease-out both; }
.m-lines .pl-core { animation: slLine .5s ease-out both; }
@keyframes slLine { from { opacity: 0; } }
.m-badges .pl-badge { animation: slBadge .4s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes slBadge { from { opacity: 0; } }
/* ampoules : trois voiles qui éteignent chacun une ampoule sur trois. Au repos, le chenillard tourne lentement ; il accélère
   pendant le tour ; sur un gain, toutes les ampoules clignotent ensemble. */
.m-bulbs { inset: 0; background-size: 100% 100%; background-repeat: no-repeat; opacity: 0; pointer-events: none; animation: slChase 1.5s steps(1, end) infinite; }
.m-bulbs.b0 { background-image: url("../assets/slots/bulbs-0.webp"); }
.m-bulbs.b1 { background-image: url("../assets/slots/bulbs-1.webp"); animation-delay: -1s; }
.m-bulbs.b2 { background-image: url("../assets/slots/bulbs-2.webp"); animation-delay: -.5s; }
@keyframes slChase { 0% { opacity: 1; } 33.34%, 100% { opacity: 0; } }
.machine.spinning .m-bulbs { animation-duration: .36s; }
.machine.spinning .m-bulbs.b1 { animation-delay: -.24s; } .machine.spinning .m-bulbs.b2 { animation-delay: -.12s; }
.machine.suspense .m-bulbs { animation-duration: .21s; }
.machine.suspense .m-bulbs.b1 { animation-delay: -.14s; } .machine.suspense .m-bulbs.b2 { animation-delay: -.07s; }
.machine.winning .m-bulbs { animation: slBlink .44s steps(1, end) infinite; animation-delay: 0s; }
.machine.big .m-bulbs, .machine.jackpot .m-bulbs { animation-duration: .24s; }
@keyframes slBlink { 0% { opacity: 1; } 50%, 100% { opacity: 0; } }
/* enseigne : un reflet la traverse de temps en temps, quelques étoiles scintillent */
.m-sign { left: 16.6%; top: 10.6%; width: 66.6%; height: 12.2%; overflow: hidden; clip-path: polygon(3.5% 0, 96.5% 0, 100% 100%, 0 100%); pointer-events: none; mix-blend-mode: screen; }
.m-shine { position: absolute; top: -20%; bottom: -20%; left: -30%; width: 22%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,244,200,.75), rgba(255,255,255,0)); transform: skewX(-20deg); animation: slShine 5.2s ease-in-out infinite; }
@keyframes slShine { 0%, 62% { left: -30%; } 100% { left: 120%; } }
.machine.winning .m-shine { animation-duration: 1.2s; }
.m-star { position: absolute; width: 5.5%; aspect-ratio: 1; background: radial-gradient(circle, #fff 0 14%, rgba(255,236,170,.9) 26%, rgba(255,236,170,0) 60%); clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); opacity: 0; animation: slStar 3.4s ease-in-out infinite; }
.m-star.s1 { left: 6%; top: 18%; } .m-star.s2 { left: 86%; top: 12%; animation-delay: .9s; } .m-star.s3 { left: 24%; top: 62%; animation-delay: 1.7s; width: 4%; } .m-star.s4 { left: 72%; top: 60%; animation-delay: 2.4s; width: 4.4%; } .m-star.s5 { left: 50%; top: 4%; animation-delay: .4s; width: 3.6%; }
@keyframes slStar { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 40% { opacity: 1; transform: scale(1.1) rotate(40deg); } 70% { opacity: 0; transform: scale(.4) rotate(80deg); } }
/* afficheurs : posés sur les trois panneaux rouges du socle */
.m-lcd { top: 81.81%; height: 8.75%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; pointer-events: none; line-height: 1; text-align: center; }
.m-lcd.p1 { left: 13.42%; width: 20.88%; } .m-lcd.p2 { left: 37.95%; width: 21.54%; } .m-lcd.p3 { left: 63.13%; width: 20.88%; }
.lcd-label { font-size: max(1.75cqw, 7.5px); font-weight: 800; letter-spacing: .28em; padding-left: .28em; color: #ffd88a; text-shadow: 0 1px 2px rgba(60,0,0,.9); }
.lcd-value { font-size: 4.3cqw; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .01em; color: #fff6dc; text-shadow: 0 0 .5cqw rgba(255,210,120,.95), 0 0 1.6cqw rgba(255,120,40,.8), 0 .2cqw .3cqw rgba(60,0,0,.9); white-space: nowrap; }
.m-lcd.win .lcd-value { color: #fff; }
.m-lcd.win .lcd-value.rolling { color: #ffe9a8; }
.m-lcd.win .lcd-value.pop { animation: slPop .4s cubic-bezier(.2,1.8,.4,1); }
@keyframes slPop { 0% { transform: scale(1); } 45% { transform: scale(1.3); } 100% { transform: scale(1); } }
/* éclair doré sur toute la machine quand un gain tombe */
.m-flash { inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(ellipse 60% 44% at 49% 52%, rgba(255,236,170,.9), rgba(255,190,70,.35) 55%, rgba(255,190,70,0) 78%); }
.machine.winning .m-flash { animation: slFlash .9s ease-out; }
.machine.big .m-flash, .machine.jackpot .m-flash { animation: slFlash .7s ease-out 3; }
@keyframes slFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
/* bandeau GROS GAIN / JACKPOT, par-dessus les rouleaux */
.win-banner { left: 18%; right: 20.5%; top: 43%; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: .6cqw; padding: 2.2cqw 2cqw 2.6cqw; border-radius: 3cqw; text-align: center; pointer-events: none; background: linear-gradient(180deg, rgba(60,6,14,.94), rgba(20,2,6,.94)); border: .45cqw solid #ffd45e; box-shadow: 0 0 0 .3cqw rgba(60,6,14,.9), 0 0 6cqw rgba(255,196,70,.75), 0 2cqw 5cqw rgba(0,0,0,.6); animation: slBanner .5s cubic-bezier(.2,1.6,.4,1) both; }
.win-banner[hidden] { display: none; }
.win-banner small { font-size: 3.1cqw; font-weight: 900; letter-spacing: .32em; padding-left: .32em; color: var(--gold); text-shadow: 0 0 1.4cqw rgba(255,212,94,.8); }
.win-banner b { font-size: 9.4cqw; font-weight: 900; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 .4cqw 0 #a86400, 0 0 3cqw rgba(255,212,94,.9); }
.win-banner.jackpot { border-color: #fff0b4; animation: slBanner .5s cubic-bezier(.2,1.6,.4,1) both, slJack .5s ease-in-out .5s infinite alternate; }
@keyframes slBanner { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }
@keyframes slJack { to { box-shadow: 0 0 0 .3cqw rgba(60,6,14,.9), 0 0 11cqw rgba(255,226,120,1), 0 2cqw 5cqw rgba(0,0,0,.6); } }

/* ========= Levier =========
   Zone tactile sur tout le bras. --pull (0 au repos, 1 tiré à fond) : la tige raccourcit par le haut, la boule descend
   d'autant et grossit un peu (elle vient vers le joueur). */
.m-lever { left: 87.158%; top: 20.568%; width: 12.842%; height: 41.75%; z-index: 3; cursor: grab; touch-action: none; --pull: 0; outline: none; -webkit-tap-highlight-color: transparent; }
.m-lever.drag { cursor: grabbing; }
.m-lever.disabled { cursor: default; }
.m-lever img { position: absolute; pointer-events: none; }
.lv-shaft { left: 26.45%; top: 27.39%; width: 42.58%; height: 41.91%; transform-origin: 50% 100%; transform: scaleY(calc(1 - .74 * var(--pull))); }
.lv-ball { left: 0; top: .55%; width: 101.3%; height: 27.39%; transform: translate(calc(var(--pull) * -7%), calc(var(--pull) * 113%)) scale(calc(1 + .07 * var(--pull))); filter: drop-shadow(0 .6cqw .9cqw rgba(0,0,0,.35)); transition: filter .2s; }
.m-lever:not(.disabled):hover .lv-ball { filter: drop-shadow(0 .6cqw .9cqw rgba(0,0,0,.35)) brightness(1.12); }
.m-lever:focus-visible .lv-ball { filter: drop-shadow(0 0 1.2cqw #fff); }

/* ========= Commandes : pupitre en laque noire, filets et touches dorés ========= */
.controls { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 22px; border: 1px solid rgba(255,196,84,.34); background: linear-gradient(180deg, #2a0b12 0, #17060a 46%, #0f0406 100%); box-shadow: 0 24px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,236,190,.22), inset 0 0 0 4px rgba(0,0,0,.25), inset 0 -18px 30px rgba(0,0,0,.35); }
.controls::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255,212,94,0), #ffe9a8 30%, #ffd45e 50%, #ffe9a8 70%, rgba(255,212,94,0)); opacity: .8; }
.ctl-block { display: flex; flex-direction: column; gap: 8px; }
.controls .auto-row { border: 0; padding: 0; margin: 0; }
.ctl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: #f1d9b0; }
.ctl-head > span:first-child::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c0, #ffc93c 55%, #b97a00); box-shadow: 0 0 6px rgba(255,201,60,.7); vertical-align: 1px; }
.ctl-head small { font-size: 10.5px; font-weight: 600; letter-spacing: .2px; text-transform: none; color: #9d8082; font-variant-numeric: tabular-nums; }
.amount { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 8px; padding: 6px; border-radius: 16px; background: linear-gradient(180deg, #080203, #150709); border: 1px solid #3a1a20; box-shadow: inset 0 3px 8px rgba(0,0,0,.7); }
.amt { width: 46px; height: 46px; border-radius: 50%; font-size: 24px; font-weight: 800; line-height: 1; color: #3a2400; background: radial-gradient(circle at 35% 28%, #fff6c0, #ffcf4a 48%, #c78a10 100%); border: 1px solid #fff0b4; box-shadow: 0 4px 0 #7a4e00, 0 8px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.7); transition: transform .08s, box-shadow .08s, filter .15s; }
.amt:hover:not(:disabled) { filter: brightness(1.08); }
.amt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #7a4e00, 0 3px 6px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.7); }
.amt:disabled { filter: grayscale(.85) brightness(.55); cursor: default; }
.amount-val { display: flex; align-items: baseline; justify-content: center; gap: 6px; min-width: 0; }
.amount-val b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff3d0; text-shadow: 0 0 10px rgba(255,190,80,.55); }
.amount-val span { font-size: 11px; font-weight: 700; color: #9d8082; }
.quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.quick button, .seg button { min-height: 36px; border-radius: 11px; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; color: #ead7c2; background: linear-gradient(180deg, #2a1218, #1a0a0e); border: 1px solid #45222a; box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 0 rgba(0,0,0,.45); transition: transform .08s, border-color .15s, color .15s, background .15s; }
.quick button:hover:not(:disabled), .seg button:hover:not(:disabled):not(.active) { border-color: #a36a2a; color: #fff; }
.quick button:active:not(:disabled), .seg button:active:not(:disabled) { transform: translateY(1px); }
.quick button.active, .seg button.active { color: #2b1a00; background: linear-gradient(180deg, #fff0b4, #ffc93c 55%, #d6960f); border-color: #fff0b4; box-shadow: 0 0 14px rgba(255,201,60,.4), inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 #7a4e00; }
.quick button:disabled, .seg button:disabled { opacity: .5; cursor: default; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.seg button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.seg button b { font-size: 16px; }
.seg button small svg { display: block; width: 22px; height: 22px; }
.seg button.active small svg rect[fill="#ffd12e"] { fill: #7a2a00; }
.seg button.active small svg rect:not([fill="#ffd12e"]) { fill: rgba(60,30,0,.22); }
.seg.small button { min-height: 36px; font-size: 13px; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tot { display: flex; flex-direction: column; gap: 3px; padding: 8px 11px; border-radius: 13px; background: linear-gradient(180deg, #080203, #150709); border: 1px solid #3a1a20; box-shadow: inset 0 2px 6px rgba(0,0,0,.65); min-width: 0; }
.tot span { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #9d8082; }
.tot b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff3d0; }
.tot b.pos { color: #7dffa9; text-shadow: 0 0 10px rgba(77,255,142,.45); }
/* SPIN : gros poussoir rouge serti d'or, bombé, qui s'enfonce */
.spin-btn { position: relative; overflow: hidden; height: 86px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; border: 3px solid #ffd45e; background: radial-gradient(120% 90% at 50% 0%, #ff5a72, #e50539 42%, #9c0020 100%); box-shadow: 0 7px 0 #5e0012, 0 0 0 4px rgba(60,6,14,.9), 0 0 0 5px rgba(255,212,94,.5), 0 18px 34px rgba(229,5,57,.45), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -10px 18px rgba(80,0,14,.55); transition: transform .08s, box-shadow .08s, filter .15s; }
.spin-btn::before { content: ""; position: absolute; left: 8%; right: 8%; top: 6px; height: 42%; border-radius: 18px 18px 60% 60%; background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0)); pointer-events: none; }
.spin-btn .spin-label { position: relative; font-size: 27px; font-weight: 900; letter-spacing: 3px; padding-left: 3px; text-shadow: 0 2px 0 rgba(90,0,16,.9), 0 0 16px rgba(255,255,255,.35); }
.spin-btn .spin-sub { position: relative; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #ffd9de; min-height: 12px; }
.spin-btn:hover:not(:disabled) { filter: brightness(1.08); }
.spin-btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 #5e0012, 0 0 0 4px rgba(60,6,14,.9), 0 0 0 5px rgba(255,212,94,.5), 0 8px 16px rgba(229,5,57,.4), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -10px 18px rgba(80,0,14,.55); }
.spin-btn:disabled { filter: saturate(.55) brightness(.7); cursor: default; }
.spin-ring { position: absolute; inset: -3px; border-radius: 26px; border: 3px solid rgba(255,240,180,0); pointer-events: none; }
.spin-btn:not(:disabled):not(.busy) .spin-ring { animation: slRing 1.9s ease-out infinite; }
@keyframes slRing { 0% { border-color: rgba(255,240,180,.9); transform: scale(1); opacity: 1; } 70%, 100% { border-color: rgba(255,240,180,0); transform: scale(1.07, 1.2); opacity: 0; } }
.spin-btn.busy .spin-label { animation: slBusy .7s ease-in-out infinite alternate; }
@keyframes slBusy { to { opacity: .6; } }
.auto-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.auto-row .seg { min-width: 0; }
.auto-btn { min-width: 76px; padding: 0 14px; border-radius: 11px; font-weight: 900; font-size: 13px; letter-spacing: 1px; color: var(--gold); background: linear-gradient(180deg, #2a1608, #170b04); border: 1px solid #c98a12; box-shadow: inset 0 1px 0 rgba(255,236,190,.2), 0 2px 0 rgba(0,0,0,.45); transition: transform .08s, filter .15s; }
.auto-btn:hover { filter: brightness(1.15); } .auto-btn:active { transform: translateY(1px); }
.auto-btn.running { color: #fff; background: linear-gradient(180deg, #ff2f55, #b0001e); border-color: #ff8ea0; animation: slAuto 1s ease-in-out infinite alternate; }
@keyframes slAuto { to { box-shadow: 0 0 18px rgba(255,47,85,.75), inset 0 1px 0 rgba(255,255,255,.3); } }
.auto-opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #ead7c2; cursor: pointer; min-height: 26px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .slider { position: relative; flex: 0 0 38px; height: 22px; border-radius: 999px; background: #1a0a0e; border: 1px solid #45222a; box-shadow: inset 0 2px 4px rgba(0,0,0,.6); transition: background .2s, border-color .2s; }
.opt .slider::before { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #b9a9a9); box-shadow: 0 1px 3px rgba(0,0,0,.6); transition: transform .2s cubic-bezier(.3,1.6,.5,1), background .2s; }
.opt input:checked + .slider { background: linear-gradient(180deg, #c98a12, #ffcf4a); border-color: #fff0b4; }
.opt input:checked + .slider::before { transform: translateX(16px); background: radial-gradient(circle at 35% 30%, #fff, #fff0b4); }
.opt input:focus-visible + .slider { outline: 2px solid #fff; outline-offset: 2px; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 10px; border-top: 1px solid rgba(255,196,84,.16); }
.links button { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border-radius: 11px; font-size: 12.5px; font-weight: 700; color: #ead7c2; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); text-align: left; transition: border-color .15s, color .15s, background .15s; }
.links button:hover { border-color: #a36a2a; color: #fff; background: rgba(255,196,84,.08); }
.lk-ico { display: inline-flex; color: var(--gold); flex: 0 0 auto; }

/* ========= Effets plein écran ========= */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ========= Modales propres au jeu ========= */
.pt-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.pt-table { display: flex; flex-direction: column; gap: 4px; }
.pt-row { display: grid; grid-template-columns: 112px 1fr 56px 80px; align-items: center; gap: 8px; background: var(--panel-2); border-radius: 8px; padding: 4px 8px; }
.pt-row.jp { background: linear-gradient(90deg, #3a2400, #1f1400); box-shadow: inset 0 0 0 1px rgba(255,212,94,.35); }
.pt-icons { display: flex; gap: 2px; }
.pt-icons .sym, .pt-icons .any { width: 34px; height: 34px; }
.pt-icons .any { border-radius: 6px; background: repeating-linear-gradient(45deg, #2a2a2e 0 3px, #1a1a1e 3px 6px); }
.pt-name { font-weight: 600; color: #fff; }
.pt-name em { font-style: normal; font-size: 10px; color: var(--gold); border: 1px solid var(--gold-2); border-radius: 6px; padding: 1px 5px; margin-left: 4px; }
.pt-mult { font-weight: 900; color: var(--gold); text-align: right; }
.pt-amt { text-align: right; font-variant-numeric: tabular-nums; color: #b2f2a3; }
.sym.inline { width: 18px; height: 18px; vertical-align: -4px; }
.pl-minis { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.pl-mini svg { width: 48px; height: 48px; }
.fair-table .mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.fair-table td.pos { color: #b2f2a3; }
.fd-grid { display: flex; flex-direction: column; gap: 3px; width: max-content; margin: 0 auto 12px; background: #fff; border-radius: 8px; padding: 4px; }
.fd-row { display: flex; gap: 3px; }
.fd-row .sym { width: 44px; height: 44px; }
.kv .v.ok { color: #b2f2a3; } .kv .v.ko { color: #ff7171; }
.kv .v.pos { color: #b2f2a3; }
.mybets-table td.res { color: var(--muted); font-size: 11px; }
.modal-body code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: #000; padding: 1px 4px; border-radius: 4px; }
.sym { object-fit: contain; }

/* ========= Tablette et téléphone portrait : machine en haut, pupitre dessous ========= */
@media (max-width: 1000px) {
  .slots { grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
}
@media (max-width: 760px) {
  .slots { grid-template-columns: minmax(0, 1fr); padding: 8px 10px 14px; gap: 10px; }
  .machine { width: min(100%, calc((100dvh - 300px) * .9263)); min-width: min(100%, 300px); margin: -6% 0 -3%; }
  .scene { gap: 6px; }
  .scene-hint { display: none; }
  .history-bar { height: 26px; }
  .controls { padding: 12px; gap: 10px; border-radius: 20px; display: grid; grid-template-columns: 1fr 1fr; }
  .controls > .spin-btn { grid-column: 1 / -1; grid-row: 1; height: 72px; }
  .controls > .ctl-block:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .controls > .ctl-block:nth-of-type(2) { grid-column: 2; grid-row: 2; align-self: start; }
  .controls > .totals { grid-column: 2; grid-row: 2; align-self: end; }
  .controls > .auto-block, .controls > .links { grid-column: 1 / -1; }
  .quick { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .quick button { font-size: 11.5px; min-height: 36px; padding: 0; }
  .amount { grid-template-columns: 40px 1fr 40px; gap: 4px; padding: 5px; }
  .amt { width: 40px; height: 40px; font-size: 21px; }
  .amount-val b { font-size: 21px; } .amount-val span { display: none; }
  .totals { gap: 6px; } .tot { padding: 6px 7px; } .tot b { font-size: 13px; } .tot span { font-size: 8.5px; letter-spacing: 0; white-space: nowrap; }
  .ctl-head { font-size: 10px; letter-spacing: 1.1px; white-space: nowrap; } .ctl-head small { display: none; }
  .pt-row { grid-template-columns: 96px 1fr 48px 68px; gap: 6px; }
  .pt-icons .sym, .pt-icons .any { width: 28px; height: 28px; }
}
@media (max-width: 400px) {
  .seg button { gap: 5px; } .seg button small svg { width: 18px; height: 18px; }
}

/* ========= Téléphone paysage : machine à gauche sur toute la hauteur, pupitre à droite ========= */
@media (orientation: landscape) and (max-height: 520px) {
  .slots { grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 6px 10px; align-items: stretch; }
  .scene { gap: 0; justify-content: center; }
  .history-bar, .scene-hint { display: none; }
  .machine { width: calc((100dvh - 34px) * .9263); min-width: 0; margin: -6% 0 -3%; }
  .controls { padding: 9px 10px; gap: 7px; border-radius: 16px; display: grid; grid-template-columns: 1fr 1fr; align-content: start; overflow: auto; max-height: calc(100dvh - 58px); }
  .controls > .ctl-block:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .controls > .ctl-block:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .controls > .totals { grid-column: 2; grid-row: 1; align-self: end; }
  .controls > .spin-btn { grid-column: 1 / -1; grid-row: 2; height: 56px; border-radius: 18px; }
  .controls > .auto-block, .controls > .links { grid-column: 1 / -1; }
  .spin-btn .spin-label { font-size: 21px; } .spin-btn .spin-sub { display: none; } .spin-ring { border-radius: 18px; }
  .ctl-block { gap: 5px; } .ctl-head { font-size: 9.5px; letter-spacing: 1.2px; }
  .amount { grid-template-columns: 36px 1fr 36px; gap: 4px; padding: 4px; border-radius: 13px; }
  .amt { width: 36px; height: 36px; font-size: 19px; }
  .amount-val b { font-size: 19px; } .amount-val span { display: none; }
  .quick { gap: 4px; } .quick button { min-height: 36px; font-size: 11px; padding: 0; }
  .seg button { min-height: 36px; gap: 5px; } .seg button b { font-size: 14px; } .seg button small svg { width: 17px; height: 17px; }
  .totals { gap: 5px; } .tot { padding: 4px 8px; gap: 1px; border-radius: 10px; } .tot span { font-size: 9px; } .tot b { font-size: 12.5px; }
  .auto-opts { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; } .opt { font-size: 12px; }
  .links { padding-top: 7px; grid-template-columns: repeat(4, minmax(0, 1fr)); } .links button { min-height: 36px; font-size: 11px; padding: 0 6px; gap: 5px; }
}

/* ========= Mouvement réduit : plus de chenillard, de reflets ni de battements ; les ampoules restent allumées ========= */
@media (prefers-reduced-motion: reduce) {
  body::after, .m-bulbs, .m-shine, .m-star, .m-halo, .m-flash, .spin-ring, .spin-btn.busy .spin-label, .auto-btn.running, .win-banner, .m-lines *, .m-badges *, .machine.thud .m-frame, .machine.thud .m-reels { animation: none !important; }
  .m-bulbs, .m-star, .m-shine { display: none; }
}
