
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a0a2e, #2d1b4e, #1a0a2e);
  color: #e0e0e0;
  overflow-x: hidden;
}


#table-jeu {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 8px 8px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


.info-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 10px; margin-bottom: 8px; min-height: 48px;
  background: rgba(255,255,255,0.06); border-radius: 12px;
  font-size: 0.82rem; flex-wrap: wrap; gap: 4px 10px;
}
.info-bar .timer { font-size: 1.05rem; font-weight: 700; color: #f0abfc; font-variant-numeric: tabular-nums; }
.info-bar .contrat-info { color: #f0abfc; font-weight: 700; }
.info-bar .contrat-info:empty { display: none; }
.info-bar .pli-info { color: #cbd5e1; }
.back-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
  color: #f0abfc; text-decoration: none; font-size: 0.85rem; font-weight: 600;
}
.back-link:hover { color: #d946ef; }
.btn-icone {
  min-width: 44px; min-height: 44px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  font-size: 1.1rem; line-height: 1; color: #fff;
}
.btn-icone:hover { background: rgba(255,255,255,0.15); }
.btn-icone:focus-visible, .btn:focus-visible, .btn-roi:focus-visible, .back-link:focus-visible, .lien-classement-fin:focus-visible {
  outline: 3px solid #fbbf24; outline-offset: 2px;
}

.bandeau-solo {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; font-size: 0.85rem; text-align: center;
  background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.35); color: #bbf7d0;
}
.bandeau-solo.bandeau-alerte { background: rgba(251,191,36,0.14); border-color: rgba(251,191,36,0.45); color: #fde68a; }

.zone-message {
  text-align: center; font-size: 0.98rem; font-weight: 700;
  color: #f0abfc; margin-bottom: 6px; min-height: 2.6em;
  display: flex; align-items: center; justify-content: center;
}


.zone-table .table-tarot.tt-n3 { min-height: 238px; }
.zone-table .table-tarot.tt-n4,
.zone-table .table-tarot.tt-n5 { min-height: 342px; }
.main-cartes { min-height: calc(var(--carte-h) + 16px); }


.zone-chien { text-align: center; margin-bottom: 10px; }
.titre-zone { font-size: 0.95rem; color: #fbbf24; margin-bottom: 8px; }
.chien-cartes { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }


.zone-main {
  padding: 8px 4px; margin-top: auto;
  background: rgba(255,255,255,0.04); border-radius: 16px 16px 0 0;
}
.main-label { font-size: 0.78rem; color: #cbd5e1; text-align: center; margin-bottom: 4px; }



.overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); z-index: 100;
  justify-content: center; align-items: center; padding: 60px 12px 12px;
}
.overlay.visible { display: flex; }
.overlay-content {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px; padding: 24px 22px; max-width: 520px; width: 100%;
  text-align: center; max-height: calc(100vh - 72px); overflow-y: auto;
}
.overlay-content h2 {
  font-size: 1.5rem; margin-bottom: 12px;
  background: linear-gradient(90deg, #f0abfc, #d946ef, #a21caf);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.overlay-texte { color: #cbd5e1; font-size: 0.86rem; margin-bottom: 10px; }
.encheres-historique { margin-bottom: 12px; font-size: 0.85rem; }

.overlay-decision { background: rgba(0,0,0,0.25); pointer-events: none; }
.overlay-decision .overlay-content { pointer-events: auto; max-width: 460px; padding: 16px 18px; }
.overlay-decision .overlay-content h2 { font-size: 1.2rem; margin-bottom: 8px; }


.btn {
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 700;
  padding: 10px 22px; min-height: 44px; border: none; border-radius: 10px; cursor: pointer;
  color: #fff; transition: transform 0.2s, box-shadow 0.2s; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1.1; text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled {
  cursor: not-allowed; transform: none; box-shadow: none;
  background: rgba(148,163,184,0.18); color: #94a3b8; border: 1px dashed rgba(148,163,184,0.5);
}
.btn-petit { padding: 8px 14px; font-size: 0.84rem; }
.btn-primary { background: #a21caf; box-shadow: none; }
.btn-secondary { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); }
.btn-passe { background: rgba(100,116,139,0.55); }
.btn-enchere { background: #7c3aed; }
.encheres-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }

.overlay .btn-redistribuer { margin-top: 14px; }
.btn-redistribuer[hidden] { display: none; }


.ecart-zone { margin: 8px 0 10px; text-align: center; }
.ecart-info { font-size: 0.85rem; color: #cbd5e1; margin-bottom: 8px; }
.ecart-cartes {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  min-height: calc(var(--carte-h) + 18px); background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 8px; border: 2px dashed rgba(255,255,255,0.15); margin-bottom: 8px;
}


.appel-roi-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.btn-roi {
  font-family: inherit; font-size: 1.3rem; font-weight: 800; min-width: 64px; height: 64px; padding: 0 8px;
  border-radius: 12px; background: #f8fafc; border: 2px solid rgba(255,255,255,0.3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: border-color 0.2s, transform 0.2s;
}
.btn-roi:hover { border-color: #d946ef; transform: scale(1.06); }
.btn-roi.rouge { color: #b91c1c; }
.btn-roi.noir { color: #0f172a; }


.cta-inscription {
  margin-top: 14px; padding: 14px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
}
.cta-inscription p { color: #cbd5e1; font-size: 0.86rem; margin-bottom: 10px; }
.cta-inscription-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.partage-score { margin-top: 10px; }
.resultat-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .zone-table .table-tarot.tt-n3 { min-height: 196px; }
  .zone-table .table-tarot.tt-n4,
  .zone-table .table-tarot.tt-n5 { min-height: 282px; }
  .overlay-content { padding: 18px 14px; }
  .resultat-gain-valeur { font-size: 1.7rem; }
}
