/* ═══════════════════════════════════════════
   TICKETÔ — AUTH.CSS
   Pages Connexion & Inscription
═══════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #1a7a4a;
  --primary-dark:  #0f2e18;
  --primary-light: #22a060;
  --accent:        #4ade80;
  --text:          #111827;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --border-focus:  #1a7a4a;
  --surface:       #ffffff;
  --surface-alt:   #f8faf9;
  --error:         #ef4444;
  --success:       #22a060;
  --radius:        14px;
  --radius-sm:     10px;
  --shadow:        0 4px 32px rgba(0,0,0,.10);
  --shadow-lg:     0 12px 48px rgba(0,0,0,.15);
}

html, body {
  min-height: 100vh;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Wrapper principal ────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
}

/* ── Panneau gauche — Branding ───────────── */
.auth-brand {
  flex: 0 0 480px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px 52px;
  background:
    linear-gradient(150deg,
      rgba(5,15,9,.96)  0%,
      rgba(10,40,22,.90) 40%,
      rgba(26,122,74,.82) 100%),
    url(assetes/pretty-black-girl-cafe.jpg) center/cover no-repeat;
}

/* Déco cercles flous */
.auth-brand::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,222,128,.18) 0%, transparent 70%);
  top: -80px; right: -120px;
  pointer-events: none;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,122,74,.25) 0%, transparent 70%);
  bottom: 40px; left: -80px;
  pointer-events: none;
}

/* Logo dans le panneau gauche */
.auth-brand-logo img {
  height: 44px;
  width: auto;
}

/* Zone centrale — titre + bullets */
.auth-brand-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 0 40px;
  position: relative;
  z-index: 1;
}

.auth-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74,222,128,.15);
  border: 1px solid rgba(74,222,128,.30);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  width: fit-content;
  margin-bottom: 28px;
}

.auth-brand-headline {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -.5px;
}
.auth-brand-headline span { color: var(--accent); }

.auth-brand-sub {
  font-size: .95rem;
  color: rgba(255,255,255,.60);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 340px;
}

/* Bullets avantages */
.auth-perks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-perk {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.auth-perk-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(74,222,128,.13);
  border: 1px solid rgba(74,222,128,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--accent);
}

.auth-perk-text strong {
  display: block;
  font-size: .875rem;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  margin-bottom: 2px;
}
.auth-perk-text span {
  font-size: .8rem;
  color: rgba(255,255,255,.50);
  line-height: 1.5;
}

/* Bas du panneau gauche — stats */
.auth-brand-footer {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.auth-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.auth-stat span {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* ── Panneau droit — Formulaire ──────────── */
.auth-form-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 72px;
  background: var(--surface);
  overflow-y: auto;
}

/* Petite nav top (mobile logo + lien retour) */
.auth-topbar {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.auth-topbar img { height: 36px; }
.auth-topbar-back {
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-topbar-back:hover { color: var(--primary); }

/* Container du form */
.auth-box {
  width: 100%;
  max-width: 420px;
}

.auth-box-head {
  margin-bottom: 36px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 28px;
  transition: color .2s;
}
.auth-back-link:hover { color: var(--primary); }
.auth-back-link i { font-size: .75rem; }

.auth-box-head h1 {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.4px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.auth-box-head p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.auth-box-head p a {
  color: var(--primary);
  font-weight: 600;
}
.auth-box-head p a:hover { text-decoration: underline; }

/* ── Formulaire ──────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 20px; }

/* Ligne double (prénom + nom) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Groupe champ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .2px;
}

/* Input wrapper (pour l'icône) */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap i {
  position: absolute;
  left: 16px;
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color .2s;
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  padding: 13px 16px 13px 44px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
  -webkit-appearance: none;
}

.input-wrap input::placeholder { color: #b0bab5; }

.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,122,74,.12);
}
.input-wrap input:focus + i,
.input-wrap:focus-within i { color: var(--primary); }

/* Eye toggle mot de passe */
.input-wrap .toggle-pw {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px;
  transition: color .2s;
  pointer-events: auto;
}
.input-wrap .toggle-pw:hover { color: var(--primary); }

/* Select chevron */
.input-wrap select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Erreur sous le champ */
.field-error {
  font-size: .78rem;
  color: var(--error);
  display: none;
  align-items: center;
  gap: 5px;
}
.field-error.show { display: flex; }

/* État d'erreur sur l'input */
.input-wrap.has-error input,
.input-wrap.has-error select {
  border-color: var(--error);
  background: #fff5f5;
}
.input-wrap.has-error i { color: var(--error); }

/* ── Lien mot de passe oublié ─────────────── */
.forgot-link {
  align-self: flex-end;
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: -8px;
}
.forgot-link:hover { text-decoration: underline; }

/* ── Force mot de passe ───────────────────── */
.pw-strength {
  margin-top: 6px;
}
.pw-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 6px;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width .3s ease, background .3s ease;
}
.pw-strength-label {
  font-size: .74rem;
  color: var(--text-muted);
}

/* ── CGU ──────────────────────────────────── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px; height: 18px;
  accent-color: var(--primary);
  margin-top: 2px;
  cursor: pointer;
}

.form-check-label {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.form-check-label a {
  color: var(--primary);
  font-weight: 600;
}
.form-check-label a:hover { text-decoration: underline; }

/* ── Bouton soumettre ─────────────────────── */
.btn-auth {
  width: 100%;
  padding: 15px 24px;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .15s, box-shadow .2s;
  letter-spacing: .2px;
  margin-top: 4px;
}
.btn-auth:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 24px rgba(26,122,74,.35);
  transform: translateY(-1px);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Divider "ou" ─────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Bouton WhatsApp ──────────────────────── */
.btn-whatsapp {
  width: 100%;
  padding: 13px 24px;
  font-size: .88rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: #25d366;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .15s;
}
.btn-whatsapp:hover { background: #1fba59; transform: translateY(-1px); }
.btn-whatsapp i { font-size: 18px; }

/* ── Alerte / message global ──────────────── */
.auth-alert {
  display: none;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.auth-alert.show { display: flex; }
.auth-alert.error  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.auth-alert.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ── Séparateur de section (register) ─────── */
.form-section-label {
  font-size: .72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 1024px) {
  .auth-brand { flex: 0 0 380px; padding: 40px 36px 44px; }
  .auth-form-side { padding: 60px 48px; }
  .auth-brand-headline { font-size: 2rem; }
}

@media (max-width: 768px) {
  .auth-page { flex-direction: column; }
  .auth-brand { display: none; }
  .auth-topbar { display: flex; }
  .auth-form-side {
    padding: 24px 24px 48px;
    flex: 1;
    justify-content: flex-start;
  }
  .auth-box {
    max-width: 100%;
    padding-top: 16px;
  }
  .auth-back-link { margin-bottom: 20px; }
  .auth-box-head { margin-bottom: 28px; }
  .auth-box-head h1 { font-size: 1.65rem; }
  .form-row { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 400px) {
  .auth-form-side { padding: 16px 18px 40px; }
}
