/* =====================================================================
   Pages d'authentification (login / register / activate) — autonomes,
   elles n'étendent pas base.html et ne chargent PAS ui-kit.css.
   Depuis 2026-09, layout.css / theme.css ont été supprimés : ce fichier
   + le <style> de chaque page doivent donc être autosuffisants.
   ===================================================================== */

/* Reset minimal (repris de l'ancien theme.css) */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body { min-height: 100vh; font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { text-decoration: none; color: inherit; }

/* =====================================================================
   Pages d'authentification (login / register / activate) — autonomes.
   ===================================================================== */

/* Enveloppe centrée des pages d'auth */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #030712; /* Very deep blue/gray */
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.12), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.12), transparent 25%);
  position: relative;
  overflow: hidden;
}

/* Animated glowing orbs for premium feel */
.auth-shell::before,
.auth-shell::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  animation: float 10s infinite ease-in-out alternate;
  pointer-events: none;
}

.auth-shell::before {
  background: rgba(59, 130, 246, 0.15);
  top: -150px;
  left: -150px;
}

.auth-shell::after {
  background: rgba(139, 92, 246, 0.15);
  bottom: -150px;
  right: -150px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 60px) scale(1.1); }
}

.authCard {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: rgba(17, 24, 39, 0.6); /* Deep gray, semi-transparent */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-shell .brand {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-shell .sub {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 32px;
  text-align: center;
}

/* Champs des formulaires d'auth */
.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.field .input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  color: #f8fafc !important;
  font-size: 15px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05) inset !important;
}

.field .input:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  background: rgba(15, 23, 42, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 2px 4px rgba(0,0,0,0.05) inset !important;
}

/* Bouton principal des pages d'auth */
.auth-shell .btn.primary {
  width: 100% !important;
  padding: 14px 20px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  margin-top: 10px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.auth-shell .btn.primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5) !important;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
}

.auth-shell .btn.primary:active {
  transform: translateY(0) !important;
}

/* Links */
.links {
  margin-top: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}
.links a {
  color: #60a5fa;
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none;
}
.links a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Messages */
.alert {
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
}
.alert.err, .alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.alert.ok, .alert-info, .alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

/* Honeypot anti-bot : hors écran mais présent dans le DOM */
.hpField, .honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* =====================================================================
   Light Mode Overrides
   ===================================================================== */
[data-theme="light"] body {
  background-color: #f8fafc;
}

[data-theme="light"] .auth-shell {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
}

[data-theme="light"] .auth-shell::before {
  background: rgba(59, 130, 246, 0.12);
}

[data-theme="light"] .auth-shell::after {
  background: rgba(139, 92, 246, 0.12);
}

[data-theme="light"] .authCard {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="light"] .auth-shell .brand {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .auth-shell .sub {
  color: #475569;
}

[data-theme="light"] .field label {
  color: #334155;
}

[data-theme="light"] .field .input {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02) inset !important;
}

[data-theme="light"] .field .input:focus {
  background: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 4px rgba(0,0,0,0.02) inset !important;
}

[data-theme="light"] .links {
  color: #475569;
}

[data-theme="light"] .links a {
  color: #3b82f6;
}

[data-theme="light"] .links a:hover {
  color: #2563eb;
}
