:root {
  color-scheme: dark;
  --bg: #060606;
  --bg2: #0D0D0D;
  --bg3: #161616;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.12);
  --blue: #FFFFFF;
  --blue-light: #E7E7EC;
  --cyan: #C7C7D1;
  --green: #10B981;
  --amber: #EAB308;
  --text: #F8FAFC;
  --text-muted: #52525B;
  --text-dim: #A1A1AA;
  --grad: linear-gradient(135deg, #FFFFFF 0%, #C6C6CE 55%, #FFFFFF 100%);
  --grad-cyan: linear-gradient(135deg, #FFFFFF, #8E8E96);
  --on-light: #0A0A0A;
  --shadow-blue: 0 0 32px rgba(255, 255, 255, 0.18);
  --radius: 16px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a { color: inherit; text-decoration: none; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.bg-orb {
  position: fixed; border-radius: 50%; filter: blur(140px); opacity: 0.18;
  pointer-events: none; z-index: 0; animation: orb-float 10s ease-in-out infinite;
}
.bg-orb.o1 { width: 600px; height: 600px; background: var(--blue); top: -200px; left: -100px; }
.bg-orb.o2 { width: 500px; height: 500px; background: var(--cyan); bottom: -100px; right: -100px; animation-delay: -3.5s; }
.bg-orb.o3 { width: 350px; height: 350px; background: #9A9AA5; top: 40%; left: 35%; animation-delay: -6s; }

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-orb { animation: none; }
  * { transition: none !important; animation-duration: .01ms !important; }
}

/* ---------- Navbar ---------- */
#navbar {
  position: sticky; top: 0; z-index: 40; height: 68px;
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: rgba(6, 6, 6, 0.72); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.nav-logo-img { width: 30px; height: 30px; border-radius: 8px; }
.nav-suffix { color: var(--text-muted); font-weight: 600; font-size: .78rem; padding: 3px 9px; border: 1px solid var(--glass-border); border-radius: 20px; background: var(--glass); }
.nav-back {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-dim);
  font-size: .85rem; font-weight: 600; padding: 8px 14px; border-radius: 50px; border: 1px solid var(--glass-border);
  background: var(--glass); transition: all .15s;
}
.nav-back:hover { color: var(--text); border-color: var(--text-muted); }
.nav-user { display: flex; align-items: center; gap: 9px; padding-left: 14px; margin-left: 6px; border-left: 1px solid var(--glass-border); }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: var(--on-light); font-weight: 800; font-size: .8rem; flex-shrink: 0;
}
.nav-user-name { font-size: .85rem; font-weight: 650; }
.nav-user-tag { font-size: .72rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.nav-user-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; }

main { flex: 1; position: relative; z-index: 1; width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 50px;
  font-size: .875rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s ease;
  font-family: 'Inter', sans-serif; text-decoration: none; outline: none;
}
.btn:active { transform: scale(.97); }
.btn svg, .btn i { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: var(--on-light); box-shadow: var(--shadow-blue); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 45px rgba(255,255,255,.6); filter: brightness(1.1); }
.btn-ghost { background: var(--glass); color: var(--text-dim); border: 1px solid var(--glass-border); }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text); border-color: rgba(255,255,255,.25); }
.btn-outline { background: transparent; color: var(--blue-light); border: 1px solid var(--blue); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue-light); outline-offset: 2px;
}

/* ---------- Forms ---------- */
label { font-size: .8rem; font-weight: 650; color: var(--text-dim); display: block; margin-bottom: 6px; }
input[type="text"], input[type="email"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--glass);
  border: 1px solid var(--glass-border); color: var(--text); font-family: inherit; font-size: .9rem; line-height: 1.5;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue-light); }
textarea { resize: vertical; min-height: 120px; }
select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
::placeholder { color: var(--text-muted); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--bg3); border: 1px solid var(--glass-border); color: var(--text);
  padding: 13px 20px; border-radius: 50px; font-size: .85rem; font-weight: 600; z-index: 200;
  display: flex; align-items: center; gap: 9px; opacity: 0; pointer-events: none; transition: all .25s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast i { color: var(--green); width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- Footer ---------- */
footer {
  position: relative; z-index: 1; border-top: 1px solid var(--glass-border);
  padding: 22px 24px; text-align: center; color: var(--text-muted); font-size: .78rem;
}
footer a { color: var(--text-dim); font-weight: 600; }
footer a:hover { color: var(--text); }

@media (max-width: 640px) {
  #navbar { padding: 0 14px; gap: 10px; }
  .nav-user-name { display: none; }
  .nav-back span { display: none; }
}

/* ---------- Authentification du portail ---------- */
.support-auth[hidden] { display: none; }
.support-auth {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  padding: 24px; background: rgba(3,3,3,.9); backdrop-filter: blur(20px);
}
.support-auth-card {
  width: min(460px, 100%); padding: 38px 32px; text-align: center;
  border: 1px solid var(--glass-border); border-radius: 24px; background: rgba(16,16,18,.92);
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
}
.support-auth-logo { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 18px; }
.support-auth-kicker { color: var(--text-muted); font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.support-auth-card h1 { margin: 9px 0 10px; font-family: 'Outfit', sans-serif; font-size: 1.65rem; }
.support-auth-card p { color: var(--text-dim); line-height: 1.6; font-size: .9rem; margin: 0 0 22px; }
.btn-discord { width: 100%; justify-content: center; background: #5865F2; color: white; box-shadow: 0 10px 30px rgba(88,101,242,.25); }
.btn-discord:hover { background: #6875f5; transform: translateY(-2px); }
.btn-discord svg { width: 20px; height: 20px; }
.support-auth-main { display: inline-block; margin-top: 18px; color: var(--text-muted); font-size: .8rem; }
.support-auth-error { color: #ff7b7b !important; margin-top: 15px !important; margin-bottom: 0 !important; }
body.support-locked > *:not(.support-auth) { visibility: hidden; }
.support-logout { margin-left: 6px; padding: 5px 8px; border: 1px solid var(--glass-border); border-radius: 8px; background: transparent; color: var(--text-muted); font: inherit; font-size: .68rem; cursor: pointer; }
.support-logout:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
