/* ============================
   RESET GLOBAL
============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

html, body {
  overflow-x: hidden;
}

body {
  background: #050816;
  color: #f5f5f5;
}

/* ============================
   HEADER & NAVIGATION
============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: rgba(5, 8, 22, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-badge {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand {
  font-size: 16px;
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.5px;
  font-family: Georgia, serif;
}

.brand-sub {
  font-size: 9px;
  font-weight: 400;
  color: #fbbf24;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Liens nav desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.nav-link-premium {
  color: #fbbf24 !important;
  font-weight: 700;
}
.nav-link-premium:hover {
  background: rgba(251,191,36,0.1) !important;
}

.nav-link-cta {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #111 !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(251,191,36,0.25);
}
.nav-link-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(251,191,36,0.35);
}

/* Liens dans le footer — toujours en bloc vertical */
/* Liens footer auth/guest — gérés indépendamment du header */
/* Footer auth/guest — masqués par défaut, JS les affiche selon l'état */
.footer-auth  { display: none !important; }
.footer-guest { display: block !important; }

/* Ces classes sont écrasées par JS via style.display inline */
/* On utilise des classes explicites pour forcer l'affichage */
.footer-auth.f-show  { display: block !important; }
.footer-guest.f-hide { display: none !important; }
.footer-link:hover {
  color: #fff !important;
  background: none !important;
  transform: none !important;
}

.nav-link-logout {
  color: #64748b !important;
  font-size: 13px;
}
.nav-link-logout:hover {
  color: #f87171 !important;
  background: rgba(248,113,113,0.08) !important;
}

/* Visibilité auth/guest par défaut */
.nav-auth  { display: none; }
.nav-guest { display: inline-flex; }

/* ── BURGER — MODÈLE CHECKBOX CSS PUR ── */
.nav-toggle-input { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  z-index: 3000;
  background: none;
  border: none;
  order: 3;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #94a3b8;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
  pointer-events: none;
}

/* Animation croix */
.nav-toggle-input:checked ~ .nav-burger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle-input:checked ~ .nav-burger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle-input:checked ~ .nav-burger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 768px) {

  .nav-burger { display: flex; }

  /* Menu fermé par défaut */
  .nav-links {
    display: none;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 22, 0.99);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 40px;
    gap: 4px;
    z-index: 1999;
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,0.08);
    -webkit-overflow-scrolling: touch;
  }

  /* Ouvert via checkbox */
  .nav-toggle-input:checked ~ .nav-links {
    display: flex !important;
  }

  /* Tous les liens en bloc dans le menu ouvert */
  .nav-links .nav-link {
    display: block !important;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
    text-align: left;
  }

  /* Forcer les liens auth/guest à s'afficher quand le menu est ouvert
     même si JS a mis un style inline display:none */
  .nav-toggle-input:checked ~ .nav-links .nav-auth,
  .nav-toggle-input:checked ~ .nav-links .nav-guest {
    display: block !important;
  }

  /* Séparateur visuel */
  .nav-links .nav-link-premium {
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 20px;
  }

  .nav-link-cta {
    text-align: center !important;
    margin-top: 8px;
    padding: 14px !important;
  }

  /* Overlay pour fermer */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 66px;
    left: 0; right: 0; bottom: 0;
    z-index: 1998;
    cursor: pointer;
  }
  .nav-toggle-input:checked ~ .nav-overlay {
    display: block;
  }
}

/* ============================
   FOOTER PREMIUM
============================ */
.footer {
  margin-top: 80px;
  background: #0b0f1e;
  border-top: 1px solid rgba(148,163,184,0.18);
  padding: 50px 20px 30px;
  color: #94a3b8;
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.footer-col h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 14px;
  transition: 0.25s;
}

.footer-col a:hover { color: #fff; }

.social-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: 0.25s;
  text-decoration: none;
}

.social-line img {
  width: 18px;
  height: 18px;
  filter: invert(1);
  opacity: 0.85;
  transition: 0.25s;
}

.social-line span {
  font-size: 14px;
  color: #94a3b8;
  transition: 0.25s;
}

.social-line:hover img { opacity: 1; transform: translateX(3px); }
.social-line:hover span { color: #fff; }

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 13px;
  color: #64748b;
}

/* ============================
   AUTH PAGES
============================ */
.auth-container {
  max-width: 380px;
  margin: 80px auto;
  padding: 30px;
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid #1e293b;
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-form input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f5f5f5;
}

.auth-form button {
  padding: 12px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.auth-form button:hover { background: #e2e8f0; }

.auth-error {
  color: #f87171;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.auth-switch {
  text-align: center;
  margin-top: 15px;
  color: #94a3b8;
}

.auth-switch a {
  color: #f5f5f5;
  text-decoration: underline;
}

/* ============================
   PROFILE PAGE
============================ */
.profile-container {
  max-width: 500px;
  margin: 80px auto;
  padding: 30px;
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid #1e293b;
}

.profile-container h1 {
  text-align: center;
  margin-bottom: 25px;
}

.profile-box {
  background: #1e293b;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  color: #f5f5f5;
}

.logout-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: #f87171;
  color: white;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}

.logout-btn:hover { background: #ef4444; }

/* ============================
   PREMIUM PAGE
============================ */
.premium-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 20px;
}

.premium-container h1 {
  text-align: center;
  margin-bottom: 25px;
}

.premium-status {
  background: #0f172a;
  border-radius: 10px;
  border: 1px solid #1e293b;
  padding: 20px;
  margin-bottom: 30px;
}

.premium-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.premium-card {
  background: #0f172a;
  border-radius: 10px;
  border: 1px solid #1e293b;
  padding: 20px;
}

.premium-card h2 { margin-bottom: 10px; }
.premium-card p  { margin-bottom: 15px; opacity: 0.9; }

.premium-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #f5f5f5;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.premium-btn:hover { background: #e2e8f0; }

/* ============================
   ADMIN PAGE
============================ */
.admin-container {
  max-width: 1100px;
  margin: 60px auto;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
}

.admin-left {
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid #1e293b;
  padding: 20px;
}

.admin-left h1 {
  font-size: 22px;
  margin-bottom: 16px;
}

.admin-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search-row input {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-filter-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s;
}

.admin-filter-btn.active {
  background: #e5e7eb;
  color: #020617;
  border-color: #e5e7eb;
}

.admin-users-list { margin-top: 10px; }

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: #020617;
  border: 1px solid #1e293b;
  margin-bottom: 8px;
}

.admin-user-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-email { font-size: 14px; color: #f9fafb; }
.admin-user-meta  { font-size: 12px; color: #9ca3af; }

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  margin-left: 6px;
}

.admin-badge-premium {
  background: #22c55e1a;
  color: #4ade80;
  border: 1px solid #22c55e55;
}

.admin-badge-banned {
  background: #b91c1c1a;
  color: #fca5a5;
  border: 1px solid #b91c1c55;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-edit-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #e5e7eb;
  color: #020617;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s;
}

.admin-edit-btn:hover { background: #f9fafb; }

.admin-right { position: relative; }

.admin-panel {
  position: sticky;
  top: 80px;
  background: #020617;
  border-radius: 12px;
  border: 1px solid #1e293b;
  padding: 18px 18px 20px;
  color: #e5e7eb;
  min-height: 260px;
}

.admin-panel-empty { opacity: 0.6; font-size: 14px; }
.admin-panel h2    { font-size: 18px; margin-bottom: 10px; }

.admin-panel-section { margin-bottom: 16px; }

.admin-panel-section h3 {
  font-size: 14px;
  margin-bottom: 6px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-field-line  { font-size: 14px; margin-bottom: 4px; }
.admin-field-label { color: #9ca3af; }
.admin-field-value { color: #e5e7eb; }

.admin-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.admin-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.admin-radio-option input[type="radio"] { accent-color: #e5e7eb; }

.admin-dates-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.admin-dates-row input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
}

.admin-banned-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.admin-banned-row input {
  max-width: 200px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
}

.admin-notes {
  width: 100%;
  min-height: 70px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
  resize: vertical;
}

.admin-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.admin-save-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: #e5e7eb;
  color: #020617;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s;
}

.admin-save-btn:hover { background: #f9fafb; }

.admin-cancel-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: transparent;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s;
}

.admin-cancel-btn:hover {
  border-color: #9ca3af;
  color: #e5e7eb;
}

/* Bouton admin général */
.admin-admin-btn {
  display: inline-block;
  padding: 12px 26px;
  background: #ffffff;
  color: #111111;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e0e0e0;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.admin-admin-btn:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* ============================
   RESPONSIVE GÉNÉRAL
============================ */
@media (max-width: 768px) {

  .admin-container {
    grid-template-columns: 1fr;
    margin: 20px auto;
  }

  .auth-container {
    margin: 40px auto;
    padding: 24px 20px;
  }

  .premium-container {
    margin: 30px auto;
    padding: 16px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
