/* /assets/css/auth.css — pages de connexion, mot de passe oublié et réinitialisation */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #F5F2EB; --paper-dark: #EDE9E0; --ink: #141210; --ink-mid: #3A3630;
  --ink-soft: rgba(20,18,16,0.62); --rule: #D4CFC4;
  --blue: #1C3860; --blue-mid: #2B507E; --blue-tint: rgba(28,56,96,0.07);
  --red: #8B1A1A; --green: #1A6B3A; --orange: #B87333;
  --f-hero: 'Barlow Condensed', sans-serif;
  --f-ui: 'Syne', sans-serif;
  --f-body: 'Lora', Georgia, serif;
}

html, body { height: 100%; }

body {
  background: var(--paper-dark);
  color: var(--ink);
  font-family: var(--f-body);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── BANDEAU MAINTENANCE ── */
.maintenance-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--orange);
  color: #fff;
  text-align: center;
  padding: 10px 24px;
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  z-index: 999;
}

/* ── PANNEAU GAUCHE ── */
.login-brand {
  background: var(--ink);
  border-right: 3px solid var(--blue);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
}

.login-brand-logo img {
  height: 40px; width: auto; display: block;
  filter: brightness(0) invert(1);
}

.login-brand-copy {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
}

.login-brand-title {
  font-family: var(--f-hero);
  font-size: clamp(48px,5vw,80px); font-weight: 800;
  line-height: .88; text-transform: uppercase; letter-spacing: -.01em;
  color: #fff; margin-bottom: 28px;
}

.login-brand-title em {
  display: block; font-style: italic; font-weight: 300;
  color: rgba(255,255,255,0.55);
}

.login-brand-sub {
  font-size: 13px; font-style: italic;
  color: rgba(255,255,255,0.62); line-height: 1.8; max-width: 280px;
}

.login-brand-footer {
  font-family: var(--f-ui); font-size: 9px;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* ── STATUT SERVEUR ── */
.server-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .2;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .2; }
  50%       { transform: scale(1.4); opacity: .08; }
}

.status-dot.operational { background: #2ECC71; color: #2ECC71; }
.status-dot.maintenance  { background: #E8943A; color: #E8943A; }
.status-dot.outage       { background: #C0392B; color: #C0392B; animation: none; }

.status-text {
  font-family: var(--f-ui); font-size: 10px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
}

.status-text.operational { color: #2ECC71; }
.status-text.maintenance  { color: #E8943A; }
.status-text.outage       { color: #C0392B; }

/* ── PANNEAU DROIT ── */
.login-form-panel {
  background: var(--paper);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 56px 64px;
}

.login-box { width: 100%; max-width: 400px; }

.login-label {
  font-family: var(--f-ui); font-size: 10px; font-weight: 700;
  letter-spacing: .24em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}

.login-label::before {
  content: ''; display: block; width: 20px; height: 2px;
  background: var(--blue); flex-shrink: 0;
}

.login-title {
  font-family: var(--f-hero); font-size: 40px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em; line-height: .95;
  color: var(--ink); margin-bottom: 40px;
}

.login-title em { font-style: italic; font-weight: 300; color: var(--blue); }

/* ── ALERTES ── */
.login-error {
  padding: 12px 16px; margin-bottom: 24px;
  font-family: var(--f-ui); font-size: 11px; font-weight: 500;
  letter-spacing: .06em;
}

.login-error.generic {
  background: rgba(139,26,26,.07);
  border-left: 3px solid var(--red);
  color: var(--red);
}

.login-error.unauthorized {
  background: rgba(28,56,96,.06);
  border-left: 3px solid var(--blue);
  color: var(--blue-mid);
}

/* ── CHAMPS ── */
.login-fields { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }

.field-wrap { display: flex; flex-direction: column; gap: 7px; }

.field-label {
  font-family: var(--f-ui); font-size: 9.5px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mid);
}

.field-input {
  font-family: var(--f-body); font-size: 14px; color: var(--ink);
  background: var(--paper-dark); border: 1px solid var(--rule);
  padding: 13px 16px; width: 100%; outline: none; appearance: none;
  transition: border-color .3s ease, background .3s ease;
}

.field-input:focus { border-color: var(--blue); background: var(--paper); }

.login-submit {
  font-family: var(--f-ui); font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: var(--blue); border: none;
  padding: 15px 40px; width: 100%; cursor: pointer;
  transition: background .3s ease, transform .3s ease;
}

.login-submit:hover { background: var(--blue-mid); transform: translateY(-2px); }
.login-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.login-back {
  display: block; text-align: center; margin-top: 24px;
  font-family: var(--f-ui); font-size: 10px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none;
  transition: color .3s ease;
}

.login-back:hover { color: var(--blue); }

.login-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.login-forgot {
  font-family: var(--f-ui); font-size: 10px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); text-decoration: none;
  transition: opacity .3s ease;
}

.login-forgot:hover { opacity: .7; }

@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-panel { padding: 48px 32px; }
}

/* ── Pages « mot de passe oublié » et « nouveau mot de passe » ── */
.login-title.tight { margin-bottom: 16px; }

.login-subtitle {
  font-size: 14px; font-style: italic; color: var(--ink-soft);
  line-height: 1.7; margin-bottom: 36px;
}

.login-alert {
  padding: 14px 18px; margin-bottom: 24px;
  font-family: var(--f-ui); font-size: 11px; font-weight: 500;
  letter-spacing: .06em; line-height: 1.6;
}
.login-alert.success { background: rgba(26,107,58,.07); border-left: 3px solid var(--green); color: var(--green); }
.login-alert.error   { background: rgba(139,26,26,.07);  border-left: 3px solid var(--red);   color: var(--red); }

.field-hint { font-size: 11px; font-style: italic; color: var(--ink-soft); margin-top: 4px; }

.password-strength {
  height: 3px; margin-top: 8px; background: var(--rule);
  position: relative; overflow: hidden;
}
.password-strength-bar { height: 100%; width: 0; transition: width .3s ease, background .3s ease; }
.strength-weak   { background: var(--red); }
.strength-medium { background: var(--orange); }
.strength-strong { background: var(--green); }

.login-submit-link { display: block; text-align: center; text-decoration: none; margin-top: 8px; }

/* ── Accessibilité ── */
.login-submit:focus-visible,
.login-back:focus-visible,
.login-forgot:focus-visible,
.field-input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Liens alignés sur la même ligne sous le formulaire */
.login-links .login-back { margin-top: 0; }
