/* ================================
   🎨 Styles d’authentification (login / reset / profil)
   Fichier : auth-styles.css
   ================================ */

/* ================================
   🔹 Logo au-dessus de la carte d'authentification
   ================================ */

.auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.8rem; /* ✅ plus d’espace entre le logo et la carte */
  animation: fadeIn 0.8s ease-in-out;
}

.auth-logo img {
  width: 300px; /* ✅ taille plus lisible et équilibrée */
  max-width: 90%;
  height: auto;
  user-select: none;
  transition: transform 4s ease-in-out;
}

/* Mobile */
@media (max-width: 480px) {
  .auth-logo {
    margin-bottom: 2rem;
  }

  .auth-logo img {
    width: 200px;
  }
}

body {
  background-color: #132E46; /* fond Snapzone */
  color: #f1f1f1;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Conteneur principal centré */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  padding: var(--page-padding, 2rem);
}

/* Carte centrale */
.auth-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: calc(var(--page-padding, 1rem) * 1.5);
  max-width: 460px;
  width: 100%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px; /* légèrement augmenté */
}

/* Titre principal */
.auth-card h1 {
  font-size: var(--font-size-lg, 1.75rem);
  margin-bottom: 2rem;
  color: #ffffff;
}

.auth-card p {
  color: #cdd7e0;
  font-size: var(--font-size-base, 1rem);
  margin-bottom: 1.5rem;
}

/* Formulaire principal */
.auth-card form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  flex-grow: 1;
}

/* Champs de saisie */
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 0.85rem;
  min-height: 44px; /* Touch target */
  border: none;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: var(--font-size-base, 1rem);
  outline: none;
  transition: background-color 0.3s;
}

.auth-card input:focus {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Bouton Connexion / Création */
.auth-card button {
  background: linear-gradient(135deg, #1e90ff, #00b4d8);
  border: none;
  border-radius: 10px;
  color: white;
  padding: 0.85rem 2rem;
  min-height: 44px; /* Touch target */
  font-size: var(--font-size-base, 1rem);
  margin-top: 0.6rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  align-self: center;
}

.auth-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 180, 216, 0.4);
}

.auth-card button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ✅ Lien mot de passe oublié en bas de la carte */
.auth-card a {
  color: #a0c4ff;
  font-size: var(--font-size-sm, 0.9rem);
  display: inline-block;
  text-decoration: none;
  transition: color 0.2s;
  margin-top: auto; /* le pousse vers le bas */
  min-height: 44px; /* Touch target */
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card a:hover {
  color: #caf0f8;
}

/* Message d’état */
.auth-message {
  font-weight: 600;
  margin-top: 1rem;
  min-height: 1.2rem;
  transition: color 0.3s;
}

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

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: var(--page-padding, 1.8rem);
    border-radius: 15px;
    min-height: 400px;
  }
}
