/* ══════════════════════════════════════════════
   Garage Bienvenue — Styles page de connexion
   style_login.css
   ══════════════════════════════════════════════
   Palette inspirée de la section #contact
   de index.php (côté clair) :
     Fond page    : var(--creme)       #F5F0E8
     Fond carte   : var(--blanc)       #FDFAF5
     Bordures     : var(--creme-fonce) #E8E0D0
     Texte        : var(--charbon)     #1A1614
     Accent rouge : var(--rouge)       #8B1A1A
   ══════════════════════════════════════════════ */

/* ── Section login ── */
#login-section {
  min-height: calc(100vh - 72px);
  background: var(--creme);           /* #F5F0E8 — fond page contact */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Motif diagonal discret — même logique que hero mais sur fond clair */
#login-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent, transparent 40px,
    rgba(139,26,26,0.03) 40px, rgba(139,26,26,0.03) 80px
  );
  pointer-events: none;
}

/* Cercle décoratif — teinte crème foncée, discret sur fond clair */
#login-section::after {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(139,26,26,0.06);  /* rouge très atténué sur fond clair */
  pointer-events: none;
}

/* ── Carte formulaire ── */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--blanc);           /* #FDFAF5 — fond carte contact */
  border: 1px solid var(--creme-fonce); /* #E8E0D0 — bordure contact */
  border-radius: 16px;
  padding: 3rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 8px 40px rgba(26, 22, 20, 0.08);
}

/* ── Icône cadenas ── */
.login-icon {
  width: 72px; height: 72px;
  background: rgba(139,26,26,0.08);   /* même teinte que .contact-icon */
  border: 1px solid rgba(139,26,26,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

/* ── En-tête ── */
.login-header { margin-bottom: 0; }

.login-title {
  color: var(--charbon) !important;   /* texte sombre sur fond clair */
  font-size: 26px !important;
}

.login-header .section-tag  { color: var(--rouge); }  /* rouge standard */
.login-header .section-line { background: var(--rouge); }

/* ── Alertes ── */
.login-alert {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.login-alert-error {
  background: rgba(197,48,48,0.08);
  border: 1px solid rgba(197,48,48,0.25);
  color: var(--rouge-fonce);          /* texte rouge foncé, lisible sur blanc */
}

.login-alert-warning {
  background: rgba(184,150,12,0.08);
  border: 1px solid rgba(184,150,12,0.25);
  color: #7A6200;                     /* or foncé, lisible sur fond clair */
}

/* ── Formulaire ── */
.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gris-moyen);           /* label atténué — même style contact */
}

/* ── Champs de saisie ── */
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  width: 16px; height: 16px;
  fill: var(--gris-moyen);
  pointer-events: none;
  flex-shrink: 0;
}

.login-input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  background: var(--creme);           /* fond input = fond creme contact */
  border: 1px solid var(--creme-fonce); /* bordure identique aux inputs contact */
  border-radius: 6px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--charbon);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.login-input-wrap input::placeholder { color: var(--gris-moyen); }

.login-input-wrap input:focus {
  border-color: var(--rouge);         /* focus rouge — identique contact */
  background: var(--blanc);
}

.login-input-wrap input.input-error {
  border-color: var(--rouge-clair);
}

/* ── Bouton afficher/masquer mot de passe ── */
.login-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gris-moyen);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
}
.login-toggle-pw:hover { color: var(--charbon); }

/* ── Erreurs inline ── */
.login-field-error {
  font-size: 12px;
  color: var(--rouge-clair);
  min-height: 16px;
  display: block;
}

/* ── Barre de force du mot de passe ── */
.login-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.login-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--creme-fonce);
  border-radius: 2px;
  overflow: hidden;
}

.login-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.login-strength-label {
  font-size: 11px;
  color: var(--gris-moyen);
  white-space: nowrap;
}

/* ── Bouton de soumission ── */
.login-submit {
  width: 100%;
  background: var(--charbon);         /* charbon — identique .contact-submit */
  color: var(--blanc);
  border: none;
  padding: 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0.5rem;
}

.login-submit:hover:not(:disabled) {
  background: var(--rouge);           /* hover rouge — identique .contact-submit */
  transform: translateY(-1px);
}

.login-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.login-spinner { animation: spin 0.9s linear infinite; }

/* ── Lien retour ── */
.login-back {
  font-size: 13px;
  color: var(--gris-moyen);
}
.login-back a {
  color: var(--gris-moyen);
  text-decoration: none;
  transition: color 0.2s;
}
.login-back a:hover { color: var(--rouge); }

/* ── Responsive ── */
@media (max-width: 480px) {
  .login-container { padding: 2.5rem 1.5rem 2rem; }
  .login-title { font-size: 22px !important; }
}