/* ═══════════════════════════════════════════════════════════════
   AUTH PREMIUM v3 — Light Mode · Indigo Accent · Clean Design
   ═══════════════════════════════════════════════════════════════ */

:root {
  --auth-primary: #4f46e5;
  --auth-primary-dark: #3730a3;
  --auth-bg: #f8fafc;
  --auth-text: #1e293b;
  --auth-text-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-radius: 16px;
  --auth-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Bouton de navigation */
.auth-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--auth-border);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  background: white;
  color: var(--auth-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.auth-nav-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.auth-nav-btn--logged {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

/* Boîte modale d'auth */
.glass-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: authFadeIn 0.3s ease-out;
}

.auth-modal-box {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  position: relative;
  color: var(--auth-text);
  border: 1px solid white;
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-modal-logo {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.auth-modal-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--auth-text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.auth-modal-header p {
  color: var(--auth-text-muted);
  font-size: 0.95rem;
}

/* Onglets */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  padding: 0.625rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--auth-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--auth-text);
}

.auth-tab.active {
  background: white;
  color: var(--auth-primary) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Champs de saisie */
.auth-field {
  position: relative;
  margin-bottom: 1.25rem;
}

.auth-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 0.5rem;
}

.auth-input {
  width: 100%;
  background: white;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--auth-text);
  font-size: 1rem;
  transition: all 0.2s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-pwd-toggle {
  position: absolute;
  right: 12px;
  bottom: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.auth-pwd-toggle:hover { opacity: 0.8; }

/* Boutons */
.auth-btn-primary {
  width: 100%;
  background: linear-gradient(to right, var(--auth-primary), var(--auth-primary-dark));
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.auth-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

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

/* Messages d'erreur/succès */
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.auth-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* Liens secondaires */
.auth-forgot {
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.auth-forgot button {
  background: none;
  border: none;
  color: var(--auth-primary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-forgot button:hover {
  text-decoration: underline;
}

.auth-legal-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  margin-top: 2rem;
  line-height: 1.4;
}

.auth-legal-note a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
}

/* Menu utilisateur */
.auth-user-menu {
  background: white;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 0.5rem;
  min-width: 240px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: authSlideDown 0.2s ease-out;
}

@keyframes authSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-menu-header {
  padding: 0.75rem 1rem;
}

.auth-menu-name {
  font-weight: 700;
  color: var(--auth-text);
  font-size: 0.95rem;
}

.auth-menu-email {
  color: var(--auth-text-muted);
  font-size: 0.8rem;
}

.auth-menu-divider {
  height: 1px;
  background: var(--auth-border);
  margin: 0.5rem 0;
}

.auth-menu-item {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--auth-text);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-menu-item:hover {
  background: #f1f5f9;
}

.auth-menu-danger {
  color: #ef4444;
}

.auth-menu-danger:hover {
  background: #fef2f2;
}

/* Bouton Fermer */
.auth-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--auth-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-close:hover {
  background: #e2e8f0;
  color: var(--auth-text);
}

@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
