/* Mini-jeux : Dés, Keno, Mines (style des grands sites, aux couleurs de la Salle de Jeux) */
:root { --win: #3EE08F; --lose: #FF5C7A; --tile: #2A2350; --tile-hi: #3A3170; }
.casino { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.ctrl { display: grid; gap: 14px; }
.ctrl .btn.play { font-size: 17px; padding: 14px; border-radius: 12px; width: 100%; }
.ctrl .btn.play.cash { background: linear-gradient(180deg, #3EE08F, #18A35E); border-color: rgba(190, 255, 220, .6); color: #062a17; box-shadow: 0 6px 18px rgba(62, 224, 143, .35); }
.bet-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; }
.bet-row input { min-width: 0; font-variant-numeric: tabular-nums; }
.bet-row button { font: inherit; font-weight: 700; cursor: pointer; color: var(--text); background: rgba(255, 255, 255, .08); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.bet-row button:hover { border-color: rgba(196, 178, 255, .55); }
.wallet { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.wallet b { color: var(--gold); font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.seg button { font: inherit; font-weight: 700; padding: 8px; border-radius: 9px; border: 0; cursor: pointer; color: var(--muted); background: transparent; }
.seg button.on { color: #fff; background: linear-gradient(180deg, var(--violet), var(--violet-2)); }
.stage { position: relative; min-height: 440px; padding: 26px; border-radius: 18px; background: radial-gradient(120% 90% at 50% 0%, rgba(139, 108, 240, .2), rgba(12, 9, 26, .9) 70%); border: 1px solid var(--line); box-shadow: inset 0 0 50px rgba(0, 0, 0, .5); }
.result-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; padding: 18px 26px; border-radius: 16px; text-align: center; pointer-events: none;
  background: rgba(14, 10, 30, .94); border: 2px solid var(--win); box-shadow: 0 0 40px rgba(62, 224, 143, .45); animation: rpop .35s cubic-bezier(.3, 1.6, .5, 1); }
.result-pop.lose { border-color: var(--lose); box-shadow: 0 0 40px rgba(255, 92, 122, .4); }
.result-pop b { display: block; font-family: 'Montserrat', sans-serif; font-size: 34px; color: var(--win); }
.result-pop.lose b { color: var(--lose); }
.result-pop span { color: var(--muted); }
@keyframes rpop { from { transform: translate(-50%, -50%) scale(.5); opacity: 0; } }
.history { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-height: 30px; margin-bottom: 14px; }
.history span { padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; background: rgba(255, 92, 122, .15); color: var(--lose); }
.history span.w { background: rgba(62, 224, 143, .15); color: var(--win); }
.fair { margin-top: 18px; }
.fair summary { cursor: pointer; color: var(--muted); }
.fair .kv { display: grid; gap: 8px; margin-top: 10px; font-size: 13.5px; }
.fair code { display: block; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .35); word-break: break-all; font-size: 12.5px; }

/* Dés */
.dice-big { text-align: center; font-family: 'Montserrat', sans-serif; font-size: clamp(56px, 10vw, 96px); font-variant-numeric: tabular-nums; margin: 20px 0 30px; color: #fff; text-shadow: 0 0 30px rgba(139, 108, 240, .6); transition: color .2s; }
.dice-big.w { color: var(--win); text-shadow: 0 0 30px rgba(62, 224, 143, .6); }
.dice-big.l { color: var(--lose); text-shadow: 0 0 30px rgba(255, 92, 122, .5); }
.track { position: relative; height: 14px; margin: 40px 10px 12px; border-radius: 999px; background: var(--lose); box-shadow: 0 0 0 6px rgba(0, 0, 0, .35); }
.track .green { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--win); }
.track input[type=range] { position: absolute; inset: -10px 0; width: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.track .knob { position: absolute; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 8px; background: linear-gradient(180deg, #fff, #C9C2EA); box-shadow: 0 4px 10px rgba(0, 0, 0, .5); pointer-events: none; }
.track .marker { position: absolute; bottom: 24px; transform: translateX(-50%); transition: left .5s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.track .marker span { display: block; padding: 6px 10px; border-radius: 10px; font-weight: 800; background: #fff; color: #120D22; font-variant-numeric: tabular-nums; }
.track .marker::after { content: ''; display: block; margin: 0 auto; border: 7px solid transparent; border-top-color: #fff; width: 0; }
.ticks { display: flex; justify-content: space-between; margin: 0 10px; color: var(--muted); font-size: 13px; }
.dice-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.dice-fields input, .ctrl input, .ctrl select { width: 100%; min-width: 0; }
.stage, .ctrl { min-width: 0; }

/* Keno */
.keno-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; max-width: 640px; margin: 0 auto; }
.kt { aspect-ratio: 1; border-radius: 10px; border: 0; cursor: pointer; font: 800 clamp(13px, 2vw, 18px) 'Instrument Sans', sans-serif; color: #D8D2F5;
  background: var(--tile); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35); transition: transform .1s, background .15s; }
.kt:hover:not(:disabled) { background: var(--tile-hi); transform: translateY(-2px); }
.kt.sel { background: linear-gradient(180deg, #A78BFA, #7C5CE8); color: #fff; }
.kt.drawn { background: #1A1538; color: var(--lose); box-shadow: inset 0 0 0 2px rgba(255, 92, 122, .45); }
.kt.hit { background: linear-gradient(180deg, #5BF0A4, #1FB46B); color: #04220f; animation: hit .4s ease-out; box-shadow: 0 0 16px rgba(62, 224, 143, .6); }
.kt:disabled { cursor: default; }
@keyframes hit { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } }
.paytable { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; max-width: 640px; margin: 18px auto 0; font-size: 12.5px; text-align: center; }
.paytable div { padding: 6px 2px; border-radius: 8px; background: rgba(0, 0, 0, .3); }
.paytable b { display: block; color: #fff; font-variant-numeric: tabular-nums; }
.paytable span { color: var(--muted); }
.paytable div.on { background: rgba(62, 224, 143, .2); box-shadow: inset 0 0 0 1px var(--win); }

/* Mines */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
.mt { aspect-ratio: 1; border-radius: 12px; border: 0; cursor: pointer; font-size: clamp(24px, 5vw, 40px); background: var(--tile); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .35);
  transition: transform .12s, background .15s; display: grid; place-items: center; }
.mt:hover:not(:disabled) { background: var(--tile-hi); transform: translateY(-3px); }
.mt:disabled { cursor: default; }
.mt.gem { background: radial-gradient(circle, rgba(62, 224, 143, .35), #15301F 70%); box-shadow: inset 0 0 0 2px var(--win); animation: hit .35s ease-out; }
.mt.bomb { background: radial-gradient(circle, rgba(255, 92, 122, .5), #3A0E18 70%); box-shadow: inset 0 0 0 2px var(--lose); animation: boom .5s ease-out; }
.mt.dim { opacity: .45; }
@keyframes boom { 0% { transform: scale(.5); } 40% { transform: scale(1.25) rotate(8deg); } 100% { transform: none; } }
.mines-info { display: flex; justify-content: center; gap: 22px; margin-top: 18px; color: var(--muted); flex-wrap: wrap; }
.mines-info b { color: #fff; font-variant-numeric: tabular-nums; }

/* Page Mini-jeux */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.mini { display: grid; gap: 8px; padding: 22px; border-radius: 18px; text-decoration: none; color: inherit; background: var(--glass); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.mini:hover { transform: translateY(-4px); box-shadow: 0 0 40px rgba(139, 108, 240, .3); }
.mini .ico { font-size: 52px; }
.mini h2 { margin: 0; }
.mini p { margin: 0; color: var(--muted); font-size: 14.5px; }

@media (max-width: 860px) {
  .casino { grid-template-columns: minmax(0, 1fr); }
  .casino .ctrl { order: 2; }
  .stage { min-height: 0; padding: 16px; }
  .keno-grid { gap: 5px; }
  .mines-grid { gap: 7px; }
  .dice-fields { gap: 8px; }
  .dice-fields input { font-size: 14px; padding: 9px 8px; }
  .dice-fields label { font-size: 12px; }
  .dice-big { margin: 6px 0 18px; }
  .paytable { font-size: 11px; }
}
