/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(145deg, #0a0f1d, #101c2c);
  color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  background-attachment: fixed;
  position: relative;
}

/* Fond animé dynamique (effet électrons/stars) */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(0,255,255,0.1) 0%, rgba(0,0,0,0) 70%), url('https://www.transparenttextures.com/patterns/stardust.png');
  background-size: cover;
  opacity: 0.15;
  z-index: -1;
  animation: subtleMove 60s infinite linear;
}

@keyframes subtleMove {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 1000px; }
}

/* HEADER */
header {
  width: 100%;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

header h1 {
  font-size: 2.5em;
  color: #00ffd5;
  text-shadow: 0 0 15px #00ffd5;
}

/* BOUTONS ACTION */
.action-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.bouton-image {
  width: 180px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 255, 213, 0.3);
  animation: pulsate 3s infinite alternate;
}

.bouton-image:hover {
  transform: scale(1.1);
  box-shadow: 0 0 50px rgba(0, 255, 213, 0.8);
}

@keyframes pulsate {
  from { box-shadow: 0 0 20px rgba(0, 255, 213, 0.3); }
  to   { box-shadow: 0 0 40px rgba(0, 255, 213, 0.5); }
}

/* FORMULAIRES */
.form-section {
  display: none;
  opacity: 0;
  margin-top: 50px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0, 255, 213, 0.15);
  max-width: 600px;
  transition: opacity 0.6s ease;
}

.form-section.active {
  display: block;
  opacity: 1;
}

.form-section h2 {
  color: #00ffd5;
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8em;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

input {
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1em;
  transition: all 0.3s;
}

input::placeholder {
  color: #ccc;
}

input:focus {
  border-color: #00ffd5;
  box-shadow: 0 0 10px #00ffd5;
  background: rgba(255, 255, 255, 0.15);
}

/* BUTTON SUBMIT (VALIDE) */
.form-section button {
  background: linear-gradient(135deg, #00ffd5, #00aaff);
  color: #000;
  font-weight: bold;
  padding: 12px 24px;
  border: none;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.5s ease;
  animation: morphShape 6s infinite ease-in-out;
  box-shadow: 0 0 15px rgba(0, 255, 213, 0.3);
  border-radius: 30% 40% 30% 40%;
  align-self: center;
  min-width: 120px;
}

.form-section button:hover {
  background-color: #00bfa1;
  box-shadow: 0 0 20px #00ffd5;
  transform: scale(1.05);
}

@keyframes morphShape {
  0%   { border-radius: 30% 40% 30% 40%; }
  25%  { border-radius: 50% 20% 50% 20%; }
  50%  { border-radius: 40% 30% 40% 30%; }
  75%  { border-radius: 20% 50% 20% 50%; }
  100% { border-radius: 30% 40% 30% 40%; }
}

/* PROGRESS BAR */
#progressBar {
  display: none;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: 0 0 10px rgba(0, 255, 213, 0.3);
}

#progressBar div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ffd5, #00aaff);
  transition: width 0.3s ease;
}

/* PRESENTATION */
.presentation {
  display: block;
  margin-top: 50px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 25px rgba(0, 255, 213, 0.15);
  max-width: 900px;
}

.presentation h2 {
  color: #00ffd5;
  text-align: center;
  font-size: 2em;
  margin-bottom: 25px;
  text-shadow: 0 0 10px #00ffd5;
}

.presentation p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 20px;
}

.presentation ul {
  margin-left: 25px;
  margin-bottom: 20px;
}

.presentation li::before {
  content: "✔";
  color: #00ffd5;
  margin-right: 8px;
}

.presentation li {
  margin-bottom: 10px;
  font-size: 1.05em;
}

/* FOOTER */
footer {
  margin-top: auto;
  padding: 20px;
  font-size: 0.9em;
  color: #999;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* CONFETTI CANVAS */
canvas.confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.6em;
  }

  .action-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }

  .bouton-image {
    width: 42vw;
    max-width: 140px;
    height: auto;
  }

  .form-section,
  .presentation {
    padding: 20px;
    width: 95%;
  }

  input {
    font-size: 1em;
    padding: 10px;
  }

  .form-section button {
    min-width: 90px;
    padding: 8px 18px;
    font-size: 0.95em;
  }

  .presentation h2 {
    font-size: 1.4em;
  }
}
