/* ═══════════════════════════════════════════════════════════════
   PULPE! — AUTH CINEMATIC v3 (FINAL)
   Refonte page de connexion.
   ═══════════════════════════════════════════════════════════════ */

/* CONTENEUR PRINCIPAL */
#auth-screen.auth-v2 {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--text-on-dark);
}

/* DÉSACTIVATION DES EFFETS HÉRITÉS */
#auth-screen.auth-v2 .auth-bg .auth-grid-fine,
#auth-screen.auth-v2 .auth-bg .auth-shimmer {
  display: none !important;
}

#auth-screen.auth-v2 .auth-bg .auth-blob {
  opacity: 0.5;
  filter: blur(120px);
}

/* AURORA CENTRALE */
#auth-screen.auth-v2::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 1100px; height: 1100px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.28) 0%,
    rgba(67, 56, 202, 0.14) 35%,
    rgba(67, 56, 202, 0.04) 60%,
    transparent 75%
  );
  pointer-events: none;
  z-index: 0;
  animation: aurora-pulse 8s ease-in-out infinite;
}

@keyframes aurora-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* MOTS DÉRIVANTS */
#auth-screen.auth-v2 .word-rain {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

#auth-screen.auth-v2 .word-rain span {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: rgba(165, 180, 252, 0.05);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.02em;
}

/* CARTE CRÈME CENTRALE */
#auth-screen.auth-v2 .auth-card,
#auth-screen.auth-v2 .auth-wrap,
#auth-screen.auth-v2 .auth-form-wrap,
#auth-screen.auth-v2 > form {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  background: var(--cream-50);
  color: var(--text-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-10);
  box-shadow: var(--shadow-card-floating);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: card-reveal 900ms var(--ease-out) backwards;
}

@keyframes card-reveal {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* LOGO PULPE! */
#auth-screen.auth-v2 .auth-logo,
#auth-screen.auth-v2 .logo,
#auth-screen.auth-v2 .pulpe-logo {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.035em;
  line-height: 1;
  text-align: center;
  margin-top: -8px;
  margin-bottom: var(--space-4);
}

#auth-screen.auth-v2 .auth-logo em,
#auth-screen.auth-v2 .logo em,
#auth-screen.auth-v2 .pulpe-logo em {
  font-style: italic;
  color: var(--indigo-600);
}

/* TRAIT FIN DÉCO */
#auth-screen.auth-v2 .auth-divider {
  width: 48px;
  height: 1px;
  background: var(--indigo-600);
  margin: 0 auto var(--space-8);
  opacity: 0.4;
}

/* Titres formulaire (panneau crème) — ne pas cibler .auth-brand ni .auth-hero (fonds sombres) */
#auth-screen.auth-v2 .auth-panel h2,
#auth-screen.auth-v2 h2.auth-form-title,
#auth-screen.auth-v2 .auth-title,
#auth-screen.auth-v2 .auth-hero-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  text-align: center;
  margin-bottom: var(--space-3);
}

#auth-screen.auth-v2 .auth-panel h2 em,
#auth-screen.auth-v2 .auth-title em,
#auth-screen.auth-v2 .auth-hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--indigo-600);
}

#auth-screen.auth-v2 .auth-subtitle,
#auth-screen.auth-v2 .auth-intro,
#auth-screen.auth-v2 .auth-hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-8);
}

/* KICKER (label optionnel) */
#auth-screen.auth-v2 .auth-kicker,
#auth-screen.auth-v2 .kicker {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--indigo-600);
  margin-bottom: var(--space-3);
}

/* FORMULAIRE */
#auth-screen.auth-v2 label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

#auth-screen.auth-v2 input[type="email"],
#auth-screen.auth-v2 input[type="password"],
#auth-screen.auth-v2 input[type="text"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: var(--space-4);
  background: white;
  color: var(--text-default);
  border: 1px solid rgba(31, 27, 24, 0.10);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--duration-fast) var(--ease-smooth);
  margin-bottom: var(--space-5);
}

#auth-screen.auth-v2 input::placeholder { color: var(--text-subtle); }

#auth-screen.auth-v2 input:focus {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background: #FFFFFF;
}

#auth-screen.auth-v2 input:hover:not(:focus) {
  border-color: rgba(31, 27, 24, 0.18);
}

/* BOUTON PRINCIPAL */
#auth-screen.auth-v2 button[type="submit"],
#auth-screen.auth-v2 .btn-primary,
#auth-screen.auth-v2 .auth-submit {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, var(--indigo-600) 0%, var(--indigo-500) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-indigo);
  transition: all var(--duration-fast) var(--ease-smooth);
  margin-top: var(--space-2);
}

#auth-screen.auth-v2 button[type="submit"]:hover,
#auth-screen.auth-v2 .btn-primary:hover,
#auth-screen.auth-v2 .auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(67, 56, 202, 0.4),
              0 6px 12px rgba(67, 56, 202, 0.2);
}

#auth-screen.auth-v2 button[type="submit"]:active,
#auth-screen.auth-v2 .btn-primary:active,
#auth-screen.auth-v2 .auth-submit:active {
  transform: translateY(0);
}

#auth-screen.auth-v2 button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* LIENS (switch login/signup) */
#auth-screen.auth-v2 .auth-switch,
#auth-screen.auth-v2 .auth-link,
#auth-screen.auth-v2 a {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--indigo-600);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-smooth);
}

#auth-screen.auth-v2 .auth-switch:hover,
#auth-screen.auth-v2 .auth-link:hover,
#auth-screen.auth-v2 a:hover {
  color: var(--indigo-700);
}

#auth-screen.auth-v2 .auth-switch-wrap {
  text-align: center;
  margin-top: var(--space-6);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* SUPPRESSION PILL BÊTA dans la carte */
#auth-screen.auth-v2 .auth-pill,
#auth-screen.auth-v2 .auth-card .pill,
#auth-screen.auth-v2 .auth-card .badge-beta,
#auth-screen.auth-v2 .auth-card .pill-beta,
#auth-screen.auth-v2 .auth-wrap .pill,
#auth-screen.auth-v2 .auth-wrap .badge-beta,
#auth-screen.auth-v2 > form .pill,
#auth-screen.auth-v2 > form .badge-beta {
  display: none !important;
}

/* MENTION "ACCÈS BÊTA" EN BAS DE PAGE */
#auth-screen.auth-v2 .beta-mark {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-5);
  border: 1px solid rgba(165, 180, 252, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(10, 22, 40, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lavender-400);
  animation: beta-mark-fade 1200ms var(--ease-out) 600ms backwards;
}

#auth-screen.auth-v2 .beta-mark::before,
#auth-screen.auth-v2 .beta-mark::after {
  content: '';
  width: 12px;
  height: 1px;
  background: var(--lavender-400);
  opacity: 0.6;
}

@keyframes beta-mark-fade {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* MESSAGES SUCCÈS / ERREUR */
#auth-screen.auth-v2 .auth-message,
#auth-screen.auth-v2 .message,
#auth-screen.auth-v2 .alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

#auth-screen.auth-v2 .auth-message.error,
#auth-screen.auth-v2 .message.error,
#auth-screen.auth-v2 .alert.error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #B91C1C;
}

#auth-screen.auth-v2 .auth-message.success,
#auth-screen.auth-v2 .message.success,
#auth-screen.auth-v2 .alert.success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #15803D;
}

/* SUPPRESSION DOT PULSÉS */
#auth-screen.auth-v2 .pulse,
#auth-screen.auth-v2 .dot-pulse,
#auth-screen.auth-v2 .status-dot,
#auth-screen.auth-v2 [class*="pulse"] {
  animation: none !important;
}

/* RESPONSIVE */
@media (max-width: 540px) {
  #auth-screen.auth-v2 .auth-card,
  #auth-screen.auth-v2 .auth-wrap,
  #auth-screen.auth-v2 > form {
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-xl);
  }

  #auth-screen.auth-v2 .auth-logo,
  #auth-screen.auth-v2 .logo {
    font-size: 2.75rem;
  }

  #auth-screen.auth-v2 .auth-panel h2,
  #auth-screen.auth-v2 h2.auth-form-title,
  #auth-screen.auth-v2 .auth-title {
    font-size: 1.625rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Page activation bêta (beta.html) — word rain + empilement
   ═══════════════════════════════════════════════════════════════ */

#beta-screen.beta-v2 {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

#beta-screen.beta-v2 .word-rain {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

#beta-screen.beta-v2 .word-rain span {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: rgba(165, 180, 252, 0.07);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════════
   Connexion index (auth-v2) — harmonisation carte / onglets / champs
   (évite halo blanc sur blanc, relie panneau et carte au design tokens)
   ═══════════════════════════════════════════════════════════════ */

#auth-screen.auth-v2 .auth-landing {
  width: 100%;
  max-width: min(1100px, 100%);
  margin: 0 auto;
}

#auth-screen.auth-v2 .auth-hero {
  padding-top: clamp(16px, 4vh, 40px);
  padding-bottom: 44px;
}

#auth-screen.auth-v2 .auth-split {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 22, 40, 0.42);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(99, 102, 241, 0.08);
}

#auth-screen.auth-v2 .auth-brand {
  border-right-color: rgba(255, 255, 255, 0.1);
}

#auth-screen.auth-v2 .auth-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    var(--cream-50) 0%,
    var(--cream-100) 38%,
    rgba(238, 242, 255, 0.85) 72%,
    var(--cream-50) 100%
  ) !important;
  border: none;
}

#auth-screen.auth-v2 .auth-panel::before {
  content: "";
  position: absolute;
  inset: -35% -25%;
  background:
    radial-gradient(ellipse 75% 55% at 78% 12%, rgba(99, 102, 241, 0.16), transparent 58%),
    radial-gradient(ellipse 55% 45% at 8% 88%, rgba(129, 140, 248, 0.12), transparent 52%),
    radial-gradient(ellipse 45% 40% at 42% 48%, rgba(196, 181, 253, 0.09), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

#auth-screen.auth-v2 .auth-panel > * {
  position: relative;
  z-index: 1;
}

/* Colonne gauche : texte clair sur fond bleu (évite héritage « titre crème ») */
#auth-screen.auth-v2 .auth-brand .auth-brand-h1 {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  background: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
}

#auth-screen.auth-v2 .auth-brand .auth-brand-h1 em {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  background: linear-gradient(120deg, #c7d2fe, #e9d5ff, #f0abfc) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

#auth-screen.auth-v2 .auth-brand .auth-brand-lead,
#auth-screen.auth-v2 .auth-brand .auth-brand-lead--accent {
  color: rgba(226, 232, 255, 0.9) !important;
}

#auth-screen.auth-v2 .auth-brand .auth-brand-list li,
#auth-screen.auth-v2 .auth-brand .auth-brand-modules li {
  color: rgba(241, 245, 249, 0.92) !important;
}

#auth-screen.auth-v2 .auth-brand .auth-brand-kicker {
  color: #c7d2fe !important;
  -webkit-text-fill-color: #c7d2fe !important;
}

#auth-screen.auth-v2 .auth-brand .auth-brand-foot {
  color: rgba(148, 163, 184, 0.55) !important;
}

/* Bandeau défilant + filigranes retirés du DOM ; filet de sécurité si présents */
#auth-screen.auth-v2 .auth-marquee-wrap,
#auth-screen.auth-v2 .auth-watermark,
#auth-screen.auth-v2 .auth-scene2-watermark {
  display: none !important;
}

/* Cases inscription : grille alignée + texte justifié */
#auth-screen.auth-v2 .auth-checks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

#auth-screen.auth-v2 .auth-checks .auth-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 12px;
  margin-bottom: 0;
}

#auth-screen.auth-v2 .auth-checks .auth-check .checkmark {
  grid-column: 1;
  margin-top: 1px;
}

#auth-screen.auth-v2 .auth-checks .auth-check > span:last-child {
  grid-column: 2;
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.5;
  hyphens: auto;
}

#auth-screen.auth-v2 .auth-card,
#auth-screen.auth-v2 #auth-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#auth-screen.auth-v2 .auth-tabs {
  background: var(--cream-200);
  border: 1px solid rgba(31, 27, 24, 0.08);
  border-radius: var(--radius-lg);
  padding: 5px;
  gap: 4px;
}

#auth-screen.auth-v2 .auth-tab {
  color: var(--text-muted);
  border-radius: var(--radius-md);
}

#auth-screen.auth-v2 .auth-tab.act {
  background: var(--cream-50);
  color: var(--text-strong);
  border: 1px solid rgba(31, 27, 24, 0.1);
  box-shadow: var(--shadow-sm);
}

#auth-screen.auth-v2 .auth-field input,
#auth-screen.auth-v2 .auth-field select,
#auth-screen.auth-v2 input[type="email"],
#auth-screen.auth-v2 input[type="password"],
#auth-screen.auth-v2 input[type="text"] {
  background: var(--cream-100) !important;
  border: 1px solid rgba(31, 27, 24, 0.12) !important;
  color: var(--text-strong);
}

#auth-screen.auth-v2 .auth-field input:focus,
#auth-screen.auth-v2 .auth-field select:focus,
#auth-screen.auth-v2 input[type="email"]:focus,
#auth-screen.auth-v2 input[type="password"]:focus,
#auth-screen.auth-v2 input[type="text"]:focus {
  background: var(--cream-50) !important;
  border-color: var(--indigo-500) !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
}

#auth-screen.auth-v2 .auth-field label {
  color: var(--text-muted);
}

#auth-screen.auth-v2 .auth-btn-social {
  background: var(--cream-50);
  border: 1px solid rgba(31, 27, 24, 0.12) !important;
  color: var(--text-strong);
}

#auth-screen.auth-v2 .auth-btn-social:hover {
  background: var(--cream-100);
  border-color: rgba(31, 27, 24, 0.18) !important;
}

#auth-screen.auth-v2 .auth-divider {
  color: var(--text-subtle);
}

#auth-screen.auth-v2 .auth-divider::before,
#auth-screen.auth-v2 .auth-divider::after {
  background: rgba(31, 27, 24, 0.1) !important;
}

#auth-screen.auth-v2 .auth-form-title,
#auth-screen.auth-v2 h2.auth-form-title {
  color: var(--text-strong);
  font-family: var(--font-display), "Fraunces", serif;
}

#auth-screen.auth-v2 .auth-form-switch {
  color: var(--text-muted);
}

#auth-screen.auth-v2 .sub-card,
#auth-screen.auth-v2 #reg-subscription-card {
  background: var(--cream-100);
  border: 1px solid rgba(31, 27, 24, 0.08) !important;
  border-radius: var(--radius-lg);
}

#auth-screen.auth-v2 .reg-sub-beta-banner {
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
}

/* Marquee connexion (index auth-v2) : in-flow, ne masque pas le hero */
#auth-screen.auth-v2.auth-cinematic .auth-landing {
  position: relative;
}

#auth-screen.auth-v2.auth-cinematic .auth-landing > .auth-marquee-wrap {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 14px;
  opacity: 1;
  z-index: 4;
  overflow: hidden;
  border-radius: 12px;
}

#auth-screen.auth-v2.auth-cinematic .auth-landing > .auth-marquee-wrap .auth-marquee-track {
  animation: auth-marquee 42s linear infinite;
}
