/* ============================================================
   BLACKJACK CB06 — style.css complet
   Style moderne sombre/violet + iPhone compact + solde visible
   ============================================================ */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #07080d;
  color: #fff;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  font-family: Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% -10%, rgba(124, 58, 237, .18), transparent 36%),
    linear-gradient(180deg, #0b0c12 0%, #07080d 45%, #05060a 100%);
}

button,
input {
  font-family: inherit;
}

button {
  border: 0;
  touch-action: manipulation;
}

:root {
  --bg: #07080d;
  --panel: #151720;
  --panel-2: #20232d;
  --panel-3: #252938;
  --panel-4: #2b3040;

  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .12);

  --purple: #7c3aed;
  --purple-2: #8b5cf6;
  --purple-3: #a855f7;
  --purple-dark: #5b21b6;

  --text: #ffffff;
  --muted: #9ca3af;
  --muted-2: #6b7280;

  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;

  --card-white: #f8fafc;
  --card-red: #dc2626;
  --card-black: #111827;

  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

/* ============================================================
   APP
   ============================================================ */

.app {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    calc(env(safe-area-inset-top) + 14px)
    clamp(10px, 2vw, 22px)
    calc(env(safe-area-inset-bottom) + 18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(10, 11, 17, .92);
  border: 1px solid var(--line);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6 55%, #a855f7);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .14) inset,
    0 12px 28px rgba(124, 58, 237, .28);
  flex: 0 0 auto;
}

.brand-mark .suit {
  font-size: 22px;
  color: #fff;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text h1 .accent {
  color: var(--purple-2);
}

.tagline {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance {
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  background: #11131c;
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.balance-label {
  display: none;
}

.balance-value {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.balance-unit {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "table"
    "controls"
    "history";
  gap: 14px;
}

.table-area {
  grid-area: table;
}

.controls {
  grid-area: controls;
}

.history-aside {
  grid-area: history;
}

/* ============================================================
   TABLE
   ============================================================ */

.table-area {
  position: relative;
  min-height: 430px;
  padding: clamp(16px, 3vw, 28px);
  border-radius: 18px;
  background:
    radial-gradient(circle at 68% 30%, rgba(124, 58, 237, .12), transparent 28%),
    linear-gradient(180deg, #15171f 0%, #10121a 48%, #0c0e15 100%);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.table-area::before {
  content: "";
  position: absolute;
  top: 22px;
  right: 34px;
  width: 92px;
  height: 64px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(139, 92, 246, .95), rgba(109, 40, 217, .95));
  box-shadow:
    0 5px 0 #6d28d9,
    0 10px 0 #5b21b6,
    0 15px 0 #4c1d95,
    0 20px 30px rgba(0, 0, 0, .35);
  opacity: .85;
  transform: perspective(500px) rotateX(55deg);
}

.table-area::after {
  content: "";
  position: absolute;
  inset: 20%;
  background: radial-gradient(circle, rgba(255, 255, 255, .035), transparent 62%);
  pointer-events: none;
}

/* ============================================================
   MAINS
   ============================================================ */

.seat {
  position: relative;
  z-index: 2;
}

.seat-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 10px;
}

.seat-name {
  display: none;
}

.seat-total {
  min-width: 58px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #363946;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
  font-variant-numeric: tabular-nums;
}

.seat-total.bust {
  background: rgba(239, 68, 68, .18);
  color: #fecaca;
}

.seat-total.bj {
  background: rgba(124, 58, 237, .22);
  color: #ddd6fe;
}

.bet-pill {
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, .35);
}

.cards {
  min-height: clamp(120px, 20vw, 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.hands {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hand {
  position: relative;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid transparent;
}

.hand.active {
  background: rgba(124, 58, 237, .07);
  border-color: rgba(139, 92, 246, .35);
}

/* ============================================================
   CARTES
   ============================================================ */

.card {
  --w: clamp(72px, 18vw, 108px);
  width: var(--w);
  height: calc(var(--w) * 1.42);
  border-radius: 8px;
  position: relative;
  background: var(--card-white);
  color: var(--card-black);
  box-shadow:
    0 16px 35px rgba(0, 0, 0, .34),
    0 0 0 1px rgba(0, 0, 0, .06) inset;
  flex: 0 0 auto;
  overflow: hidden;
  animation: dealIn .22s cubic-bezier(.2, .8, .2, 1) backwards;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .58), transparent 38%),
    linear-gradient(315deg, rgba(0, 0, 0, .05), transparent 42%);
  pointer-events: none;
}

.card .corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .95;
  font-weight: 900;
}

.card .corner.tl {
  top: 8px;
  left: 9px;
}

.card .corner.br {
  bottom: 8px;
  right: 9px;
  transform: rotate(180deg);
}

.card .rank {
  font-size: clamp(17px, 4vw, 25px);
  letter-spacing: -.06em;
}

.card .corner-suit {
  font-size: clamp(14px, 3vw, 18px);
  margin-top: 2px;
}

.card .center-suit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(36px, 8vw, 62px);
}

.card.red {
  color: var(--card-red);
}

.card.black {
  color: var(--card-black);
}

.card.back {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow:
    0 16px 35px rgba(0, 0, 0, .34),
    0 0 0 1px rgba(255, 255, 255, .16) inset;
}

.card.back::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .32);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, .12) 0 5px,
      rgba(255, 255, 255, .03) 5px 10px
    );
}

@keyframes dealIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================
   RÉSULTAT
   ============================================================ */

.result-banner {
  position: relative;
  z-index: 4;
  min-height: 0;
  height: 0;
  overflow: hidden;
  text-align: center;
  color: #fff;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 900;
}

.result-banner.show {
  height: auto;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 14px 35px rgba(0, 0, 0, .35);
}

.result-banner.win {
  color: #bbf7d0;
  background: rgba(34, 197, 94, .14);
  border-color: rgba(34, 197, 94, .28);
}

.result-banner.lose {
  color: #fecaca;
  background: rgba(239, 68, 68, .14);
  border-color: rgba(239, 68, 68, .28);
}

.result-banner.push {
  color: #fde68a;
  background: rgba(245, 158, 11, .14);
  border-color: rgba(245, 158, 11, .28);
}

.result-banner.bj,
.result-banner.blackjack {
  color: #ddd6fe;
  background: rgba(124, 58, 237, .18);
  border-color: rgba(139, 92, 246, .38);
}

/* ============================================================
   CONTRÔLES
   ============================================================ */

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel,
.sidebet-panel {
  background: #151720;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
}

.panel-title {
  margin-bottom: 11px;
  font-size: 12px;
  font-weight: 850;
  color: #fff;
}

.bet-display {
  min-height: 54px;
  padding: 0 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #20232d;
  border: 1px solid rgba(255, 255, 255, .06);
  color: #fff;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.bet-display .bet-unit {
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  height: 42px;
  border-radius: 10px;
  background: #242733;
  border: 1px solid rgba(255, 255, 255, .07);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  transition: .16s ease;
}

.chip:hover:not(:disabled) {
  background: #2c3040;
  border-color: rgba(139, 92, 246, .35);
}

.chip:active:not(:disabled) {
  transform: scale(.97);
}

.chip:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.chip-allin {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  color: #fff;
}

.bet-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}

.btn {
  height: 48px;
  padding: 0 14px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  color: #fff;
  transition: .16s ease;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active:not(:disabled) {
  transform: scale(.975);
}

.btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #8b5cf6, #711ff0);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 28px rgba(124, 58, 237, .28);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #9f7aea, #7c3aed);
}

.btn-ghost {
  background: #242733;
  border: 1px solid rgba(255, 255, 255, .07);
  color: #d1d5db;
}

.btn-action {
  height: 58px;
  background: #242733;
  border: 1px solid rgba(255, 255, 255, .07);
  color: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-action:hover:not(:disabled),
.btn-ghost:hover:not(:disabled) {
  background: #2c3040;
  color: #fff;
  border-color: rgba(139, 92, 246, .35);
}

.btn-danger {
  width: 100%;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .24);
  color: #fecaca;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ============================================================
   SIDE BETS
   ============================================================ */

.sidebet-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #20232d;
  border: 1px solid rgba(255, 255, 255, .055);
  margin-bottom: 8px;
}

.sidebet-name {
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.sidebet-desc {
  margin-top: 3px;
  color: #8b93a7;
  font-size: 11px;
  line-height: 1.25;
}

.sidebet-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebet-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #2a2d3a;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.sidebet-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.sidebet-value {
  min-width: 56px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  background: #11131c;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.sidebet-results {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(124, 58, 237, .10);
  border: 1px solid rgba(139, 92, 246, .22);
}

.sidebet-results.show {
  display: block;
}

.sidebet-result-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #d7d7ff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 0;
}

.sidebet-result-item .win {
  color: #86efac;
}

.sidebet-result-item .lose {
  color: #fca5a5;
}

/* ============================================================
   HISTORIQUE
   ============================================================ */

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.history-empty {
  padding: 20px 8px;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
}

.history-item {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #20232d;
  border: 1px solid rgba(255, 255, 255, .055);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.history-item .h-result {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.h-result.win {
  color: #bbf7d0;
  background: rgba(34, 197, 94, .13);
}

.h-result.lose,
.h-result.bust {
  color: #fecaca;
  background: rgba(239, 68, 68, .13);
}

.h-result.push {
  color: #fde68a;
  background: rgba(245, 158, 11, .13);
}

.h-result.blackjack {
  color: #ddd6fe;
  background: rgba(124, 58, 237, .18);
}

.history-item .h-bet {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.history-item .h-delta {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.h-delta.pos {
  color: var(--green);
}

.h-delta.neg {
  color: var(--red);
}

.h-delta.zer {
  color: var(--muted);
}

/* ============================================================
   LEGAL / TOAST
   ============================================================ */

.legal {
  color: var(--muted-2);
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  padding: 4px 10px 0;
}

.legal strong {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translate(-50%, 14px);
  z-index: 999;
  max-width: calc(100% - 24px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #181b24;
  border: 1px solid rgba(239, 68, 68, .28);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .45);
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   TABLETTE
   ============================================================ */

@media (min-width: 768px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    grid-template-areas:
      "table controls"
      "history history";
    align-items: start;
  }

  .table-area {
    min-height: 520px;
  }

  .card {
    --w: clamp(76px, 9vw, 96px);
  }

  .history-list {
    max-height: 190px;
  }
}

/* ============================================================
   DESKTOP WINDOWS
   ============================================================ */

@media (min-width: 1200px) {
  .layout {
    grid-template-columns: 330px minmax(0, 1fr) 320px;
    grid-template-areas: "controls table history";
    align-items: stretch;
  }

  .table-area {
    min-height: 600px;
  }

  .controls,
  .history-aside {
    height: fit-content;
  }

  .history-list {
    max-height: 480px;
  }

  .card {
    --w: clamp(84px, 7vw, 112px);
  }

  .cards {
    gap: 14px;
  }
}

/* ============================================================
   IPHONE / MOBILE COMPACT AVEC SOLDE VISIBLE
   ============================================================ */

@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    min-height: 100svh;
    overflow-x: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
  }

  .app {
    min-height: 100svh !important;
    padding:
      calc(env(safe-area-inset-top) + 4px)
      8px
      calc(env(safe-area-inset-bottom) + 4px) !important;
    gap: 5px !important;
  }

  .topbar {
    display: flex !important;
    min-height: 40px !important;
    padding: 5px 8px !important;
    border-radius: 12px !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(10, 11, 17, .96) !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .28) !important;
  }

  .brand {
    display: none !important;
  }

  .balance {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 28px !important;
    min-width: 96px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #1b2030, #101521) !important;
    border: 1px solid rgba(139, 92, 246, .35) !important;
    box-shadow: 0 6px 16px rgba(124, 58, 237, .18) !important;
  }

  .balance-label {
    display: inline !important;
    font-size: 10px !important;
    color: #a78bfa !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
  }

  .balance-value {
    font-size: 12px !important;
    font-weight: 900 !important;
    color: #fff !important;
    line-height: 1 !important;
  }

  .balance-unit {
    font-size: 10px !important;
    color: #9ca3af !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }

  .layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "table"
      "controls" !important;
    gap: 6px !important;
  }

  .history-aside,
  .legal {
    display: none !important;
  }

  .table-area {
    min-height: 300px !important;
    padding: 8px 7px !important;
    border-radius: 13px !important;
    gap: 6px !important;
  }

  .table-area::before {
    width: 42px !important;
    height: 28px !important;
    top: 8px !important;
    right: 10px !important;
    opacity: .55 !important;
  }

  .cards {
    min-height: 74px !important;
    gap: 5px !important;
  }

  .card {
    --w: clamp(48px, 15.5vw, 62px) !important;
    border-radius: 7px !important;
  }

  .card .corner.tl {
    top: 4px !important;
    left: 5px !important;
  }

  .card .corner.br {
    bottom: 4px !important;
    right: 5px !important;
  }

  .card .rank {
    font-size: 13px !important;
  }

  .card .corner-suit {
    font-size: 10px !important;
  }

  .card .center-suit {
    font-size: 25px !important;
  }

  .seat-head {
    margin-bottom: 4px !important;
    gap: 5px !important;
  }

  .seat-total {
    min-width: 40px !important;
    height: 24px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
  }

  .hands {
    gap: 5px !important;
  }

  .hand {
    padding: 4px !important;
  }

  .controls {
    gap: 6px !important;
  }

  .panel,
  .sidebet-panel {
    padding: 7px !important;
    border-radius: 12px !important;
  }

  .panel-title {
    display: none !important;
  }

  .bet-display {
    min-height: 32px !important;
    margin-bottom: 6px !important;
    font-size: 17px !important;
  }

  .chip-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 5px !important;
    margin-bottom: 6px !important;
  }

  .chip {
    height: 30px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    padding: 0 3px !important;
  }

  .bet-actions {
    grid-template-columns: 80px 1fr !important;
    gap: 5px !important;
  }

  .action-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
  }

  .btn {
    height: 34px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    padding: 0 5px !important;
  }

  .btn-action {
    height: 35px !important;
  }

  .sidebet-panel {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .sidebet-row {
    margin: 0 !important;
    padding: 6px !important;
    border-radius: 10px !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }

  .sidebet-name {
    font-size: 11px !important;
  }

  .sidebet-desc {
    display: none !important;
  }

  .sidebet-controls {
    justify-content: space-between !important;
    gap: 4px !important;
  }

  .sidebet-btn {
    width: 27px !important;
    height: 27px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
  }

  .sidebet-value {
    min-width: 40px !important;
    height: 27px !important;
    font-size: 10px !important;
  }

  .sidebet-results {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
    padding: 6px !important;
    border-radius: 10px !important;
  }

  .sidebet-result-item {
    font-size: 10px !important;
    padding: 2px 0 !important;
  }

  .result-banner.show {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  .toast {
    bottom: calc(env(safe-area-inset-bottom) + 76px) !important;
  }
}

/* ============================================================
   PETITS IPHONE
   ============================================================ */

@media (max-width: 390px) {
  .table-area {
    min-height: 285px !important;
  }

  .card {
    --w: clamp(44px, 14.2vw, 54px) !important;
  }

  .cards {
    min-height: 68px !important;
  }

  .btn {
    height: 32px !important;
    font-size: 9px !important;
  }

  .btn-action {
    height: 33px !important;
  }

  .chip {
    height: 28px !important;
    font-size: 9px !important;
  }

  .bet-display {
    min-height: 30px !important;
    font-size: 16px !important;
  }

  .sidebet-btn {
    width: 25px !important;
    height: 25px !important;
  }

  .sidebet-value {
    height: 25px !important;
    min-width: 36px !important;
  }
}

/* ============================================================
   MOBILE PAYSAGE
   ============================================================ */

@media (max-height: 620px) and (orientation: landscape) {
  .app {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .topbar {
    min-height: 36px !important;
  }

  .table-area {
    min-height: 250px !important;
    padding: 8px !important;
  }

  .cards {
    min-height: 62px !important;
  }

  .card {
    --w: 44px !important;
  }

  .legal,
  .history-aside {
    display: none !important;
  }
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */

.btn:focus-visible,
.chip:focus-visible,
.sidebet-btn:focus-visible {
  outline: 2px solid var(--purple-2);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}