/* ============================================================
   AUTH
   ============================================================ */
.auth-page {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(0,201,141,.10) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(0,168,244,.07) 0%, transparent 55%),
    #0A0C10;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
  overflow-y: auto;
}

.auth-page.hidden {
  display: none;
}

.auth-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(18, 22, 34, 0.88);
  border: 1px solid rgba(0,201,141,.18);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 0 60px rgba(0,201,141,.06), 0 24px 64px rgba(0,0,0,.55);
  animation: slideUp .25s ease;
}

/* ── Auth back button ── */
.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  transition: color .2s;
}
.auth-back-btn:hover { color: rgba(255,255,255,.85); }

/* ── Auth logo ── */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.auth-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  object-fit: contain;
}

.auth-tagline {
  font-size: 12px;
  color: rgba(255,255,255,.38);
  margin-bottom: 24px;
}

.auth-form h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 20px;
  color: #e8eaf0;
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Force light labels inside auth (always dark bg) */
.auth-page .form-group label {
  color: rgba(255,255,255,.42);
}

.auth-form input {
  width: 100%;
}

/* Dark-forced inputs inside auth */
.auth-page input[type="text"],
.auth-page input[type="email"],
.auth-page input[type="tel"],
.auth-page input[type="password"] {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.11) !important;
  color: #e8eaf0 !important;
}
.auth-page input[type="text"]::placeholder,
.auth-page input[type="email"]::placeholder,
.auth-page input[type="tel"]::placeholder,
.auth-page input[type="password"]::placeholder {
  color: rgba(255,255,255,.28) !important;
}
.auth-page input[type="text"]:focus,
.auth-page input[type="email"]:focus,
.auth-page input[type="tel"]:focus,
.auth-page input[type="password"]:focus {
  border-color: rgba(0,201,141,.4) !important;
  background: rgba(255,255,255,.09) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,201,141,.08) !important;
}

/* ── Password show/hide ── */
.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-password-wrap input {
  padding-right: 42px !important;
}
.btn-show-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255,255,255,.38);
  display: flex;
  align-items: center;
  transition: color .2s;
}
.btn-show-pwd:hover { color: rgba(255,255,255,.75); }

/* ── Forgot password ── */
.auth-forgot {
  display: block;
  font-size: 12px;
  color: rgba(0,201,141,.75);
  text-align: right;
  margin-top: 6px;
  text-decoration: none;
  transition: color .2s;
}
.auth-forgot:hover { color: #00C98D; }

/* ── Modal mot de passe oublié ─────────────────────────────── */
.forgot-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.forgot-modal.hidden { display: none; }
.forgot-modal-box {
  background: var(--card-bg);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  animation: notifSlideIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
@media (max-width: 480px) { .forgot-modal-box { padding: 20px 16px; } }

.auth-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 14px;
}

.auth-error.hidden {
  display: none;
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  margin-top: 16px;
}

.auth-switch a {
  color: #00C98D;
  font-weight: 600;
}

/* Online/offline */
.online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.online-indicator.online {
  background: rgba(16,185,129,.15);
  color: var(--green);
}

.online-indicator.offline {
  background: rgba(239,68,68,.15);
  color: var(--red);
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.online-indicator.online .online-dot {
  background: var(--green);
}

.online-indicator.offline .online-dot {
  background: var(--red);
}

/* User pill */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--hover);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #0f1117;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}


/* ── Sélecteur type de compte (inscription) ─────────────────── */
.reg-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.reg-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  background: rgba(255,255,255,.04);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--text);
  text-align: center;
}
.reg-type-btn i {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 4px;
  transition: color .2s;
}
.reg-type-btn .reg-type-label {
  font-size: 13px;
  font-weight: 700;
}
.reg-type-btn .reg-type-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.reg-type-btn.active {
  border-color: var(--accent);
  background: rgba(0,201,141,.08);
}
.reg-type-btn.active i { color: var(--accent); }
.reg-assiste-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0,201,141,.07);
  border: 1px solid rgba(0,201,141,.25);
  border-radius: 8px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 14px;
  line-height: 1.5;
}
.reg-assiste-notice i { margin-top: 2px; flex-shrink: 0; }
