/* ═══════════════════════════════════════════════════════════
   STAGEPRO / PARCOURSPRO — STYLES MOT DE PASSE OUBLIÉ & RESET
══════════════════════════════════════════════════════════════ */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --success-border: #10b981;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --error-border: #ef4444;
}

/* ── Structure globale & Fond ── */
body.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--success-bg);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ── Éléments d'arrière-plan lumineux ── */
.auth-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
.auth-bg-blob--1 {
  top: 10%;
  left: 15%;
  width: 350px;
  height: 350px;
  background: #3b82f6;
}
.auth-bg-blob--2 {
  bottom: 10%;
  right: 15%;
  width: 300px;
  height: 300px;
  background: #6366f1;
}

/* ── Conteneur principal ── */
.auth-container {
  width: 100%;
  max-width: 460px;
  padding: 20px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* ── Bouton retour ── */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}
.auth-back-link:hover {
  color: #ffffff;
  transform: translateX(-4px);
}

/* ── Carte principale ── */
.auth-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 35px 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  animation: cardAppear 0.4s ease-out;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── En-tête de la carte ── */
.auth-header {
  text-align: center;
  margin-bottom: 25px;
}
.auth-header-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 15px auto;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-header h2 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}
.auth-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Champs de formulaire ── */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}
.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.form-input-wrap svg {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}
.form-control {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}
.form-control:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ── Bouton de soumission ── */
.btn-submit {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: var(--primary-color);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ── Boîtes d'alertes & Messages ── */
.auth-alert {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: alertFadeIn 0.3s ease-out;
}

@keyframes alertFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.auth-alert--success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}
.auth-alert--error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

/* ── Lien de test direct en local ── */
.auth-reset-box {
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px dashed var(--success-border);
  margin-top: 6px;
  text-align: center;
}
.auth-reset-btn {
  display: inline-block;
  background: #059669;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 6px;
  transition: background 0.2s;
}
.auth-reset-btn:hover {
  background: #047857;
}

/* ── État expiré ou invalide ── */
.auth-invalid-state {
  text-align: center;
  padding: 20px 0;
}
.auth-invalid-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-card {
    padding: 25px 20px;
    border-radius: 16px;
  }
}