/* Global */
body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Arial', sans-serif;
  text-align: center;
  padding: 20px;
  margin: 0;
}

/* TITRE */
h1 {
  color: #a855f7;
  text-transform: uppercase;
  text-shadow: 0 0 10px #a855f7;
  font-size: clamp(24px, 5vw, 40px);
  margin-bottom: 20px;
}

/* FILTRES */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 14px;
  color: #a855f7;
  margin-bottom: 5px;
}

select {
  padding: 10px;
  background: #222;
  color: #fff;
  border: 1px solid #a855f7;
  border-radius: 5px;
  font-size: 14px;
}

/* BOUTONS */
.buttons {
  margin-bottom: 20px;
}

button {
  padding: 12px 18px;
  margin: 5px;
  border: none;
  background: linear-gradient(145deg, #a855f7, #7c3aed);
  color: white;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #a855f7;
}

/* GRILLE D'AFFICHAGE */
.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 15px;
  margin: 20px auto;
  max-width: 1200px;
}

.card {
  background: #222;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  box-shadow: 0 0 10px #a855f7; /* Néon externe */
  transition: opacity 0.6s ease-out, transform 0.3s ease-out;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: scale(1.05);
}

.card-number {
  font-size: 12px;
  color: #a855f7;
  margin-top: 10px;
}

/* PHRASE ALÉATOIRE */
#randomDisplay {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: bold;
  color: #ffffff;
  font-style: italic;
  padding: 12px;
  display: inline-block;
  margin: 25px auto;
  opacity: 1;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

/* ANIMATION D'APPARITION */
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* ANIMATION FLUIDE DE LA PHRASE ALÉATOIRE */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Texte expliquant les mots fixes */
#fixedWordsNotice {
  font-size: 14px;
  color: #a855f7;
  margin-top: 20px;
  font-style: italic;
}

/* responsive design */
@media only screen and (max-width: 1000px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media only screen and (max-width: 800px) {
    .grid-container {
        margin: 20px 50px;
    }
}

@media only screen and (max-width: 450px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}
