/* ========================================
   LUNARIS - Theme V2 Modern
   ======================================== */

:root {
  --primary: #a169f7;
  --secondary: #8a45e4;
  --accent: #00d4ff;
  --bg-dark: #0a0a15;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-muted: #888888;
}

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

body {
  font-family: 'Poppins', sans-serif;
  /* ✅ Fond IDENTIQUE à ton code Python */
  background: radial-gradient(circle at top, #1a0033, #0a0a15 60%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* PRELOADER - CRITICAL FIX */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.preloader::after {
  content: '';
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* CRITICAL: Hide preloader */
.preloader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

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

/* Stars background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(2px 2px at 20px 30px, white, transparent),
              radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
              radial-gradient(1px 1px at 90px 40px, white, transparent),
              radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.6), transparent);
  background-size: 200px 200px;
  animation: starsMove 100s linear infinite;
  opacity: 0.3;
}

@keyframes starsMove {
  from { transform: translateY(0); }
  to { transform: translateY(-200px); }
}

/* Header */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1400px;
  background: rgba(10, 10, 21, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo-img { height: 40px; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(161, 105, 247, 0.15);
}

.nav-buttons { display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 20px rgba(161, 105, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(161, 105, 247, 0.5);
}

.btn-discord {
  background: rgba(88, 101, 242, 0.15);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.btn-discord:hover {
  background: #5865F2;
  color: white;
}

.burger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Mobile Menu */
#mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: rgba(10, 10, 21, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1001;
  transition: right 0.3s ease;
  padding: 80px 20px 20px;
}

#mobile-menu.active { right: 0; }

#mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  transition: 0.3s;
}

#mobile-menu a:hover { background: rgba(161, 105, 247, 0.15); }

#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

#menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
  position: relative;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.vouch-count {
  margin-top: 40px;
  padding: 12px 24px;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: 30px;
  color: #2ecc71;
  font-weight: 600;
}

/* Cards */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(161, 105, 247, 0.2);
}

/* Responsive */
@media (max-width: 900px) {
  header { padding: 12px 20px; }
  .nav-links { display: none; }
  .burger { display: block; }
  .hero h1 { font-size: 2.2rem; }
}

/* ============================================================================
   COMPOSANTS PARTAGÉS — Promo Banner, Lang Selector, Footer
   (utilisés sur TOUTES les pages publiques)
   ============================================================================ */

/* ----- PROMO BANNER (style unifié, repris du product_detail v1) ----- */
.promo-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  padding: 10px 20px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: lunarisBannerSlide 0.3s ease;
}
.promo-banner a { color: inherit; text-decoration: underline; }
.promo-banner .promo-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.promo-banner .promo-code {
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
}
.promo-banner .promo-link {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}
.promo-banner .promo-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0 8px;
  line-height: 1;
}
.promo-banner .promo-close:hover { opacity: 1; }
@keyframes lunarisBannerSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
/* Quand le banner est affiché, on décale le header pour ne pas le recouvrir */
body.has-banner header,
body.has-banner > nav,
body.has-banner > .navbar { margin-top: 44px; }
body.has-banner { padding-top: 44px; }
@media (max-width: 600px) {
  .promo-banner { font-size: 0.82rem; padding: 8px 30px; }
  .promo-banner .promo-close { right: 8px; font-size: 1.2rem; }
}

/* ----- LANG SELECTOR (utilisé dans le header de toutes les pages publiques) ----- */
.lang-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #ccc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.lang-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--primary);
  color: #fff;
}
.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(20,0,30,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 8px;
  min-width: 160px;
  max-height: 320px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}
.lang-selector:hover .lang-dropdown,
.lang-selector.active .lang-dropdown,
.lang-selector:focus-within .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #ccc;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
}
.lang-option:hover {
  background: rgba(161,105,247,0.15);
  color: #fff;
}
.lang-option.active {
  background: rgba(161,105,247,0.2);
  color: var(--primary);
}
.lang-flag { font-size: 1.2rem; }
@media (max-width: 900px) {
  .lang-selector { margin-left: 0; margin-top: 10px; }
}

/* ----- SITE FOOTER (style unifié — repris du index v1) ----- */
.site-footer {
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 40px 20px;
  margin-top: 60px;
  position: relative;
  z-index: 5;
}
.site-footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.site-footer .footer-copy {
  color: #888;
  font-size: 0.9rem;
}
.site-footer .footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer .footer-links a {
  color: #888;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.site-footer .footer-links a:hover {
  color: var(--primary);
}

