/* DarkGPT — Auth SaaS premium (rouge / noir) */

:root {
  --auth-bg: #050505;
  --auth-card: #121214;
  --auth-input: #1a1a1f;
  --auth-red: #ff4b5c;
  --auth-red-hot: #ff2d55;
  --auth-border: rgba(255, 70, 70, 0.1);
  --auth-text: #f5f5f7;
  --auth-muted: #8a8a94;
  --auth-placeholder: #5c5c66;
  --auth-font: "Outfit", system-ui, sans-serif;
  --auth-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: var(--auth-font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Fond ─────────────────────────────────────────────────── */

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-halo {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(780px, 140vw);
  height: min(780px, 140vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at center,
    rgba(255, 45, 85, 0.32) 0%,
    rgba(255, 45, 85, 0.14) 28%,
    rgba(255, 45, 85, 0.04) 52%,
    transparent 70%
  );
  filter: blur(8px);
  animation: auth-halo-pulse 8s ease-in-out infinite;
}

@keyframes auth-halo-pulse {
  0%,
  100% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.auth-grid {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(255, 75, 92, 0.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 75, 92, 0.9) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}

.auth-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* ── Brand ────────────────────────────────────────────────── */

.auth-brand {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin: 28px 0 0 32px;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  color: #fff;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.auth-brand span {
  color: transparent;
  background: linear-gradient(135deg, #ff7a88, #ff4b5c 50%, #ff2d55);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 75, 92, 0.45));
}

.auth-brand:hover {
  opacity: 0.85;
}

/* ── Layout ───────────────────────────────────────────────── */

.auth-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  min-height: calc(100dvh - 80px);
  padding: 24px 20px 48px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 40px;
  border-radius: 24px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(255, 45, 85, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: auth-card-in 520ms var(--auth-ease) both;
}

.auth-card.is-switching {
  animation: auth-card-switch 360ms var(--auth-ease);
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes auth-card-switch {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  40% {
    opacity: 0.55;
    transform: scale(0.985);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Titre ────────────────────────────────────────────────── */

.auth-head {
  margin-bottom: 28px;
  text-align: center;
}

.auth-title {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.15;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35em;
}

.auth-title__plain {
  color: #fff;
}

.auth-title__accent {
  color: var(--auth-red);
  text-shadow:
    0 0 24px rgba(255, 75, 92, 0.55),
    0 0 48px rgba(255, 45, 85, 0.25);
}

.auth-sub {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 450;
  color: var(--auth-muted);
  letter-spacing: -0.01em;
}

/* ── Formulaire ───────────────────────────────────────────── */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form[hidden] {
  display: none !important;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.65);
}

.auth-field input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--auth-input);
  color: #fff;
  font: 500 0.95rem/1 var(--auth-font);
  outline: none;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.auth-field input::placeholder {
  color: var(--auth-placeholder);
}

.auth-field input:hover {
  background: #1d1d23;
}

.auth-field input:focus {
  border-color: rgba(255, 75, 92, 0.55);
  box-shadow:
    0 0 0 3px rgba(255, 75, 92, 0.12),
    0 0 20px rgba(255, 45, 85, 0.15);
  background: #1d1d23;
}

.auth-submit {
  margin-top: 8px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff4b5c 0%, #ff2d55 100%);
  color: #fff;
  font: 650 1rem/1 var(--auth-font);
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    0 6px 24px rgba(255, 45, 85, 0.4),
    0 0 0 1px rgba(255, 120, 140, 0.15) inset;
  transition:
    transform 220ms var(--auth-ease),
    box-shadow 220ms ease,
    filter 220ms ease;
}

.auth-submit:hover {
  transform: scale(1.02);
  box-shadow:
    0 10px 36px rgba(255, 45, 85, 0.55),
    0 0 32px rgba(255, 75, 92, 0.3),
    0 0 0 1px rgba(255, 140, 155, 0.2) inset;
  filter: brightness(1.04);
}

.auth-submit:active {
  transform: scale(0.99);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  filter: none;
}

/* ── Status / switch / discord ────────────────────────────── */

.auth-status {
  min-height: 1.25em;
  margin: 16px 0 0;
  font-size: 0.875rem;
  text-align: center;
  color: #ff8a9a;
  transition: color 200ms ease;
}

.auth-status.is-ok {
  color: #86efac;
}

.auth-switch {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

.auth-switch__btn {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--auth-red);
  font: 600 0.9rem/1.4 var(--auth-font);
  cursor: pointer;
  text-decoration: none;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.auth-switch__btn:hover {
  color: #ff6b7a;
  text-shadow: 0 0 12px rgba(255, 75, 92, 0.4);
}

.auth-switch--secondary {
  margin-top: 10px;
  font-size: 0.82rem;
}

.auth-switch--secondary .auth-switch__btn {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.auth-switch--secondary .auth-switch__btn:hover {
  color: #ff8a9a;
  text-shadow: none;
}

.auth-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 200ms ease;
}

.auth-discord:hover {
  color: rgba(255, 255, 255, 0.55);
}

.auth-discord svg {
  opacity: 0.7;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 520px) {
  .auth-brand {
    margin: 20px 0 0 20px;
    font-size: 1.15rem;
  }

  .auth-main {
    padding: 16px 16px 40px;
    align-items: flex-start;
    min-height: auto;
  }

  .auth-card {
    padding: 32px 24px;
    border-radius: 20px;
    margin-top: 24px;
  }

  .auth-title {
    font-size: 1.65rem;
  }

  .auth-field input,
  .auth-submit {
    height: 52px;
  }
}

@media (max-height: 700px) {
  .auth-main {
    align-items: flex-start;
    padding-top: 12px;
  }

  .auth-halo {
    top: 38%;
    opacity: 0.7;
  }
}
