:root {
  color-scheme: dark;
  --bg: #17110e; --panel: #261c16; --panel2: #32251c; --line: #61482e;
  --text: #fff2df; --muted: #c7ae91; --gold: #edc780; --champagne: #fff0ce; --bronze: #ae7942;
  --discord: #5865f2; --discord-dark: #4752c4;
  font-family: Inter, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
a { color: inherit; }
.auth-body {
  min-height: 100vh; display: flex; flex-direction: column; color: var(--text); overflow-x: hidden;
  background: radial-gradient(ellipse at 65% -30%, #382546 0, transparent 65%),
              radial-gradient(ellipse at 10% 110%, #3a2414 0, transparent 55%), var(--bg);
}

/* Décor */
.auth-backdrop { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.auth-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.glow-1 { width: 420px; height: 420px; background: #edc78055; top: 8%; left: -120px; }
.glow-2 { width: 520px; height: 520px; background: #5865f240; bottom: -180px; right: -140px; }
.auth-chip {
  position: absolute; display: grid; place-items: center; width: 74px; height: 102px; border-radius: 12px;
  font-size: 34px; color: #edc78099; background: linear-gradient(160deg, #32251ccc, #1f1712cc);
  border: 1px solid #61482e99; box-shadow: 0 18px 40px #0007; animation: float 9s ease-in-out infinite;
}
.chip-1 { top: 14%; left: 8%; transform: rotate(-14deg); }
.chip-2 { top: 62%; left: 4%; transform: rotate(9deg); animation-delay: -3s; color: #e2706a99; }
.chip-3 { top: 18%; right: 7%; transform: rotate(12deg); animation-delay: -5s; color: #e2706a99; }
.chip-4 { bottom: 10%; right: 12%; transform: rotate(-8deg); animation-delay: -7s; }
@keyframes float { 50% { translate: 0 -16px; } }

/* En-tête */
.auth-top {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 22px clamp(18px, 4vw, 48px);
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; text-decoration: none; }
.auth-brand-logo, .auth-avatar {
  position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  background: var(--panel2); color: var(--gold); font-weight: 800;
}
.auth-brand-logo { width: 40px; height: 40px; border: 2px solid var(--line); }
.auth-brand-logo img, .auth-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.auth-nav a {
  padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
  text-decoration: none; border: 1px solid transparent; transition: .15s;
}
.auth-nav a:hover, .auth-nav a:focus-visible { color: var(--text); border-color: var(--line); background: #ffffff08; }

/* Contenu */
.auth-main {
  position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 300px);
  gap: 28px; align-content: center; justify-content: center; padding: 24px clamp(16px, 4vw, 48px) 56px;
}
.auth-card, .auth-side {
  background: linear-gradient(180deg, #2b2019f2, #1f1712f2); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: 0 30px 80px #0009, inset 0 1px 0 #ffffff0d;
}
.auth-card { padding: 40px 36px 30px; text-align: center; }
.auth-avatar {
  width: 92px; height: 92px; margin: -86px auto 18px; font-size: 36px;
  border: 3px solid var(--gold); box-shadow: 0 0 0 6px #17110e, 0 14px 40px #edc78040;
}
.auth-kicker { margin: 0 0 6px; color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; }
.auth-card h1 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 32px); line-height: 1.15; }
.auth-card h1 span { color: var(--champagne); }
.auth-lead { margin: 0 auto 24px; max-width: 360px; color: var(--muted); line-height: 1.55; font-size: 15px; }

.auth-status {
  margin: 0 0 18px; padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; text-align: left;
  border: 1px solid var(--line); background: #ffffff0a;
}
.auth-status[data-level="success"] { border-color: #6fbf7f80; background: #6fbf7f1a; color: #c9f2d1; }
.auth-status[data-level="warning"] { border-color: #edc78080; background: #edc7801a; color: var(--champagne); }
.auth-status[data-level="error"] { border-color: #e2706a80; background: #e2706a1a; color: #ffd2cd; }

.auth-discord {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 16px 20px;
  border-radius: 14px; background: var(--discord); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none;
  box-shadow: 0 10px 30px #5865f24d, inset 0 1px 0 #ffffff33; transition: transform .15s, background .15s, box-shadow .15s;
}
.auth-discord:hover { background: var(--discord-dark); transform: translateY(-1px); box-shadow: 0 14px 36px #5865f266; }
.auth-discord:focus-visible { outline: 3px solid var(--champagne); outline-offset: 3px; }
.auth-discord.loading { pointer-events: none; opacity: .8; }
.auth-discord.loading svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.auth-perks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 9px; text-align: left; }
.auth-perks li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.auth-perks li span {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #edc7801f; color: var(--gold); font-size: 12px; font-weight: 800;
}
.auth-legal { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #61482e80; font-size: 13px; color: var(--muted); }
.auth-legal a { color: var(--gold); }

.auth-side { padding: 24px; align-self: center; }
.auth-side h2 { margin: 0 0 14px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.auth-link {
  display: flex; align-items: center; gap: 14px; padding: 12px; margin: 0 -6px; border-radius: 14px;
  text-decoration: none; border: 1px solid transparent; transition: .15s;
}
.auth-link + .auth-link { margin-top: 4px; }
.auth-link:hover, .auth-link:focus-visible { background: #ffffff08; border-color: var(--line); }
.auth-link-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--gold); font-weight: 800;
}
.auth-link strong { display: block; font-size: 15px; }
.auth-link small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .auth-main { grid-template-columns: minmax(0, 480px); padding-top: 64px; }
  .auth-chip { display: none; }
}
@media (max-width: 480px) {
  .auth-top { justify-content: center; }
  .auth-card { padding: 36px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-chip, .auth-discord.loading svg { animation: none; }
  .auth-discord { transition: none; }
}
