/*
 * Écran connexion — landing hero + carte bicolore (marine / beige chaud)
 */
#auth-screen.auth-screen {
  --auth-bg-deep: #060814;
  --auth-bg-mid: #0c1222;
  --auth-accent: #6366f1;
  --auth-accent-soft: rgba(99, 102, 241, 0.14);
  --auth-lilac: #c4b5fd;
  --auth-border: #dcd6cb;
  --auth-text: #171717;
  --auth-muted: #57534e;
  --auth-panel-warm: #f3eee6;
  --auth-panel-warm-mid: #ebe4d9;

  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  padding-top: 20px;
  padding-bottom: 28px;
  background: radial-gradient(
      ellipse 120% 80% at 50% -10%,
      rgba(99, 102, 241, 0.18),
      transparent 52%
    ),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(167, 139, 250, 0.12), transparent 50%),
    linear-gradient(165deg, var(--auth-bg-deep) 0%, var(--auth-bg-mid) 55%, #080c18 100%);
  position: relative;
  overflow-x: hidden;
}

#auth-screen .auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#auth-screen .auth-blob {
  filter: blur(92px);
  opacity: 0.55;
  animation: auth-blob-drift 22s ease-in-out infinite alternate;
}

#auth-screen .auth-blob.b1 {
  width: 460px;
  height: 460px;
  top: -140px;
  left: -100px;
  background: rgba(99, 102, 241, 0.42) !important;
}

#auth-screen .auth-blob.b2 {
  width: 400px;
  height: 400px;
  bottom: -120px;
  right: -80px;
  background: rgba(56, 189, 248, 0.28) !important;
  animation-delay: -4s;
}

#auth-screen .auth-blob.b3 {
  width: 340px;
  height: 340px;
  top: 42%;
  left: 32%;
  background: rgba(167, 139, 250, 0.22) !important;
  animation-delay: -8s;
}

@keyframes auth-blob-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(18px, -14px) scale(1.06);
  }
}

#auth-screen .auth-grid-fine {
  position: absolute;
  inset: -10%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.45;
  animation: auth-grid-shift 90s linear infinite;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 15%, transparent 72%);
}

@keyframes auth-grid-shift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-44px, -44px);
  }
}

#auth-screen .auth-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.05) 48%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.05) 52%,
    transparent 62%
  );
  background-size: 220% 220%;
  animation: auth-shimmer 16s ease-in-out infinite;
  opacity: 0.55;
}

@keyframes auth-shimmer {
  0%,
  100% {
    background-position: 0% 40%;
  }
  50% {
    background-position: 100% 60%;
  }
}

/* ——— Conteneur landing ——— */
#auth-screen .auth-landing {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

/* ——— Hero + marquee ——— */
#auth-screen .auth-hero {
  position: relative;
  text-align: center;
  padding: 8px 12px 56px;
  margin-bottom: 4px;
}

#auth-screen .auth-marquee-wrap {
  overflow: hidden;
  width: 100%;
  margin-bottom: 22px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

#auth-screen .auth-marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: auth-marquee 42s linear infinite;
}

@keyframes auth-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

#auth-screen .auth-marquee-seg {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  padding-right: 28px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.72);
}

#auth-screen .auth-marquee-sep {
  color: rgba(148, 163, 184, 0.45);
  font-weight: 400;
}

#auth-screen .auth-hero-copy {
  position: relative;
  z-index: 2;
}

#auth-screen .auth-pill--hero {
  margin: 0 auto 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 600;
  padding: 7px 14px;
}

#auth-screen .auth-pill--hero .auth-pill-dot {
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.22);
}

#auth-screen .auth-hero-h1 {
  font-family: "Fraunces", "Playfair Display", Georgia, serif;
  font-size: clamp(1.85rem, 5.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.12;
  color: #f8fafc;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}

#auth-screen .auth-hero-h1 em {
  font-style: italic;
  font-weight: 700;
  color: var(--auth-lilac);
}

#auth-screen .auth-hero-tagline {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  font-style: italic;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.62);
  margin: 0;
  letter-spacing: 0.01em;
}

#auth-screen .auth-watermark {
  position: absolute;
  left: 50%;
  bottom: -8%;
  transform: translateX(-50%);
  z-index: 0;
  font-family: "Fraunces", "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 22vw, 11rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
  text-stroke: 1px rgba(255, 255, 255, 0.14);
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
}

/* ——— Carte principale ——— */
#auth-screen .auth-split {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 420px);
  width: 100%;
  gap: 0;
  align-items: stretch;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25), 0 28px 56px -16px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

#auth-screen .auth-brand {
  position: relative;
  background: linear-gradient(165deg, #141c32 0%, #0d1428 46%, #101827 100%);
  color: #e5e7eb;
  padding: 34px 30px 28px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

#auth-screen .auth-brand.hidden {
  display: none !important;
}

#auth-screen .auth-brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

#auth-screen .auth-brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#auth-screen .auth-brand-head .auth-brand-kicker {
  margin-bottom: 0;
}

#auth-screen .auth-brand-glow {
  position: absolute;
  width: 130%;
  height: 75%;
  top: -30%;
  right: -35%;
  background: radial-gradient(circle at 45% 45%, rgba(99, 102, 241, 0.38) 0%, transparent 62%);
  pointer-events: none;
  animation: auth-brand-pulse 18s ease-in-out infinite alternate;
}

#auth-screen .auth-brand-glow--b {
  background: radial-gradient(circle at 40% 40%, rgba(56, 189, 248, 0.22) 0%, transparent 58%);
  animation-duration: 22s;
}

@keyframes auth-brand-pulse {
  from {
    opacity: 0.72;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.05) translate(-1%, 2%);
  }
}

#auth-screen .auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#auth-screen .auth-brand-kicker {
  font-family: "Archivo Black", sans-serif;
  font-size: 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #a5b4fc 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

#auth-screen .auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.55);
  color: #eef2ff;
  border: 1px solid rgba(165, 180, 252, 0.28);
  margin-bottom: 20px;
}

#auth-screen .auth-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.22);
}

#auth-screen .auth-brand-h1 {
  font-family: "Fraunces", "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  color: #f9fafb;
  margin: 0 0 12px;
}

#auth-screen .auth-brand-h1 em {
  font-style: italic;
  color: var(--auth-lilac);
}

#auth-screen .auth-brand-lead {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(203, 213, 225, 0.88);
  margin: 0 0 18px;
  max-width: 38ch;
}

#auth-screen .auth-brand-lead--accent {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.68);
}

#auth-screen .auth-brand-list,
#auth-screen .auth-brand-modules {
  list-style: none;
  margin: 0 0 auto;
  padding: 0;
  font-size: 13px;
  line-height: 1.62;
  color: rgba(226, 232, 240, 0.93);
}

#auth-screen .auth-brand-list li,
#auth-screen .auth-brand-modules li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

#auth-screen .auth-brand-list strong {
  font-weight: 700;
  color: #f5f3ff;
}

#auth-screen .auth-brand-li-dot {
  width: 6px;
  height: 6px;
  margin-top: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #818cf8);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.45);
}

#auth-screen .auth-brand-modules strong {
  color: #e0e7ff;
  font-weight: 600;
}

#auth-screen .auth-brand-foot {
  margin-top: 28px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.48);
}

/* Panneau formulaire — beige chaud */
#auth-screen .auth-panel {
  background: linear-gradient(180deg, var(--auth-panel-warm) 0%, var(--auth-panel-warm-mid) 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 28px 26px 24px;
}

#auth-screen .auth-card {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  animation: none;
}

#auth-screen .auth-screen-foot {
  margin-top: 22px;
  padding-top: 6px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
  cursor: pointer;
  transition: color 0.2s ease;
}

#auth-screen .auth-screen-foot:hover {
  color: var(--auth-lilac);
}

#auth-screen .auth-tabs {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  padding: 5px;
  gap: 4px;
  margin-bottom: 22px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

#auth-screen .auth-tab {
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-muted);
  padding: 10px 12px;
}

#auth-screen .auth-tab.act {
  background: #fff;
  color: var(--auth-accent);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

#auth-screen .auth-form-title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 8px;
  line-height: 1.2;
}

#auth-screen .auth-form-title--sm {
  font-size: 1.25rem;
}

#auth-screen .auth-form-switch {
  font-size: 13px;
  color: var(--auth-muted);
  margin: 0 0 22px;
}

#auth-screen .auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--auth-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#auth-screen .auth-link-btn:hover {
  color: #4338ca;
}

#auth-screen .auth-forgot-lead {
  font-size: 13px;
  color: var(--auth-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

#auth-screen .auth-field label {
  font-size: 12px;
  font-weight: 600;
  color: #44403c;
  text-transform: none;
  letter-spacing: 0;
}

#auth-screen .auth-field input,
#auth-screen .auth-field select {
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  background: #fff;
}

#auth-screen .auth-field input:focus,
#auth-screen .auth-field select:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 4px var(--auth-accent-soft);
}

#auth-screen .auth-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

#auth-screen .auth-check--inline {
  margin-bottom: 0;
  font-size: 13px;
  color: #57534e;
}

#auth-screen .auth-forgot {
  margin-top: 0;
  text-align: right;
}

#auth-screen .auth-btn-primary-light {
  background: #fff !important;
  color: var(--auth-text) !important;
  border: 1.5px solid var(--auth-border) !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  padding: 14px 18px !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
}

#auth-screen .auth-btn-primary-light:hover {
  border-color: #c4b8a8 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1) !important;
  transform: translateY(-1px);
}

#auth-screen .auth-divider {
  color: #a8a29e;
  margin: 6px 0 14px;
}

#auth-screen .auth-divider::before,
#auth-screen .auth-divider::after {
  background: var(--auth-border);
}

#auth-screen .auth-sso-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#auth-screen .auth-btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #44403c;
  background: #fff;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#auth-screen .auth-btn-social:hover {
  border-color: #c4b8a8;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

#auth-screen .auth-avatar-wrap--compact {
  flex-direction: row;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

#auth-screen .auth-avatar-wrap--compact .auth-avatar {
  width: 64px;
  height: 64px;
  font-size: 28px;
}

#auth-screen .auth-inline-link {
  color: var(--auth-accent) !important;
}

#auth-screen .auth-verify-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #78716c;
}

#auth-screen .checkmark {
  border-color: #d6d3d1;
}

#auth-screen .auth-check input:checked + .checkmark {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
}

#auth-screen .password-strength {
  background: rgba(99, 102, 241, 0.08);
}

#auth-screen .pwd-bar {
  background: linear-gradient(90deg, var(--auth-accent), #38bdf8);
}

@media (prefers-reduced-motion: reduce) {
  #auth-screen .auth-marquee-track {
    animation: none;
  }

  #auth-screen .auth-blob,
  #auth-screen .auth-brand-glow {
    animation: none;
  }

  #auth-screen .auth-grid-fine,
  #auth-screen .auth-shimmer {
    animation: none;
  }
}

@media (max-width: 900px) {
  #auth-screen .auth-split {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 22px;
  }

  #auth-screen .auth-brand {
    min-height: auto;
    padding: 26px 22px 22px;
  }

  #auth-screen .auth-panel {
    padding: 22px 18px 18px;
  }

  #auth-screen .auth-watermark {
    bottom: -4%;
    opacity: 0.28;
  }
}

@media (max-width: 480px) {
  #auth-screen.auth-screen {
    padding: 10px;
  }

  #auth-screen .auth-hero {
    padding-bottom: 40px;
  }

  #auth-screen .auth-sso-row {
    grid-template-columns: 1fr;
  }
}

/* Thème nuit — garde le contraste sur le panneau clair + assombrit légèrement */
html.pulpe-night #auth-screen.auth-screen {
  background: linear-gradient(165deg, #050811 0%, #0a0e18 100%);
}

html.pulpe-night #auth-screen .auth-panel {
  background: linear-gradient(180deg, #1e1b24 0%, #19161c 100%);
  --auth-border: #3f3d42;
  --auth-text: #f5f5f4;
  --auth-muted: #a8a29e;
}

html.pulpe-night #auth-screen .auth-form-title,
html.pulpe-night #auth-screen .auth-field label {
  color: #fafaf9;
}

html.pulpe-night #auth-screen .auth-field input,
html.pulpe-night #auth-screen .auth-field select {
  background: #292524;
  border-color: #44403c;
  color: #fafaf9;
}

html.pulpe-night #auth-screen .auth-tabs {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.06);
}

html.pulpe-night #auth-screen .auth-tab.act {
  background: #292524;
}

html.pulpe-night #auth-screen .auth-btn-primary-light {
  background: #292524 !important;
  color: #fafaf9 !important;
  border-color: #57534e !important;
}

html.pulpe-night #auth-screen .auth-btn-social {
  background: #292524;
  border-color: #44403c;
  color: #e7e5e4;
}
