/* ============================================================
   Auth (login / signup) — layout split-screen moderne
   Panneau marque (gradient + carte matching + Léa) + form blanc
   Réutilise le langage visuel de l'OG image
   ============================================================ */

* {
  box-sizing: border-box;
}

.auth-page {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--sp-color-white);
}

/* ---------- PANNEAU MARQUE (gauche) ---------- */
.auth-brand {
  position: relative;
  flex: 1.15;
  min-width: 0;
  overflow: hidden;
  background: var(
    --sp-gradient-brand,
    linear-gradient(135deg, #00394d 0%, #004e41 60%, #002535 100%)
  );
  padding: clamp(2.5rem, 4vw, 4rem);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.5rem);
}

.auth-brand__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.auth-brand__glow--1 {
  width: 520px;
  height: 520px;
  background: #0a6b58;
  opacity: 0.35;
  top: -180px;
  right: -120px;
}
.auth-brand__glow--2 {
  width: 380px;
  height: 380px;
  background: var(--sp-color-accent);
  opacity: 0.16;
  bottom: -220px;
  left: -120px;
}
.auth-brand__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.06) 1.5px,
    transparent 1.5px
  );
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(120deg, #000 0%, transparent 75%);
  mask-image: linear-gradient(120deg, #000 0%, transparent 75%);
  pointer-events: none;
}

.auth-brand__content {
  position: relative;
  z-index: 3;
  flex: 1.4 1.4 0;
  min-width: 0;
  max-width: 620px;
}
.auth-brand__logo {
  height: 34px;
  width: auto;
  margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
}
.auth-brand__title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 1.5rem;
}
.auth-brand__title .auth-brand__hl {
  color: var(--sp-color-accent);
  font-weight: 700;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
.auth-brand__sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.45;
  font-weight: 400;
  max-width: 420px;
  margin: 0 0 1.75rem;
}
.auth-brand__pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.auth-brand__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.auth-brand__pdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sp-color-accent);
  box-shadow: 0 0 10px var(--sp-color-accent);
}

/* ---------- HERO : carte matching + Léa ---------- */
.auth-brand__hero {
  position: relative;
  flex: 1 1 0;
  align-self: stretch;
  min-width: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(2rem, 6vh, 5rem);
  z-index: 2;
  pointer-events: none;
}
/* Bloc lié Léa + card : Léa positionnée en % de la card => ils ne se
   détachent jamais, et l'ensemble reste ancré en bas du panneau */
.auth-brand__stage {
  position: relative;
  z-index: 2;
}
.auth-brand__card-wrap {
  position: relative;
  z-index: 4;
  transform: rotate(-3deg);
}
.auth-brand__card {
  position: relative;
  width: clamp(260px, 20vw, 320px);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.auth-brand__photo {
  width: 100%;
  height: 158px;
  object-fit: cover;
  display: block;
}
.auth-brand__card-body {
  padding: 1rem 1.15rem 1.15rem;
}
.auth-brand__ptitle {
  color: var(--sp-color-primary);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.auth-brand__pmeta {
  color: var(--sp-color-grey-600);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.25rem;
  display: flex;
  gap: 0.85rem;
}
.auth-brand__pmeta b {
  color: var(--sp-color-primary);
}
.auth-brand__hr {
  height: 1px;
  background: #eef1f3;
  margin: 1rem 0;
}
.auth-brand__buyer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.auth-brand__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00394d, #004e41);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-brand__buyer-info {
  flex: 1;
  min-width: 0;
}
.auth-brand__buyer-name {
  color: var(--sp-color-primary);
  font-size: 0.95rem;
  font-weight: 700;
}
.auth-brand__buyer-sub {
  color: var(--sp-color-grey-500);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 1px;
}
.auth-brand__actions {
  display: flex;
  gap: 0.5rem;
}
.auth-brand__act {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.auth-brand__act--yes {
  background: var(--sp-color-success);
  color: #fff;
  box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}
.auth-brand__act--no {
  background: #fff;
  color: #cbd0d6;
  border: 1.5px solid #e5e9ed;
}
.auth-brand__badge {
  position: absolute;
  top: 118px;
  right: -18px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--sp-color-accent),
    var(--sp-color-accent-dark)
  );
  color: var(--sp-color-primary);
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 5px solid #fff;
  box-shadow: 0 14px 30px rgba(212, 168, 70, 0.55);
}
.auth-brand__pct {
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -1px;
}
.auth-brand__lbl {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.8;
}
.auth-brand__lea {
  position: absolute;
  left: 50%;
  bottom: 58%;
  transform: translateX(-46%);
  height: clamp(330px, 44vh, 430px);
  width: auto;
  z-index: 2;
  filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

/* ---------- FORM PANEL (droite) ---------- */
.auth-form-panel {
  flex: 0.85;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}
.auth-form-inner {
  width: 100%;
  max-width: 380px;
}
.auth-form-logo {
  display: none; /* logo affiché dans le panneau marque sur desktop */
  height: 32px;
  margin-bottom: 1.5rem;
}
.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--sp-color-text-primary);
  margin: 0 0 0.4rem;
}
.auth-subtitle {
  font-size: 0.95rem;
  color: var(--sp-color-text-secondary);
  margin: 0 0 1.75rem;
  line-height: 1.45;
}

.auth-error {
  background: var(--sp-color-danger-background);
  color: var(--sp-color-error-dark);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  text-align: left;
}
.auth-error p {
  margin: 0;
  line-height: 1.5;
}
.auth-error a {
  color: var(--sp-color-error-dark);
  text-decoration: underline;
  font-weight: 600;
  text-underline-offset: 2px;
}

.auth-referral-badge {
  margin-bottom: 1.25rem;
}

.auth-form-group {
  margin-bottom: 1.1rem;
  text-align: left;
}
.auth-form-group label {
  display: block;
  font-weight: 600;
  color: var(--sp-color-text-primary);
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
}
.auth-form-group .sp-input {
  width: 100%;
}
.auth-form-group small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--sp-color-text-muted);
}

.auth-submit {
  width: 100%;
  margin-top: 0.75rem;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: 12px;
}

/* Mot de passe oublié : lien discret, action mineure */
.auth-forgot {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--sp-color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.auth-forgot:hover {
  color: var(--sp-color-primary);
  text-decoration: underline;
}

/* CTA secondaire (créer un compte / se connecter) : bouton distinct,
   clairement séparé du CTA principal pour éviter le miss-click mobile */
.auth-alt {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sp-color-grey-200);
  text-align: center;
}
.auth-alt__label {
  display: block;
  font-size: 0.85rem;
  color: var(--sp-color-text-muted);
  margin-bottom: 0.75rem;
}

/* ============================================================
   RESPONSIVE — sous 900px : le panneau marque devient un
   bandeau compact (logo + headline + pills), carte + Léa cachés
   ============================================================ */
@media (max-width: 900px) {
  .auth-page {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
  }
  .auth-brand {
    flex: none;
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.5rem 1.75rem;
  }
  .auth-brand__content {
    max-width: 100%;
  }
  .auth-brand__logo {
    height: 30px;
    margin-bottom: 1.25rem;
  }
  .auth-brand__title {
    font-size: 1.6rem;
    letter-spacing: -0.8px;
  }
  .auth-brand__sub {
    display: none;
  }
  .auth-brand__pills {
    margin-top: 1rem;
  }
  .auth-brand__hero {
    display: none;
  }
  .auth-form-panel {
    flex: none;
    padding: 2rem 1.5rem 2.5rem;
  }
}

@media (max-width: 480px) {
  .auth-brand__title {
    font-size: 1.4rem;
  }
  .auth-brand__pill {
    font-size: 0.78rem;
    padding: 0.45rem 0.75rem;
  }
}

/* Écrans courts en desktop : compresse le panneau marque */
@media (min-width: 901px) and (max-height: 720px) {
  .auth-brand__logo {
    margin-bottom: 1.25rem;
  }
  .auth-brand__lea {
    height: 56vh;
  }
}
