/* 🌌 Arrière-plan général */
body {
  background: linear-gradient(135deg, #1a1a1a, #222, #2c2c2c);
  color: #f0f0f0;
  font-family: 'Comic Neue', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

/* 🪄 Conteneur principal */
#game {
  max-width: 720px;
  padding: 30px;
  background: rgba(34, 34, 34, 0.95);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0,0,0,0.7);
  text-align: center;
  animation: fadeIn 1s ease;
}

/* 💬 Zone de texte */
#text {
  font-size: 22px;
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 140px;
}

/* 🎉 Quand il y a un GIF → pas de marge inutile */
#text:has(img) {
  min-height: 0;
  margin: 0;
  padding: 0;
}

/* 🔘 Boutons */
button {
  background: #ff7b00;
  border: none;
  padding: 14px 28px;
  margin: 10px;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
  background: #ff9500;
  transform: scale(1.1);
}

/* 🖼️ Zone personnage */
#character {
  width: 350px;
  height: 400px;
  margin: 0 auto 25px auto;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;                      /* caché par défaut */
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#character.visible {
  opacity: 1;                      /* rendu visible */
  transform: translateY(0);
}

/* ✨ Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== Bouton retour Accueil ===== */
#home-button {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
  background: #ff7b00;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  transition: background 0.3s, transform 0.2s;
}

#home-button:hover {
  background: #ff9500;
  transform: scale(1.05);
}
