#proprietesJeu {
  width: 100vw;  
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

h1 {
  text-align: center;
  font-size: 7em;
  top: 10%;
  color: #ffffff;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  position: absolute;
}

.jouer_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 4em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
}

.jouer_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

.regles_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 4em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
}

.regles_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

.parametres_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 4em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
}

.parametres_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

body { background-color: #1e1325; }

.popup { display: none; }

.popup_parametres { 
  display: none;
  position: absolute;
  width: 100vw;
  height: 100vh;
}

.popup-content-parametres {
  position: relative;
  width: 100%;
  height: 100%;
}

.parametre-item {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.parametre-item:nth-of-type(1) { top: 35%; }
.parametre-item:nth-of-type(2) { top: 45%; }
.parametre-item:nth-of-type(3) { top: 55%; }
.parametre-item:nth-of-type(4) { top: 65%; }

.parametre-item label {
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 2em;
}

.parametre-item select {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 1.5em;
  border: 2px solid white;
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
}

.parametre-item select:hover {
  background-color: white;
  color: black;
}

.fermer_parametres_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 3em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
}

.fermer_parametres_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

#h2_parametres {
  text-align: center;
  font-size: 7em;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  position: absolute;
}

/* POPUP REGLES */
.popup_regles { 
  display: none;
  position: absolute;
  width: 100vw;
  height: 100vh;
}

.popup-content-regles {
  position: relative;
  width: 100%;
  height: 100%;
}

#h2_regles {
  text-align: center;
  font-size: 5em;
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  position: absolute;
}

.contenu-regles {
  position: absolute;
  top: 23%;
  left: 8%;
  right: 8%;
  display: flex;
  gap: 80px;
  justify-content: center;
}

.colonne-gauche {
  flex: 1;
  max-width: 550px;
}

.colonne-droite {
  flex: 1;
  max-width: 550px;
}

.bloc-regle {
  background-color: rgba(80, 62, 91, 0.3);
  border-left: 4px solid white;
  padding: 20px 25px;
  margin-bottom: 25px;
  border-radius: 5px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.contenu-regles h4 {
  color: white;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 2.8em;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.contenu-regles p {
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 1.6em;
  margin: 10px 0;
  line-height: 1.8;
}

.fermer_regles_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 3em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
}

.fermer_regles_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

h2 {
  text-align: center;
  font-size: 7em;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  position: absolute;
}

.facile_button,
.moyen_button,
.difficile_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 4em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.facile_button { top: 40%; }
.moyen_button { top: 60%; }
.difficile_button { top: 80%; }

.parametres-actifs {
  position: absolute;
  top: 20%;
  right: 50px;
  background-color: rgba(80, 62, 91, 0.7);
  border: 2px solid white;
  border-radius: 10px;
  padding: 20px;
  width: 350px;
}

.parametres-actifs h5 {
  color: white;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 2em;
  margin: 0 0 15px 0;
  text-align: center;
}

.parametres-actifs p {
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 1.3em;
  margin: 0;
  line-height: 1.8;
  white-space: pre-line;
}

.facile_button:hover,
.moyen_button:hover,
.difficile_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

.niveau_facile { display: none; }
.niveau_moyen { display: none; }
.niveau_difficile { display: none; }

/* ✅ LOGO RETOUR */
.logo-retour {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 150px;
  height: 150px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
}

.logo-retour:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* ✅ LOGO ACCUEIL */
.logo-accueil {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 150px;
  height: 150px;
  z-index: 1000;
}

h3 {
  text-align: center;
  font-size: 3em;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  position: absolute;
}

.board {
  display: flex;
  gap: 10px;
  margin-top: 50px;
  position: relative;
}

.slot {
  width: 60px;
  height: 60px;
  border: 2px solid white;
  border-radius: 10px;
  margin: 80px;
  background-color: transparent;
}

.slot.red { background-color: #C80303; }
.slot.orange { background-color: #F84F06; }
.slot.yellow { background-color: #FFCE46; }
.slot.green { background-color: #00E02E; }
.slot.aqua { background-color: #33FDD8; }
.slot.cyan { background-color: #00D4FF; }
.slot.blue { background-color: #1300C1; }
.slot.purple { background-color: #9600F3; }
.slot.magenta { background-color: #EF00FF; }
.slot.pink { background-color: #FF0291; }

.colors {
  display: flex;
  gap: 20px;
  position: absolute;
  top: 73%;          /* AU-DESSUS du bouton */
  left: 50%;
  transform: translateX(-50%);
}


.color {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
}

.color.red { background-color: #C80303; }
.color.orange { background-color: #F84F06; }
.color.yellow { background-color: #FFCE46; }
.color.green { background-color: #00E02E; }
.color.aqua { background-color: #33FDD8; }
.color.cyan { background-color: #00D4FF; }
.color.blue { background-color: #1300C1; }
.color.purple { background-color: #9600F3; }
.color.magenta { background-color: #EF00FF; }
.color.pink { background-color: #FF0291; }

/* Indicateur de couleur sélectionnée */
.color.selected {
  border: 4px solid white;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.valider_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 4em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  top: 85%;
  left: 50%;
  transform: translateX(-50%);
}

.valider_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

.feedback {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3em;      /* texte agrandi */
  font-family: 'Trebuchet MS', sans-serif;
  color: white;
  text-align: center;
}

.page_victoire {
  display: none;
  text-align: center;
}

.page_defaite {
  display: none;
  text-align: center;
}

.retour_button {
  background-color: #503e5b;
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 4em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 15px 30px;
  transition: all 0.1s ease;
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translateX(-50%);
}

.retour_button:hover {
  background-color: white;
  color: black;
  transform: translateX(-50%) scale(1.2);
}

p {
  font-family: 'Trebuchet MS', sans-serif;
  color: white;
  font-size: 4em;
}

/* ✅ AJOUT : compteur d'essais */
#compteur_essais,
#compteur_essais_moyen,
#compteur_essais_difficile,
#essais_victoire {
  font-family: 'Trebuchet MS', sans-serif;
  color: white;
  font-size: 3em;
  text-align: center;
  top: 45%;
}

/* ✅ HISTORIQUE */
.historique {
  position: absolute;
  right: 50px;
  top: 15%;
  width: 300px;
  max-height: 70vh;
  overflow-y: auto;
  background-color: rgba(80, 62, 91, 0.5);
  border: 2px solid white;
  border-radius: 10px;
  padding: 20px;
}

.historique h4 {
  color: white;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 2em;
  text-align: center;
  margin: 0 0 20px 0;
}

.tentative-historique {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  align-items: center;
}

.tentative-historique .mini-slot {
  width: 30px;
  height: 30px;
  border: 1px solid white;
  border-radius: 5px;
}

.tentative-historique .resultat {
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 1em;
  margin-left: 10px;
}

/* ✅ CADRE INDICE */
.cadre-indice {
  position: absolute;
  bottom: 50px;
  left: 50px;
  width: 350px;
  background-color: rgba(80, 62, 91, 0.8);
  border: 2px solid #FFD700;
  border-radius: 10px;
  padding: 20px;
  display: none;
}

.cadre-indice h6 {
  color: #FFD700;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 2em;
  text-align: center;
  margin: 0 0 15px 0;
}

.cadre-indice p {
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 1.5em;
  margin: 0;
  text-align: center;
}

.indice-item {
  color: white;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 1.3em;
  margin: 8px 0;
  padding: 8px;
  background-color: rgba(255, 215, 0, 0.1);
  border-radius: 5px;
  border-left: 3px solid #FFD700;
}