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

/* === PAGE D’ACCUEIL === */
body.home {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top, #074c65 0%, #03172e 90%);
  color: #c41b1b;
  font-family: 'Cormorant Garamond', serif;
}

.container {
  text-align: center;
}

/* TITRES ACCUEIL */
.title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 3rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px #6513d9, 0 0 40px #529e02;
  animation: fadeIn 2s ease-in-out forwards;
}

.subtitle {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeIn 4s ease-in-out forwards;
  animation-delay: 1s;
}

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

/* BOUTON ACCUEIL */
.enter-btn {
  display: inline-block;
  text-decoration: none;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  background: transparent;
  border: 2px solid #eaeaea;
  color: #eaeaea;
  padding: 0.8rem 2rem;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
}
.enter-btn:hover {
  background: hsl(0, 87%, 41%);
  color: #2c2c86;
  box-shadow: 0 0 100px #eaeaea;
}

/* BOUGIE ANIMÉE */
.flame-container {
  position: relative;
  width: 20px;
  height: 30px;
  margin: 0 auto 2rem auto;
}
.candle {
  position: absolute;
  width: 20px;
  height: 50px;
  background: #d8d0c1;
  border-radius: 8px;
}
.flame {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 20px;
  height: 30px;
  background: radial-gradient(ellipse at center, #f9d977 0%, #ff9b00 70%, transparent 80%);
  animation: flicker 0.2s infinite alternate;
}
@keyframes flicker {
  0% { transform: translateX(-50%) scaleY(1); opacity: 1; }
  100% { transform: translateX(-48%) scaleY(1.1); opacity: 0.8; }
}

/* === PAGE FORMULAIRE === */
body.form-page {
  background: url('../img/noces-funebres.jpg') no-repeat center center/cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Cormorant Garamond', serif;
  color: #eaeaea;
  position: relative;
  overflow: hidden;
}

/* BRUME ROUGE */
body.form-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(120, 0, 0, 0.45), rgba(0, 0, 0, 0.9) 80%);
  z-index: 0;
  animation: fogmove 40s linear infinite;
}
@keyframes fogmove {
  0% { background-position: 0 0; }
  100% { background-position: 2000px 0; }
}

/* CONTENEUR FORMULAIRE */
.form-container {
  position: relative;
  z-index: 2;
  background: rgba(10, 10, 20, 0.8);
  padding: 3rem 2rem;
  border: 2px solid #6a0f0f;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(255, 0, 0, 0.2), 0 0 60px rgba(80, 0, 130, 0.3);
  max-width: 500px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 2.5s ease;
}

/* TITRES FORMULAIRE */
.form-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.2rem;
  color: #b90e0a;
  text-shadow: 0 0 25px #b90e0a, 0 0 50px #ff0000;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  font-style: italic;
  font-size: 1.1rem;
  color: #d3d3d3;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* FORMULAIRE CHAMPS */
.laugh-form label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-weight: bold;
  color: #ffbaba;
  text-shadow: 0 0 5px #ff0000;
}

.laugh-form input,
.laugh-form select,
.laugh-form textarea {
  width: 100%;
  padding: 0.7rem;
  background: rgba(30, 0, 0, 0.7);
  border: 1px solid #8a0000;
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  transition: 0.3s;
}

.laugh-form input:focus,
.laugh-form select:focus,
.laugh-form textarea:focus {
  outline: none;
  background: rgba(50, 0, 0, 0.85);
  box-shadow: 0 0 20px #b90e0a;
}

/* BOUTON FORMULAIRE */
.laugh-btn {
  display: block;
  width: 100%;
  margin-top: 2rem;
  padding: 1rem;
  border: none;
  border-radius: 30px;
  background: linear-gradient(145deg, #8a0000, #c90a0a);
  color: #fff;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.laugh-btn:hover {
  background: linear-gradient(145deg, #c90a0a, #8a0000);
  box-shadow: 0 0 25px #b90e0a, 0 0 50px #ff0000;
  transform: scale(1.05);
}

/* === JUMPSCARE === */
.form-jumpscare {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.jump-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* couvre tout l’écran sans déformer */
  opacity: 1;
  transform: scale(1);
  transition: transform 0.3s ease;
  filter: brightness(110%) contrast(110%);
}


.form-jumpscare.active {
  opacity: 1;
  pointer-events: all;
}


.form-jumpscare.active .jump-img {
  transform: scale(1.1);
  animation: shake 0.3s linear 2;
  filter: brightness(150%) contrast(130%) saturate(120%);
}


/* TREMBLEMENT IMAGE */
@keyframes shake {
  0% { transform: translate(0, 0) scale(1.2); }
  25% { transform: translate(5px, -5px) scale(1.2); }
  50% { transform: translate(-5px, 5px) scale(1.2); }
  75% { transform: translate(5px, 5px) scale(1.2); }
  100% { transform: translate(0, 0) scale(1.2); }
}
