/* ════════════════════════════════════════
   MWA Platform 3.0 — Feuille de style principale
   ════════════════════════════════════════ */

:root {
  --gold: #C9A84C;
  --gold-light: #e8c96a;
  --dark: #080d14;
  --dark2: #0c1828;
  --green: #2E7D6B;
  --red: #8B2252;
  --purple: #5C3D8F;
  --text: #e0d8c8;
  --muted: #6a8a78;
  --font-main: 'Inter', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
  --font-arabic: 'Noto Sans Arabic', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
}

body.rtl { font-family: var(--font-arabic); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.gold { color: var(--gold); }

/* ══════════════════════════════════
   NAVBAR
══════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(8,13,20,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo img { height: 48px; object-fit: contain; }
.logo-text { font-family: var(--font-serif); font-size: 28px; color: var(--gold); font-weight: 400; letter-spacing: 4px; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 0;
  flex: 1;
}

.nav-menu a {
  color: #8a9a90;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  text-transform: uppercase;
}

.nav-menu a:hover { color: var(--gold); }

.btn-nav {
  background: var(--gold) !important;
  color: #000 !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}

.btn-nav:hover { background: var(--gold-light) !important; }

.lang-switcher {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lang-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  padding: 4px 9px;
  color: #888;
  font-size: 11px;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.lang-btn.active, .lang-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
  font-weight: 700;
}

.burger { display: none; background: none; border: none; color: var(--gold); font-size: 22px; cursor: pointer; margin-left: auto; }

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 80px 24px 20px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(201,168,76,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(46,125,107,0.07) 0%, transparent 60%);
}

.stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  background: var(--gold);
  border-radius: 50%;
  animation: twinkle linear infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  animation: fadeUp 1s ease;
}

.hero-badge {
  display: inline-block;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  padding: 6px 20px;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.2;
  color: #fff;
  margin-bottom: 20px;
}

.rtl .hero-title { font-family: var(--font-arabic); }

.hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Ticker */
.ticker-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 8px;
  padding: 10px 18px;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.ticker-live {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-text {
  font-size: 13px;
  color: #c0d0c4;
  transition: opacity 0.4s;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* CTA */
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }

.btn-gold {
  background: var(--gold);
  color: #000;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
}

.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline:hover { background: rgba(201,168,76,0.1); }

/* Mega Stats */
.mega-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.mega-stat { text-align: center; }

.mega-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}

.mega-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

.mega-divider { width: 1px; height: 50px; background: rgba(201,168,76,0.3); }

/* ══════════════════════════════════
   STATS SECTION
══════════════════════════════════ */
.stats-section {
  padding: 24px 0;
  background: rgba(255,255,255,0.01);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.section-header { text-align: center; margin-bottom: 16px; }

.section-badge {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-sub { font-size: 14px; color: var(--muted); font-style: italic; }

.gold-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(var(--accent), 0.2);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.stat-card:hover { transform: translateY(-4px); }

.stat-icon { font-size: 28px; margin-bottom: 10px; }

.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* Divider with text */
.divider-with-text {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.divider-with-text::before,
.divider-with-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.divider-with-text span {
  font-size: 11px;
  letter-spacing: 3px;
  color: #445544;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Legend */
.legend { display: flex; gap: 20px; justify-content: flex-end; margin-bottom: 16px; }
.legend-item { font-size: 12px; color: var(--muted); }

/* Pays Bars */
.pays-bars {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.pays-bar-row { margin-bottom: 16px; }
.pays-bar-row:last-child { margin-bottom: 0; }

.pays-info-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pays-info { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pays-flag { font-size: 18px; }
.pays-nom { font-size: 13px; color: #c0ccc4; font-weight: 600; }

.pays-counts { display: flex; gap: 16px; margin-bottom: 6px; }
.count-inscrits { font-size: 12px; color: var(--gold); }
.count-adherents { font-size: 12px; color: var(--green); }

.bar-track {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--color) 60%, transparent), var(--color));
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-note { font-size: 11px; color: #334433; text-align: center; font-style: italic; }

/* ══════════════════════════════════
   MISSION SECTION
══════════════════════════════════ */
.mission-section {
  padding: 80px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.mission-p { font-size: 16px; color: #8a9a90; line-height: 1.8; margin-bottom: 12px; }

.mission-values { display: flex; flex-wrap: wrap; gap: 10px; }

.value-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: rgba(201,168,76,0.9);
  transition: all 0.2s;
}

.value-pill:hover { background: rgba(201,168,76,0.15); }

.mission-img {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.world-map { font-size: 200px; opacity: 0.15; user-select: none; }

.map-dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dot {
  position: absolute;
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.5));
  animation: pulse-dot 2s ease-in-out infinite;
  cursor: default;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.footer {
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 60px 0 0;
  background: rgba(0,0,0,0.3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.footer-title {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  color: #556655;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--gold); }

.social-links { display: flex; flex-direction: column; gap: 8px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: #334433;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════
   RTL SUPPORT
══════════════════════════════════ */
.rtl .nav-menu { direction: rtl; }
.rtl .ticker-wrap { direction: rtl; }
.rtl .hero-content { direction: rtl; }
.rtl .bar-fill { background: linear-gradient(270deg, color-mix(in srgb, var(--color) 60%, transparent), var(--color)); }

/* ══════════════════════════════════
   ANIMATIONS
══════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 768px) {
  .nav-menu { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: var(--dark); padding: 20px; border-bottom: 1px solid rgba(201,168,76,0.2); }
  .nav-menu.open { display: flex; }
  .burger { display: block; }
  .lang-switcher { display: none; }
  .mega-stats { gap: 20px; }
  .mega-divider { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-grid { grid-template-columns: 1fr; }
  .world-map { font-size: 120px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; }
}



/* MWA V1.1 responsive safety patch - 20260703 */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ticker-wrap {
    max-width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 10px 14px;
  }

  .ticker-live {
    white-space: normal;
    letter-spacing: 2px;
  }

  .ticker-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.5;
  }

  .stat-label,
  .chart-label,
  .legend-item,
  .pays-nom {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .legend {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .nav-menu {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .hero-title,
  .section-title,
  .mega-title {
    overflow-wrap: anywhere;
  }

  img,
  video,
  canvas {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .ticker-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ticker-live,
  .ticker-text {
    width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta a,
  .hero-cta button {
    width: 100%;
    justify-content: center;
  }
}
