html, body {
  height: 100%;
  overflow: hidden;
}

body {
  position: fixed;
  width: 100%;
}

/* ================================
   FOND GÉNÉRAL
================================ */
.fond-foret {
  background-image: url("../images/fonds/fond_foret.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #fff;
}

/* Phrase poétique du Doyen */
.foret-phrase {
  position: absolute;
  bottom: 12%;        /* toujours au-dessus du footer */
  right: 2%;
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(14px, 1.5vw, 22px);
  line-height: 1.4;
  color: rgba(180, 200, 245, 0.4);
  text-shadow: 0 0 6px rgba(180,200,255,0.2);
  text-align: right;
  opacity: 0;
  filter: blur(0.75px);
  transition: opacity 4s ease-in-out;
  max-width: 40%;
  z-index: 100; /* texte toujours au-dessus des flammes */
}

/* Flammes et noms */
.esprit {  
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease-in-out;
  transform-origin: center bottom;
  animation: oscillationFlamme 4.5s ease-in-out infinite;
  z-index: 10; /* sous le texte */
}

.esprit-nom {
  position: absolute;
  pointer-events: none;
  white-space: nowrap;
  font-size: 1rem;
  text-align: center;
  opacity: 0;
  color: #fef6b2;
  text-shadow: 0 0 6px rgba(255, 240, 180, 0.4);
  transition: opacity 1.2s ease-in-out;
  z-index: 10;
}

/* Oscillation légère */
@keyframes oscillationFlamme {
  0% { transform: rotate(-1deg) scale(1); }
  25% { transform: rotate(1deg) scale(1.03); }
  50% { transform: rotate(-0.5deg) scale(0.98); }
  75% { transform: rotate(0.8deg) scale(1.02); }
  100% { transform: rotate(-1deg) scale(1); }
}

/* ================================
   RESPONSIVE MOBILE
================================ */
@media (max-width: 768px) {

  .foret-phrase {
    right: 5%;
    left: 5%;
    bottom: 15%;
    max-width: 100%;
    text-align: center;
    font-size: clamp(14px, 3.5vw, 18px);
  }

  .esprit {
    width: 70px !important;
  }

  .esprit-nom {
    font-size: 0.8rem;
  }
  
  .site-footer {
    display:none;
  }
}

@media (orientation : portrait) {
  .foret-phrase {
    filter: blur(0.50px);
  }
}