/* ----- STYLE GLOBAL ----- */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  background: linear-gradient(180deg, #eaffea, #ffffff);
  color: #222;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.4s ease;
}

/* ----- HEADER ----- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: #fafff8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

h1 {
  color: #27ae60;
  font-size: 1.6em;
  margin: 0;
}

#menu-btn {
  background: none;
  border: none;
  font-size: 1.8em;
  cursor: pointer;
  color: #27ae60;
}

/* ----- MENU LATÉRAL ----- */
#side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 270px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 5; /* derrière le bouton menu */
}

#side-menu.open {
  transform: translateX(0);
  z-index: 15; /* passe devant quand ouvert */
}

#close-menu {
  background: none;
  border: none;
  font-size: 1.5em;
  float: right;
  cursor: pointer;
  color: #27ae60;
}

#side-menu ul {
  list-style: none;
  padding: 0;
  margin-top: 60px;
}

#side-menu li {
  margin: 25px 0;
}

#side-menu a {
  text-decoration: none;
  color: #2ecc71;
  font-weight: 600;
  font-size: 1.1em;
  transition: color 0.3s;
}

#side-menu a:hover {
  color: #1e9b57;
}


/* ----- MAIN ----- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 10px;
  text-align: center;
}

.arbuste-section {
  transition: transform 0.4s ease;
}

#arbuste {
  width: 160px;
  transition: all 0.5s ease;
}

#arbuste.grow {
  transform: scale(1.15);
  filter: drop-shadow(0 0 10px #9df5af);
}

#level {
  font-weight: 600;
  color: #27ae60;
  margin-top: 10px;
}

/* ----- QUESTION ----- */
.question-section {
  background: #f8fff9;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-top: 25px;
  width: 100%;
  max-width: 500px;
  animation: fadeIn 0.4s ease;
}

.question-section h2 {
  font-size: 1.2em;
  color: #333;
  margin-bottom: 15px;
}

.assertion {
  display: block;
  width: 100%;
  background: #ebfff0;
  border: none;
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
}

.assertion:hover {
  background: #d3f8dd;
  transform: translateY(-3px);
}

.assertion.selected {
  background: #2ecc71;
  color: white;
}

#feedback {
  margin-top: 15px;
  font-style: italic;
  color: #27ae60;
  min-height: 22px;
}

/* ----- FOOTER ----- */
footer {
  background: #f0fff2;
  border-top: 1px solid #d8f8dd;
  text-align: center;
  padding: 12px;
  font-weight: 500;
}

/* ----- MODALE ----- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 25px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  animation: pop 0.4s ease;
  max-width: 350px;
  width: 85%;
}

.modal-content h2 {
  color: #27ae60;
  margin-bottom: 15px;
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-buttons button {
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1em;
  transition: transform 0.3s ease;
}

#buy-boost {
  background: #2ecc71;
  color: white;
}

#come-back {
  background: #e7fbe9;
  color: #27ae60;
}

.modal-buttons button:hover {
  transform: scale(1.05);
}

/* ----- ANIMATIONS ----- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ----- RESPONSIVE ----- */
@media (max-width: 600px) {
  #arbuste {
    width: 130px;
  }

  h1 {
    font-size: 1.3em;
  }

  .question-section {
    padding: 15px;
    font-size: 0.95em;
  }

  .assertion {
    padding: 10px;
    font-size: 0.95em;
  }

  #side-menu {
    width: 230px;
  }
}
