/* ============================================================
🎨 PALETTE DE COULEURS & VARIABLES GLOBALES
============================================================ */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6f76;
  --line: #ececf1;
  --alt: #f8f9fa;
  --card: #f8f9fb;
  --pill: #f2f3f7;
  --fr-blue: #0055A4;
  --fr-white: #ffffff;
  --fr-red: #EF4135;
  --vocab: #fffbea;
  --gold: #f5b301;
  --btn-blue: #2563eb;
  --btn-blue-hover: #1d4ed8;
}

/* ============================================================
🎯 HERO BANNIÈRE POUR PAGES D'AUTHENTIFICATION
============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@900&display=swap");

.banner-hero {
  position: relative;
  width: 100vw; /* largeur écran */
  max-width: 100%;
  margin: 0; /* ✅ Supprime toute marge extérieure */
  padding: 0;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  isolation: isolate;
  text-align: center;

  /* ✅ Ajoute un espace sous la bannière */
  margin-bottom: 1.5em;
}

.banner-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/static/img/hero_img_grammalab.png") center/cover no-repeat;
  filter: grayscale(90%) brightness(0.7) contrast(1.05);
  z-index: -2;
}

.banner-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 65% at 50% 42%, rgba(0, 0, 0, 0.25), transparent 75%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25) 40%, rgba(0, 0, 0, 0.55));
  z-index: -1;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero__branding {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: 100%;
  margin: 0 auto;
}

/* ✅ Logo montgolfière collé à gauche */
.hero__logo {
  position: absolute;
  top: -5rem;
  left: -5rem; /* ✅ ajoute cette ligne pour la placer à gauche */
  width: 150px;
  height: auto;
  z-index: 3;
}

/* ✅ Logo texte centré */
.hero__title-img {
  display: block;
  margin: 0 auto;
  height: 50px;
  max-width: 100%;
  object-fit: contain;
  z-index: 1;
}

/* 📱 Responsive ajustement */
@media (max-width: 600px) {
  .hero__logo {
    height: 80px;
  }

  .hero__title-img {
    height: 36px;
  }

  .hero__branding {
    gap: 1.5rem;
  }
}
/* ============================================================
🧱 BASE
============================================================ */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(to bottom right, var(--bg), #e5e7eb);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}

/* ============================================================
🎯 CENTRAGE DE LA ZONE AUTHENTIFICATION
============================================================ */
.page-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 0.5rem;
}

/* ============================================================
💳 FORMULAIRE (CARTE)
============================================================ */
.auth-card {
  width: 100%;
  max-width: 700px;
  padding: 1rem 1rem 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 auto;
  background: white;
}

.auth-card h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.auth-card > p {
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ============================================================
🔐 FORMULAIRE : CHAMPS + ICÔNES
============================================================ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Groupe de champ */
.auth-form .form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 1rem;
}

.auth-form .form-group label {
  align-self: flex-start;
  max-width: 500px;
  width: 100%;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 0.95rem;
}
.auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-links .link-tricolor {
  display: inline-flex;         /* pour la ligne juste sous le texte */
  justify-content: center;
  align-items: center;
  max-width: max-content;       /* évite d’étirer le lien */
  margin: 0 auto;               /* centre horizontalement */
}

/* Conteneur avec icône + bouton mot de passe */
.input-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #6b7280;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
}

/* Champ avec icône */
.input-wrapper input {
  width: 100%;
  background-color: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 0.6rem 2.2rem 0.6rem 2.2rem; /* icône à gauche et oeil à droite */
  font-size: 1rem;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out;
}

.input-wrapper input:focus {
  border-color: #6366f1;
  background-color: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Lien mot de passe oublié */
.password-wrapper {
  text-align: right;
  max-width: 500px;
  margin: 0.25rem auto 0;
}

.password-wrapper a {
  color: var(--btn-blue);
  font-size: 0.85rem;
  text-decoration: none;
}

.password-wrapper a:hover {
  text-decoration: underline;
}

/* Bouton soumission */
.auth-card button[type="submit"] {
  max-width: 500px;
  margin: 0.5rem auto 0.25rem;
  display: block;
  width: 100%;
  padding: 0.65rem;
  background-color: #1f2937;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.auth-card button[type="submit"]:hover {
  background-color: #111827;
}
/* ===== Liens façon barre de nav (tricolore animé) ===== */
/* Utilise déjà tes variables : --fr-blue / --fr-white / --fr-red */

.link-tricolor {
  position: relative;
  display: inline-block;          /* ↑ agrandit la zone cliquable */
  text-decoration: none;
  max-width: max-content; 
  color: var(--text);             /* reste dans ta palette */
  font-weight: 700;               /* idem rendu “titre” dans la liste */
  padding: .15rem 0;              /* un peu d’aria touch */
  transition: color .2s ease;
}

.link-tricolor::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;                   /* espace entre texte et ligne */
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--fr-blue), var(--fr-white), var(--fr-red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}

.link-tricolor:hover,
.link-tricolor:focus {
  color: var(--fr-blue);
}

.link-tricolor:hover::after,
.link-tricolor:focus::after {
  transform: scaleX(1);
}

/* État “actif / sélectionné” (par ex. page courante) */
.link-tricolor.is-active,
.link-tricolor[aria-current="page"] {
  color: var(--fr-blue);
}
.link-tricolor.is-active::after,
.link-tricolor[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Focus clavier bien visible, sans déformer la ligne animée */
.link-tricolor:focus-visible {
  outline: 2px solid #E4E9FF;
  outline-offset: 2px;
}
/* ============================================================
👥 LOGIN SOCIAL
============================================================ */
.auth-divider {
  text-align: center;
  margin: 1rem 0 0.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.social-login {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
  margin: 0.5rem 0 0;
}

.auth-provider-btn {
  flex: 1 1 220px;
  max-width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease;
}

.auth-provider-btn:hover {
  background-color: #f3f4f6;
}

.auth-icon {
  height: 20px;
  width: 20px;
}

/* Responsive pour mobiles */
@media (max-width: 500px) {
  .social-login {
    flex-wrap: wrap;
  }
}

/* ============================================================
🔗 LIENS EN BAS
============================================================ */
.auth-links a {
  text-align: center;
  display: block;
  font-size: 0.85rem;
  color: var(--btn-blue);
  margin-top: 0.4rem;
}