/* ===== TABLE DE BELOTE ===== */
.game-page {
  background: radial-gradient(ellipse at 50% 0%, #16202f 0%, #0a0e17 70%);
  padding-top: 56px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.score-display { color: var(--accent-blue); font-weight: 600; font-size: 14px; }

.belote-table-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 0;
}
.belote-table {
  position: relative;
  width: min(940px, 94vw);
  height: min(560px, calc(100vh - 240px));
  border-radius: 46% / 40%;
  background: radial-gradient(ellipse at 50% 42%, #0f834d, #095230 62%, #063d1f);
  box-shadow: 0 0 80px rgba(6,107,62,0.3), inset 0 0 100px rgba(0,0,0,0.35), 0 20px 60px rgba(0,0,0,0.55);
  border: 14px solid #4a3728;
  border-top-color: #5c4432;
  border-bottom-color: #3d2b1e;
}
.table-felt {
  position: absolute; inset: 0; border-radius: inherit;
  background: repeating-conic-gradient(rgba(255,255,255,0.02) 0% 25%, transparent 0% 50%) 0 0 / 22px 22px;
  pointer-events: none; z-index: 1;
}

/* ---- Sièges ---- */
.seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 6;
  transition: all .25s;
}
.seat-top { top: 6px; left: 50%; transform: translateX(-50%); }
.seat-bottom { bottom: 6px; left: 50%; transform: translateX(-50%); }
.seat-left { left: 10px; top: 50%; transform: translateY(-50%); }
.seat-right { right: 10px; top: 50%; transform: translateY(-50%); }
.seat-player {
  display: flex; align-items: center; gap: 8px;
  background: rgba(8,14,23,0.82);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  min-width: 132px;
}
.seat.turn .seat-player {
  border-color: var(--accent-gold);
  box-shadow: 0 0 18px rgba(245,158,11,0.55);
}
.seat.team-0 .seat-name { color: #cbd5e1; }
.seat.team-1 .seat-name { color: #f87171; }
.seat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border); font-size: 20px;
}
.seat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seat-info { display: flex; flex-direction: column; line-height: 1.2; }
.seat-name { font-weight: 700; font-size: 13px; white-space: nowrap; }
.seat-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.seat-dealer-badge {
  position: absolute; top: -8px; right: -8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: #000; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--accent-gold);
}
.seat-cards { display: flex; }
.mini-card {
  width: 46px; height: 66px; border-radius: 6px; margin-left: -16px;
  background: linear-gradient(135deg, #1e3a8a, #172554);
  border: 1px solid #93c5fd; box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform .15s; position: relative;
}
.mini-card-img {
  width: 48px; height: 69px; border-radius: 6px; margin-left: -17px;
  box-shadow: 0 2px 7px rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.3);
  transition: transform .15s; position: relative;
}
.mini-card:hover, .mini-card-img:hover { transform: scale(1.25); z-index: 60; }
.mini-card-img:first-child { margin-left: 0; }
.mini-card:first-child { margin-left: 0; }
.team-trick-badge {
  font-size: 10px; font-weight: 700; color: var(--accent-green);
  background: rgba(16,185,129,0.15); border-radius: 8px; padding: 1px 6px;
}

/* ---- Zone du pli ---- */
.trick-area { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.trick-slot {
  position: absolute;
  width: 66px; height: 92px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
}
.trick-slot img { width: 100%; height: 100%; object-fit: contain; border-radius: 5px; box-shadow: var(--shadow); transition: transform .15s; position: relative; }
.trick-slot img:hover { transform: scale(1.25); z-index: 60; }
.trick-top { left: 50%; top: 30%; transform: translateX(-50%); }
.trick-bottom { left: 50%; bottom: 26%; transform: translateX(-50%); }
.trick-left { left: 30%; top: 50%; transform: translateY(-50%); }
.trick-right { right: 30%; top: 50%; transform: translateY(-50%); }
.trick-slot.win img { box-shadow: 0 0 20px var(--accent-gold); }

.contract-banner {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  z-index: 7;
  pointer-events: none;
}
.contract-banner .cb-trump { font-size: 15px; font-weight: 700; color: var(--accent-gold); }
.contract-banner .cb-value { font-size: 26px; font-weight: 900; }
.contract-banner .cb-coinche { color: var(--accent-red); font-weight: 800; font-size: 14px; }

.action-message {
  position: absolute;
  bottom: 33%; left: 50%; transform: translateX(-50%);
  color: #fff; font-weight: 600; font-size: 14px;
  background: rgba(0,0,0,0.5); padding: 4px 12px; border-radius: 12px;
  z-index: 8; pointer-events: none; transition: opacity .3s;
}

/* ---- Ma main ---- */
.my-hand-area {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0 14px;
  min-height: 120px;
}
.hand-label { font-size: 12px; color: var(--text-muted); }
.my-hand { display: flex; justify-content: center; height: 108px; }
.hand-card {
  width: 74px; height: 104px;
  margin-left: -22px;
  border-radius: 6px;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  position: relative;
}
.hand-card:first-child { margin-left: 0; }
.hand-card img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.hand-card:hover {
  transform: translateY(-10px) scale(1.12);
  transform-origin: bottom center;
  z-index: 60;
  box-shadow: 0 10px 24px rgba(0,0,0,0.55);
}
.hand-card.illegal { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.5); }
.hand-card.trump-card { box-shadow: 0 0 0 2px var(--accent-gold); }

/* ---- Barre de tour ---- */
.turn-bar {
  height: 4px; width: 100%; background: rgba(255,255,255,0.08);
}
.turn-timer-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
  transition: width 1s linear;
}

/* ---- Enchères ---- */
.bidding-panel {
  position: fixed;
  bottom: 130px; left: 50%; transform: translateX(-50%);
  background: rgba(17,24,39,0.98);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  width: min(620px, 94vw);
}
.bidding-header { font-size: 14px; font-weight: 700; color: var(--accent-gold); margin-bottom: 8px; text-align: center; }
.bidding-values { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 8px; }
.bid-value-btn {
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-weight: 600; font-size: 14px;
}
.bid-value-btn.active { background: var(--accent-gold); color: #000; border-color: var(--accent-gold); }
.bid-value-btn.capot { color: var(--accent-red); font-weight: 800; }
.bid-value-btn.capot.active { background: var(--accent-red); color: #fff; }
.bidding-denoms { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.bid-denom-btn {
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-weight: 700; font-size: 15px;
}
.bid-denom-btn.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.bidding-actions { display: flex; gap: 8px; justify-content: center; }
.btn-action {
  padding: 10px 22px; border: none; border-radius: 8px;
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.btn-fold { background: var(--accent-red); color: #fff; }
.btn-check { background: var(--accent-green); color: #04240f; }
.btn-raise { background: var(--accent-blue); color: #fff; }
.btn-coinche { background: linear-gradient(135deg, #f59e0b, #dc2626); color: #fff; }
.btn-action:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Historique des enchères ---- */
.bids-log {
  position: fixed;
  top: 70px; left: 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--text-secondary);
  pointer-events: none;
  max-width: 200px;
}
.bids-log .bl-bid { color: var(--accent-gold); font-weight: 700; }
.bids-log .bl-fold { color: var(--accent-red); }
.bids-log .bl-coinche { color: #f59e0b; font-weight: 800; }

/* ---- Résultat ---- */
.result-modal { text-align: center; max-width: 520px; }
.result-modal h2 { font-size: 24px; }
.result-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.result-table th, .result-table td { padding: 7px; border-bottom: 1px solid var(--border); text-align: center; }
.result-table th { color: var(--text-muted); font-weight: 600; }
.result-table .t0 { color: #cbd5e1; font-weight: 700; }
.result-table .t1 { color: #f87171; font-weight: 700; }
.result-made { color: var(--accent-green); font-weight: 800; }
.result-failed { color: var(--accent-red); font-weight: 800; }
.result-total { font-size: 16px; font-weight: 800; margin-top: 8px; }

@media (max-width: 720px) {
  .belote-table { width: 96vw; height: min(430px, calc(100vh - 250px)); border-width: 10px; }
  .seat-player { min-width: 96px; padding: 4px 7px; }
  .seat-avatar { width: 30px; height: 30px; font-size: 16px; }
  .seat-name { font-size: 11px; }
  .seat-sub { font-size: 10px; }
  .trick-slot { width: 50px; height: 70px; }
  .hand-card { width: 56px; height: 80px; margin-left: -18px; }
  .my-hand { height: 84px; }
  .bidding-panel { bottom: 104px; padding: 10px; }
  .bid-value-btn { padding: 5px 9px; font-size: 13px; }
}
