/* ═══════════════════════════════════════════════
   AnnoncIA — Styles des pages d'authentification
   (login.html / register.html / reset-password.html)
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:     #0f1117;
  --paper:   #f8f5ef;
  --cream:   #ede9e0;
  --gold:    #b89a5a;
  --gold-lt: #d4b87a;
  --muted:   #7a7570;
  --border:  #d6d0c4;
  --danger:  #c0392b;
  --success: #27ae60;
  --sidebar-bg: #0f1117;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
}

/* ─────────────────────────────────────
   LAYOUT SPLIT
───────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
}

/* ── Panneau gauche (marque) ── */
.auth-left {
  width: 42%;
  background: var(--sidebar-bg);
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(184,154,90,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(184,154,90,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand {
  margin-bottom: 3rem;
}

.auth-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
}
.auth-logo span {
  color: var(--gold);
  font-style: italic;
}

.auth-tagline {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: 6px;
}

.auth-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  border-left: 2px solid var(--gold);
  padding-left: 1.25rem;
  max-width: 340px;
}

.auth-features {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}
.auth-feature-item span:first-child {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Panneau droit (formulaire) ── */
.auth-right {
  flex: 1;
  background: var(--paper);
  align-items: center;
}

.auth-form-container {
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ─────────────────────────────────────
   FORMULAIRE
───────────────────────────────────── */
.auth-field {
  margin-bottom: 1.25rem;
}

.auth-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.auth-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.auth-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,154,90,0.12);
}
.auth-field input::placeholder { color: #bfb9b0; }
.auth-field input.error { border-color: var(--danger); }

/* Champ mot de passe avec œil */
.auth-password-wrap {
  position: relative;
}
.auth-password-wrap input {
  padding-right: 3rem;
}
.auth-eye {
  position: absolute;
  right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; font-size: 1rem;
  opacity: 0.4; transition: opacity 0.15s;
  padding: 0;
}
.auth-eye:hover { opacity: 0.8; }

/* ─────────────────────────────────────
   BOUTONS
───────────────────────────────────── */
.auth-btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 0.5rem;
}
.auth-btn:hover {
  background: var(--gold-lt);
  box-shadow: 0 4px 14px rgba(184,154,90,0.3);
}
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--border);
  margin-top: 0.75rem;
}
.auth-btn-secondary:hover {
  background: rgba(184,154,90,0.06);
  border-color: var(--gold);
  box-shadow: none;
}

/* ─────────────────────────────────────
   MESSAGES ERREUR / SUCCÈS
───────────────────────────────────── */
.auth-error,
.auth-success {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.auth-error {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.3);
  color: var(--danger);
}
.auth-success {
  background: rgba(39,174,96,0.08);
  border: 1px solid rgba(39,174,96,0.3);
  color: var(--success);
}

/* ─────────────────────────────────────
   SÉPARATEUR & LIENS
───────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-forgot {
  font-size: 0.75rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 400;
}
.auth-forgot:hover { text-decoration: underline; }

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.75rem;
  transition: color 0.15s;
}
.auth-back:hover { color: var(--gold); }

/* Règles mot de passe */
.auth-pwd-rules {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.auth-pwd-rule {
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.auth-pwd-rule.ok  { color: var(--success); }
.auth-pwd-rule.bad { color: var(--danger); }
.auth-pwd-rule .rule-icon { font-size: 0.7rem; }

/* Loader spinner dans le bouton */
.auth-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────
   RESPONSIVE — MOBILE
───────────────────────────────────── */
@media (max-width: 720px) {
  .auth-container { flex-direction: column; }
  .auth-left {
    width: 100%;
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .auth-quote { display: none; }
  .auth-features { display: none; }
  .auth-logo { font-size: 2rem; }
  .auth-right { padding: 2rem 1.5rem; }
  .auth-form-container { max-width: 100%; }
}
