@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap");

body {
  font-family: "Comfortaa", Arial, sans-serif;
  background-color: #f0f0f0;
  text-align: center;
  margin-top: 50px;
  position: relative;
  background-image: url(images/krozmoz_backgroundM7.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

h1 {
  color: #ae0ba6;
  font-size: 75px;
  margin: 10px;
  padding: 10px;
  text-shadow: 5px 5px 10px black;
}

h1 span {
  color: rgb(8, 129, 241);
}

.rep {
  padding: 10px;
  margin: 5px;
  width: 300px;
  /* Fixer la largeur de l'input */
  position: relative;
  /* Nécessaire pour aligner les suggestions */
}

button {
  padding: 10px;
  margin: 5px;
  width: 100px;
}

#feedback {
  margin-top: 20px;
  font-size: 25px;
  font-weight: bold;
  text-shadow: 1px 1px 0px white,
    /* Ombre vers le bas à droite */ -1px 1px 0px white,
    /* Ombre vers le bas à gauche */ 1px -1px 0px white,
    /* Ombre vers le haut à droite */ -1px -1px 0px white; /* Ombre vers le haut à gauche */
}

#suggestions {
  border: 1px solid #ccc;
  display: none;
  position: absolute;
  background-color: #fff;
  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.1);
  /* Ajoute une ombre pour le style */
}
.suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  /* Ligne de séparation entre les suggestions */
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

/* 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;
}

.btn-submit {
  box-shadow: 5px 5px 10px 5px #000000;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: center;
  width: calc(100% / 6);
  /* Ajustement pour 7 colonnes */
}

td {
  text-shadow: 2px 2px 5px #000;
  padding: 0px;
}

th {
  background-color: #f0f0f0;
  font-weight: bold;
  box-shadow: inset 1px 1px 1px 1px black;
}

.square-image {
  max-width: 100%;
  max-height: 100%;
}

.square-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
}

.correct {
  background-color: #4caf50;
  /* Vert pour correspondance totale */
  color: white;
}

.partial-correct {
  background-color: #ffa500;
  /* Orange pour correspondance partielle */
  color: white;
}

.incorrect {
  background-color: #f44336;
  /* 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: #fff;
  padding: 40px 20px 20px 20px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 2;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 80%;
}

.win-content {
  position: relative;
}

.win-popup img {
  max-width: 100%;
  border-radius: 5px;
  margin-bottom: 10px;
}

.close {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 20px;
  cursor: pointer;
  color: #333;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-weight: bold;
}

.win-popup button {
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.win-popup button:hover {
  background-color: #45a049;
}

/* 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 #eee;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

.suggestion-image {
  width: 30px;
  /* Taille de l'image */
  height: 30px;
  margin-right: 10px;
  /* Espace entre l'image et le nom */
  border-radius: 25px;
  /* Coins arrondis */
  object-fit: cover;
}

/* Style pour la barre de navigation */
nav {
  background-color: #333;
  padding: 1em;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  /* Assurez-vous qu'elle reste au-dessus des autres éléments */
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2em;
  margin: 0;
  padding: 0;
}

nav ul li {
  display: inline;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav ul li a:hover {
  text-decoration: underline;
}