/* =====================================================================
   LE SEND — Auth Split-Screen PIXEL-PERFECT (Mauve)
   Reproduction exacte du design de référence :
   - Carte flottante centrée (border-radius 24px, ombre douce)
   - Cercle géant qui déborde (blob organique créant séparation courbe)
   - Inputs pill-shape sur fond mauve pâle
   - Bouton primaire centré (pas full width)
   - Footer credits en bas du panneau gauche
   ===================================================================== */

/* === GLOBAL === */
.ls-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* === CARTE FLOTTANTE === */
.ls-auth-card-split {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 920px;
  min-height: 580px;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 10px 25px rgba(0, 0, 0, 0.08);
  animation: ls-auth-card-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes ls-auth-card-in {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === CÔTÉ GAUCHE : Branding mauve === */
.ls-auth-left {
  position: relative;
  flex: 1;
  background: linear-gradient(135deg, #432775 0%, #6B46C1 100%);
  color: #fff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* === BLOB GÉANT (cercle qui déborde à droite) === */
.ls-auth-left::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -180px;
  transform: translateY(-50%);
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
              linear-gradient(135deg, #6B46C1 0%, #9F7AEA 100%);
  z-index: 0;
  animation: ls-blob-pulse 8s ease-in-out infinite;
}
@keyframes ls-blob-pulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.08); }
}

/* Second blob plus petit en haut à gauche */
.ls-auth-left::after {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 122, 234, 0.4) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

/* Contenu au-dessus du blob */
.ls-auth-left-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
}

/* === LOGO === */
.ls-auth-logo-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: ls-logo-float 4s ease-in-out infinite;
}
@keyframes ls-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.ls-auth-logo-text {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 36px;
  text-transform: lowercase;
}

.ls-auth-left-title {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.2;
}

.ls-auth-left-subtitle {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 36px;
  max-width: 280px;
}

/* Bouton SIGN IN (ghost, outlined) */
.ls-auth-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 36px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 30px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: inherit;
}
.ls-auth-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

/* Footer credits en bas */
.ls-auth-left-footer {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  z-index: 2;
}

/* === CÔTÉ DROIT : Formulaire blanc === */
.ls-auth-right {
  flex: 1;
  background: #fff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ls-auth-right-content {
  width: 100%;
  max-width: 320px;
}

.ls-auth-right-title {
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ls-mauve-dark, #432775);
  margin-bottom: 8px;
  text-transform: lowercase;
  line-height: 1;
}

.ls-auth-right-subtitle {
  font-size: 14.5px;
  font-weight: 400;
  color: #6B7280;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* === CHAMPS INPUT (pill, fond mauve pâle) === */
.ls-auth-field {
  margin-bottom: 16px;
  text-align: left;
}

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

.ls-auth-input {
  width: 100%;
  padding: 16px 24px;
  background: #F3EEFF;
  border: 1.5px solid transparent;
  border-radius: 50px;
  font-size: 15px;
  font-family: inherit;
  color: #1F2937;
  transition: all 0.25s ease;
  outline: none;
  box-sizing: border-box;
}
.ls-auth-input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}
.ls-auth-input:focus {
  background: #fff;
  border-color: #6B46C1;
  box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.15);
}

/* Input avec icône (padding gauche) */
.ls-auth-input.has-icon {
  padding-left: 52px;
}

.ls-auth-input-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9CA3AF;
  pointer-events: none;
  transition: color 0.25s ease;
}
.ls-auth-input:focus ~ .ls-auth-input-icon {
  color: #6B46C1;
}

/* Toggle password */
.ls-auth-toggle-pwd {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  color: #9CA3AF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease;
}
.ls-auth-toggle-pwd:hover { color: #6B46C1; }

/* === LIEN "Forgot password" === */
.ls-auth-link-center {
  text-align: center;
  margin: 18px 0 24px;
}
.ls-auth-link-center a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ls-mauve-dark, #432775);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ls-auth-link-center a:hover {
  color: #6B46C1;
  text-decoration: underline;
}

/* === BOUTON LOG IN (primaire, centré, pas full width) === */
.ls-auth-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 48px;
  background: linear-gradient(135deg, #6B46C1 0%, #432775 100%);
  border: none;
  border-radius: 30px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(107, 70, 193, 0.35);
  font-family: inherit;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.ls-auth-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.5s ease;
}
.ls-auth-btn-primary:hover::before { left: 100%; }
.ls-auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(107, 70, 193, 0.5);
}
.ls-auth-btn-primary:active { transform: translateY(0); }

/* Wrapper pour centrer le bouton */
.ls-auth-btn-wrap {
  text-align: center;
  margin-top: 8px;
}

/* === FOOTER FORM (Sign up link) === */
.ls-auth-form-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: #6B7280;
}
.ls-auth-form-footer a {
  color: var(--ls-mauve-dark, #432775);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.2s ease;
}
.ls-auth-form-footer a:hover {
  color: #6B46C1;
  text-decoration: underline;
}

/* === CHECKBOX === */
.ls-auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #4B5563;
  margin-bottom: 20px;
  justify-content: center;
}
.ls-auth-check input {
  accent-color: #6B46C1;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* === ALERTES === */
.ls-auth-alert {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 18px;
  text-align: left;
  align-items: flex-start;
}
.ls-auth-alert svg { flex-shrink: 0; margin-top: 1px; }
.ls-auth-alert-danger {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
}
.ls-auth-alert-success {
  background: #DCFCE7;
  border: 1px solid #BBF7D0;
  color: #166534;
}
.ls-auth-alert-info {
  background: #E0E7FF;
  border: 1px solid #C7D2FE;
  color: #3730A3;
}
.ls-auth-alert-warning {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #92400E;
}

/* === ROBUSTESSE PASSWORD === */
.ls-auth-pwd-strength {
  margin: 8px 0 18px;
  text-align: left;
}
.ls-auth-pwd-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.ls-auth-pwd-bars > div {
  height: 4px;
  flex: 1;
  background: #E5E7EB;
  border-radius: 2px;
  transition: background 0.25s ease;
}
.ls-auth-pwd-label {
  font-size: 12px;
  color: #6B7280;
}

/* === INFO CARD (succès, vérification) === */
.ls-auth-info-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ls-success-bounce 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes ls-success-bounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.ls-auth-info-icon > div {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.ls-auth-info-icon.is-mauve { background: #F3EEFF; }
.ls-auth-info-icon.is-mauve > div { background: linear-gradient(135deg, #6B46C1 0%, #432775 100%); box-shadow: 0 8px 20px rgba(107, 70, 193, 0.4); }
.ls-auth-info-icon.is-success { background: #DCFCE7; }
.ls-auth-info-icon.is-success > div { background: #16A34A; box-shadow: 0 8px 20px rgba(22, 163, 74, 0.4); }
.ls-auth-info-icon.is-warning { background: #FEF3C7; }
.ls-auth-info-icon.is-warning > div { background: #D97706; box-shadow: 0 8px 20px rgba(217, 119, 6, 0.4); }

/* === GRID 2 COLONNES (signup) === */
.ls-auth-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  text-align: left;
}
.ls-auth-fields-grid .ls-field-full { grid-column: span 2; }

/* === SELECT === */
.ls-auth-select {
  width: 100%;
  padding: 16px 24px;
  background: #F3EEFF;
  border: 1.5px solid transparent;
  border-radius: 50px;
  font-size: 15px;
  font-family: inherit;
  color: #1F2937;
  appearance: none;
  outline: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B46C1' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 22px center;
  padding-right: 48px;
  transition: all 0.25s ease;
}
.ls-auth-select:focus {
  background-color: #fff;
  border-color: #6B46C1;
  box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.15);
}

/* === LABEL === */
.ls-auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
  text-align: left;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .ls-auth-card-split {
    flex-direction: column;
    max-width: 420px;
    min-height: auto;
  }
  .ls-auth-left {
    padding: 40px 32px 60px;
    min-height: 280px;
  }
  .ls-auth-left::before {
    width: 280px;
    height: 280px;
    right: -140px;
    top: -100px;
    transform: none;
  }
  .ls-auth-left::after {
    display: none;
  }
  .ls-auth-left-footer { position: relative; bottom: auto; margin-top: 24px; }
  .ls-auth-right { padding: 40px 32px; }
  .ls-auth-right-title { font-size: 2rem; }
}

@media (max-width: 480px) {
  .ls-auth-page { padding: 12px; }
  .ls-auth-left, .ls-auth-right { padding: 32px 24px; }
  .ls-auth-left-title { font-size: 1.6rem; }
  .ls-auth-right-title { font-size: 1.8rem; }
  .ls-auth-fields-grid { grid-template-columns: 1fr; }
  .ls-auth-fields-grid .ls-field-full { grid-column: span 1; }
}

/* === VARIANTES ADMIN (mauve foncé) === */
.ls-auth-left.is-admin {
  background: linear-gradient(135deg, #2D1B69 0%, #432775 100%);
}
.ls-auth-left.is-admin::before {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
              linear-gradient(135deg, #432775 0%, #6B46C1 100%);
}

/* Badge ADMIN en haut à droite de la carte */
.ls-auth-admin-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .ls-auth-admin-badge { display: none; }
}
