/* ==========================================================================
   SteamLuaManager — Espace Compte Utilisateur Moderne & Professionnel
   Auteur: SteamLuaManager Team
   Style: Dark Glassmorphism, Micro-animations, 100% Mobile Responsive
   ========================================================================== */

:root {
  --acc-bg-base: #080d1a;
  --acc-bg-card: rgba(15, 23, 42, 0.75);
  --acc-border: rgba(148, 163, 184, 0.14);
  --acc-border-hover: rgba(99, 102, 241, 0.4);
  --acc-accent: #6366f1;
  --acc-accent-cyan: #06b6d4;
  --acc-accent-gold: #f59e0b;
  --acc-success: #10b981;
  --acc-danger: #f43f5e;
  --acc-text-main: #f1f5f9;
  --acc-text-muted: #94a3b8;
  --acc-text-dim: #64748b;
  --acc-radius-sm: 8px;
  --acc-radius-md: 14px;
  --acc-radius-lg: 20px;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--acc-bg-base);
  background-image: 
    radial-gradient(at 10% 15%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 90% 85%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--acc-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Top Navbar ─────────────────────────────────────────────────────────── */
.acc-nav {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--acc-border);
  background: rgba(8, 13, 26, 0.7);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acc-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--acc-text-main);
  text-decoration: none;
}

.acc-nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.acc-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.acc-btn-nav {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--acc-border);
  color: var(--acc-text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: var(--acc-radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.acc-btn-nav:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--acc-text-main);
  border-color: rgba(148, 163, 184, 0.3);
}

.acc-btn-admin-nav {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.2) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.acc-btn-admin-nav:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.3) 100%);
  border-color: #f59e0b;
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

/* ─── Main Content Shell ─────────────────────────────────────────────────── */
.acc-container {
  width: min(1040px, calc(100% - 2rem));
  margin: 2rem auto;
  flex: 1;
}

/* ─── Profile Header Banner ──────────────────────────────────────────────── */
.acc-profile-banner {
  background: var(--acc-bg-card);
  border: 1px solid var(--acc-border);
  border-radius: var(--acc-radius-lg);
  padding: 1.75rem 2rem;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.acc-profile-user {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.acc-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc-accent) 0%, var(--acc-accent-cyan) 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.acc-user-titles h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.acc-user-email {
  margin-top: 0.3rem;
  color: var(--acc-text-muted);
  font-size: 0.9rem;
}

.acc-badge-role {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.acc-badge-role.admin {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

/* ─── Grid 2 Colonnes : Pass Licence / Infos Détails ─────────────────────── */
.acc-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* ─── Carte Membre SLM ("Pass Holographique") ────────────────────────────── */
.acc-license-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.acc-pass-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--acc-radius-lg);
  padding: 1.75rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transition: all 0.3s ease;
}

.acc-pass-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.acc-pass-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.15);
}

.acc-pass-card.premium {
  border-color: rgba(245, 158, 11, 0.35);
}

.acc-pass-card.premium:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.2);
}

.acc-pass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acc-pass-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.acc-pass-logo img {
  width: 26px;
  height: 26px;
}

.acc-pass-chip {
  width: 40px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
}

.acc-pass-chip::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 3px;
}

.acc-pass-key-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.acc-pass-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acc-text-dim);
}

.acc-pass-key-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--acc-border);
  border-radius: var(--acc-radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.acc-pass-key-code {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.acc-pass-copy-btn {
  background: transparent;
  border: none;
  color: var(--acc-text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.acc-pass-copy-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.acc-pass-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.acc-pass-footer-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.acc-pass-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--acc-text-main);
}

/* Badges statut & plans */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-status.inactive {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

.badge-status.banned {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.plan-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  display: inline-block;
}

.plan-pill-premium {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.3) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.plan-pill-free {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

/* Bouton télécharger */
.acc-btn-download {
  background: linear-gradient(135deg, var(--acc-accent) 0%, #4f46e5 100%);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--acc-radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.acc-btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5);
  border-color: #818cf8;
  color: #ffffff;
}

/* ─── Panneau de Droite : Détails du Compte & Sécurité ───────────────────── */
.acc-details-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.acc-card-block {
  background: var(--acc-bg-card);
  border: 1px solid var(--acc-border);
  border-radius: var(--acc-radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.acc-block-title {
  margin: 0 0 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.acc-info-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.acc-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.acc-info-item.full-width {
  grid-column: 1 / -1;
}

.acc-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--acc-text-dim);
}

.acc-info-value {
  font-size: 0.95rem;
  color: var(--acc-text-main);
  word-break: break-all;
}

.acc-info-value.mono {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.88rem;
  color: #a5b4fc;
}

/* ─── Erreurs & Alertes ─────────────────────────────────────────────────── */
.acc-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--acc-radius-md);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.acc-alert-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.acc-alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

/* ─── Spinner & Loading ─────────────────────────────────────────────────── */
.acc-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  gap: 1rem;
  color: var(--acc-text-muted);
}

.acc-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--acc-accent);
  border-radius: 50%;
  animation: acc-spin 0.8s linear infinite;
}

@keyframes acc-spin {
  to { transform: rotate(360deg); }
}

/* ─── Toast Feedback ────────────────────────────────────────────────────── */
.acc-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  border: 1px solid var(--acc-accent);
  color: #ffffff;
  padding: 0.8rem 1.3rem;
  border-radius: var(--acc-radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.acc-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ─── Responsive Queries ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .acc-grid {
    grid-template-columns: 1fr;
  }

  .acc-profile-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .acc-nav {
    padding: 0.9rem 1rem;
  }

  .acc-container {
    width: calc(100% - 1.25rem);
    margin: 1.25rem auto;
  }

  .acc-profile-banner {
    padding: 1.25rem;
  }

  .acc-profile-user {
    gap: 1rem;
  }

  .acc-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .acc-user-titles h1 {
    font-size: 1.2rem;
  }

  .acc-info-table {
    grid-template-columns: 1fr;
  }

  .acc-pass-card {
    padding: 1.25rem;
  }
}
