/* Connexion / inscription — léger (mobile-first) */
:root {
  color-scheme: dark;
  --primary: hsl(259 94% 65%);
  --landing-bg: #060612;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--landing-bg);
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.z-10 { z-index: 10; }
.block { display: block; }
.text-center { text-align: center; }
.text-2xl { font-size: 1.5rem; line-height: 1.2; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.tracking-tight { letter-spacing: -0.025em; }
.uppercase { text-transform: uppercase; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.rounded-xl { border-radius: 0.75rem; }

.space-y-4 > * + * { margin-top: 1rem; }

.logo-box {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px hsl(259 94% 65% / 0.3);
  color: #fff;
}

/* ——— Login / inscription : logo + carte ——— */
.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--landing-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(1.25rem, 4vh, 2rem) 1rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
}

.auth-header {
  display: flex;
  justify-content: center;
  margin: 0 0 1rem;
  padding: 0;
}

.auth-header__brand {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.auth-header__brand:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.55);
  outline-offset: 4px;
  border-radius: 0.35rem;
}

/* Un seul logo (fond sombre) — pas de paire clair/sombre sur login/register */
.auth-header .predix-brand-wrap .predix-brand-img--light {
  display: none !important;
}
.auth-header .predix-brand-wrap .predix-brand-img--dark {
  display: block !important;
}

/* Asset : plafond strict (évite le plein écran si CSS absent en prod) */
.auth-header__logo,
.auth-header__brand img,
.auth-header__brand .predix-brand-wrap {
  display: block;
  width: 9.75rem !important;
  max-width: 9.75rem !important;
  height: auto !important;
  max-height: 3.35rem !important;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 4px 14px rgba(124, 58, 237, 0.18));
}

.auth-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%;
}

.auth-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.auth-remember {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.15rem 0 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  accent-color: #a78bfa;
  flex-shrink: 0;
  cursor: pointer;
}

.auth-remember__hint {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.75rem;
}

.auth-input-wrap { position: relative; }

.auth-ic {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.auth-input--password {
  padding-right: 2.75rem;
}

.auth-ic--toggle {
  pointer-events: auto;
  left: auto;
  right: 1rem;
  z-index: 2;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0.25rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 0;
  transition: color 0.2s;
}

.auth-ic--toggle:hover,
.auth-ic--toggle:focus-visible {
  color: rgba(255, 255, 255, 0.75);
  outline: none;
}

.auth-ic--toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.45);
  border-radius: 0.35rem;
}

/* Halo décoratif — hors flux (évite le grand vide au-dessus du formulaire) */
.auth-glow {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 92vw);
  height: 12rem;
  margin: 0;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.14) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
}

.auth-submit {
  width: 100%;
  padding: 0.875rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0.75rem;
  margin-top: 0.5rem;
  background: linear-gradient(90deg, #7c3aed, #8b5cf6);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.auth-submit:active { transform: scale(0.98); }

.auth-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fb7185;
}

.auth-link { color: #a78bfa; font-weight: 600; text-decoration: none; }

.auth-muted { color: rgba(255, 255, 255, 0.4); }
.auth-muted-soft { color: rgba(255, 255, 255, 0.3); }
.auth-label { color: rgba(255, 255, 255, 0.5); }

.fill-white { fill: currentColor; }
