/* ============ COMPTES ============ */
body { padding-top: 80px; }
.nav { background: rgba(7,9,15,.92); backdrop-filter: blur(14px);
       border-bottom: 1px solid rgba(255,255,255,.06); }

.auth-wrap { max-width: 520px; margin: 40px auto 60px; padding: 0 20px; transition: max-width .2s; }
.auth-wrap:has(#card-profile:not(.hidden)) { max-width: 640px; }
.auth-card {
  background: var(--panel); border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px; padding: 30px; backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

/* ---------- Intro de la carte connexion ---------- */
.auth-intro { text-align: center; margin-bottom: 22px; }
.auth-logo { font-size: 22px; font-weight: 900; letter-spacing: 1px; margin-bottom: 8px; }
.auth-intro p { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 380px; margin: 0 auto; }

/* Lien "mot de passe oublié" */
.link-forgot {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: 12.5px; text-decoration: underline;
  margin: 10px auto 0; display: block; transition: color .15s;
}
.link-forgot:hover { color: var(--accent); }

/* Encart mot de passe oublié */
.forgot-box { text-align: center; }
.forgot-box p { font-size: 13.5px; color: #cbd5e1; line-height: 1.6; margin-bottom: 12px; }
.forgot-box .btn-auth { margin-top: 4px; text-decoration: none; display: inline-block; }

/* ---------- Profil ---------- */
.profile-head { align-items: center; }
.prof-skin {
  width: 88px; height: 88px; flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(74,222,128,.18), transparent 70%);
  border: 1px solid rgba(74,222,128,.22);
}
.prof-skin img { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 12px; background: #222; }
.prof-id { flex: 1; }
.prof-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* Stats */
.prof-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 6px 0 24px;
}
.pstat {
  text-align: center; padding: 14px 8px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
}
.pstat b { display: block; font-size: 20px; font-weight: 900; color: var(--accent); }
.pstat span { font-size: 10.5px; color: var(--muted); }
@media (max-width: 520px) { .prof-stats { grid-template-columns: repeat(2, 1fr); } }

/* Onglets */
.auth-tabs {
  display: flex; gap: 6px; margin-bottom: 24px;
  background: rgba(0,0,0,.3); border-radius: 12px; padding: 5px;
}
.auth-tab {
  flex: 1; border: none; background: none; cursor: pointer;
  color: var(--muted); font-family: inherit; font-weight: 700; font-size: 13.5px;
  padding: 10px; border-radius: 9px; transition: background .2s, color .2s;
}
.auth-tab.active { background: var(--accent); color: #052e16; }

/* Formulaires */
.auth-form { display: flex; flex-direction: column; }
.auth-form label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.auth-form label small { opacity: .7; }
.auth-form input {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  color: var(--text); font-family: inherit; font-size: 14.5px;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form.compact input { margin-bottom: 10px; }

.btn-auth {
  border: none; border-radius: 11px; cursor: pointer; margin-top: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #052e16; font-family: inherit; font-weight: 800; font-size: 15px; padding: 13px;
  transition: transform .12s, box-shadow .2s;
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(74,222,128,.3); }
.btn-auth.small { font-size: 13.5px; padding: 11px; }

.auth-msg { font-size: 12.5px; margin-top: 10px; min-height: 16px; }
.auth-msg.ok { color: var(--accent); }
.auth-msg.err { color: #f87171; }

/* Profil */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.profile-head img { width: 72px; height: 72px; border-radius: 14px; background: #222; }
.prof-name { font-size: 24px; font-weight: 900; }
.prof-since { font-size: 12.5px; color: var(--muted); }
.prof-badge {
  display: inline-block; margin-top: 6px;
  background: rgba(251,191,36,.12); color: var(--gold);
  border: 1px solid rgba(251,191,36,.35); border-radius: 20px;
  font-size: 11.5px; font-weight: 700; padding: 3px 12px;
}

.auth-card h3 {
  font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin: 26px 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.07);
}

.orders { display: flex; flex-direction: column; gap: 8px; }
.order {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: 12px 14px;
}
.o-items { font-size: 13.5px; font-weight: 600; }
.o-date { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.o-total { color: var(--gold); font-size: 15px; white-space: nowrap; }
.empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 16px 0; }

.btn-signout {
  width: 100%; margin-top: 24px; cursor: pointer;
  background: none; border: 1px solid rgba(248,113,113,.4); color: #f87171;
  border-radius: 11px; padding: 11px; font-family: inherit; font-weight: 600; font-size: 13.5px;
}
.btn-signout:hover { background: rgba(248,113,113,.08); }

#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(90px);
  background: var(--accent); color: #052e16; font-weight: 700; font-size: 14px;
  padding: 12px 26px; border-radius: 30px; z-index: 400;
  transition: transform .3s ease; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.err { background: #f87171; color: #450a0a; }
