/* ============================================================
   STORYBUL — Styles pages Auth (login / signup)
   ============================================================ */

.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0fdf4 0%, #fef9f0 50%, #fdf4ff 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem 2rem;
  font-family: 'Nunito', sans-serif;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Logo */
.auth-logo {
  text-decoration: none;
}
.auth-logo .logo-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: #059669;
  letter-spacing: -0.5px;
}
.auth-logo .logo-u { color: #F48F82; }

/* Card */
.auth-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  padding: 2rem;
  width: 100%;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a2e;
  margin: 0 0 .25rem;
  text-align: center;
}

.auth-subtitle {
  font-size: .95rem;
  color: #6b7280;
  text-align: center;
  margin: 0 0 1.5rem;
}

/* Social login */
.btn-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  padding: .75rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.btn-social:hover { border-color: #d1d5db; background: #f9fafb; }
.btn-apple { margin-top: .625rem; background: #000; color: #fff; border-color: #000; }
.btn-apple:hover { background: #1a1a1a; border-color: #1a1a1a; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: #9ca3af;
  font-size: .85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Champs */
.field-group {
  margin-bottom: 1rem;
}
.field-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: .375rem;
}
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="text"] {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  color: #1a1a2e;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  outline: none;
}
.field-group input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .1);
}
.field-group input.invalid { border-color: #ef4444; }
.field-group input.valid   { border-color: #10b981; }

.link-forgot {
  font-size: .8rem;
  font-weight: 600;
  color: #059669;
  text-decoration: none;
}
.link-forgot:hover { text-decoration: underline; }

/* Password wrap */
.input-password-wrap {
  position: relative;
}
.input-password-wrap input { padding-right: 3rem; }
.btn-toggle-password {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: .25rem;
  display: flex;
  align-items: center;
}
.btn-toggle-password:hover { color: #374151; }

/* Indicateur force mot de passe */
.password-strength {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .375rem;
}
.strength-bar {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}
.strength-fill.weak   { width: 33%; background: #ef4444; }
.strength-fill.medium { width: 66%; background: #f59e0b; }
.strength-fill.strong { width: 100%; background: #10b981; }
.strength-label { font-size: .75rem; color: #6b7280; white-space: nowrap; }

/* Erreurs */
.field-error {
  display: block;
  font-size: .8rem;
  color: #ef4444;
  margin-top: .25rem;
  min-height: 1rem;
}
.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-size: .875rem;
  color: #dc2626;
  margin-bottom: 1rem;
}

/* Checkbox */
.field-checkbox label { align-items: flex-start; font-weight: 400; }
.field-checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: .1rem;
  accent-color: #059669;
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  cursor: pointer;
  font-size: .875rem;
  color: #374151;
  line-height: 1.5;
}
.checkbox-label a { color: #059669; text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }

/* Boutons */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1.5rem;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: background .2s, transform .1s;
  text-decoration: none;
}
.btn-primary:hover { background: #047857; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
.btn-full { width: 100%; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .875rem 1.5rem;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  width: 100%;
}
.btn-secondary:hover { background: #e5e7eb; }

/* Spinner */
.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: .875rem;
  color: #6b7280;
  margin: 1rem 0 0;
}
.auth-switch a { color: #059669; font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Age gate */
.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 1.5rem 0 1rem;
}
.link-secondary {
  text-align: center;
  color: #6b7280;
  font-size: .875rem;
  text-decoration: none;
}
.link-secondary:hover { text-decoration: underline; }
.age-gate-note {
  font-size: .8rem;
  color: #9ca3af;
  text-align: center;
  margin: 0;
}

/* Verify card */
.verify-icon { font-size: 3rem; text-align: center; margin-bottom: .5rem; }
.verify-note {
  font-size: .875rem;
  color: #6b7280;
  text-align: center;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

/* Maintenance banner */
.maintenance-banner {
  background: #fef3c7;
  border: 1.5px solid #fbbf24;
  border-radius: 12px;
  padding: .875rem 1rem;
  font-size: .875rem;
  color: #92400e;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

/* Hidden */
.hidden { display: none !important; }

/* Mobile */
@media (max-width: 480px) {
  .auth-card { padding: 1.5rem; border-radius: 16px; }
  .auth-title { font-size: 1.3rem; }
}
