/* PokerDecide — version PC, commandes sur chaque siège */
:root {
  --bg: #0a0e14;
  --panel: #141a22;
  --felt: #1a5c38;
  --felt-border: #3d2817;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #3ddc84;
  --accent-dim: #1e7a48;
  --warn: #f0b429;
  --danger: #ff6b6b;
  --border: #2a3441;
  --hero: #58a6ff;
  --btn-dealer: #f0b429;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
  min-height: 100vh;
}

/* --- Layout : barre verticale gauche + table --- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-left {
  width: 200px;
  flex-shrink: 0;
  background: #0f1318;
  border-right: 1px solid var(--border);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 0.25rem;
}

.sidebar-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.sidebar-field input {
  width: 100%;
  height: 34px;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.95rem;
}

.sidebar-btn {
  width: 100%;
  margin-top: 0.15rem;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.sidebar-format {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-format .chip {
  width: 100%;
  text-align: center;
}

.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.top-left { display: flex; align-items: baseline; gap: 1rem; }
.top h1 { margin: 0; font-size: 1.25rem; color: var(--accent); }
.hand-no { font-size: 0.85rem; color: var(--muted); }

.top-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-info .street-badge {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(61, 220, 132, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.top-info .blinds-info {
  font-size: 0.85rem;
  color: var(--muted);
}

.chip {
  min-height: 36px;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.chip.active { border-color: var(--accent); background: var(--accent-dim); color: #fff; }

.btn {
  height: 36px;
  padding: 0 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}
.btn.secondary { border-color: var(--accent-dim); color: var(--accent); }
.btn.cta-inline {
  border: none;
  background: var(--accent);
  color: #0a0e14;
  font-weight: 800;
  height: 40px;
}

.workspace {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
}

.table-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Table large pour PC */
.poker-table {
  position: relative;
  width: min(1100px, calc(100vw - 240px));
  height: min(720px, calc(100vh - 120px));
  min-height: 560px;
}

.table-felt {
  position: absolute;
  inset: 10% 8% 10% 8%;
  background: radial-gradient(ellipse at center, #1f6b42 0%, var(--felt) 55%, #134a2c 100%);
  border: 8px solid var(--felt-border);
  border-radius: 50%;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.35), 0 10px 30px rgba(0,0,0,0.45);
}

.felt-info {
  display: none;
}

.pot-center {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}
.pot-label { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.7); text-transform: uppercase; }
.pot-value { font-size: 1.75rem; font-weight: 800; color: #fff; }

/* Conseil — centre de la table (sur le tapis) */
.advice-center {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  min-width: 260px;
  max-width: 340px;
  padding: 0.85rem 1.1rem;
  text-align: center;
  background: rgba(10, 14, 20, 0.94);
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.advice-center[hidden] {
  display: none;
}

.advice-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.advice-action {
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}

.advice-reason {
  margin-top: 0.45rem;
  color: #e8edf4;
  font-size: 0.95rem;
  line-height: 1.35;
}

.advice-confidence {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--warn);
}

/* Jetons devant les joueurs sur le tapis */
.bets-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bet-pile {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  animation: bet-in 0.2s ease-out;
}

@keyframes bet-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.bet-pile.folded-bet { opacity: 0.45; }

.chip-pile-visual {
  position: relative;
  width: 36px;
  height: 28px;
}

.chip-disc {
  position: absolute;
  left: 50%;
  bottom: calc(var(--i) * 5px);
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7c2, var(--warn) 45%, #c97a0a 100%);
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.5);
}

.chip-disc::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.55);
}

.bet-pile-amount {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.45);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.bet-pile-action {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}

.seats-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* --- Siège complet --- */
.seat-node {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  width: 168px;
  z-index: 2;
}

.seat-node.inactive { opacity: 0.45; }
.seat-node.folded .seat-box { opacity: 0.55; }
.seat-node.is-hero .seat-box { border-color: var(--hero); box-shadow: 0 0 0 1px var(--hero); }

.seat-box {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.5rem 0.5rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.seat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.seat-pos {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}
.seat-toggle {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
}

.seat-meta {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}
.meta-btn {
  flex: 1;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
}
.meta-btn.on {
  border-color: var(--hero);
  background: rgba(88, 166, 255, 0.15);
  color: var(--hero);
}

.seat-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.seat-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
}
.seat-fields input {
  height: 28px;
  padding: 0.2rem 0.35rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  width: 100%;
}

.seat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}
.seat-cards select {
  height: 28px;
  font-size: 0.75rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0 0.15rem;
}

.seat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.act {
  height: 30px;
  border: none;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}
.act.fold { background: var(--danger); }
.act.mid { background: #4a5568; }
.act.raise { background: var(--accent-dim); }
.act.mini {
  height: 28px;
  font-size: 0.65rem;
  background: #2d6a4f;
  padding: 0 0.4rem;
}

.seat-raise-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem;
}
.seat-raise-row input {
  height: 28px;
  padding: 0.2rem 0.35rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
}

.seat-action-badge {
  margin-top: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  text-align: center;
}
.seat-folded {
  margin-top: 0.2rem;
  font-size: 0.65rem;
  color: var(--danger);
  text-align: center;
  font-weight: 700;
}

.dealer-chip {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: var(--btn-dealer);
  color: #000;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #c99a10;
}
.dealer-chip.draggable { cursor: grab; }
.dealer-chip.draggable:active { cursor: grabbing; }
.hero-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--hero);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.docs {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.docs a { color: var(--accent); }
