/* Pressure (dossier balloon) : la scène (ciel, campagne, ballon) est dessinée dans le canvas ; ici, tout ce qui l'entoure.
   Famille visuelle : encre bleu nuit, laiton, émail rose de la pompe, chiffres crème. Aucun flou d'arrière-plan sur la scène
   (elle est redessinée à chaque image), animations en transform / opacity uniquement. */
:root {
  --ink: #0b1120; --ink-2: #121a2e; --ink-3: #1c2642; --hair: rgba(255,255,255,.1);
  --brass: #e7b758; --brass-d: #8a5e16; --cream: #fff4d6; --lab: #aab4cf;
  --pump: #ff2d8f; --pump-d: #a8005a;
  --ok: #4be08a; --bad: #ff6b83;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --disp: Poppins, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pm: clamp(150px, 24.5vh, 232px);              /* largeur de la pompe (hauteur d'écran dynamique plus bas, là où elle existe) */
  /* la barre du haut, le menu et les fenêtres (styles communs) prennent la même encre bleu nuit que le pupitre */
  --bg: #070b14; --panel: #131b30; --panel-2: #0c1323; --panel-3: #0a101d; --border: #26324f; --border-light: #3d4d74; --muted: #a3acc4;
}
@supports (height: 1dvh) { :root { --pm: clamp(150px, 24.5dvh, 232px); } }
body { font-family: var(--font); background: var(--bg); overflow: hidden; }
.logo { color: #fff; font-style: normal; gap: 6px; }
.kb { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; padding: 1px 5px; border-radius: 5px; font: 700 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d5dcef; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-bottom-width: 2px; white-space: nowrap; }
.modal { border-color: rgba(255,255,255,.14); box-shadow: 0 24px 70px rgba(0,8,30,.75), inset 0 1px 0 rgba(255,255,255,.07); }
.modal-head { background: linear-gradient(180deg, #223052, #1a2542); border-bottom: 1px solid rgba(231,183,88,.35); }
.modal-title { font-family: var(--disp); font-weight: 800; }
.pos { color: #9df0b6; }
.neg { color: #ff8a9c; }

/* ========= structure ========= */
.bl { flex: 1; display: flex; flex-direction: column; min-height: 0; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: linear-gradient(180deg, #1272e3 0%, #5bbdfb 46%, #c9ecff 74%, #8fd35e 74%, #3d9c2f 100%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .toasts { top: 52px; z-index: 7; }

/* ========= bandeau du haut : tendance des derniers éclatements, session ========= */
.topline { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; z-index: 3; }
.trend, .session { pointer-events: auto; display: flex; align-items: center; height: 36px; border-radius: 12px; background: linear-gradient(180deg, rgba(18,27,50,.9), rgba(8,13,27,.9)); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 6px 18px rgba(0,20,60,.3), inset 0 1px 0 rgba(255,255,255,.08); }
.trend { gap: 8px; padding: 0 6px 0 11px; min-width: 0; max-width: min(38%, 520px); }
.trend-lab { flex: 0 0 auto; font: 800 10px/1 var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--lab); white-space: nowrap; }
.trend-spark { flex: 0 0 auto; width: 60px; height: 22px; }
.trend.empty .trend-spark { display: none; }
.trend-chips { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.hp { flex: 0 0 auto; height: 24px; padding: 0 9px; border-radius: 8px; font: 800 12px/24px var(--disp); font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.hp:first-child { animation: hpIn .4s cubic-bezier(.2,.9,.25,1.3); }
.hp.win { background: linear-gradient(180deg, #2fc468, #188a3f); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.hp.lose { background: linear-gradient(180deg, #ff5574, #d1123a); box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.hp:hover { filter: brightness(1.12); }
.hp-empty { padding: 0 8px 0 0; font-size: 11px; font-weight: 600; color: var(--lab); white-space: nowrap; }
@keyframes hpIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.session { flex: 0 0 auto; padding: 0 4px; }
.ss { display: flex; align-items: center; gap: 7px; padding: 0 10px; height: 22px; }
.ss + .ss { border-left: 1px solid var(--hair); }
.ss-ico { display: block; width: 16px; height: 16px; color: #7f8bab; flex: 0 0 auto; }
.ss-ico svg { display: block; width: 100%; height: 100%; }
.ss span { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.ss small { font-size: 9px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--lab); white-space: nowrap; }
.ss b { font: 800 13px/1 var(--disp); font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.ss.has .ss-ico { color: #ffb24a; }
.ss.hot .ss-ico { color: #ffd45e; }
.ss.hot b { color: #ffe08a; }
.ss.pos .ss-ico, .ss.pos b { color: var(--ok); }
.ss.neg .ss-ico, .ss.neg b { color: var(--bad); }

/* ========= onglets latéraux + tiroir ========= */
.side-tabs { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.side-tab { width: 40px; padding: 11px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; border-radius: 0 14px 14px 0; background: linear-gradient(180deg, #1a2542, #0b1120); border: 1px solid rgba(255,255,255,.16); border-left: 0; color: #e6ebf7; box-shadow: 0 8px 20px rgba(0,20,60,.35), inset 0 1px 0 rgba(255,255,255,.1); transition: transform .15s, background .15s; }
.side-tab i { display: block; width: 18px; height: 18px; color: var(--brass); }
.side-tab i svg { display: block; width: 100%; height: 100%; }
.side-tab span { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 10px/1 var(--font); letter-spacing: 1.5px; white-space: nowrap; }
.side-tab:hover { transform: translateX(3px); }
.side-tab.active { background: linear-gradient(180deg, #ff4fa3, #c4106c); border-color: rgba(255,255,255,.4); }
.side-tab.active i { color: #fff; }
.drawer { position: absolute; left: 50px; top: 10px; bottom: 10px; width: 400px; max-width: calc(100% - 60px); display: flex; flex-direction: column; border-radius: 16px; background: linear-gradient(180deg, rgba(17,25,46,.98), rgba(8,12,24,.98)); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 24px 60px rgba(0,15,50,.55), inset 0 1px 0 rgba(255,255,255,.08); z-index: 6; animation: drawerIn .22s ease-out; }
@keyframes drawerIn { from { transform: translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--hair); }
.drawer-head b { font: 800 14px/1 var(--disp); letter-spacing: .3px; color: #fff; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 8px 10px; }
.bal { position: relative; display: inline-block; flex: 0 0 auto; width: 10px; height: 12px; border-radius: 50% 50% 50% 50% / 46% 46% 54% 54%; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.75), rgba(255,255,255,0) 46%), var(--c, #ff8a1f); box-shadow: inset -1px -2px 2px rgba(0,0,0,.25); }
.bal::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 4px; height: 3px; margin-left: -2px; background: var(--c, #ff8a1f); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.dr-head { display: grid; gap: 4px; padding: 2px 10px 6px; font: 700 10px/1 var(--font); letter-spacing: .8px; text-transform: uppercase; color: var(--lab); }
.dr-head span:nth-child(n+3), .dr-head.my span:nth-child(n+2) { text-align: right; }
.dr-head.top, .dr-row.top { grid-template-columns: 26px minmax(0, 1fr) 76px 64px 86px; }
.dr-head.my, .dr-row.my { grid-template-columns: minmax(0, 1fr) 76px 64px 86px; }
.dr-row { display: grid; align-items: center; gap: 4px; width: 100%; min-height: 44px; padding: 5px 10px; margin-bottom: 4px; border-radius: 10px; text-align: left; font-size: 12px; color: #dfe5f3; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); font-variant-numeric: tabular-nums; }
.dr-row .u { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dr-row .u img { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; }
.dr-row .u > div, .dr-row.my .u { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; overflow: hidden; }
.dr-row .nm { font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.dr-row .dt, .dr-row .st { max-width: 100%; font-size: 10.5px; color: var(--lab); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-row .a, .dr-row .m, .dr-row .w { text-align: right; font-weight: 700; white-space: nowrap; }
.dr-row .a { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: #cfd6e8; }
.dr-row .m { color: #ffd87a; }
.dr-row .w { font: 800 13px/1 var(--disp); color: #9df0b6; }
.dr-row .rk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 11px/1 var(--disp); color: var(--lab); background: rgba(255,255,255,.06); }
.dr-row.p1 .rk { color: #3a2500; background: linear-gradient(180deg, #ffe58a, #e0a100); }
.dr-row.p2 .rk { color: #20242c; background: linear-gradient(180deg, #eef2f7, #a9b3c2); }
.dr-row.p3 .rk { color: #2e1500; background: linear-gradient(180deg, #f0b27a, #b96a2a); }
.dr-row.me { border-color: rgba(231,183,88,.6); background: linear-gradient(90deg, rgba(231,183,88,.18), rgba(231,183,88,.04)); }
button.dr-row { cursor: pointer; transition: border-color .12s, background .12s; }
button.dr-row:hover { border-color: rgba(255,255,255,.28); }
.dr-row.my.cashed { box-shadow: inset 3px 0 0 var(--ok); }
.dr-row.my.lost { box-shadow: inset 3px 0 0 var(--bad); }
.dr-row.my.lost .w { color: #ff8a9c; }
.dr-row.my.lost .m { color: #ff8a9c; }
.dr-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.dr-sum > div { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.dr-sum small { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--lab); margin-bottom: 4px; }
.dr-sum b { font: 800 16px/1 var(--disp); color: #fff; font-variant-numeric: tabular-nums; }
.dr-sum .pos b { color: var(--ok); }
.dr-sum .neg b { color: var(--bad); }
.drawer .empty { padding: 26px 10px; text-align: center; color: var(--lab); }

/* ========= tampons au-dessus du ballon (palier, record, pression maximale) ========= */
.stamps { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.stamp { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: italic 900 38px/1 var(--disp); letter-spacing: -1px; color: #fff; -webkit-text-stroke: 5px rgba(22,12,48,.82); paint-order: stroke fill; text-shadow: 0 5px 0 rgba(22,12,48,.5); animation: stampIn 1.15s cubic-bezier(.2,.9,.25,1) forwards; }
.stamp.t1 { color: #fff3a8; }
.stamp.t2 { color: #ffd45e; font-size: 44px; }
.stamp.t3 { color: #ffa53d; font-size: 50px; }
.stamp.t4 { color: #ff6b6b; font-size: 56px; }
.stamp.rec, .stamp.apex { font: 900 17px/1 var(--disp); font-style: normal; letter-spacing: 1.5px; padding: 10px 18px; border-radius: 999px; color: #2a1900; -webkit-text-stroke: 0; text-shadow: none; background: linear-gradient(180deg, #fff3b8, #f2b824 55%, #c98a0a); border: 2px solid #fff6d2; box-shadow: 0 8px 22px rgba(60,30,0,.45), 0 0 0 5px rgba(255,212,94,.25); animation-duration: 2.3s; }
.stamp.apex { font-size: 22px; padding: 13px 24px; animation-duration: 2.6s; }
@keyframes stampIn { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.3) rotate(-10deg); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(-4deg); } 24% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 72% { opacity: 1; transform: translate(-50%, -70%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translate(-50%, -105%) scale(.96) rotate(-4deg); } }

/* ========= bandeau d'état ========= */
.hud { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; min-height: 40px; max-width: calc(100% - 32px); padding: 6px 16px 6px 13px; border-radius: 20px; background: linear-gradient(180deg, rgba(18,27,50,.94), rgba(8,13,27,.94)); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 8px 22px rgba(0,20,60,.38), inset 0 1px 0 rgba(255,255,255,.08); color: #fff; pointer-events: none; z-index: 3; }
.hud-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--pump); box-shadow: 0 0 0 4px rgba(255,45,143,.22); }
#hudText { display: flex; flex-direction: column; gap: 2px; min-width: 0; font: 700 13.5px/1.15 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hudText small { font-size: 10.5px; font-weight: 600; color: var(--lab); overflow: hidden; text-overflow: ellipsis; }
.hud-arrows { display: none; align-items: center; gap: 1px; margin-left: 2px; }
.hud-arrows b { display: block; width: 8px; height: 8px; border-top: 3px solid var(--pump); border-right: 3px solid var(--pump); transform: rotate(45deg); animation: hudArrow 1.2s ease-in-out infinite; }
.hud-arrows b:nth-child(2) { animation-delay: .15s; }
.hud-arrows b:nth-child(3) { animation-delay: .3s; }
@keyframes hudArrow { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
.hud[data-state="idle"] .hud-arrows { display: flex; }
.hud[data-state="pumping"] .hud-dot { background: #ffd45e; box-shadow: 0 0 0 4px rgba(255,212,94,.25); animation: hudBeat .5s ease-in-out infinite alternate; }
.hud[data-state="record"] { border-color: rgba(255,212,94,.8); }
.hud[data-state="record"] .hud-dot { background: #ffd45e; box-shadow: 0 0 0 4px rgba(255,212,94,.3); }
.hud[data-state="auto"] .hud-dot { background: var(--brass); box-shadow: 0 0 0 4px rgba(231,183,88,.22); }
.hud[data-state="cashed"] { border-color: rgba(75,224,138,.7); }
.hud[data-state="cashed"] .hud-dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(75,224,138,.25); }
.hud[data-state="popped"] { border-color: rgba(255,107,131,.7); }
.hud[data-state="popped"] .hud-dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(255,107,131,.25); }
@keyframes hudBeat { to { transform: scale(1.5); } }

/* ========= résultat de la manche, au centre de la scène ========= */
.win-fx { position: absolute; left: 50%; top: 43%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; white-space: nowrap; pointer-events: none; z-index: 4; animation: fxIn .45s cubic-bezier(.2,.9,.25,1.3) backwards; }
.win-fx small { padding: 5px 13px; border-radius: 999px; font: 800 12px/1 var(--font); letter-spacing: 1px; text-transform: uppercase; color: #fff; background: rgba(8,13,27,.82); border: 1px solid rgba(255,255,255,.18); }
.win-fx b { font: 900 68px/1 var(--disp); letter-spacing: -2px; font-variant-numeric: tabular-nums; color: #fff8dc; -webkit-text-stroke: 7px rgba(16,40,22,.8); paint-order: stroke fill; text-shadow: 0 6px 0 rgba(10,34,18,.5); }
.win-fx em { font: 800 15px/1 var(--disp); font-style: normal; letter-spacing: 3px; color: #fff; -webkit-text-stroke: 4px rgba(16,40,22,.75); paint-order: stroke fill; }
.win-fx.win small { border-color: rgba(75,224,138,.8); }
.win-fx.win b { color: #b8ffcf; }
.win-fx.lose b { font-size: 92px; font-style: italic; letter-spacing: -3px; color: #fff; -webkit-text-stroke: 9px #d1123a; text-shadow: 0 8px 0 rgba(90,0,20,.55); transform: rotate(-7deg); margin-bottom: 4px; }
.win-fx.lose small { border-color: rgba(255,107,131,.8); text-transform: none; letter-spacing: .3px; font-size: 13px; }
@keyframes fxIn { from { transform: translate(-50%, -50%) scale(.45); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* ========= la pompe : vrai bouton, dessin SVG (piston, corps émaillé, manomètre) ========= */
#pumpSlotStage { position: absolute; right: clamp(16px, 10%, 160px); bottom: 12px; z-index: 4; }
.panel .pump-slot:empty { display: none; }
.pump-wrap { position: relative; width: var(--pm); }
.pmp { position: relative; display: block; width: var(--pm); aspect-ratio: 200 / 236; border-radius: 26% / 22%; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.pmp:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
/* halo qui invite à appuyer : un anneau autour du corps de la pompe */
.pmp::before { content: ""; position: absolute; left: 11%; top: 27.1%; width: 78%; aspect-ratio: 1; border-radius: 50%; border: 5px solid rgba(255,45,143,.55); animation: pmHalo 2s ease-out infinite; pointer-events: none; }
@keyframes pmHalo { 0% { transform: scale(.98); opacity: .9; } 80%, 100% { transform: scale(1.22); opacity: 0; } }
.pmp.live::before, .pmp.auto::before { animation: none; opacity: 0; }
.pm-svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; transition: transform .08s ease-out; }
.pmp:hover .pm-svg { transform: translateY(-1px); }
.pmp.held .pm-svg, .pmp:active .pm-svg { transform: translateY(1.2%) scale(.985); }
.pm-num { font: 800 10.5px var(--disp); fill: #2b1d0c; }
.pm-read { font: 800 12.5px var(--disp); fill: #ffe9a8; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.pm-glow { transition: opacity .3s; }
.pmp.hot .pm-glow { opacity: .16; }
.pmp.ping .pm-svg { animation: pmPing .42s ease-out; }
@keyframes pmPing { 0% { transform: scale(1); } 30% { transform: scale(1.06); } 100% { transform: scale(1); } }
.pmp.rec #pmRecord { animation: pmRec .3s ease-in-out 3; }
@keyframes pmRec { 50% { opacity: .15; } }
.pmp.deny { animation: pmDeny .4s ease-in-out; }
@keyframes pmDeny { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
/* soupape : petites bouffées de vapeur à forte pression */
.pm-puff { position: absolute; left: 78%; top: 27%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.9); opacity: 0; pointer-events: none; }
.pmp.hiss .pm-puff { animation: pmPuff .66s linear infinite; }
.pmp.hiss .pm-puff:nth-of-type(2) { animation-delay: .22s; }
.pmp.hiss .pm-puff:nth-of-type(3) { animation-delay: .44s; }
@keyframes pmPuff { 0% { transform: translate(0, 0) scale(.4); opacity: .9; } 100% { transform: translate(190%, -230%) scale(1.9); opacity: 0; } }
.pm-auto { position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%); display: none; padding: 3px 9px; border-radius: 999px; font: 900 10px/1.3 var(--disp); letter-spacing: 1.5px; color: #2a1900; background: linear-gradient(180deg, #fff3b8, #e7b758); border: 1px solid #fff6d2; box-shadow: 0 3px 8px rgba(0,0,0,.35); pointer-events: none; }
.pmp.auto .pm-auto { display: block; }
/* invitation au-dessus du piston */
.pump-cap { position: absolute; left: 50%; bottom: calc(100% + 9px); display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; color: #fff; background: linear-gradient(180deg, #ff4fa3, #d5127a); border: 1px solid rgba(255,255,255,.5); box-shadow: 0 8px 18px rgba(120,0,60,.4); pointer-events: none; transform: translateX(-50%); animation: capBob 1.3s ease-in-out infinite; transition: opacity .15s; }
.pump-cap b { font: 900 12px/1 var(--disp); letter-spacing: 1.6px; }
.pump-cap .kb { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.45); color: #fff; }
.pump-cap::after { content: ""; position: absolute; left: 50%; top: 100%; width: 12px; height: 7px; margin-left: -6px; background: #d5127a; clip-path: polygon(0 0, 100% 0, 50% 100%); }
@keyframes capBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }
.pmp.live ~ .pump-cap { opacity: 0; }
.pump-wrap.auto .pump-cap { background: linear-gradient(180deg, #33405f, #172038); box-shadow: 0 8px 18px rgba(0,20,60,.4); animation: none; }
.pump-wrap.auto .pump-cap::after { background: #172038; }
.pump-wrap.auto .pump-cap .kb { display: none; }
.pump-wrap.auto .pmp.live ~ .pump-cap { opacity: 1; }

/* ========= pupitre de commandes ========= */
.panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, .8fr); gap: 10px; padding: 11px max(14px, calc((100% - 1280px) / 2)) 12px; background: linear-gradient(180deg, #162038, #0a0f1c); border-top: 1px solid #000; z-index: 2; }
.panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, rgba(231,183,88,0), rgba(231,183,88,.75) 18%, rgba(255,243,196,.95) 50%, rgba(231,183,88,.75) 82%, rgba(231,183,88,0)); }
.pn { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 8px 12px 10px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid var(--hair); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 6px 16px rgba(0,0,0,.25); }
.pn-head { display: flex; align-items: center; gap: 10px; min-height: 24px; min-width: 0; }
.pn-lab, .auto-switch { font: 800 11px/1 var(--font); letter-spacing: 1.2px; text-transform: uppercase; color: var(--lab); white-space: nowrap; }
.pn-lab small { font-weight: 700; opacity: .65; }
.pn-note { margin-left: auto; font-size: 11px; font-weight: 600; color: #7f8bab; white-space: nowrap; }
.lab-short { display: none; }
/* allemand et espagnol : le libellé long ne tient pas sur téléphone, le court prend le relais plus tôt */
@media (max-width: 520px) { html:lang(de) .lab-long, html:lang(es) .lab-long { display: none; } html:lang(de) .lab-short, html:lang(es) .lab-short { display: inline; } }
.pn-head > .kb { margin-left: auto; }

/* mise : dernière mise d'un geste, gain en direct, carrousel aux couleurs des ballons */
.same { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 12px; font-size: 11px; font-weight: 700; color: #dfe5f3; background: rgba(255,255,255,.07); border: 1px solid color-mix(in srgb, var(--c, #ff8a1f) 70%, transparent); white-space: nowrap; transition: background .12s; }
.same svg { width: 13px; height: 13px; color: var(--c, #ff8a1f); }
.same b { font: 800 12px/1 var(--disp); color: #fff; font-variant-numeric: tabular-nums; }
.same:hover { background: rgba(255,255,255,.14); }
.pot { margin-left: auto; display: flex; align-items: baseline; gap: 7px; min-width: 0; white-space: nowrap; }
.pot small { font-size: 11px; font-weight: 600; color: var(--lab); overflow: hidden; text-overflow: ellipsis; }
.pot b { min-width: 3.3ch; text-align: right; font: 800 19px/1 var(--disp); color: var(--cream); font-variant-numeric: tabular-nums; }
.pot em { min-width: 5.6ch; font: 800 12px/1 var(--disp); font-style: normal; color: #7f8bab; font-variant-numeric: tabular-nums; }
.pot.aim em { color: #ff7cc0; }
.pot.live b { color: #ffd45e; }
.pot.live em { color: #fff; }
.pot.won b { color: var(--ok); }
.pot.lost b { color: var(--bad); }
.carousel { display: flex; align-items: center; gap: 6px; transition: opacity .2s; }
.panel.locked .carousel { opacity: .5; }
.car-arrow { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #2a3659, #141c33); border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 3px 8px rgba(0,0,0,.3); transition: transform .1s, border-color .12s; }
.car-arrow svg { width: 20px; height: 20px; }
.car-arrow:hover:not(:disabled) { border-color: var(--brass); }
.car-arrow:active:not(:disabled) { transform: scale(.92); }
.car-arrow:disabled { opacity: .4; }
.car-items { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; }
.car-item { flex: 1 1 0; min-width: 0; max-width: 96px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 12px; color: #c5cde1; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.06); transition: background .15s, color .15s, border-color .15s; }
.car-item b { font: 700 14px/1 var(--disp); font-variant-numeric: tabular-nums; }
.car-item.far { flex: .78 1 0; opacity: .6; }
.car-item.far b { font-size: 12.5px; }
.car-item.cur { flex: 1.55 1 0; max-width: 140px; height: 52px; color: #fff; background: #131b30; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, #111a2e), #0b1120); border-color: var(--c); box-shadow: 0 6px 16px rgba(0,0,0,.35), 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.16); animation: curIn .22s cubic-bezier(.2,.9,.25,1.3); }
.car-item.cur b { font-size: 22px; font-weight: 800; }
.car-item.cur .bal { width: 15px; height: 18px; }
.car-item.poor b { opacity: .45; }
.car-item:hover:not(:disabled):not(.cur) { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.car-item:disabled { cursor: default; }
@keyframes curIn { from { transform: scale(.9); } to { transform: none; } }

/* encaissement automatique : interrupteur, valeur avec pas, cibles rapides */
.auto-switch { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.panel .switch { width: 42px; height: 24px; }
.panel .switch .slider { background: #2a3350; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; }
.panel .switch .slider::before { width: 18px; height: 18px; left: 2px; top: 2px; background: linear-gradient(180deg, #fff, #cdd5e6); box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.panel .switch input:checked + .slider { background: linear-gradient(180deg, #ff5cae, #df1479); border-color: rgba(255,255,255,.4); }
.panel .switch input:checked + .slider::before { transform: translateX(18px); }
.panel .switch input:focus-visible + .slider { outline: 2px solid #fff; outline-offset: 2px; }
.pn-cash.on .auto-switch { color: #fff; }
.cash-row, .play-row, .cash-step { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cash-step { flex: 0 0 auto; }
.stp { flex: 0 0 auto; width: 42px; height: 44px; border-radius: 12px; font: 800 22px/1 var(--disp); color: #fff; background: linear-gradient(180deg, #2a3659, #141c33); border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); transition: transform .1s, border-color .12s; }
.stp:hover:not(:disabled) { border-color: var(--brass); }
.stp:active:not(:disabled) { transform: scale(.92); }
.stp:disabled { opacity: .35; }
.auto-input { flex: 0 0 96px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 2px; border-radius: 12px; background: #060a14; border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 2px 6px rgba(0,0,0,.7); }
.auto-input input { width: 58px; min-width: 0; padding: 0; background: transparent; border: 0; outline: none; text-align: right; font: 800 19px/1 var(--disp); color: #7f8bab; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.auto-input b { font: 800 14px/1 var(--disp); color: #7f8bab; }
.pn-cash.on .auto-input { border-color: rgba(255,92,174,.75); }
.pn-cash.on .auto-input input { color: var(--cream); }
.pn-cash.on .auto-input b { color: var(--pump); }
.auto-input:focus-within { border-color: #fff; }
.presets { flex: 1; display: flex; justify-content: flex-end; gap: 4px; min-width: 0; }
.presets button, .rounds button { height: 44px; border-radius: 12px; font: 800 13px/1 var(--disp); color: #dfe5f3; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); transition: transform .1s, border-color .12s, background .12s; font-variant-numeric: tabular-nums; }
.presets button { flex: 1 1 0; max-width: 58px; min-width: 0; padding: 0 4px; }
.presets button:hover:not(:disabled), .rounds button:hover:not(:disabled) { border-color: var(--brass); background: rgba(255,255,255,.1); }
.presets button:active:not(:disabled), .rounds button:active:not(:disabled) { transform: scale(.94); }
.presets button.active { color: #fff; background: linear-gradient(180deg, #ff5cae, #df1479); border-color: rgba(255,255,255,.45); }
.presets button:disabled, .rounds button:disabled { opacity: .4; }
.pn-cash.locked .auto-input, .pn-cash.locked .auto-switch { opacity: .6; }

/* auto play : nombre de manches, ou arrêt avec l'avancement */
.rounds { flex: 1; display: flex; gap: 4px; min-width: 0; }
.rounds button { flex: 1 1 0; min-width: 0; font-size: 14px; }
.auto-stop { position: relative; flex: 1; height: 44px; overflow: hidden; border-radius: 12px; font: 900 14px/1 var(--disp); letter-spacing: 1px; color: #fff; background: linear-gradient(180deg, #ff5574, #c90b34); border: 1px solid rgba(255,255,255,.4); box-shadow: 0 6px 16px rgba(201,11,52,.35); }
.auto-stop i { position: absolute; inset: 0; background: rgba(60,0,16,.35); transform-origin: 0 50%; transform: scaleX(0); transition: transform .3s ease-out; }
.auto-stop span { position: relative; }
.auto-stop:disabled { opacity: .7; }
.pn-play.on { border-color: rgba(255,107,131,.5); }

/* ========= fenêtres ========= */
.fair-round { background: var(--panel-2); border-radius: 8px; margin-bottom: 6px; padding: 6px 10px; }
.fair-round summary { cursor: pointer; font-weight: 600; color: #fff; }
.fair-round .kv { margin-top: 8px; }
.kv .v.big.pos { color: #9df0b6; }
.kv .v.big.neg { color: #ff8a9c; }
.verify { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }
.verify i { flex: 0 0 auto; position: relative; width: 20px; height: 20px; border-radius: 50%; }
.verify.ok { color: #c9f7d8; background: rgba(40,160,90,.16); border: 1px solid rgba(75,224,138,.45); }
.verify.ok i { background: #22a857; }
.verify.ok i::after { content: ""; position: absolute; left: 6.5px; top: 3.5px; width: 5px; height: 9px; border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(42deg); }
.verify.ko { color: #ffd0d8; background: rgba(209,18,58,.16); border: 1px solid rgba(255,107,131,.5); }
.verify.ko i { background: #d1123a; }
.verify.ko i::before, .verify.ko i::after { content: ""; position: absolute; left: 9px; top: 4px; width: 2.5px; height: 12px; background: #fff; transform: rotate(45deg); }
.verify.ko i::after { transform: rotate(-45deg); }
/* tutoriel */
.hw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hw-step { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); }
.hw-step b { color: #fff; font-size: 13.5px; }
.hw-step span { font-size: 12px; line-height: 1.4; color: #b9bdc6; }
.hw-art { position: relative; border-radius: 9px; overflow: hidden; background: linear-gradient(180deg, #2a97f5, #a6e0ff 70%, #8fd35e 70%, #5db344); }
.hw-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.hw-art i { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 12px/1 var(--disp); font-style: normal; color: #fff; background: rgba(8,13,27,.8); border: 1px solid rgba(255,255,255,.35); }
.hw-b { transform-box: fill-box; transform-origin: 50% 60%; animation: hwPick 2.4s ease-in-out infinite; }
.hw-b1 { animation-delay: .6s; } .hw-b2 { animation-delay: 1.2s; } .hw-b3 { animation-delay: 1.8s; }
@keyframes hwPick { 0%, 30%, 100% { scale: 1; } 12% { scale: 1.25; } }
.hw-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: hwGrow 2.6s ease-in-out infinite; }
@keyframes hwGrow { 0% { scale: .55; } 70%, 100% { scale: 1.2; } }
.hw-pl { animation: hwPl .52s ease-in-out infinite alternate; }
@keyframes hwPl { to { translate: 0 6px; } }
.hw-nd { transform-box: fill-box; transform-origin: 50% 100%; animation: hwNd 2.6s ease-in-out infinite; }
@keyframes hwNd { 0% { rotate: -110deg; } 70%, 100% { rotate: 80deg; } }
.hw-fly { animation: hwFly 2.6s ease-in infinite; }
@keyframes hwFly { 0%, 25% { translate: 0 0; opacity: 1; } 85%, 100% { translate: -8px -64px; opacity: 0; } }
.hw-coin { transform-box: fill-box; transform-origin: center; animation: hwCoin 2.6s ease-out infinite; }
@keyframes hwCoin { 0%, 28% { scale: 0; opacity: 0; } 40% { scale: 1.25; opacity: 1; } 50%, 85% { scale: 1; opacity: 1; } 100% { scale: 1; opacity: 0; } }
.hw-keys h4 { margin-top: 16px; }
.hw-keylist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.hw-keylist div { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #b9bdc6; }
.hw-keylist .kb { flex: 0 0 auto; min-width: 54px; font-size: 11px; padding: 3px 6px; }
@media (hover: none), (pointer: coarse) { .hw-keys { display: none; } }
/* statistiques */
.st-record { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 4px; border-radius: 12px; background: linear-gradient(90deg, rgba(231,183,88,.22), rgba(231,183,88,.05)); border: 1px solid rgba(231,183,88,.55); }
.st-record i { flex: 0 0 auto; width: 30px; height: 30px; background: linear-gradient(180deg, #fff3b8, #e0a100); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.st-record small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #e8cf96; margin-bottom: 3px; }
.st-record b { font: 800 22px/1 var(--disp); color: #fff; font-variant-numeric: tabular-nums; }
.st-record.none b { font: 600 13px/1.2 var(--font); color: #b9bdc6; }
.st-record.none { border-color: var(--border); background: var(--panel-2); }
.st-record.none i { background: #4d4f54; }
.bl-stats .stat .v { font-family: var(--disp); font-variant-numeric: tabular-nums; }
.st-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px 10px 8px; border-radius: 10px; background: var(--panel-2); }
.st-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.st-bar i { display: block; width: 100%; max-width: 46px; height: 62px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #ff7cc0, #df1479); transform-origin: 50% 100%; }
.st-bar:nth-child(1) i { background: linear-gradient(180deg, #ff8a9c, #d1123a); }
.st-bar:nth-child(2) i { background: linear-gradient(180deg, #ffb27a, #e0661a); }
.st-bar:nth-child(3) i { background: linear-gradient(180deg, #ffe08a, #e0a100); }
.st-bar:nth-child(4) i { background: linear-gradient(180deg, #b8f08a, #4fae2a); }
.st-bar:nth-child(5) i { background: linear-gradient(180deg, #8af0c0, #189a62); }
.st-bar b { font: 800 13px/1 var(--disp); color: #fff; }
.st-bar span { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* les raccourcis clavier ne s'affichent que là où il y a un clavier */
@media (hover: none), (pointer: coarse), (max-width: 900px) { .panel .kb, .pump-cap .kb { display: none; } }

/* ========= tablette et fenêtres étroites : la mise sur toute la largeur, encaissement automatique et auto play dessous ========= */
@media (min-width: 641px) and (max-width: 1180px) and (min-height: 521px) {
  .panel { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); }
  .pn-bet { grid-column: 1 / -1; }
  .auto-input { flex-basis: 84px; }
  .hud { top: 98px; bottom: auto; }
  .stage .toasts { top: 148px; }
  .pn-note { overflow: hidden; text-overflow: ellipsis; }
}

/* ========= téléphone portrait ========= */
@media (max-width: 640px) {
  :root { --pm: clamp(98px, 15.2vh, 128px); }
  @supports (height: 1dvh) { :root { --pm: clamp(98px, 15.2dvh, 128px); } }
  .topline { top: 8px; left: 8px; right: 8px; }
  .trend, .session { height: 32px; border-radius: 11px; }
  .trend { max-width: 100%; padding: 0 5px 0 8px; gap: 6px; }
  .trend-lab { display: none; }
  .trend-spark { width: 48px; }
  .hp { height: 22px; padding: 0 7px; font-size: 11px; line-height: 22px; }
  .ss { padding: 0 8px; gap: 5px; }
  .ss small { display: none; }
  .ss b { font-size: 12px; }
  .ss-ico { width: 14px; height: 14px; }
  .stage .toasts { top: 130px; }
  .side-tabs { top: 43%; }
  .side-tab { width: 36px; padding: 10px 0; }
  .drawer { left: 44px; right: 8px; width: auto; max-width: none; top: 8px; bottom: calc(var(--pm) * 1.18 + 34px); }
  .dr-head.top, .dr-row.top { grid-template-columns: 22px minmax(0, 1fr) 58px 50px 64px; }
  .dr-head.my, .dr-row.my { grid-template-columns: minmax(0, 1fr) 58px 50px 64px; }
  .dr-row { padding: 5px 8px; gap: 3px; }
  .dr-row .u { gap: 6px; }
  .dr-row .u img { width: 22px; height: 22px; }
  .dr-row .dt, .dr-row .st { font-size: 10px; }
  .dr-row .w { font-size: 12px; }
  .hud { top: 86px; bottom: auto; max-width: calc(100% - 60px); min-height: 36px; padding: 5px 12px 5px 10px; gap: 8px; }
  #hudText { font-size: 12.5px; }
  #hudText small { font-size: 10px; }
  .hud-arrows b { width: 7px; height: 7px; }
  .win-fx { left: 47%; top: 40%; }
  .win-fx b { font-size: 50px; -webkit-text-stroke-width: 6px; }
  .win-fx.lose b { font-size: 68px; -webkit-text-stroke-width: 7px; }
  .stamp { font-size: 30px; -webkit-text-stroke-width: 4px; }
  .stamp.t2 { font-size: 34px; } .stamp.t3 { font-size: 38px; } .stamp.t4 { font-size: 42px; }
  .stamp.rec { font-size: 13px; padding: 8px 13px; }
  .stamp.apex { font-size: 16px; padding: 10px 16px; }
  #pumpSlotStage { right: 8px; bottom: 10px; }
  .pump-cap { padding: 5px 10px; }
  .pump-cap b { font-size: 11px; letter-spacing: 1.3px; }
  .panel { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .pn { padding: 6px 8px 8px; gap: 5px; border-radius: 14px; }
  .pn-bet .pn-head { gap: 6px; }
  .same span { display: none; }
  .pot small { font-size: 10.5px; }
  .pot b { font-size: 17px; }
  .pot em { min-width: 0; }
  .carousel { gap: 4px; }
  .car-arrow { width: 44px; height: 44px; }
  .car-items { gap: 3px; }
  .car-item { height: 44px; gap: 5px; }
  .car-item b { font-size: 13px; }
  .car-item.far b { font-size: 11.5px; }
  .car-item.far .bal { display: none; }
  .car-item.cur { height: 50px; }
  .car-item.cur b { font-size: 19px; }
  /* encaissement automatique : interrupteur et valeur sur une ligne, cibles rapides dessous */
  .pn-cash { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 6px; }
  .pn-cash .cash-row { display: contents; }
  .pn-cash .pn-head { grid-column: 1; grid-row: 1; }
  .stp { width: 44px; }
  .auto-input { flex-basis: 88px; width: 88px; }
  .auto-input input { width: 54px; font-size: 18px; }
  .pn-cash .cash-step { grid-column: 2; grid-row: 1; }
  .presets { grid-column: 1 / -1; grid-row: 2; justify-content: stretch; }
  .presets button { max-width: none; height: 36px; }
  .pn-play { flex-direction: row; align-items: center; gap: 10px; }
  .pn-play .pn-head { flex: 0 0 auto; }
  .pn-play .pn-note { display: none; }
  .pn-play .play-row { flex: 1; }
  .rounds button, .auto-stop { height: 40px; }
  .hw-steps { grid-template-columns: 1fr; }
  .hw-step { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 10px; align-items: start; }
  .hw-step .hw-art { grid-row: 1 / span 2; }
  .hw-step b { align-self: end; }
}
/* petit téléphone : la scène garde la place (les chiffres de session restent dans Mes mises et Statistiques) */
@media (max-width: 640px) and (max-height: 720px) {
  .presets, .session { display: none; }
  .hud { top: 46px; }
  .stage .toasts { top: 90px; }
  .side-tabs { top: 56%; gap: 6px; }
  .side-tab { width: 32px; padding: 7px 0 8px; gap: 5px; }
  .side-tab i { width: 15px; height: 15px; }
  .side-tab span { font-size: 9px; letter-spacing: 1px; }
}
@media (max-width: 360px) { .pn-lab, .auto-switch { letter-spacing: .6px; font-size: 10px; } .car-item.far { display: none; } }

/* ========= téléphone paysage : scène à gauche, pompe et pupitre dans la colonne de droite ========= */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --topbar-h: 40px; --pm: clamp(82px, 27.5vh, 106px); }
  @supports (height: 1dvh) { :root { --pm: clamp(82px, 27.5dvh, 106px); } }
  .topbar { padding: 0 8px; }
  .logo { font-size: 16px; }
  .balance { font-size: 13px; }
  .icon-btn, .friends-btn, .avatar-btn { width: 30px; height: 30px; }
  .bl { flex-direction: row; }
  .stage { flex: 1; }
  .topline { top: 6px; left: 8px; right: 8px; flex-direction: row; justify-content: space-between; gap: 8px; }
  .trend, .session { height: 28px; border-radius: 10px; }
  .trend { max-width: 56%; padding: 0 4px 0 7px; gap: 6px; }
  .trend-lab { display: none; }
  .trend-spark { width: 46px; height: 18px; }
  .hp { height: 20px; padding: 0 6px; font-size: 10.5px; line-height: 20px; border-radius: 7px; }
  .ss { padding: 0 7px; gap: 4px; }
  .ss small { display: none; }
  .ss b { font-size: 11.5px; }
  .ss-ico { width: 13px; height: 13px; }
  .stage .toasts { top: 40px; }
  .side-tabs { gap: 5px; }
  .side-tab { width: 30px; padding: 7px 0 8px; gap: 5px; border-radius: 0 11px 11px 0; }
  .side-tab i { width: 14px; height: 14px; }
  .side-tab span { font-size: 8.5px; letter-spacing: 1px; }
  .drawer { left: 38px; top: 6px; bottom: 6px; width: 400px; max-width: calc(100% - 46px); border-radius: 13px; }
  .drawer-head { padding: 4px 6px 4px 12px; }
  .dr-head.top, .dr-row.top { grid-template-columns: 22px minmax(0, 1fr) 62px 54px 70px; }
  .dr-head.my, .dr-row.my { grid-template-columns: minmax(0, 1fr) 62px 54px 70px; }
  .dr-row { min-height: 38px; padding: 3px 8px; margin-bottom: 3px; gap: 3px; }
  .dr-row .u { gap: 6px; }
  .dr-row .u img { width: 22px; height: 22px; }
  .dr-row .dt, .dr-row .st { font-size: 10px; }
  .dr-sum > div { padding: 5px 8px; }
  .dr-sum b { font-size: 14px; }
  .hud { left: auto; right: 8px; bottom: 8px; transform: none; max-width: 58%; min-height: 32px; padding: 4px 12px 4px 10px; gap: 8px; border-radius: 16px; }
  #hudText { font-size: 12px; }
  #hudText small { font-size: 9.5px; }
  .win-fx { top: 44%; gap: 4px; }
  .win-fx b { font-size: 44px; -webkit-text-stroke-width: 5px; }
  .win-fx.lose b { font-size: 58px; -webkit-text-stroke-width: 6px; }
  .win-fx small { font-size: 10.5px; padding: 4px 10px; }
  .stamp { font-size: 28px; -webkit-text-stroke-width: 4px; }
  .stamp.t2 { font-size: 31px; } .stamp.t3 { font-size: 34px; } .stamp.t4 { font-size: 38px; }
  .stamp.rec { font-size: 12px; padding: 7px 12px; }
  .stamp.apex { font-size: 15px; padding: 9px 14px; }
  #pumpSlotStage { display: none; }
  .panel { flex: 0 0 264px; width: 264px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px)); border-top: 0; border-left: 1px solid #000; overflow: hidden; }
  .panel::before { left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, rgba(231,183,88,0), rgba(231,183,88,.75) 18%, rgba(255,243,196,.95) 50%, rgba(231,183,88,.75) 82%, rgba(231,183,88,0)); }
  .panel .pump-slot { display: flex; justify-content: center; }
  .pump-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
  .pump-cap { position: relative; left: auto; bottom: auto; flex-direction: column; gap: 4px; padding: 7px 9px; border-radius: 12px; transform: none; animation: none; order: -1; max-width: 98px; white-space: normal; text-align: center; }
  .pump-cap b { font-size: 10px; letter-spacing: 1px; line-height: 1.25; }
  .pump-cap::after { left: 100%; top: 50%; width: 7px; height: 12px; margin: -6px 0 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
  .pn { padding: 4px 8px 6px; gap: 4px; border-radius: 12px; }
  .pn-head { min-height: 18px; gap: 6px; }
  .pn-lab, .auto-switch { font-size: 9.5px; letter-spacing: .9px; }
  .same { height: 20px; padding: 0 7px 0 5px; }
  .same span { display: none; }
  .pot small { display: none; }
  .pot b { font-size: 15px; }
  .pot em { min-width: 0; font-size: 11px; }
  .carousel { gap: 3px; }
  .car-arrow { width: 34px; height: 36px; border-radius: 12px; }
  .car-arrow svg { width: 16px; height: 16px; }
  .car-item.far { display: none; }
  .car-item { height: 34px; gap: 5px; }
  .car-item b { font-size: 12.5px; }
  .car-item.cur { height: 38px; }
  .car-item.cur b { font-size: 17px; }
  .car-item.cur .bal { width: 12px; height: 14px; }
  .pn-cash { flex-direction: row; align-items: center; gap: 6px; }
  .pn-cash .pn-head { flex: 1; }
  .lab-long { display: none; }
  .lab-short { display: inline; }
  .panel .switch { width: 38px; height: 22px; }
  .panel .switch .slider::before { width: 16px; height: 16px; }
  .panel .switch input:checked + .slider::before { transform: translateX(16px); }
  .pn-cash .auto-switch { gap: 7px; letter-spacing: .4px; }
  .stp { width: 30px; height: 34px; font-size: 18px; border-radius: 10px; }
  .auto-input { flex-basis: 62px; height: 34px; border-radius: 10px; }
  .auto-input input { width: 40px; font-size: 15px; }
  .auto-input b { font-size: 12px; }
  .cash-row, .cash-step { gap: 4px; }
  .presets { display: none; }
  .pn-play { flex-direction: row; align-items: center; gap: 8px; }
  .pn-play .pn-head { flex: 0 0 auto; }
  .pn-play .pn-note { display: none; }
  .pn-play .play-row { flex: 1; }
  .rounds { gap: 3px; }
  .rounds button, .auto-stop { height: 32px; border-radius: 10px; font-size: 12px; }
  .hw-steps { gap: 8px; }
  .hw-step { padding: 8px; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 740px) {
  .hud { max-width: 76%; }
  #hudText small { display: none; }
  .panel { flex-basis: 252px; width: 252px; }
  .pn-cash .auto-switch { letter-spacing: 0; }
}

/* ========= animations réduites ========= */
@media (prefers-reduced-motion: reduce) {
  .pmp::before { animation: none; opacity: .8; transform: scale(1.06); }
  .pump-cap, .hud-arrows b, .hud[data-state="pumping"] .hud-dot, .pmp.hiss .pm-puff, .pmp.ping .pm-svg, .pmp.deny, .hp:first-child, .car-item.cur, .drawer,
  .hw-b, .hw-grow, .hw-pl, .hw-nd, .hw-fly, .hw-coin { animation: none; }
  .hud-arrows b { opacity: .8; }
  .hw-coin { scale: 1; opacity: 1; }
  .stamp { animation: stampCalm 1.6s linear forwards; }
  .win-fx { animation: none; }
  .pm-svg { transition: none; }
  @keyframes stampCalm { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}
