/* ============================================================================
   NEXOO APP — BRIQUE 11 : AUTHENTIFICATION NATIVE, ONBOARDING & ACCÈS
   Dark Mode exclusif · Mobile-first (100dvh, inputs 16px anti-zoom iOS)
   ============================================================================ */

.nexoo-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 85% 45% at 50% -8%, rgba(34, 197, 94, 0.22), transparent 65%),
    radial-gradient(circle at 85% 90%, rgba(57, 255, 20, 0.08), transparent 45%),
    #080e1c;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.nexoo-auth-overlay[hidden] {
  display: none !important;
}

.nexoo-auth-topbar {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.nexoo-auth-lang {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(17, 26, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nexoo-auth-lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.nexoo-auth-lang-btn.active {
  background: rgba(34, 197, 94, 0.18);
  color: #39ff14;
}

.nexoo-auth-shell {
  width: 100%;
  max-width: 440px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nexoo-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.nexoo-auth-logo {
  width: 128px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(57, 255, 20, 0.28));
}

.nexoo-auth-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #94a3b8;
  max-width: 340px;
}

.nexoo-auth-card {
  background: rgba(17, 26, 46, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Onglets Connexion / Créer un compte / Lien magique */
.nexoo-auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #0b1325;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}

.nexoo-auth-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  text-align: center;
  line-height: 1.2;
}

.nexoo-auth-tab.active {
  background: #18243f;
  color: #f8fafc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.nexoo-auth-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.nexoo-auth-desc {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #94a3b8;
}

.nexoo-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nexoo-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nexoo-auth-label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.nexoo-auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nexoo-auth-input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0c1426;
  color: #f8fafc;
  font-size: 16px; /* Anti-zoom automatique sur iOS */
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.nexoo-auth-input.has-toggle {
  padding-right: 48px;
}

.nexoo-auth-input::placeholder {
  color: #64748b;
}

.nexoo-auth-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.nexoo-auth-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nexoo-auth-eye:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.nexoo-auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nexoo-auth-link-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  color: #22c55e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.nexoo-auth-link-btn:hover {
  color: #39ff14;
  text-decoration: underline;
}

.nexoo-auth-submit {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #04130a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.28);
  transition: transform 0.14s ease, filter 0.18s ease, opacity 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nexoo-auth-submit:hover:not(:disabled) {
  filter: brightness(1.07);
}

.nexoo-auth-submit:active:not(:disabled) {
  transform: scale(0.985);
}

.nexoo-auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nexoo-auth-secondary {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(24, 36, 63, 0.7);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.nexoo-auth-secondary:hover:not(:disabled) {
  background: #18243f;
  border-color: rgba(255, 255, 255, 0.25);
}

.nexoo-auth-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 14px;
  display: none;
}

.nexoo-auth-alert.visible {
  display: block;
}

.nexoo-auth-alert.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.nexoo-auth-alert.success {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.38);
  color: #bbf7d0;
}

.nexoo-auth-alert.info {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #bae6fd;
}

.nexoo-auth-hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #94a3b8;
}

.nexoo-auth-footer {
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
}

.nexoo-auth-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.nexoo-auth-footer a:hover {
  color: #22c55e;
}

.nexoo-auth-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(4, 19, 10, 0.25);
  border-top-color: #04130a;
  animation: nexooAuthSpin 0.7s linear infinite;
}

@keyframes nexooAuthSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Écran d'état connecté mais accès expiré / en attente (prépare 11B/11C) */
.nexoo-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.nexoo-gate-email {
  font-size: 13px;
  color: #cbd5e1;
  background: #0c1426;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0 16px;
  word-break: break-word;
}

.nexoo-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Bouton Déconnexion dans ⚙️ Paramètres */
.param-logout-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(24, 36, 63, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.param-logout-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.param-logout-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.param-logout-email {
  font-size: 12.5px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.param-logout-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.param-logout-btn:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}