:root {
  --card-width: 100px;
  --card-height: 145px;
}

body {
  background-color: #1a5e3a; /* Vert tapis de cartes */
  font-family: sans-serif;
  margin: 0;
  padding: 20px;
}

#game-board {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.top-row, .tableau-row {
  display: flex;
  justify-content: space-between;
}

.spacer { flex-grow: 1; }

/* Emplacement vide */
.zone {
  width: var(--card-width);
  height: var(--card-height);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  position: relative;
}

/* Style de la Carte */
.card {
  width: var(--card-width);
  height: var(--card-height);
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  position: absolute;
  cursor: grab;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  box-sizing: border-box;
  font-weight: bold;
  font-size: 1.2rem;
}

.card.red { color: #cc0000; }
.card.black { color: #000000; }

/* Dos de la carte */
.card.back {
  background: linear-gradient(135deg, #1d2b64, #f8cdda);
  border: 3px solid white;
}
.card.back * {
  display: none; /* Cache le texte si face cachée */
}

/* Effet cascade automatique pour le tableau */
.tableau .card {
  top: calc(var(--card-index) * 28px);
}
