/* Fond étoilé animé */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #1d002c, #3a0ca3, #240046);
  color: #fff;
  min-height: 70vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('https://www.transparenttextures.com/patterns/stardust.png');
  opacity: 0.15;
  animation: starsFlow 100s linear infinite;
  z-index: 0;
}

@keyframes starsFlow {
  0% { background-position: 0 0; }
  100% { background-position: 2000px 2000px; }
}

/* Boîte du formulaire */
main {
  position: relative;
  z-index: 1;
  max-width: 250px;
  margin: 20px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(173, 216, 230, 0.3);
  backdrop-filter: blur(10px);
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px #9d4edd;
  }
  50% {
    box-shadow: 0 0 30px #5a189a;
  }
}

header {
  text-align: center;
  margin-top: 5px;
  position: relative;
  z-index: 2;
}

header h1 {
  font-size: 2.5rem;
  color: #ffb3ec;
  text-shadow: 0 0 8px #e0aaff;
}

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

/* Champs */
form div {
  margin-bottom: 15px;
}

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

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

input:focus {
  border-color: #e0aaff;
  box-shadow: 0 0 10px #e0aaff;
}

/* Icône mot de passe 👁 */
#togglePassword {
  color: #ffb3ec;
}

/* Bouton */
button {
  width: 100%;
  padding: 12px;
  font-size: 1.2rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(to right, #9d4edd, #e0aaff);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: linear-gradient(to right, #e0aaff, #9d4edd);
}

/* Lien mot de passe oublié */
p a {
  color: #ffd1dc;
  text-align: center;
  display: block;
  margin-top: 15px;
}

.message {
  padding: 12px;
  margin: 15px auto;
  width: 95%;
  max-width: 500px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

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