* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.body-home {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(145deg, #0a0a0a, #1e1e1e);
  color: #f0f0f0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particles span {
  position: absolute;
  display: block;
  width: 10px;
  height: 10px;
  background: #33ccff;
  animation: float 20s infinite linear;
  opacity: 0.3;
  border-radius: 50%;
}

.particles span:nth-child(1)  { top: 20%; left: 15%; animation-delay: 0s;  }
.particles span:nth-child(2)  { top: 50%; left: 25%; animation-delay: 5s;  }
.particles span:nth-child(3)  { top: 70%; left: 75%; animation-delay: 10s; }
.particles span:nth-child(4)  { top: 10%; left: 80%; animation-delay: 15s; }
.particles span:nth-child(5)  { top: 40%; left: 60%; animation-delay: 20s; }
.particles span:nth-child(6)  { top: 30%; left: 35%; animation-delay: 25s; }
.particles span:nth-child(7)  { top: 60%; left: 50%; animation-delay: 30s; }
.particles span:nth-child(8)  { top: 80%; left: 20%; animation-delay: 35s; }
.particles span:nth-child(9)  { top: 25%; left: 70%; animation-delay: 40s; }
.particles span:nth-child(10) { top: 55%; left: 85%; animation-delay: 45s; }
.particles span:nth-child(11) { top: 15%; left: 40%; animation-delay: 50s; }
.particles span:nth-child(12) { top: 45%; left: 10%; animation-delay: 55s; }
.particles span:nth-child(13) { top: 65%; left: 30%; animation-delay: 60s; }
.particles span:nth-child(14) { top: 35%; left: 75%; animation-delay: 65s; }
.particles span:nth-child(15) { top: 70%; left: 55%; animation-delay: 70s; }
.particles span:nth-child(16) { top: 50%; left: 80%; animation-delay: 75s; }
.particles span:nth-child(17) { top: 20%; left: 60%; animation-delay: 80s; }
.particles span:nth-child(18) { top: 85%; left: 45%; animation-delay: 85s; }
.particles span:nth-child(19) { top: 40%; left: 25%; animation-delay: 90s; }
.particles span:nth-child(20) { top: 60%; left: 70%; animation-delay: 95s; }


@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-1000px); }
}

.overlay {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.navbar {
  background: rgba(0, 0, 0, 0.6);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: #33ccff;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #ffffff;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.site-title {
  font-size: 2.5rem;
  color: #ffffff;
  text-shadow: 2px 2px 10px #33ccff;
}

.site-subtitle {
  font-size: 1.2rem;
  color: #cccccc;
  margin-top: 0.5rem;
}

.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

.story-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #33ccff;
  text-transform: uppercase;
}

.story-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.glitch {
  position: relative;
  font-size: 2rem;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 2px #33ccff;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: #33ccff;
  z-index: -1;
}
.glitch::before {
  animation: glitchTop 2s infinite linear alternate-reverse;
  top: -2px;
}
.glitch::after {
  animation: glitchBottom 2s infinite linear alternate-reverse;
  top: 2px;
}

@keyframes glitchTop {
  0% { clip-path: inset(0 0 90% 0); }
  50% { clip-path: inset(0 0 10% 0); }
  100% { clip-path: inset(0 0 90% 0); }
}

@keyframes glitchBottom {
  0% { clip-path: inset(90% 0 0 0); }
  50% { clip-path: inset(10% 0 0 0); }
  100% { clip-path: inset(90% 0 0 0); }
}

.btn-engine-access {
  text-align: center;
}

.start-button {
  display: inline-block;
  background-color: #33ccff;
  color: #000;
  padding: 0.8rem 1.5rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.start-button:hover {
  background-color: #00aaff;
  color: #fff;
}
.rules-list {
  list-style: none;
  padding-left: 0;
}

.rule-item {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* --- FORMULAIRE --- */

.answer-form {
  max-width: 500px;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.answer-label {
  font-weight: 600;
  color: #33ccff; /* Bleu clair pour rester dans ta palette */
  user-select: none;
}

.answer-input {
  padding: 10px 12px;
  font-size: 1rem;
  border: 2px solid #33ccff;
  border-radius: 6px;
  background-color: #222;
  color: #eee;
  outline-offset: 2px;
  transition: border-color 0.3s ease;
}

.answer-input::placeholder {
  color: #555;
  font-style: italic;
}

.answer-input:focus {
  border-color: #66ddff;
  box-shadow: 0 0 6px #66ddffaa;
  outline: none;
}

.answer-submit {
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  background-color: #33ccff;
  color: #121212;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.answer-submit:hover,
.answer-submit:focus {
  background-color: #1aa8cc;
  outline: none;
  box-shadow: 0 0 8px #1aa8ccaa;
}

/* --- RENDU GÉNÉRAL COHÉRENT AVEC INDEX --- */

body.body-home {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212;
  color: #eee;
  margin: 0;
  padding: 0;
}

.overlay {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.navbar {
  background-color: #1f1f1f;
  padding: 10px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 25px;
  padding: 0;
  margin: 0;
}

.nav-link {
  color: #bbb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #33ccff;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.site-title {
  font-size: 2.8rem;
  margin: 0;
  color: #33ccff;
}

.site-subtitle {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-top: 8px;
}

.main-content {
  background-color: #1a1a1a;
  padding: 30px 25px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(51, 204, 255, 0.2);
}


/* Bouton toggle audio */
.audio-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background: #111;
  color: #33ccff;
  border: 1px solid #33ccff;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

/* Section principale */
.enigmes-page {
  padding: 2rem;
}

/* Liste des énigmes */
.enigmes-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.enigme-item {
  margin-bottom: 1.5rem;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border: 1px solid #333;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.enigme-item:hover {
  transform: scale(1.02);
}

.enigme-link {
  font-size: 1.2rem;
  font-weight: bold;
  color: #33ccff;
  text-decoration: none;
}

.enigme-link:hover {
  text-decoration: underline;
}

.enigme-desc {
  font-size: 0.95rem;
  color: #aaa;
  margin-top: 0.5rem;
}

/* Détail d'une énigme */
.enigme-detail-section {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
}

.enigme-full-desc {
  margin-bottom: 1.5rem;
  color: #ccc;
}

.answer-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.answer-input {
  padding: 0.7rem;
  border: 1px solid #555;
  border-radius: 5px;
  background-color: #111;
  color: #fff;
}

.answer-submit {
  padding: 0.7rem 1.5rem;
  border: none;
  background-color: #33ccff;
  color: #000;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}

.answer-submit:hover {
  background-color: #1aa7d1;
}

.answer-result {
  margin-top: 1rem;
  font-weight: bold;
}

.small-text {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Utilitaire pour cacher une section */
.hidden {
  display: none;
}



/* ---- Ajout formulaire pseudo ---- */
.pseudo-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.pseudo-form {
  background: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 10px;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-label {
  font-size: 1rem;
  color: #f0f0f0;
}

.form-input {
  padding: 0.6rem 1rem;
  border: 1px solid #33ccff;
  background: #111;
  color: #f0f0f0;
  border-radius: 5px;
  font-size: 1rem;
  outline: none;
  transition: border 0.3s ease;
}

.form-input:focus {
  border-color: #00aaff;
}

/* Bouton générique */
.btn {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* Bouton style principal */
.btn-primary {
  background-color: #33ccff;
  color: #000;
  font-weight: bold;
}

.btn-primary:hover {
  background-color: #00aaff;
  color: #fff;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid #333;
}

.footer-text {
  color: #888;
  margin-bottom: 0.5rem;
}

.footer-link {
  color: #33ccff;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .nav-list {
    flex-direction: column;
    gap: 1rem;
  }

  .site-title {
    font-size: 1.8rem;
  }

  .site-subtitle {
    font-size: 1rem;
  }

  .pseudo-form {
    padding: 1.5rem;
  }
}
