/* ============================================
   GESTOCK - Page de connexion (pro)
   ============================================ */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .login-brand-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
  }
  .login-brand-logo img {
    width: 28px;
    height: 28px;
  }
  .login-brand h1 {
    font-size: 1.5rem;
  }
  .login-brand-tagline {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  .login-brand-features {
    display: none;
  }
}

/* —— Panneau gauche (branding) —— */
.login-brand {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand-inner {
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 40px rgba(20, 184, 166, 0.35);
}

.login-brand-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.login-brand h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-brand-tagline {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 2.5rem 0;
  max-width: 320px;
  line-height: 1.5;
}

.login-brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-brand-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.login-brand-features li i {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.2);
  color: #2dd4bf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* —— Panneau droit (formulaire) —— */
.login-form-panel {
  background: #fff;
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.06);
}

@media (max-width: 900px) {
  .login-form-panel {
    box-shadow: none;
    padding: 2.5rem 1.5rem;
    min-height: auto;
  }
}

.login-form-wrap {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.login-form-panel h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
}

.login-form-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 0 2rem 0;
}

/* Alerte */
.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.login-alert i {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.login-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.login-alert--expired {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

/* Champs */
.login-field {
  margin-bottom: 1.25rem;
}

.login-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-field input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fafafa;
  color: #0f172a;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-field input::placeholder {
  color: #94a3b8;
}

.login-field input:hover {
  background: #fff;
  border-color: #cbd5e1;
}

.login-field input:focus {
  outline: none;
  border-color: #14b8a6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

/* Icône change de couleur au focus du champ */
.login-input-wrap:focus-within .login-input-icon {
  color: #14b8a6;
}
.login-input-wrap:focus-within .login-input-icon i {
  color: inherit;
}

.login-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
}

/* Bouton */
.login-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.45);
}

.login-submit:active {
  transform: translateY(0);
}

.login-submit i {
  font-size: 1.25rem;
}

/* Footer du formulaire */
.login-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

.login-footer a {
  color: #64748b;
  text-decoration: none;
}

.login-footer a:hover {
  color: #14b8a6;
}
