/* Fond animé étoilé */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(120deg, #0f0c29, #302b63, #24243e);
  color: #fff;
  min-height: 50vh;
  overflow-x: hidden;
  position: relative;
}

/* Animation d’étoiles légères */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  pointer-events: none; /* NE PAS bloquer les clics */
  width: 100%; height: 100%;
  background: url('https://www.transparenttextures.com/patterns/stardust.png');
  opacity: 0.15;
  animation: scrollStars 90s linear infinite;
  z-index: 0;
}

@keyframes scrollStars {
  from { background-position: 0 0; }
  to   { background-position: 1000px 1000px; }
}

/* Conteneur du formulaire */
main {
  position: relative;
  z-index: 10;
  max-width: 250px;
  margin: 30px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
  backdrop-filter: blur(10px);
  animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px #ff99ff;
  }
  50% {
    box-shadow: 0 0 30px #ccffff;
  }
}

header {
  text-align: center;
  margin-top: 5px;
  position: relative;
  z-index: 10; /* au-dessus des autres */
  pointer-events: auto;
}

header h1 {
  font-size: 2rem;
  color: #ffccff;
  text-shadow: 0 0 10px #cc66ff;
}

header a {
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
  display: block;
  margin-top: 10px;
}

form div {
  margin-bottom: 8px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #ffd1dc;
}

input,
select {
  width: 90%;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: 0.3s ease;
}

input:focus,
select:focus {
  border-color: #cc66ff;
  box-shadow: 0 0 10px #cc66ff;
}

button {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(to right, #cc66ff, #ff99cc);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: linear-gradient(to right, #ff99cc, #cc66ff);
}

/* Toast messages */
.toast-success {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4BB543;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  z-index: 9999;
  transition: opacity 1s ease;
  animation: fadeIn 0.5s ease;
}

.toast-error {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #e74c3c;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  z-index: 9999;
  transition: opacity 1s ease;
  animation: fadeIn 0.5s ease;
}

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

