/* ==========================================
   WORLD ROOTS ACADEMY — Global Stylesheet
   ========================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=Cinzel:wght@400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --black: #000000;
  --white: #FFFFFF;
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --gold-dark: #A87F2C;
  --gold-gradient: linear-gradient(90deg, #A87F2C 0%, #FFFFB8 50%, #A87F2C 100%);
  --gold-gradient-v: linear-gradient(180deg, #A87F2C 0%, #FFFFB8 50%, #A87F2C 100%);
  --bg-dark: #0A0A0A;
  --bg-card: #111111;
  --bg-card-hover: #1A1A1A;
  --border-gold: rgba(212, 175, 55, 0.3);
  --text-muted: rgba(255,255,255,0.6);
  --font-display: 'Cinzel', serif;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
  --radius: 4px;
  --radius-md: 8px;
  --transition: all 0.3s ease;
  --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.15);
  --shadow-card: 0 8px 40px rgba(0,0,0,0.6);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
.font-serif { font-family: var(--font-serif); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.section-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3rem;
  font-style: italic;
}
.section-line {
  width: 80px;
  height: 2px;
  background: var(--gold-gradient);
  margin: 1rem auto 2rem;
  border-radius: 2px;
}

/* ---- Gold Text ---- */
.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gold { color: var(--gold); }

/* ---- Sections ---- */
section { padding: 80px 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* ====== HEADER ====== */
#main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #0a0a0a;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gold);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(212,175,55,0.1);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: transparent;
  padding: 0;
}
.logo-wrapper img {
  height: 46px;
  width: auto;
  display: block;
  /* Sur fond sombre (#000): screen rend le blanc invisible */
  mix-blend-mode: screen;
  filter: brightness(1.05) contrast(1.1);
}
.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}



.lang-btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  transition: var(--transition);
  letter-spacing: 0.1em;
}
.lang-btn:hover {
  background: var(--gold);
  color: var(--black);
}

.visitor-counter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.visitor-counter i { color: var(--gold); font-size: 1rem; }
.visitor-count-num { color: var(--white); font-weight: 500; }

.profile-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  transition: var(--transition);
  font-size: 1rem;
}
.profile-btn:hover {
  background: var(--gold);
  color: var(--black);
}

/* ---- Navigation ---- */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2rem;
  gap: 0;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.8);
  padding: 0.5rem 1rem;
  display: flex;
  position: relative;
  transition: var(--transition);
  text-transform: uppercase;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold-gradient);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--gold);
}
.nav-link:hover::after, .nav-link.active::after {
  left: 0.8rem;
  right: 0.8rem;
}
.nav-link.active {
  border: 1px solid var(--border-gold);
  border-bottom: none;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold-gradient);
  color: var(--black);
  font-weight: 600;
  border: none;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212,175,55,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-2px);
}
.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--gold);
  color: var(--gold);
}

/* ====== CARDS ====== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

/* ====== FOOTER ====== */
#main-footer {
  background: var(--white);
  color: var(--black);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 0 2rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand img {
  height: 60px;
  width: auto;
  margin-bottom: 1rem;
  filter: none;
  /* Footer a fond blanc: multiply rend le blanc transparent */
  mix-blend-mode: multiply;
}
.footer-brand p {
  font-size: 0.9rem;
  color: rgba(0,0,0,0.65);
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1.2rem;
}
.footer-col ul li {
  margin-bottom: 0.6rem;
}
.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(0,0,0,0.65);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--gold-dark); }

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.2rem;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-dark);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--gold-dark);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.1);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 0.8rem;
  color: rgba(0,0,0,0.5);
}

/* ====== HERO GENERAL ====== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 110px;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
}

/* ====== DIVIDER ====== */
.gold-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.3;
}

/* ====== TAGS & BADGES ====== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-display);
  border-radius: 20px;
}
.badge-gold {
  background: rgba(212,175,55,0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold);
}
.badge-free {
  background: rgba(46,204,113,0.15);
  border: 1px solid rgba(46,204,113,0.3);
  color: #2ecc71;
}
.badge-premium {
  background: rgba(212,175,55,0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold);
}

/* ====== MODAL ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gold); color: var(--black); }

/* ====== TOAST NOTIFICATION ====== */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast i { color: var(--gold); }

/* ====== LOADING ====== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 0.5s ease;
}
.page-loader.hide {
  opacity: 0;
  pointer-events: none;
}
.loader-logo {
  height: 100px;
  width: auto;
  animation: pulse 2s ease-in-out infinite;
  filter: none;
  mix-blend-mode: screen;
}
.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: var(--gold-gradient);
  animation: load 1.5s ease-in-out forwards;
}

/* ====== ANIMATIONS ====== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.97); }
}
@keyframes load {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  from { background-position: -200% center; }
  to { background-position: 200% center; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(212,175,55,0.2); }
  50% { box-shadow: 0 0 40px rgba(212,175,55,0.5); }
}

.animate-fade { animation: fadeIn 0.8s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ====== SCROLL REVEAL ====== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== GRID UTILITIES ====== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 60px 0; }
  .container { padding: 0 1.25rem; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(0,0,0,0.98);
    border-bottom: 1px solid var(--border-gold);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0;
  }
  .main-nav.open { display: flex; }
  .nav-link { width: 100%; padding: 0.75rem 1.5rem; }
  .nav-link::after { display: none; }
  .nav-toggle { display: flex; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  
  .hero { min-height: 90vh; }
  .header-top { padding: 0.6rem 1.25rem; }
  .logo-wrapper img { height: 32px; }
  .logo-wrapper { padding: 3px 10px 3px 6px; }
}

@media (max-width: 480px) {
  .btn { padding: 0.75rem 1.5rem; font-size: 0.75rem; }
  .section-title { font-size: 1.6rem; }
  .header-right { gap: 1rem; }
}

/* ====== SPECIFIC PAGE STYLES ====== */

/* Ornament separator */
.ornament {
  text-align: center;
  color: var(--gold);
  opacity: 0.4;
  font-size: 1.2rem;
  letter-spacing: 0.5em;
  margin: 1rem 0;
}

/* Highlight box */
.highlight-box {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  background: rgba(212,175,55,0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Number badges */
.number-badge {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(212,175,55,0.1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  flex-shrink: 0;
}

/* Icon box */
.icon-box {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gold);
  background: rgba(212,175,55,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.card:hover .icon-box {
  background: var(--gold);
  color: var(--black);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 2.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1rem 1.5rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--gold); }
.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
  background: var(--gold-gradient);
  color: var(--black);
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  transition: var(--transition);
}
.search-bar button:hover { opacity: 0.85; }

/* Accordion */
.accordion-item {
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--gold);
}
.accordion-header:hover { background: rgba(212,175,55,0.05); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.accordion-body.open {
  max-height: 500px;
  padding: 0 1.5rem 1.2rem;
}
