/* Orbit : la scène est le pare-brise du vaisseau, les commandes sont son tableau de bord (métal brossé, puits de verre,
   voyants, afficheurs). Trois mises en page : ordinateur (trois baies), téléphone en portrait (une colonne, onglets),
   téléphone en paysage (tableau de bord en colonne à droite). */
:root {
  --bg: #05070f; --panel: #141a26; --panel-2: #0d121c; --panel-3: #090d15; --border: #263146; --border-light: #3d4c69;
  --muted: #92a3c0; --accent: #1aa7c9; --text: #eef4ff; --green: #22c98a;
  --cy: #5fe1ff; --am: #ffb428; --gr: #36e38f; --rd: #ff4d5e; --line: rgba(130,170,230,.17);
  --font: Poppins, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --num: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
}
body { font-family: var(--font); background: #05070f; overflow: hidden; }
.sm { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #05070f; color: var(--text); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; display: block; }
kbd { display: none; font: 700 10px/1 var(--font); letter-spacing: .6px; padding: 4px 6px 3px; border-radius: 5px; color: #dbe6fb; background: linear-gradient(180deg, #333c4f, #1c2230); border: 1px solid #55627c; border-bottom-width: 2px; }

/* ================= scène ================= */
.sm-stage { position: relative; min-height: 0; background: #03040c; --px: 50%; --py: 36%; --pr: 100px; --ax: 30%; --ay: 60%; --ah: 150px; }
.sm-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* pare-brise : reflet du verre, ombre du tableau de bord, équerres */
.sm-frame { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(118deg, rgba(190,220,255,.06) 0%, rgba(190,220,255,0) 24%), linear-gradient(0deg, rgba(2,3,10,.7), rgba(2,3,10,0) 70px); box-shadow: inset 0 0 0 1px rgba(150,190,255,.07); }
.sm-frame i { position: absolute; bottom: 40px; width: 22px; height: 22px; border: 2px solid rgba(150,200,255,.34); border-top: 0; }
.sm-frame i:first-child { left: 10px; border-right: 0; border-radius: 0 0 0 6px; }
.sm-frame i:last-child { right: 10px; border-left: 0; border-radius: 0 0 6px 0; }

/* haut */
.sm-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 14px 18px; pointer-events: none; z-index: 12; background: linear-gradient(180deg, rgba(2,3,10,.72), rgba(2,3,10,0)); }
.sm-top > * { pointer-events: auto; }
.sm-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sm-logo { color: #fff; display: flex; flex-direction: column; gap: 4px; }
.sm-word { height: 24px; width: auto; display: block; overflow: visible; filter: drop-shadow(0 0 8px rgba(120,200,255,.55)); }
.sm-word .orb { stroke: var(--cy); opacity: .9; }
.sm-word .moon { fill: var(--am); transform-origin: .3px .5px; animation: smMoon 9s linear infinite; }
@keyframes smMoon { to { transform: rotate(360deg); } }
.sm-logo .online-pill { display: flex; width: max-content; margin: 0; background: rgba(4,8,20,.5); border-color: var(--line); color: #b7c6e2; }
.sm-title { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 13px; }
.sm-title .pl { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-variant-numeric: tabular-nums; }
.sm-title .pl .ic { width: 14px; height: 14px; color: var(--cy); }
.sm-title small { font-weight: 500; font-size: 11px; color: var(--muted); }
.sm-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sm-meta { font-size: 10px; color: var(--muted); letter-spacing: 1.2px; }
.sm-icons { display: flex; gap: 8px; align-items: center; position: relative; }
.sm-icon { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(180deg, rgba(40,52,76,.85), rgba(14,20,34,.85)); border: 1px solid rgba(150,190,255,.26); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 8px rgba(0,0,0,.4); display: inline-flex; align-items: center; justify-content: center; color: #e6efff; text-decoration: none; transition: border-color .15s, color .15s; }
.sm-icon:hover { border-color: var(--cy); color: #fff; }
.sm-icon img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
#muteBtn .off, #muteBtn.muted .on { display: none; }
#muteBtn.muted .off { display: block; }
#muteBtn.muted { color: #ff9aa5; }
.sm-hub { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px; border-radius: 18px; background: linear-gradient(180deg, rgba(40,52,76,.85), rgba(14,20,34,.85)); border: 1px solid rgba(150,190,255,.26); color: #fff; text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sm-hub img { height: 18px; }
.sm-hub:hover { border-color: var(--cy); }

/* affichage tête haute */
.sm-msg, .sm-zone { position: absolute; z-index: 3; left: var(--px); top: calc(var(--py) + var(--pr) * 1.74); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; pointer-events: none; white-space: nowrap; text-shadow: 0 2px 10px rgba(0,0,10,.9); }
.sm-msg b { font-weight: 800; font-size: 19px; letter-spacing: 2.4px; color: #fff; }
.sm-msg span { font: 600 12px/1.2 var(--num); letter-spacing: 1px; color: var(--cy); }
.sm-stage:not([data-phase="betting"]) .sm-msg { display: none; }
.sm-zone { opacity: 0; }
.sm-zone small { font: 700 10px/1 var(--num); letter-spacing: 2.4px; color: var(--cy); padding: 4px 8px 3px; border: 1px solid rgba(95,225,255,.4); border-radius: 4px; background: rgba(4,10,24,.55); }
.sm-zone b { font-weight: 800; font-size: 18px; letter-spacing: 1.6px; text-transform: uppercase; color: #fff; }
.sm-zone.show { animation: smZone 3.2s ease-out both; }
@keyframes smZone { 0% { opacity: 0; transform: translate(-50%, 10px); } 9% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
.sm-timer { display: none; }

/* fin de manche */
.sm-end { position: absolute; z-index: 3; left: var(--px); top: calc(var(--py) + var(--pr) * 1.5); transform: translateX(-50%); min-width: 230px; max-width: calc(100% - 24px); padding: 10px 18px 11px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; pointer-events: none; background: linear-gradient(180deg, rgba(30,8,18,.88), rgba(10,6,18,.9)); border: 1px solid rgba(255,90,110,.5); box-shadow: 0 14px 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); }
.sm-end.in { animation: smEnd .42s cubic-bezier(.2,1.4,.4,1) .45s both; }
@keyframes smEnd { from { opacity: 0; transform: translate(-50%, 12px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.sm-end small { font: 700 10px/1 var(--num); letter-spacing: 3px; color: #ff8091; }
.sm-end b { font-weight: 800; font-size: 20px; letter-spacing: .4px; color: #fff; font-variant-numeric: tabular-nums; }
.sm-end span { font-size: 12.5px; font-weight: 600; color: #c8d3ea; white-space: normal; }
.sm-end[data-result="won"] span { color: var(--gr); }
.sm-end[data-result="lost"] span { color: #ff97a3; }
.sm-end[data-result="half"] span { color: #ffd68a; }
.sm-end em { white-space: nowrap; font: 600 11px/1.2 var(--num); font-style: normal; letter-spacing: .6px; color: var(--muted); margin-top: 2px; }

.toasts { position: absolute; left: 0; right: 0; top: auto; bottom: 44px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 5; pointer-events: none; }
.sm-toast { max-width: calc(100% - 24px); background: rgba(6,12,26,.92); border: 1px solid rgba(150,190,255,.3); color: #fff; padding: 8px 16px; border-radius: 20px; font-weight: 600; font-size: 13px; text-align: center; box-shadow: 0 8px 22px rgba(0,0,0,.5); animation: toastIn .25s ease-out; }
.sm-toast.win { border-color: rgba(54,227,143,.7); color: #b9ffd9; }
.sm-toast.error { border-color: var(--rd); color: #ffb3bb; }
.sm-toast.info { border-color: rgba(95,225,255,.5); color: #cfeeff; }
.sm-toast.record { border-color: #ffd45e; color: #ffe9a8; background: linear-gradient(180deg, rgba(48,34,4,.95), rgba(20,14,3,.95)); }
.sm-toast.fade { animation: toastOut .3s ease-in forwards; }

/* sas : deux volets de métal qui se rejoignent entre deux manches */
.sm-shutter { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.sm-shutter i { position: absolute; left: 0; right: 0; height: 50.5%; transition: transform .42s cubic-bezier(.6,0,.3,1); will-change: transform;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, rgba(0,0,0,.05) 1px 3px), linear-gradient(180deg, #2a3242, #171c27 60%, #10141c); }
.sm-shutter i.a { top: 0; transform: translateY(-102%); border-bottom: 8px solid transparent; border-image: repeating-linear-gradient(-45deg, #ffb428 0 12px, #14181f 12px 24px) 8; }
.sm-shutter i.b { bottom: 0; transform: translateY(102%); border-top: 8px solid transparent; border-image: repeating-linear-gradient(-45deg, #ffb428 0 12px, #14181f 12px 24px) 8; }
.sm-shutter.closed i { transform: none; }
.sm-shutter span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 16px 7px; border-radius: 6px; font: 700 12px/1 var(--num); letter-spacing: 4px; white-space: nowrap; color: #ffcf6b; background: #0b0e14; border: 1px solid #5a4a22; opacity: 0; transition: opacity .12s; }
.sm-shutter.closed span { opacity: 1; transition: opacity .2s .3s; }

/* dernières manches : tendance en barres puis pastilles */
.sm-history { position: absolute; left: 10px; right: 10px; bottom: 7px; height: 26px; z-index: 4; display: flex; align-items: center; gap: 8px; }
.sm-trend { flex: 0 0 auto; width: 72px; height: 26px; padding: 3px 5px; border-radius: 7px; background: rgba(4,8,18,.72); border: 1px solid var(--line); }
.sm-trend svg, .trend-big { width: 100%; height: 100%; display: block; }
.sm-trend:hover { border-color: var(--cy); }
.sm-trend.empty { display: none; }
svg rect.lo { fill: #6b7da3; } svg rect.mid { fill: #46c7e8; } svg rect.hi { fill: #ffb428; } svg rect.top { fill: #ff6fc8; }
svg line.ref { stroke: rgba(255,255,255,.28); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.sm-pills { display: flex; gap: 5px; overflow: hidden; flex: 1; min-width: 0; align-items: center; -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
.sm-chip { flex: 0 0 auto; height: 22px; padding: 0 9px; border-radius: 11px; font: 700 11px/22px var(--num); color: #dfe9ff; background: rgba(8,14,30,.78); border: 1px solid rgba(110,130,170,.5); white-space: nowrap; }
.sm-chip.mid { color: #7fe3ff; border-color: rgba(70,199,232,.6); }
.sm-chip.hi { color: #ffd277; border-color: rgba(255,180,40,.7); background: rgba(40,24,2,.8); }
.sm-chip.top { color: #ffb1e3; border-color: rgba(255,111,200,.8); background: rgba(44,6,34,.82); }
.sm-chip.inplay { color: #1b1300; background: linear-gradient(180deg, #ffd45e, #ffb428); border-color: #ffe6a0; letter-spacing: .6px; }
button.sm-chip:hover { border-color: #fff; }
.sm-pills .sm-chip:first-child:not(.inplay) { box-shadow: 0 0 0 1px rgba(255,255,255,.35); }

/* ================= tableau de bord ================= */
.sm-console { position: relative; z-index: 10; display: grid; grid-template-columns: 338px minmax(0, 1fr) 346px; grid-template-areas: "head head stats" "auto center live"; gap: 8px 10px; padding: 0 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #4a5670;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 30px), repeating-linear-gradient(90deg, rgba(255,255,255,.016) 0 1px, rgba(0,0,0,.035) 1px 3px), linear-gradient(180deg, #1d2330, #10141c 60%, #0b0e14);
  box-shadow: 0 -14px 34px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.14); }
.sm-console::before { content: ""; position: absolute; left: 50%; top: -5px; width: 120px; height: 5px; transform: translateX(-50%); border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #5a6782, #343d50); }
.sm-head { grid-area: head; display: flex; align-items: center; gap: 14px; height: 40px; min-width: 0; }
.sm-balance { order: 9; margin-left: auto; display: flex; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: linear-gradient(180deg, #03050a, #0a0f18); border: 1px solid #2a3449; box-shadow: inset 0 2px 5px rgba(0,0,0,.8); }
.sm-balance > div { padding: 3px 12px 2px; display: flex; flex-direction: column; line-height: 1.15; }
.sm-balance > div + div { border-left: 1px solid #222b3d; }
.sm-balance small { font-size: 8.5px; color: var(--muted); font-weight: 700; letter-spacing: 1.3px; }
.sm-balance b { font: 700 14px/1.2 var(--num); color: #c9ffe2; white-space: nowrap; }
.sm-balance > div + div b { color: #ffd277; }
.sm-status { display: inline-flex; align-items: center; gap: 7px; font: 700 10.5px/1 var(--num); letter-spacing: 1.8px; color: #b9c8e2; white-space: nowrap; }
.lamp, .led { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: #2a3348; box-shadow: inset 0 1px 1px rgba(0,0,0,.6); }
.sm-status[data-phase="betting"] .lamp { background: var(--gr); box-shadow: 0 0 8px var(--gr); }
.sm-status[data-phase="flying"] .lamp { background: var(--am); box-shadow: 0 0 8px var(--am); }
.sm-status[data-phase="crashed"] .lamp { background: var(--rd); box-shadow: 0 0 8px var(--rd); }
.sm-status[data-phase="crashed"] { color: #ff97a3; }
.led.on { background: var(--gr); box-shadow: 0 0 7px var(--gr); }
.sm-seq { display: inline-flex; gap: 4px; }
.sm-seq i { width: 14px; height: 7px; border-radius: 2px; background: #1c2333; box-shadow: inset 0 1px 1px rgba(0,0,0,.7); }
.sm-seq i.on { background: var(--cy); box-shadow: 0 0 7px rgba(95,225,255,.8); }
.sm-console[data-phase="flying"] .sm-seq i.on, .sm-console[data-phase="crashed"] .sm-seq i.on { background: var(--am); box-shadow: 0 0 7px rgba(255,180,40,.8); }
.sm-head.pulse .sm-seq { animation: smPop .5s ease-out; }
.sm-caution { display: inline-flex; align-items: center; gap: 5px; font: 700 9.5px/1 var(--num); letter-spacing: 1.6px; color: #4a566e; }
.sm-caution i { width: 9px; height: 9px; border-radius: 2px; background: #2a3348; transform: rotate(45deg); }
.sm-caution.on { color: #ffb37a; }
.sm-caution.on i { background: #ff7a2f; box-shadow: 0 0 9px #ff7a2f; animation: smBlink 1s steps(2, jump-none) infinite; }
@keyframes smBlink { from { opacity: 1; } to { opacity: .25; } }
@keyframes smPop { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }
.sm-keysbtn { display: none; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.sm-keysbtn span { margin-right: 6px; }
.sm-keysbtn:hover { color: #fff; }
.sm-tabs { display: none; }

/* baies : puits de verre sombre sertis dans le métal */
.sm-bay { position: relative; min-width: 0; border-radius: 12px; padding: 9px 10px 10px; background: linear-gradient(180deg, rgba(5,9,18,.88), rgba(9,14,26,.92)); border: 1px solid rgba(120,160,225,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 26px rgba(40,90,170,.07), 0 1px 0 rgba(255,255,255,.07); }
.sm-cap { display: flex; align-items: center; gap: 6px; margin: 0; font: 700 9.5px/1 var(--num); letter-spacing: 2px; color: var(--muted); }
.sm-auto { grid-area: auto; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; }
.sm-center { grid-area: center; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "stake stake tools" "thrust manifest manifest" "actions actions actions"; gap: 8px 12px; align-items: center; }
.sm-live { grid-area: live; display: flex; flex-direction: column; gap: 4px; min-height: 0; height: 190px; padding-bottom: 0; }
.sm-stats { grid-area: stats; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 9px; }
.sm-stats .sm-cap { display: none; }

/* touches : capuchon en relief, enfoncement à l'appui */
.sm-key { height: 42px; min-width: 42px; padding: 0 10px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 13px; color: #e8f0ff; white-space: nowrap; background: linear-gradient(180deg, #364053, #222938); border: 1px solid #4d5a74; border-bottom-color: #141922; box-shadow: 0 2px 0 #0a0d13, inset 0 1px 0 rgba(255,255,255,.15); transition: transform .06s, box-shadow .06s, filter .15s; }
.sm-key:hover { filter: brightness(1.14); }
.sm-key:active { transform: translateY(2px); box-shadow: 0 0 0 #0a0d13, inset 0 1px 0 rgba(255,255,255,.1); }
.sm-key.dim { opacity: .42; }
.sm-key.tool { padding: 0; color: #c2d0ea; }
.sm-key.rebet { padding: 0 10px 0 8px; color: #ffd277; }
.sm-key.rebet span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.sm-key.rebet small { font-size: 8.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.sm-key.rebet b { font: 700 12px/1.2 var(--num); }

/* ---- mise : un instrument de bord, pas une table de casino ----
   afficheur holographique serti entre deux molettes, barrette ½ / 2x / MAX, et jauge de poussée à manette. */
.sm-stake { grid-area: stake; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sm-dial, .sm-ops { display: flex; align-items: stretch; height: 46px; padding: 3px; gap: 3px; border-radius: 13px; flex: 0 0 auto;
  background: linear-gradient(180deg, #2a3243, #151a25 55%, #10141d); border: 1px solid #07090e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), inset 0 -1px 0 rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.06), 0 4px 10px rgba(0,0,0,.35); }
.sm-nudge, .sm-op { position: relative; display: inline-flex; align-items: center; justify-content: center; color: #e8f0ff;
  background: linear-gradient(180deg, #3d475c, #262d3c 55%, #1e2431); border: 1px solid #4f5d79; border-bottom-color: #121620;
  box-shadow: 0 2px 0 #090b11, inset 0 1px 0 rgba(255,255,255,.18); transition: transform .07s, box-shadow .07s, filter .15s, opacity .15s; }
.sm-nudge:hover, .sm-op:hover { filter: brightness(1.15); }
.sm-nudge:active, .sm-op:active { transform: translateY(2px); box-shadow: 0 0 0 #090b11, inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 12px rgba(95,225,255,.18); }
.sm-nudge { width: 38px; border-radius: 10px 5px 5px 10px; }
.sm-nudge + .sm-readout + .sm-nudge { border-radius: 5px 10px 10px 5px; }
.sm-nudge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(95,225,255,.55)); }
.sm-nudge:hover svg { color: #bff3ff; }
.sm-nudge.dim, .sm-op.dim { opacity: .4; }
.sm-ops { gap: 2px; }
.sm-op { min-width: 44px; padding: 0 10px; border-radius: 4px; font: 800 13px/1 var(--num); letter-spacing: .4px; color: #9ff0ff; text-shadow: 0 0 8px rgba(95,225,255,.5); }
.sm-op:first-child { border-radius: 10px 4px 4px 10px; }
.sm-op:last-child { border-radius: 4px 10px 10px 4px; }
.sm-op#betHalf { font: 700 17px/1 var(--font); }
.sm-op.max { color: #ffd88a; text-shadow: 0 0 8px rgba(255,180,40,.5); }
/* voyant de chaque touche : allumé tant que la touche peut agir */
.sm-op i { position: absolute; top: 4px; left: 50%; width: 10px; height: 2px; margin-left: -5px; border-radius: 1px; background: var(--cy); box-shadow: 0 0 5px var(--cy); opacity: .85; }
.sm-op.max i { background: var(--am); box-shadow: 0 0 5px var(--am); }
.sm-op.dim i { background: #2a3348; box-shadow: none; }

/* afficheur : verre sombre, équerres de visée, lignes de balayage, chiffres ambrés */
.sm-readout { position: relative; width: 128px; padding: 2px 8px 1px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; cursor: text; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(95,225,255,.13), rgba(95,225,255,0) 60%), linear-gradient(180deg, #02040a, #07101c);
  border: 1px solid #1c2a40; box-shadow: inset 0 2px 6px rgba(0,0,0,.9), inset 0 0 14px rgba(40,140,200,.12); }
.sm-readout::before { content: ""; position: absolute; inset: 3px; pointer-events: none; opacity: .75;
  background: linear-gradient(var(--cy), var(--cy)) 0 0 / 7px 1.5px, linear-gradient(var(--cy), var(--cy)) 0 0 / 1.5px 7px,
    linear-gradient(var(--cy), var(--cy)) 100% 0 / 7px 1.5px, linear-gradient(var(--cy), var(--cy)) 100% 0 / 1.5px 7px,
    linear-gradient(var(--cy), var(--cy)) 0 100% / 7px 1.5px, linear-gradient(var(--cy), var(--cy)) 0 100% / 1.5px 7px,
    linear-gradient(var(--cy), var(--cy)) 100% 100% / 7px 1.5px, linear-gradient(var(--cy), var(--cy)) 100% 100% / 1.5px 7px;
  background-repeat: no-repeat; }
.sm-readout::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }
.sm-readout small { font: 700 8.5px/1.1 var(--num); letter-spacing: 2px; text-transform: uppercase; color: #7fcfe6; }
.sm-readout b { display: flex; align-items: baseline; justify-content: center; gap: 3px; font: 700 18px/1.1 var(--num); color: var(--am); text-shadow: 0 0 10px rgba(255,180,40,.5), 0 0 1px #ffe2a0; }
.sm-readout b i { font-style: normal; font-size: 12px; opacity: .8; }
.sm-readout input { width: 76px; min-width: 0; padding: 0; background: none; border: 0; outline: none; color: inherit; font: inherit; text-shadow: inherit; text-align: left; }
.sm-readout input:disabled { -webkit-text-fill-color: currentColor; opacity: 1; }
.sm-readout:focus-within { border-color: rgba(95,225,255,.7); }
.sm-readout.pop b { animation: smPop .22s ease-out; }
.sm-readout.deny { animation: smDeny .3s ease-out; border-color: var(--rd); }
@keyframes smDeny { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }

.sm-tools { grid-area: tools; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }

/* jauge de poussée : rail en LED segmentées (cyan puis ambre), paliers gravés, manette en métal à voyant */
.sm-thrust { grid-area: thrust; position: relative; width: 330px; height: 48px; padding: 0 16px; border-radius: 12px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; --p: 0;
  background: linear-gradient(180deg, rgba(3,6,13,.92), rgba(8,13,24,.92)); border: 1px solid rgba(120,160,225,.2);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.75), 0 1px 0 rgba(255,255,255,.06); outline: none; }
.sm-thrust:focus-visible { border-color: var(--cy); box-shadow: inset 0 2px 6px rgba(0,0,0,.75), 0 0 0 2px rgba(95,225,255,.35); }
.th-in { position: relative; height: 100%; }
/* graduations fines sous le rail */
.th-in::before { content: ""; position: absolute; left: 0; right: 0; top: 21px; height: 4px; pointer-events: none; border-right: 1px solid rgba(150,190,255,.28);
  background: linear-gradient(90deg, rgba(150,190,255,.28) 1px, transparent 1px) 0 0 / 5% 100% repeat-x; }
.th-rail { position: absolute; left: -4px; right: -4px; top: 7px; height: 10px; border-radius: 5px; overflow: hidden; background: #02040a; box-shadow: inset 0 1px 3px rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.07); }
.th-rail::before { content: ""; position: absolute; inset: 2px 4px; border-radius: 3px; background: repeating-linear-gradient(90deg, rgba(95,225,255,.09) 0 4px, transparent 4px 6px); }
.th-fill { position: absolute; top: 2px; bottom: 2px; left: 4px; right: 4px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(90deg, #1596b6, #5fe1ff 36%, #bff6ff 48%, #ffd277 66%, #ffb428 84%, #ff7a3d);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 6px); mask-image: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 6px);
  clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); transition: clip-path .2s cubic-bezier(.3,1.2,.5,1); }
/* lit de lumière diffuse sous les segments allumés */
.th-rail::after { content: ""; position: absolute; top: 1px; bottom: 1px; left: 3px; right: 3px; border-radius: 4px; opacity: .32; pointer-events: none;
  background: linear-gradient(90deg, #1596b6, #5fe1ff 36%, #bff6ff 48%, #ffd277 66%, #ffb428 84%, #ff7a3d);
  clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); transition: clip-path .2s cubic-bezier(.3,1.2,.5,1); }
.sm-thrust.drag .th-rail::after { transition: none; }
/* reflet qui parcourt les segments allumés (ordinateur seulement, simple translation) */
.th-fill::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 100%; display: none; background: linear-gradient(90deg, transparent 0 40%, rgba(255,255,255,.85) 50%, transparent 60% 100%); transform: translateX(-100%); }
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
  .th-fill::after { display: block; animation: smGlint 3.6s cubic-bezier(.45,0,.3,1) infinite; }
  .locked .th-fill::after { animation: none; display: none; }
}
@keyframes smGlint { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
/* paliers : pastilles gravées, reliées au rail par un trait */
.th-stops { position: absolute; left: 0; right: 0; bottom: 3px; height: 17px; }
.th-stop { position: absolute; bottom: 0; left: calc(var(--at) * 100%); transform: translateX(-50%); height: 17px; min-width: 24px; padding: 0 5px; border-radius: 9px;
  font: 700 10px/15px var(--num); color: #7486a8; background: linear-gradient(180deg, #111a2b, #0a101c); border: 1px solid rgba(120,160,225,.22); transition: color .15s, border-color .15s, background .15s, box-shadow .15s; }
.th-stop::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 5px; margin-left: -.5px; background: currentColor; opacity: .7; }
.th-stop span { pointer-events: none; }
.th-stop.lit { color: #bfefff; border-color: rgba(95,225,255,.45); }
.th-stop.on { color: #03202a; background: linear-gradient(180deg, #c6f7ff, #5fe1ff); border-color: #e2fcff; box-shadow: 0 0 10px rgba(95,225,255,.55), inset 0 1px 0 #fff; }
.sm-thrust[data-band="hi"] .th-stop.on { color: #2a1500; background: linear-gradient(180deg, #ffe7a6, #ffb428); border-color: #fff1c2; box-shadow: 0 0 10px rgba(255,180,40,.55), inset 0 1px 0 #fff; }
.th-stop.pop { animation: smNotch .32s ease-out; }
@keyframes smNotch { 0% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(1.22); } 100% { transform: translateX(-50%) scale(1); } }
/* manette : curseur de console (capuchon de métal strié), index lumineux qui pointe la graduation */
.th-lever { position: absolute; top: 2px; left: calc(var(--p) * 100%); width: 24px; height: 20px; margin-left: -12px; border-radius: 5px 5px 7px 7px; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.55) 0 1px, rgba(30,38,54,.55) 1px 2px, transparent 2px 4px) 3px 4px / 6px 12px no-repeat,
    repeating-linear-gradient(180deg, rgba(255,255,255,.55) 0 1px, rgba(30,38,54,.55) 1px 2px, transparent 2px 4px) calc(100% - 3px) 4px / 6px 12px no-repeat,
    linear-gradient(180deg, #f2f5fb, #b9c3d4 45%, #7d889f 100%);
  border: 1px solid #0b0e15; box-shadow: 0 2px 0 #0a0d14, 0 4px 8px rgba(0,0,0,.6), inset 0 1px 0 #fff, inset 0 -2px 3px rgba(20,26,40,.35);
  transition: left .2s cubic-bezier(.3,1.2,.5,1), transform .12s; }
.th-lever b { position: absolute; left: 50%; top: 3px; height: 14px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--cy); box-shadow: 0 0 6px var(--cy), 0 0 2px #fff; }
.th-lever::after { content: ""; position: absolute; left: 50%; top: 100%; margin: 2px 0 0 -4px; border: 4px solid transparent; border-top: 5px solid var(--cy); border-bottom: 0; filter: drop-shadow(0 0 3px rgba(95,225,255,.8)); }
.sm-thrust[data-band="mid"] .th-lever b { background: #c9f7ff; box-shadow: 0 0 6px #9ff0ff, 0 0 2px #fff; }
.sm-thrust[data-band="hi"] .th-lever b { background: var(--am); box-shadow: 0 0 6px var(--am), 0 0 2px #fff; }
.sm-thrust[data-band="hi"] .th-lever::after { border-top-color: var(--am); filter: drop-shadow(0 0 3px rgba(255,180,40,.8)); }
.sm-thrust.drag .th-lever, .sm-thrust.drag .th-fill { transition: none; }
.sm-thrust.drag .th-lever { transform: translateY(1px) scale(1.06); }
.sm-thrust:hover .th-lever { box-shadow: 0 3px 0 #0a0d14, 0 5px 9px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 3px rgba(95,225,255,.16); }
.locked .sm-thrust, .locked .sm-stake, .locked .sm-tools .rebet, .locked .sm-tools #betReset { opacity: .4; pointer-events: none; }

/* manifeste : plan de vol, puis ce qui est sécurisé et ce qui vole encore */
.sm-manifest { grid-area: manifest; display: flex; gap: 6px; min-width: 0; }
.mf-seg { position: relative; flex: 1 1 0; min-width: 0; height: 42px; padding: 0 10px; border-radius: 9px; display: flex; align-items: center; gap: 8px; overflow: hidden; border: 1px dashed rgba(130,170,230,.3); background: rgba(6,10,20,.6); }
.mf-seg > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; position: relative; }
.mf-seg small { font: 700 9px/1.2 var(--num); letter-spacing: 1.4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-seg b { font: 700 13px/1.25 var(--num); color: #dfe9ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-ico { position: relative; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: #3a4660; }
.mf-seg[data-kind="board"] { border: 1px solid rgba(255,180,40,.55); }
.mf-seg[data-kind="board"] .mf-ico { background: var(--am); box-shadow: 0 0 8px var(--am); }
.mf-seg[data-kind="board"] small { color: #ffd277; }
.mf-seg[data-kind="fly"] { border: 1px solid rgba(255,196,60,.8); background: linear-gradient(180deg, rgba(60,38,2,.9), rgba(30,18,2,.9)); }
.mf-seg[data-kind="fly"]::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40px; right: 0; opacity: .5; background: repeating-linear-gradient(-55deg, rgba(255,196,60,.16) 0 10px, transparent 10px 20px); animation: smStripe 1s linear infinite; }
@keyframes smStripe { to { transform: translateX(24.4px); } }
.mf-seg[data-kind="fly"] .mf-ico { background: var(--am); box-shadow: 0 0 9px var(--am); }
.mf-seg[data-kind="fly"] small { color: #ffd277; } .mf-seg[data-kind="fly"] b { color: #fff3d0; }
.mf-seg[data-kind="sec"] { border: 1px solid rgba(54,227,143,.75); background: linear-gradient(180deg, rgba(4,44,26,.92), rgba(3,24,16,.92)); }
.mf-seg[data-kind="sec"] .mf-ico { width: 12px; height: 10px; margin-top: 4px; border-radius: 2px; background: var(--gr); box-shadow: 0 0 8px rgba(54,227,143,.7); }
.mf-seg[data-kind="sec"] .mf-ico::before { content: ""; position: absolute; left: 2px; right: 2px; top: -6px; height: 7px; border: 2px solid var(--gr); border-bottom: 0; border-radius: 5px 5px 0 0; }
.mf-seg[data-kind="sec"] small { color: #8dffc3; } .mf-seg[data-kind="sec"] b { color: #d8ffea; }
.mf-seg[data-kind="lost"] { border: 1px solid rgba(255,77,94,.6); background: rgba(40,6,12,.8); }
.mf-seg[data-kind="lost"] .mf-ico { background: var(--rd); }
.mf-seg[data-kind="lost"] small { color: #ff97a3; } .mf-seg[data-kind="lost"] b { color: #ffc4cb; }
.sm-manifest.pop .mf-seg[data-kind="sec"] { animation: smPop .4s ease-out; }

/* bouton principal : touche lumineuse, verte pour miser, ambre pour retirer, rouge pour annuler */
.sm-actions { grid-area: actions; display: flex; gap: 8px; justify-content: center; }
.sm-confirm { position: relative; flex: 1 1 0; max-width: 430px; min-width: 0; height: 58px; padding: 0 16px; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0,50,25,.7); background: linear-gradient(180deg, #46f2a3, #17c06c 52%, #0b9150); border: 1px solid #a5ffd4; box-shadow: 0 4px 0 #06532e, 0 10px 22px rgba(10,150,80,.35), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -8px 14px rgba(0,60,30,.3); transition: transform .06s, box-shadow .06s, filter .15s; }
.sm-confirm:hover { filter: brightness(1.07); }
.sm-confirm:active, .sm-confirm.kbd-press, .sm-half:active, .sm-half.kbd-press { transform: translateY(3px); box-shadow: 0 1px 0 #06532e, inset 0 1px 0 rgba(255,255,255,.4); }
.sm-confirm .ico { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.95); color: #0c9a55; }
.sm-confirm .ico .ic { width: 16px; height: 16px; stroke-width: 3; }
.sm-confirm .txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.12; min-width: 0; }
.sm-confirm .txt > span { font-weight: 800; font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.sm-confirm small { font-size: 10px; font-weight: 600; letter-spacing: .4px; opacity: .92; white-space: nowrap; }
.sm-confirm small:empty { display: none; }
.sm-confirm b { font: 800 19px/1 var(--num); white-space: nowrap; }
.sm-confirm.cancel { text-shadow: 0 1px 2px rgba(70,0,10,.7); background: linear-gradient(180deg, #ff7f8b, #e2334a 52%, #a81428); border-color: #ffc0c7; box-shadow: 0 4px 0 #5e0a16, 0 10px 22px rgba(200,30,50,.3), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -8px 14px rgba(70,0,10,.3); }
.sm-confirm.cancel .ico { color: #d42a41; }
.sm-confirm.cashout { color: #2a1500; text-shadow: 0 1px 0 rgba(255,240,190,.6); background: linear-gradient(180deg, #ffe48a, #ffb428 52%, #f08a00); border-color: #fff1c2; box-shadow: 0 4px 0 #7a4300, 0 10px 26px rgba(255,160,20,.45), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -8px 14px rgba(140,70,0,.3); }
.sm-confirm.cashout .ico { background: #2a1500; color: #ffc94a; }
.sm-confirm.cashout b { font-size: 22px; }
.sm-confirm.cashout::after { content: ""; position: absolute; inset: -5px; border-radius: 19px; border: 2px solid rgba(255,200,70,.85); pointer-events: none; animation: smHalo 1.1s ease-out infinite; }
@keyframes smHalo { 0% { opacity: .9; transform: scale(.985); } 100% { opacity: 0; transform: scale(1.045, 1.2); } }
.sm-confirm.pop { animation: smPop .28s ease-out; }
.sm-confirm.deny { animation: smDeny .3s ease-out; }
.sm-half { position: relative; flex: 0 1 230px; min-width: 0; height: 58px; padding: 0 12px; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #021a22; text-shadow: 0 1px 0 rgba(220,250,255,.5); background: linear-gradient(180deg, #a8f3ff, #3ecbe8 52%, #1596b6); border: 1px solid #d6fbff; box-shadow: 0 4px 0 #064a5c, 0 10px 22px rgba(40,180,220,.3), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -8px 14px rgba(0,70,90,.28); transition: transform .06s, box-shadow .06s, filter .15s; }
.sm-half:hover { filter: brightness(1.07); }
.sm-half .txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.12; min-width: 0; }
.sm-half .txt > span { font-weight: 800; font-size: 12.5px; letter-spacing: .7px; white-space: nowrap; }
.sm-half b { font: 800 16px/1.1 var(--num); white-space: nowrap; }
.halfico { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; border: 2.5px solid #021a22; background: linear-gradient(90deg, #021a22 50%, transparent 50%); }
.sm-halfdone { flex: 0 1 230px; min-width: 0; height: 58px; padding: 0 12px; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #8dffc3; background: linear-gradient(180deg, rgba(4,44,26,.92), rgba(3,24,16,.92)); border: 1px solid rgba(54,227,143,.75); box-shadow: inset 0 0 18px rgba(54,227,143,.14); }
.sm-halfdone span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sm-halfdone small { font: 700 9.5px/1.2 var(--num); letter-spacing: 1.2px; white-space: nowrap; }
.sm-halfdone b { font: 700 13px/1.2 var(--num); color: #d8ffea; white-space: nowrap; }
.sm-halfdone.pop { animation: smPop .4s ease-out; }

/* pilote automatique : interrupteurs à bascule, réglage par pas */
.sm-auto-row { display: flex; align-items: center; gap: 9px; min-height: 40px; font-size: 13px; font-weight: 600; }
.sm-auto-row .lbl { flex: 1; min-width: 0; line-height: 1.15; }
.sm-switch { position: relative; flex: 0 0 auto; width: 52px; height: 40px; display: inline-flex; align-items: center; cursor: pointer; }
.sm-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sm-switch .track { position: relative; width: 52px; height: 28px; border-radius: 14px; background: linear-gradient(180deg, #05070c, #121826); border: 1px solid #344059; box-shadow: inset 0 2px 5px rgba(0,0,0,.8); transition: border-color .15s, box-shadow .15s; }
.sm-switch .knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f4f7fd, #9aa7c0 60%, #5b6780); box-shadow: 0 2px 4px rgba(0,0,0,.6); transition: transform .16s cubic-bezier(.3,1.5,.5,1); }
.sm-switch input:checked + .track { border-color: var(--gr); box-shadow: inset 0 2px 5px rgba(0,0,0,.6), inset 0 0 12px rgba(54,227,143,.45), 0 0 10px rgba(54,227,143,.3); }
.sm-switch.half input:checked + .track { border-color: var(--cy); box-shadow: inset 0 2px 5px rgba(0,0,0,.6), inset 0 0 12px rgba(95,225,255,.45), 0 0 10px rgba(95,225,255,.3); }
.sm-switch input:checked + .track .knob { transform: translateX(24px); }
.sm-switch input:focus-visible + .track { outline: 2px solid #fff; outline-offset: 2px; }
.sm-stepper { display: flex; align-items: center; flex: 0 0 auto; border-radius: 9px; overflow: hidden; background: linear-gradient(180deg, #03050a, #0a0f18); border: 1px solid #2c3750; box-shadow: inset 0 2px 6px rgba(0,0,0,.8); }
.sm-stepper button { width: 38px; height: 38px; font-size: 19px; font-weight: 600; color: #e8f0ff; background: linear-gradient(180deg, #364053, #222938); transition: filter .12s; }
.sm-stepper button:hover { filter: brightness(1.2); }
.sm-stepper button:active { filter: brightness(.8); }
.sm-stepper input { width: 70px; height: 38px; padding: 0; background: transparent; border: 0; outline: none; color: var(--cy); text-align: center; font: 700 14px/1 var(--num); text-shadow: 0 0 9px rgba(95,225,255,.4); }
.sm-presets { display: flex; align-items: center; gap: 5px; }
.sm-presets span { font: 700 9px/1 var(--num); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-right: auto; }
.sm-presets button { height: 30px; min-width: 42px; padding: 0 8px; border-radius: 15px; font: 700 12px/1 var(--num); color: #cfe0ff; background: rgba(255,255,255,.05); border: 1px solid rgba(130,170,230,.28); }
.sm-presets button:hover { border-color: var(--cy); color: #fff; }
.sm-presets button.active { color: #04202a; background: var(--cy); border-color: #d6fbff; }

/* équipage : mises et retraits en direct */
.sm-live .sm-cap { justify-content: flex-start; }
.sm-live-toggle { margin-left: auto; width: 36px; height: 22px; margin-top: -4px; margin-bottom: -4px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 6px; }
.sm-live-toggle:hover { color: #fff; background: rgba(255,255,255,.06); }
.sm-live-toggle .ic { width: 16px; height: 16px; transform: rotate(180deg); transition: transform .2s; }
.sm-live.collapsed .sm-live-toggle .ic { transform: none; }
.sm-live-head, .sm-row { display: grid; grid-template-columns: minmax(0, 1fr) 62px 74px 70px; gap: 6px; padding: 2px 4px; font-size: 11px; }
.sm-live-head { color: var(--muted); font-weight: 600; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; }
.sm-live-head span:not(:first-child), .sm-row span:not(:first-child) { text-align: right; }
.sm-rows { overflow-y: auto; flex: 1 1 0; min-height: 0; scrollbar-width: thin; scrollbar-color: #3a4660 transparent; }
.sm-row { color: #dfe8fb; height: 22px; align-items: center; border-radius: 5px; font-family: var(--num); }
.sm-row .u { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font); }
.sm-row .u i { width: 3px; height: 13px; border-radius: 2px; background: #4b5b7c; flex: 0 0 auto; }
.sm-row.cashed .u i { background: var(--gr); box-shadow: 0 0 6px rgba(54,227,143,.6); }
.sm-row.lost { opacity: .5; }
.sm-row.me { background: rgba(255,180,40,.1); color: #fff; }
.sm-row.me .u { font-weight: 700; }
.sm-row.friend { background: rgba(255,122,217,.1); }
.sm-row .m em { font-style: normal; background: rgba(54,227,143,.16); color: #9dffca; padding: 1px 7px; border-radius: 9px; font-weight: 700; }
.sm-row .m em.half { background: rgba(95,225,255,.16); color: #a5efff; }
.sm-row .w { color: #ffd277; font-weight: 700; }
.sm-live-foot { display: flex; align-items: center; gap: 10px; height: 28px; margin: 0 -10px; padding: 0 12px; border-top: 1px solid rgba(130,170,230,.14); font: 700 11px/1 var(--num); color: #c8d5ee; }
.sm-live-foot .n { display: inline-flex; align-items: center; gap: 4px; }
.sm-live-foot .ic { width: 13px; height: 13px; color: var(--muted); }
.sm-live-foot .ok .ic { color: var(--gr); stroke-width: 3; }
.sm-live-foot .cashed { font-size: 9px; letter-spacing: 1.2px; color: #8dffc3; }
.sm-live-foot .tot { margin-left: auto; color: #ffd277; }
.sm-empty { padding: 14px 6px; font-size: 11px; color: var(--muted); text-align: center; }
.sm-live.collapsed { height: auto; align-self: end; }
.sm-live.collapsed .sm-live-head, .sm-live.collapsed .sm-rows { display: none; }

/* session */
.st-tiles { display: flex; gap: 6px; flex: 1; min-width: 0; }
.st-tile { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; padding: 2px 8px; border-left: 2px solid #2c3750; }
.st-tile small { font: 700 8.5px/1.2 var(--num); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.st-tile b { font: 700 13px/1.25 var(--num); color: #e6efff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tile b.pos { color: var(--gr); } .st-tile b.neg { color: #ff8b98; }
.st-tile.rec { border-left-color: rgba(255,255,255,.6); }
.st-tile.rec b { color: #fff; }
.st-tile.pop b { animation: smPop .5s ease-out; }
.st-trend { display: none; }

/* raccourcis affichés sur ordinateur */
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
  .sm-confirm kbd, .sm-half kbd { display: inline-block; position: absolute; right: 10px; top: 8px; opacity: .85; }
  .sm-confirm.cashout kbd, .sm-half kbd { color: #2a1500; background: rgba(255,255,255,.4); border-color: rgba(60,30,0,.4); }
  .sm-keysbtn { display: inline-flex; }
  .sm-keysbtn kbd { display: inline-block; }
}
@media (max-width: 1240px) { .sm-keysbtn span { display: none; } .sm-keysbtn kbd { margin-right: 2px; } }

/* ================= fenêtres ================= */
.modal { background: linear-gradient(180deg, #171d2a, #0e121b); border-color: #34415b; }
.modal-head { background: linear-gradient(180deg, #2a3346, #1c2331); border-bottom: 1px solid #0a0d13; }
.modal-title { letter-spacing: 1px; text-transform: uppercase; font-size: 13px; }
.steps .step { background: var(--panel-2); border: 1px solid var(--border); }
.steps .step .ico.g { background: linear-gradient(180deg, #46f2a3, #0b9150); }
.steps .step .ico.o { background: linear-gradient(180deg, #7fa8ff, #2f55c8); }
.steps .step .ico.c { background: linear-gradient(180deg, #ffe48a, #f08a00); color: #2a1500; }
.split { display: flex; gap: 4px; margin-top: 10px; }
.split i { flex: 1; padding: 6px 4px; border-radius: 7px; font: 700 10px/1.2 var(--num); font-style: normal; }
.split .a { color: #8dffc3; border: 1px solid rgba(54,227,143,.75); background: rgba(4,44,26,.9); }
.split .b { color: #ffd277; border: 1px solid rgba(255,196,60,.8); background: rgba(60,38,2,.9); }
.kv .v.res.lo { color: #a9bbdf; } .kv .v.res.mid { color: #7fe3ff; } .kv .v.res.hi { color: #ffd277; } .kv .v.res.top { color: #ffb1e3; }
.keys { display: flex; flex-direction: column; gap: 6px; }
.keys .row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: var(--panel-2); }
.keys kbd { display: inline-block; min-width: 62px; text-align: center; font-size: 11px; }
.m-stats .stats-grid.two { grid-template-columns: repeat(2, 1fr); margin-top: 8px; }
.m-stats .stat .v.rec { color: #fff; }
.trend-big { height: 84px; margin-bottom: 10px; border-radius: 8px; background: var(--panel-3); border: 1px solid var(--border); padding: 6px; box-sizing: border-box; }
.dist { display: grid; grid-template-columns: 96px minmax(0, 1fr) 84px; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px; }
.dist i { height: 10px; border-radius: 5px; background: var(--panel-3); overflow: hidden; }
.dist b { display: block; height: 100%; border-radius: 5px; }
.dist.lo b { background: #6b7da3; } .dist.mid b { background: #46c7e8; } .dist.hi b { background: #ffb428; }
.dist em { font: 700 11px/1 var(--num); font-style: normal; text-align: right; color: #dfe9ff; }
.btn.primary { background: linear-gradient(180deg, #2cc0e2, #1487a8); }

/* ================= largeurs intermédiaires (tablette en paysage, petite fenêtre) : mise à gauche, onglets à droite ================= */
@media (max-width: 1180px) {
  .sm-console { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head head" "center tabs" "center pane"; }
  .sm-tabs { grid-area: tabs; display: flex; gap: 5px; }
  .sm-tabs button { flex: 1 1 0; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; font: 700 10.5px/1 var(--num); letter-spacing: 1.5px; color: var(--muted); background: rgba(6,10,20,.6); border: 1px solid rgba(120,160,225,.16); }
  .sm-tabs button.active { color: #fff; border-color: rgba(95,225,255,.6); background: linear-gradient(180deg, rgba(22,44,66,.9), rgba(8,16,30,.9)); box-shadow: inset 0 -2px 0 var(--cy); }
  .sm-tabs b { font: 700 10px/1 var(--num); padding: 2px 5px; border-radius: 7px; background: rgba(255,255,255,.1); color: #dfe9ff; }
  .sm-auto, .sm-live, .sm-stats { grid-area: pane; display: none; height: auto; min-height: 0; }
  .sm-console[data-fold="0"][data-tab="auto"] .sm-auto, .sm-console[data-fold="0"][data-tab="crew"] .sm-live, .sm-console[data-fold="0"][data-tab="stats"] .sm-stats { display: flex; }
  .sm-bay .sm-cap { display: none; }
  .sm-live.collapsed { height: auto; align-self: stretch; }
  .sm-live.collapsed .sm-live-head { display: grid; }
  .sm-live.collapsed .sm-rows { display: block; }
  .sm-stats { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 8px 10px; border-radius: 11px; }
  .st-tiles { flex: 0 0 auto; }
  .st-tile b { font-size: 14px; }
  .st-trend { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 11.5px; font-weight: 600; color: #cfe0ff; text-align: left; background: rgba(255,255,255,.04); border: 1px solid rgba(130,170,230,.22); }
  .st-trend .ic { width: 15px; height: 15px; color: var(--cy); }
}

/* ================= téléphone en portrait, tablette ================= */
@media (max-width: 900px) {
  .sm-top { padding: 10px 10px 16px; }
  .sm-brand { gap: 8px; }
  .sm-brand .sm-title, .sm-meta, .sm-hub span { display: none; }
  .sm-hub { padding: 0 8px; }
  .sm-word { height: 21px; }
  .sm-logo .online-pill { padding: 0; background: none; border: 0; font-size: 10px; }
  .sm-icons { gap: 6px; }
  .sm-msg, .sm-zone { left: 12px; top: 106px; transform: none; align-items: flex-start; text-align: left; white-space: normal; max-width: 36%; }
  .sm-msg span, .sm-zone small { white-space: nowrap; }
  .sm-msg b { font-size: 14px; letter-spacing: 1.4px; line-height: 1.15; }
  .sm-msg span { font-size: 11px; }
  .sm-zone b { font-size: 13px; letter-spacing: 1px; line-height: 1.15; }
  .sm-zone small { font-size: 9px; letter-spacing: 1.6px; }
  @keyframes smZone { 0% { opacity: 0; transform: translateY(8px); } 9% { opacity: 1; transform: none; } 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-5px); } }
  .sm-end { left: 50%; }
  .sm-frame i { display: none; }
  .sm-history { left: 8px; right: 8px; bottom: 6px; gap: 6px; }
  .sm-trend { width: 56px; }

  .sm-console { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "center" "tabs" "pane"; gap: 7px; padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .sm-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "status caution . balance" "seq seq . balance"; align-items: center; gap: 4px 8px; height: 38px; }
  .sm-status { grid-area: status; font-size: 9.5px; letter-spacing: 1.2px; }
  .sm-seq { grid-area: seq; }
  .sm-caution { grid-area: caution; }
  .sm-caution span { display: none; }
  .sm-balance { grid-area: balance; margin: 0; }
  .sm-balance > div { padding: 2px 9px 1px; }
  .sm-balance b { font-size: 13px; }
  .phone-off { display: none; }
  .sm-bay { padding: 8px; border-radius: 11px; }
  .sm-center { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "stake stake" "thrust tools" "actions actions"; gap: 7px 8px; }
  .sm-center[data-mf="fly"], .sm-center[data-mf="split"] { grid-template-areas: "stake stake" "manifest manifest" "actions actions"; }
  .sm-center .sm-manifest { display: none; }
  .sm-center[data-mf="fly"] .sm-manifest, .sm-center[data-mf="split"] .sm-manifest { display: flex; }
  .sm-center[data-mf="fly"] .sm-thrust, .sm-center[data-mf="split"] .sm-thrust, .sm-center[data-mf="fly"] .sm-tools, .sm-center[data-mf="split"] .sm-tools { display: none; }
  .sm-stake { gap: 6px; }
  .sm-dial { flex: 1 1 auto; min-width: 0; }
  .sm-dial .sm-readout { flex: 1 1 auto; width: auto; min-width: 0; }
  .sm-thrust { width: auto; min-width: 0; padding: 0 19px; }
  .sm-tools { gap: 5px; }
  .sm-tools #statsBtn { display: none; }
  .sm-key.rebet { padding: 0 8px 0 6px; }
  .sm-confirm { max-width: none; height: 60px; padding: 0 12px; gap: 10px; flex: 1.5 1 0; }
  .sm-confirm b { font-size: 18px; }
  .sm-confirm.cashout b { font-size: 20px; }
  .sm-confirm.cashout .txt > span { font-size: 14px; }
  .sm-half, .sm-halfdone { height: 60px; flex: 1 1 0; padding: 0 8px; gap: 7px; }
  .sm-half .txt > span { font-size: 11px; letter-spacing: .3px; }
  .sm-half b { font-size: 15px; }
  .halfico { width: 20px; height: 20px; }
  .sm-console:has(.sm-half:not([hidden])) .sm-confirm .ico, .sm-console:has(.sm-halfdone:not([hidden])) .sm-confirm .ico { display: none; }

  .sm-auto, .sm-live, .sm-stats { height: 98px; }
  .sm-auto { justify-content: center; gap: 4px; padding: 6px 8px; }
  .sm-presets { display: none; }
  .sm-live { padding-bottom: 0; gap: 2px; }
  .sm-live.collapsed { height: 98px; }
  .sm-live-foot { height: 24px; margin: 0 -8px; }
}
@media (max-width: 380px) {
  .sm-nudge { width: 32px; }
  .sm-op { min-width: 36px; padding: 0 6px; font-size: 12px; }
  .sm-readout b { font-size: 16px; gap: 2px; }
  .sm-readout input { width: 60px; }
  .sm-thrust { padding: 0 16px; }
  .sm-key.rebet small { display: none; }
}

/* ================= téléphone en paysage : tableau de bord en colonne à droite ================= */
@media (orientation: landscape) and (max-height: 520px) {
  .sm { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr) 306px; }
  .sm-top { padding: 6px 8px 12px; background: none; }
  .sm-brand { gap: 8px; }
  .sm-brand .sm-title, .sm-meta, .sm-hub span { display: none; }
  .sm-hub { height: 32px; padding: 0 8px; }
  .sm-icon { width: 32px; height: 32px; }
  .sm-icon img { width: 22px; height: 22px; }
  .sm-word { height: 18px; }
  .sm-logo { gap: 2px; }
  .sm-logo .online-pill { padding: 0; background: none; border: 0; font-size: 10px; }
  .sm-msg, .sm-zone { left: 10px; top: 46px; transform: none; align-items: flex-start; text-align: left; white-space: normal; max-width: 42%; }
  @keyframes smZone { 0% { opacity: 0; transform: translateY(8px); } 9% { opacity: 1; transform: none; } 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-5px); } }
  .sm-msg b { font-size: 13px; letter-spacing: 1.6px; }
  .sm-msg span { font-size: 10.5px; }
  .sm-zone b { font-size: 13px; }
  .sm-end { left: var(--px); top: calc(var(--py) + var(--pr) * 1.3); min-width: 200px; padding: 7px 12px 8px; }
  .sm-end b { font-size: 16px; }
  .sm-end span { font-size: 11.5px; }
  .sm-frame i { display: none; }
  .sm-history { left: 6px; right: 6px; bottom: 5px; height: 24px; gap: 6px; }
  .sm-trend { width: 52px; height: 24px; }
  .sm-chip { height: 20px; line-height: 20px; font-size: 10.5px; padding: 0 7px; }
  .toasts { bottom: 36px; }
  .sm-toast { font-size: 12px; padding: 6px 12px; }

  .sm-console { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); grid-template-areas: "head" "center" "tabs" "pane"; gap: 6px; padding: 6px calc(8px + env(safe-area-inset-right)) 6px 8px; border-top: 0; border-left: 1px solid #4a5670; box-shadow: -14px 0 34px rgba(0,0,0,.6), inset 1px 0 0 rgba(255,255,255,.12); height: 100%; min-height: 0; }
  .sm-console::before { display: none; }
  .sm-head { display: flex; height: 32px; gap: 8px; }
  .sm-balance > div { padding: 1px 7px; }
  .sm-balance small { font-size: 7.5px; letter-spacing: 1px; }
  .sm-balance b { font-size: 12px; }
  .sm-status { font-size: 10px; letter-spacing: 1.2px; }
  .sm-balance { position: fixed; top: 6px; left: 168px; margin: 0; }
  .sm-seq i { width: 9px; }
  .sm-caution span { display: none; }
  .sm-bay { padding: 6px; border-radius: 10px; }
  .sm-center { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "stake stake" "thrust tools" "actions actions"; gap: 6px; }
  .sm-center[data-mf="fly"], .sm-center[data-mf="split"] { grid-template-areas: "stake stake" "manifest manifest" "actions actions"; }
  .sm-center .sm-manifest { display: none; }
  .sm-center[data-mf="fly"] .sm-manifest, .sm-center[data-mf="split"] .sm-manifest { display: flex; }
  .sm-center[data-mf="fly"] .sm-thrust, .sm-center[data-mf="split"] .sm-thrust, .sm-center[data-mf="fly"] .sm-tools, .sm-center[data-mf="split"] .sm-tools { display: none; }
  .sm-stake { gap: 5px; }
  .sm-key { height: 36px; min-width: 36px; font-size: 12px; padding: 0 6px; }
  .sm-dial, .sm-ops { height: 40px; padding: 2px; border-radius: 11px; }
  .sm-dial { flex: 1 1 auto; min-width: 0; }
  .sm-nudge { width: 30px; }
  .sm-nudge svg { width: 14px; height: 14px; }
  .sm-dial .sm-readout { flex: 1 1 auto; width: auto; min-width: 0; }
  .sm-readout small { font-size: 7.5px; letter-spacing: 1.5px; }
  .sm-readout b { font-size: 15px; }
  .sm-readout input { width: 58px; }
  .sm-op { min-width: 32px; padding: 0 5px; font-size: 11.5px; }
  .sm-op#betHalf { font-size: 15px; }
  .sm-op i { top: 3px; width: 8px; margin-left: -4px; }
  .sm-thrust { width: auto; min-width: 0; height: 40px; padding: 0 13px; border-radius: 10px; }
  .th-rail { top: 5px; height: 9px; }
  .th-in::before { top: 17px; height: 3px; }
  .th-lever { top: 0; height: 18px; width: 22px; margin-left: -11px; }
  .th-lever b { top: 3px; height: 12px; }
  .th-lever::after { margin-top: 1px; }
  .th-stops { bottom: 3px; height: 15px; }
  .th-stop { height: 15px; min-width: 20px; padding: 0 3px; font-size: 9px; line-height: 13px; }
  .th-stop::before { height: 4px; }
  .sm-tools { gap: 4px; }
  .sm-tools #statsBtn { display: none; }
  .sm-key.rebet { padding: 0 6px 0 4px; gap: 4px; }
  .sm-key.rebet small { display: none; }
  .sm-key.rebet .ic { width: 15px; height: 15px; }
  .mf-seg { height: 37px; padding: 0 7px; gap: 6px; }
  .mf-seg[data-kind="fly"] .mf-ico { display: none; }
  .mf-seg small { font-size: 8px; letter-spacing: .8px; }
  .mf-seg b { font-size: 11.5px; }
  .sm-confirm { max-width: none; height: 52px; padding: 0 10px; gap: 8px; border-radius: 13px; flex: 1.5 1 0; }
  .sm-confirm .ico { width: 22px; height: 22px; }
  .sm-confirm .txt > span { font-size: 12.5px; letter-spacing: .6px; }
  .sm-confirm b { font-size: 15px; }
  .sm-confirm.cashout b { font-size: 16px; }
  .sm-confirm.cashout::after { border-radius: 17px; }
  .sm-half, .sm-halfdone { height: 52px; flex: 1 1 0; padding: 0 6px; gap: 6px; border-radius: 13px; }
  .sm-half .txt > span { font-size: 10px; letter-spacing: .2px; }
  .sm-half b { font-size: 13px; }
  .halfico { width: 16px; height: 16px; border-width: 2px; }
  .sm-console:has(.sm-half:not([hidden])) .sm-confirm .ico, .sm-console:has(.sm-halfdone:not([hidden])) .sm-confirm .ico { display: none; }
  .sm-halfdone .ic { width: 15px; height: 15px; }
  .sm-halfdone small { font-size: 8.5px; letter-spacing: .6px; }
  .sm-halfdone b { font-size: 11px; }

  .sm-tabs { grid-area: tabs; display: flex; gap: 4px; }
  .sm-tabs button { flex: 1 1 0; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 9px; font: 700 9.5px/1 var(--num); letter-spacing: 1px; color: var(--muted); background: rgba(6,10,20,.6); border: 1px solid rgba(120,160,225,.16); }
  .sm-tabs button.active { color: #fff; border-color: rgba(95,225,255,.6); background: linear-gradient(180deg, rgba(22,44,66,.9), rgba(8,16,30,.9)); box-shadow: inset 0 -2px 0 var(--cy); }
  .sm-tabs b { font: 700 9.5px/1 var(--num); padding: 2px 4px; border-radius: 7px; background: rgba(255,255,255,.1); color: #dfe9ff; }
  .sm-auto, .sm-live, .sm-stats { grid-area: pane; display: none; height: auto; min-height: 0; }
  .sm-console[data-fold="0"][data-tab="auto"] .sm-auto, .sm-console[data-fold="0"][data-tab="crew"] .sm-live, .sm-console[data-fold="0"][data-tab="stats"] .sm-stats { display: flex; }
  .sm-bay .sm-cap { display: none; }
  .sm-auto { justify-content: center; gap: 4px; }
  .sm-auto-row { gap: 6px; font-size: 11.5px; min-height: 38px; }
  .sm-switch { width: 46px; height: 38px; }
  .sm-switch .track { width: 46px; height: 26px; }
  .sm-switch .knob { width: 20px; height: 20px; }
  .sm-switch input:checked + .track .knob { transform: translateX(20px); }
  .sm-stepper button { width: 36px; height: 36px; }
  .sm-stepper input { width: 60px; height: 36px; font-size: 12.5px; }
  .sm-presets { display: none; }
  .sm-live { padding-bottom: 0; gap: 1px; }
  .sm-live.collapsed { height: auto; align-self: auto; }
  .sm-live.collapsed .sm-live-head { display: grid; }
  .sm-live.collapsed .sm-rows { display: block; }
  .sm-live-head, .sm-row { grid-template-columns: minmax(0, 1fr) 50px 66px 58px; font-size: 10px; gap: 4px; }
  .sm-row { height: 20px; }
  .sm-live-foot { height: 22px; margin: 0 -6px; padding: 0 8px; font-size: 10px; }
  .sm-stats { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 6px 8px; border-radius: 10px; }
  .st-tiles { flex: 0 0 auto; gap: 3px; }
  .st-tile { padding: 1px 5px; }
  .st-tile b { font-size: 12px; }
  .st-trend { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 36px; padding: 0 8px; border-radius: 9px; font-size: 10.5px; font-weight: 600; color: #cfe0ff; text-align: left; background: rgba(255,255,255,.04); border: 1px solid rgba(130,170,230,.22); }
  .st-trend .ic { width: 14px; height: 14px; color: var(--cy); }
}

@media (prefers-reduced-motion: reduce) {
  .sm-word .moon, .sm-confirm.cashout::after, .mf-seg[data-kind="fly"]::before, .sm-caution.on i { animation: none; }
  .sm-confirm.cashout::after { opacity: .7; }
  .sm-zone.show { animation: none; opacity: 1; }
  .sm-end.in, .sm-toast, .sm-confirm.pop, .sm-readout.pop b, .sm-readout.deny, .sm-confirm.deny, .sm-halfdone.pop, .st-tile.pop b, .sm-head.pulse .sm-seq, .sm-manifest.pop .mf-seg { animation: none; }
  .sm-shutter i, .sm-switch .knob, .sm-key, .sm-confirm, .sm-half, .sm-nudge, .sm-op, .th-fill, .th-lever, .th-stop { transition: none; }
  .th-stop.pop, .th-fill::after { animation: none; }
}

.sm-halfdone b i { font-style: normal; }
