/* Variables globales */
:root {
  --primary-color: #2a2a72;
  --secondary-color: #009ffd;
  --accent-color: #00ff88;
  --text-color: #ffffff;
  --error-color: #ff4757;
  --background-gradient: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  --card-background: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --border-radius: 15px;
}

/* Reset et styles de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  background: var(--background-gradient);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--text-color);
}

/* Container principal */
.container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--card-background);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: fadeIn 0.5s ease-out;
}

/* Titres */
h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  text-align: center;
  background: linear-gradient(
    to right,
    var(--accent-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-color);
  opacity: 0.9;
}

/* Formulaire */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.3rem;
}

input {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* Bouton de connexion */
button {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: var(--border-radius);
  background: linear-gradient(
    to right,
    var(--accent-color),
    var(--secondary-color)
  );
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

button:active {
  transform: translateY(0);
}

/* Message d'erreur */
.error {
  background: rgba(255, 71, 87, 0.2);
  color: var(--error-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  text-align: center;
  animation: shake 0.5s ease-in-out;
}

/* Lien d'inscription */
p {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Media Queries */
@media (min-width: 768px) {
  .container {
    padding: 3rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  input {
    padding: 1rem;
  }

  button {
    padding: 1.2rem;
  }
}

/* Import de la police Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
