@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap");

body {
  font-family: "Comfortaa", Arial, sans-serif;
  background-color: #0a0a0a;
  background-image: url(images/background.jfif);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  text-align: center;
  margin-top: 50px;
  position: relative;
  color: #ffffff;
}

h1 {
  color: #00d4ff;
  font-size: 75px;
  margin: 10px;
  padding: 10px;
  text-shadow: 5px 5px 10px black;
}

h1 span {
  color: yellow;
}

.rep {
  padding: 10px;
  margin: 5px;
  width: 300px;
  /* Fixer la largeur de l'input */
}

button {
  padding: 10px;
  margin: 5px;
  width: 100px;
}

#feedback {
  margin-top: 20px;
  font-size: 25px;
  font-weight: bold;
  text-shadow: 1px 1px 0px #ffffff,
    /* Ombre vers le bas à droite */ -1px 1px 0px #ffffff,
    /* Ombre vers le bas à gauche */ 1px -1px 0px #ffffff,
    /* Ombre vers le haut à droite */ -1px -1px 0px #ffffff; /* Ombre vers le haut à gauche */
}

#suggestions {
  border: 1px solid #333;
  display: none;
  position: absolute;
  background-color: #1a1a1a;
  width: 300px;
  /* Correspond à la largeur de l'input */
  text-align: left;
  margin-top: 5px;
  /* Espace entre l'input et les suggestions */
  z-index: 1;
  left: calc(50% - 55px);
  transform: translateX(-50%);
  top: calc(50px + 120px);
  /* Position en dessous de l'input */
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5);
  /* Ajoute une ombre pour le style */
}
.suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #333;
  /* Ligne de séparation entre les suggestions */
  color: #ffffff;
}

.suggestion-item:hover {
  background-color: #333;
}

/* Autres styles inchangés */
.answers-container {
  max-width: 800px;
  margin: 20px auto;
  overflow-x: auto;
}

input {
  border-radius: 20px;
  box-shadow: 5px 5px 10px 5px #000000;
  background-color: #1a1a1a;
  color: #ffffff;
  border: 1px solid #333;
}

.btn-submit {
  box-shadow: 5px 5px 10px 5px #000000;
  background-color: #00d4ff;
  color: #000000;
  border: none;
  border-radius: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border: 1px solid #333;
  text-align: center;
  width: calc(100% / 6);
  /* Ajustement pour 7 colonnes */
}

td {
  text-shadow: 2px 2px 5px #000;
  padding: 0px;
}

th {
  background-color: #1a1a1a;
  font-weight: bold;
  box-shadow: inset 1px 1px 1px 1px black;
  color: #ffffff;
}

.square-image {
  max-width: 100%;
  max-height: 100%;
}

.square-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
}

.correct {
  background-color: #00ff88;
  /* Vert pour correspondance totale */
  color: black;
}

.partial-correct {
  background-color: #ffa500;
  /* Orange pour correspondance partielle */
  color: white;
}

.incorrect {
  background-color: #ff4757;
  /* Rouge pour aucune correspondance */
  color: white;
}

.correct,
.partial-correct,
.incorrect {
  box-shadow: inset 1px 1px 10px 1px black;
}

/*tr:nth-child(even) { background-color: #f9f9f9;}*/

/* Styles pour le pop-up de victoire */
.win-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1a1a1a;
  padding: 20px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5);
  z-index: 2;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 80%;
  color: #ffffff;
}

.win-content {
  position: relative;
}

.win-popup img {
  max-width: 100%;
  border-radius: 5px;
  margin-bottom: 10px;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: #ffffff;
}

.win-popup button {
  padding: 10px 20px;
  background-color: #00ff88;
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.win-popup button:hover {
  background-color: #00cc66;
}

/* Styles pour les flèches */
.arrow-icon {
  width: 20px;
  /* Taille de la flèche */
  height: 20px;
  opacity: 0.5;
  /* Opacité à 50% */
  margin-left: 5px;
  /* Espace entre la flèche et le texte */
  vertical-align: middle;
  /* Aligne la flèche avec le texte */
}

/* Flèche vers le haut */
.arrow-up {
  content: url("images/fleche-haut.png");
}

/* Flèche vers le bas */
.arrow-down {
  content: url("images/fleche-bas.png");
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-in-cell {
  animation: fadeIn 0.25s ease-in-out forwards;
  opacity: 0;
  /* Assurez-vous qu'elles sont invisibles au début */
}

.suggestion-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #333;
}

.suggestion-item:hover {
  background-color: #333;
}

.suggestion-image {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  margin-right: 10px;
  object-fit: cover;
}

.suggestion-text {
  color: #ffffff;
}
