/* 🌐 Reset & Font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Orbitron', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(180deg, #1a0033 0%, #2d0a4e 50%, #4a1c75 100%);
}

main {
  flex: 1;
}

/* 🌅 Grille synthwave en arrière-plan */
body::before {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 0, 200, 0.15) 0px,
      transparent 1px,
      transparent 40px,
      rgba(255, 0, 200, 0.15) 41px),
    repeating-linear-gradient(90deg,
      rgba(255, 120, 0, 0.15) 0px,
      transparent 1px,
      transparent 40px,
      rgba(255, 120, 0, 0.15) 41px);
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom;
  z-index: 0;
  pointer-events: none;
}

/* 🌟 Header synthwave */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: linear-gradient(90deg, rgba(255, 0, 200, 0.3), rgba(255, 120, 0, 0.3));
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #ff00c8;
  box-shadow: 0 4px 20px rgba(255, 0, 200, 0.4);
  position: relative;
  z-index: 10;
}

header h2 {
  color: #ff7800;
  text-shadow: 0 0 15px #ff7800, 0 0 30px #ff00c8;
  font-weight: 900;
  letter-spacing: 2px;
}

.nav-buttons {
  display: flex;
  gap: 15px;
}

header a {
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  border: 2px solid;
  position: relative;
  overflow: hidden;
}

header a.dashboard {
  background: rgba(255, 120, 0, 0.2);
  border-color: #ff7800;
  color: #ff7800;
}

header h2 a.header-title {
  color: #ff7800;
  text-decoration: none;
  text-shadow: 0 0 15px #ff7800, 0 0 30px #ff00c8;
  font-weight: 900;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

header h2 a.header-title:hover {
  color: #00b4ff;
  text-shadow:
    0 0 15px #00b4ff,
    0 0 35px #00b4ff,
    0 0 50px #ff00c8;
}

header h2 a.header-title {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  text-transform: none;
  font-size: inherit;
}

header a.dashboard:hover {
  background: #ff7800;
  color: #1a0033;
  box-shadow: 0 0 20px #ff7800;
}

header a.logout {
  background: rgba(255, 0, 200, 0.2);
  border-color: #ff00c8;
  color: #ff00c8;
}

header a.chat {
  background: rgba(0, 180, 255, 0.2);
  border-color: #00b4ff;
  color: #00b4ff;
}

header a.errorButton {
  background: rgba(255, 0, 200, 0.2);
  border-color: red;
  color: red;
}

.userLogin {
  color: #ff00c8;
}

header a.logout:hover {
  background: #ff00c8;
  color: #1a0033;
  box-shadow: 0 0 20px #ff00c8;
}

header a.chat:hover {
  background: #00b4ff;
  color: #0b0020;
  box-shadow: 0 0 25px #00b4ff;
}

header a.errorButton:hover {
  background: red;
  color: #1a0033;
  box-shadow: 0 0 20px red;
}

/* 🎯 Conteneur du formulaire */
.form-container {
  max-width: 550px;
  margin: 100px auto;
  padding: 40px;
  background: rgba(20, 0, 40, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid #ff00c8;
  box-shadow:
    0 0 30px rgba(255, 0, 200, 0.5),
    0 0 60px rgba(255, 120, 0, 0.3),
    inset 0 0 30px rgba(139, 0, 255, 0.15);
  position: relative;
  z-index: 5;
}

/* Coins lumineux */
.form-container::before,
.form-container::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.form-container::before {
  top: -10px;
  left: -10px;
  background: #ff00c8;
  box-shadow: 0 0 20px #ff00c8;
}

.form-container::after {
  bottom: -10px;
  right: -10px;
  background: #ff7800;
  box-shadow: 0 0 20px #ff7800;
}

/* 📝 Titre */
.form-container h1 {
  text-align: center;
  margin-bottom: 35px;
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(90deg, #ff00c8, #8b00ff, #ff7800, #ff00c8);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s linear infinite;
  filter: drop-shadow(0 0 20px rgba(255, 0, 200, 0.6));
  letter-spacing: 3px;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 📌 Labels */
.form-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #ff7800;
  text-shadow: 0 0 8px #ff7800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 🧾 Champs input */
.form-container input,
.form-container textarea,
.form-container select {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 10px;
  border: 2px solid #8b00ff;
  background: rgba(30, 0, 50, 0.7);
  color: #fff;
  font-size: 15px;
  font-family: 'Orbitron', sans-serif;
  outline: none;
  transition: all 0.3s;
}

.form-container input::placeholder,
.form-container textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* ✨ Effet focus */
.form-container input:focus,
.form-container textarea:focus,
.form-container select:focus {
  border-color: #ff00c8;
  background: rgba(255, 0, 200, 0.1);
  box-shadow:
    0 0 20px rgba(255, 0, 200, 0.6),
    inset 0 0 15px rgba(255, 0, 200, 0.2);
}

/* ✅ Checkbox & radio */
.checkbox-group,
.radio-group {
  margin-bottom: 20px;
}

.form-container input[type="checkbox"],
.form-container input[type="radio"] {
  width: auto;
  margin-right: 10px;
  margin-bottom: 0;
  accent-color: #ff00c8;
}

.checkbox-group label,
.radio-group label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  text-transform: none;
  font-size: 14px;
}

/* 🚀 Bouton */
.form-container button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(90deg, #ff00c8, #8b00ff, #ff7800);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow:
    0 0 25px rgba(255, 0, 200, 0.7),
    0 0 50px rgba(139, 0, 255, 0.5);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.form-container button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.form-container button:hover::before {
  left: 100%;
}

/* 🔥 Hover bouton */
.form-container button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 35px rgba(255, 0, 200, 0.9),
    0 0 70px rgba(255, 120, 0, 0.7);
}

.form-container button:active {
  transform: translateY(0) scale(0.98);
}

/* ⚠️ Message d'erreur */
.error {
  color: #ff0066;
  font-size: 13px;
  margin-top: -15px;
  margin-bottom: 15px;
  text-shadow: 0 0 8px #ff0066;
}

/* Responsive */
@media (max-width: 600px) {
  .form-container {
    margin: 30px 20px;
    padding: 30px 20px;
  }

  header {
    flex-direction: column;
    gap: 15px;
  }

  .nav-buttons {
    width: 100%;
    justify-content: center;
  }
}