html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  font-family: sans-serif;
}

#taquin-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  height: calc(100vh - 80px);
  flex-wrap: wrap;
}

#game-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* ⬅️ proportionnel */
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
  width: 90vw;
  max-width: 400px;
  aspect-ratio: 1;
}

#pseudoInput {
  color: black;
  background-color: white;
  border: 1px solid #aaa;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 16px;
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ddd;
  font-size: clamp(14px, 4vw, 24px);
  font-weight: bold;
  height: 100%;
  width: 100%;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.tile.empty {
  background-color: transparent;
  cursor: default;
}

.crit-effect {
  position: absolute;
  font-size: 30px;
  font-weight: bold;
  pointer-events: none;
  animation: crit 0.6s ease-out forwards;
  z-index: 9999;
}

@keyframes crit {
  0% { transform: scale(1) translateY(0); opacity: 1; }
  100% { transform: scale(1.8) translateY(-40px); opacity: 0; }
}

.shiny-effect {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: bold;
  color: gold;
  text-shadow: 0 0 10px white;
  animation: shine 2s ease-out;
  z-index: 10000;
}

@keyframes shine {
  0% { opacity: 0; transform: scale(0.5) translate(-50%, -50%); }
  50% { opacity: 1; transform: scale(1.2) translate(-50%, -50%); }
  100% { opacity: 0; transform: scale(2) translate(-50%, -50%); }
}

@media (max-width: 600px) {
  #game-area {
    flex-direction: column;
    align-items: center;
  }
}

#leaderboard {
  list-style: none;
  padding: 0;
  margin: 0;
}
