/* Style global */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  text-align: center;
  background: linear-gradient(to bottom, #f8e8ff, #d1c4e9);
}

/* Écrans centrés */
#start-screen,
#rule-memory,
#game-memory,
#rule-math,
#game-math,
#rule-speed,
#game-speed,
#game-labyrinth {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Timer + score */
.info-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

/* Boutons animés */
.animated-button {
  background: #6200ea;
  color: white;
  font-size: 28px;
  padding: 15px 25px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  margin: 12px;
  transition: background 0.3s, transform 0.2s;
}
.animated-button:hover {
  background: #3700b3;
  transform: scale(1.1);
}

/* Bouton gris (Accueil / Non) */
.gray-button {
  background: #bdbdbd;
  color: black;
}
.gray-button:hover {
  background: #909090;
}

/* JEU DE MÉMOIRE */
#grid {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  justify-content: center;
}
.cell {
  width: 60px;
  height: 60px;
  background: #bbb;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.5s;
}
.cell.active {
  background: #ffeb3b; /* Jaune */
}

/* JEU DE MATH */
#calcul-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.calcul-box {
  width: 200px;
  padding: 20px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  margin: 0 auto;
  transition: background 0.3s;
}
.calcul-box:nth-child(1) {
  background: #9c27b0;
  color: white;
}
.calcul-box:nth-child(2) {
  background: #6200ea;
  color: white;
}
.calcul-box:hover {
  background: #3700b3;
}

/* JEU "À TOUTE VITESSE" */
#symbol-container {
  margin: 20px auto;
}
#symbol-box {
  width: 200px;
  height: 200px;
  background: #ffffff;
  border: 4px solid #ccc;
  border-radius: 12px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);

  font-size: 60px; 
  font-weight: bold;
  transition: transform 0.6s ease;
}
#symbol-box.flip {
  animation: rotateSymbol 0.6s forwards; /* 0->180° */
}

/* Première symbole distinctif */
.first-symbol {
  outline: 4px dashed #ff4081;
  box-shadow: 0 0 10px #ff4081;
}

/* Keyframes 0->180° */
@keyframes rotateSymbol {
  0%   { transform: rotateY(0deg) scale(1); }
  100% { transform: rotateY(180deg) scale(1.1); }
}

#buttons-yes-no {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

/* LABYRINTHE (4) */
.lab-info-container {
  margin-bottom: 20px;
  font-size: 18px;
}

/* Labyrinthe : 10×20 => 640×320 en PC */
#lab-container {
  width: 640px;
  height: 320px;
  background: #74c69d;
  position: relative;
  border: 2px solid #555;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* Tuiles (32×32 en PC) */
.tile {
  position: absolute;
  width: 32px;
  height: 32px;
}
.wall {
  background: #384a3f;
}
.exit {
  background: #ffd166; /* Jaune sortie */
}
.player {
  background: #006d77; /* Carré bleu */
}

/* Sur mobile (max-width:600px) => divisé par 2 */
@media (max-width: 600px) {
  #lab-container {
    width: 320px;
    height: 160px;
  }
  .tile {
    width: 16px;
    height: 16px;
  }
}
body {
    font-family: Arial, sans-serif;
    text-align: center;
    background: linear-gradient(to bottom, #f8e8ff, #d1c4e9);
}

#start-screen, #rule-screen, #game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.animated-button {
    padding: 10px 20px;
    font-size: 18px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    background: #6200ea;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.animated-button:hover {
    background: #3700b3;
    transform: scale(1.1);
}

#grid {
    display: grid;
    gap: 5px;
    margin-top: 20px;
}

.cell {
    width: 60px;
    height: 60px;
    background: #bbb;
    border-radius: 5px;
    cursor: pointer;
}

.cell.active {
    background: #6200ea;
}
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(to bottom, #f8e8ff, #d1c4e9);
}

#start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.animated-button {
    font-size: 22px;
    padding: 15px 30px;
    margin: 15px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.animated-button::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.3s ease-in-out;
}

.animated-button:hover::before {
    left: 0;
}

.animated-button:active {
    transform: scale(0.95);
}

/* Styles spécifiques pour chaque bouton */
#play-button {
    background-color: #6200ea;
    color: white;
}

#home-button {
    background-color: #bdbdbd;
    color: black;
}