/* =========================================================================
   MUSULMANS DE FRANCE — Charte graphique & styles globaux
   Charte issue du logo officiel :
   - Bleu royal #2e4394 (globe du logo)
   - Noir charbon #241e20 (texte et MF stylisé)
   - Blanc cassé / gris perle (fond)
   Variables historiques --mf-green-* conservées (remappées vers le bleu)
   pour ne pas casser les centaines de références existantes.
   ========================================================================= */

:root {
  /* === Bleu royal — couleur principale (issue du globe du logo) === */
  --mf-blue-900: #1a2563;
  --mf-blue-800: #243388;
  --mf-blue-700: #2e4394;     /* couleur exacte du logo */
  --mf-blue-600: #3a52ab;
  --mf-blue-500: #4d65bd;
  --mf-blue-300: #8b9bd1;
  --mf-blue-100: #dde2ee;
  --mf-blue-50:  #eff2f8;

  /* === Alias historiques (--mf-green-*) remappés vers le bleu logo === */
  /* Permet de ne pas casser le code existant — toutes les "zones vertes"
     deviennent bleu royal, conformément au logo */
  --mf-green-900: var(--mf-blue-900);
  --mf-green-800: var(--mf-blue-800);
  --mf-green-700: var(--mf-blue-700);
  --mf-green-600: var(--mf-blue-600);
  --mf-green-500: var(--mf-blue-500);
  --mf-green-50:  var(--mf-blue-50);

  /* === Bleu marine — secondaire (utilisé en gradients) === */
  --mf-navy-900: #0f1631;
  --mf-navy-800: #161f43;
  --mf-navy-700: #1d2856;

  /* === Accent doré discret — uniquement pour les détails premium === */
  /* Conservé en accent très ponctuel (filets, séparateurs, hover)
     pour la qualité institutionnelle — usage réduit */
  --mf-gold-700: #b8893a;
  --mf-gold-500: #c9a55b;
  --mf-gold-300: #e0c993;
  --mf-gold-50:  #faf3e3;

  /* === Noir charbon (texte du logo) === */
  --mf-ink: #0a0a0c;
  --mf-charcoal: #241e20;     /* couleur exacte du logo */
  --mf-slate-900: #2a2528;
  --mf-slate-700: #4a474c;
  --mf-slate-500: #6b6a70;
  --mf-slate-300: #c4c4c7;
  --mf-slate-200: #dde0e3;
  --mf-slate-100: #eef0f2;
  --mf-slate-50:  #f7f8f9;
  --mf-bone:      #fafaf8;     /* blanc cassé légèrement chaud */
  --mf-white:     #ffffff;

  /* Typographie */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-arabic: 'Amiri', 'Times New Roman', serif;

  /* Espacements */
  --container: 1280px;
  --header-h: 80px;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgba(26, 37, 99, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 37, 99, 0.08);
  --shadow-lg: 0 24px 48px rgba(26, 37, 99, 0.12);
  --shadow-xl: 0 40px 80px rgba(26, 37, 99, 0.16);

  /* Transitions */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--mf-charcoal);
  background: var(--mf-bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--mf-navy-900);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h4 { font-size: 1.15rem; }

::selection { background: var(--mf-green-700); color: var(--mf-white); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--mf-green-800); color: white; padding: .75rem 1.25rem;
  z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ============================== LAYOUT ============================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: clamp(4rem, 8vw, 7rem) 0; position: relative; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mf-green-700);
  margin-bottom: 1rem;
}
.section-kicker::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--mf-gold-500);
}

.section-title {
  margin-bottom: 1.25rem;
  max-width: 38ch;
}
.section-title em {
  font-style: italic;
  color: var(--mf-green-700);
  font-weight: 500;
}
.section-lead {
  font-size: 1.05rem;
  color: var(--mf-slate-700);
  max-width: 60ch;
  margin-bottom: 3rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.section-head .section-lead { margin-bottom: 0; }

/* ============================== HEADER ============================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(26, 37, 99, 0.06);
  transition: all .3s var(--ease);
}
.site-header.is-transparent {
  background: linear-gradient(180deg, rgba(15, 22, 49, 0.85) 0%, rgba(15, 22, 49, 0.55) 70%, transparent 100%);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border-bottom-color: transparent;
}
.site-header.is-transparent .logo-text-main,
.site-header.is-transparent .logo-text-sub,
.site-header.is-transparent .nav-list > li > a { color: white; }
.site-header.is-transparent .nav-list > li > a::after { background: white; }
.site-header.is-transparent .nav-toggle span { background: white; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 2rem;
}

.logo {
  display: flex; align-items: center; gap: .85rem;
  flex-shrink: 0;
}

/* Cercle décoratif bordé d'or autour du logo de la topbar — fond clair pour faire ressortir le logo */
.logo-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(232, 201, 138, 0.65);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.10),
    0 0 12px rgba(232, 201, 138, 0.18);
  transition: all .3s var(--ease);
  overflow: hidden;
}
.logo-circle::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(232, 201, 138, 0.30);
  pointer-events: none;
}
.logo:hover .logo-circle {
  border-color: rgba(232, 201, 138, 0.95);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.15),
    0 0 18px rgba(232, 201, 138, 0.32);
  transform: scale(1.04);
}

/* Sur header transparent (haut de la home), halo doré plus marqué pour mieux ressortir sur fond bleu */
.site-header.is-transparent .logo-circle {
  border-color: rgba(232, 201, 138, 0.85);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.20),
    0 0 22px rgba(232, 201, 138, 0.40);
}
.site-header.is-transparent .logo-circle::after {
  border-color: rgba(232, 201, 138, 0.45);
}

.logo-img {
  width: 52px; height: 52px;
  object-fit: contain;
  border-radius: 50%;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text-main {
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 700;
  letter-spacing: .02em;
  color: var(--mf-navy-900);
  transition: color .3s var(--ease);
}
.logo-text-sub {
  font-family: var(--font-body);
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--mf-gold-700);
  margin-top: .25rem;
  transition: color .3s var(--ease);
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-overlay { display: none; }
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-list a {
  position: relative;
  display: block;
  padding: .5rem .85rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--mf-slate-900);
  transition: color .25s var(--ease);
}
.nav-list a::after {
  content: '';
  position: absolute;
  left: .85rem; right: .85rem;
  bottom: .15rem;
  height: 2px;
  background: var(--mf-green-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-list a:hover { color: var(--mf-green-700); }
.nav-list a:hover::after,
.nav-list a.is-active::after { transform: scaleX(1); }
.nav-list a.is-active { color: var(--mf-green-700); }

/* === SOUS-MENUS DESKTOP === */
.has-submenu {
  position: relative;
}
.nav-submenu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mf-slate-900);
  cursor: pointer;
  transition: color .25s var(--ease);
  position: relative;
}
.nav-submenu-toggle::after {
  content: '';
  position: absolute;
  left: 0.85rem; right: 0.85rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--mf-green-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-submenu-toggle:hover,
.nav-submenu-toggle.is-active {
  color: var(--mf-green-700);
}
.nav-submenu-toggle.is-active::after,
.has-submenu:hover .nav-submenu-toggle::after {
  transform: scaleX(1);
}
.nav-chevron {
  transition: transform .25s var(--ease);
}
.has-submenu:hover .nav-chevron {
  transform: rotate(180deg);
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 220px;
  background: white;
  border: 1px solid var(--mf-slate-100);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(15, 22, 49, 0.12);
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, visibility .2s, transform .2s;
  z-index: 50;
}
.has-submenu:hover .nav-submenu,
.has-submenu:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-submenu li { margin: 0; }
.nav-submenu a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
  color: var(--mf-navy-900);
  font-weight: 400;
  transition: all .15s;
  white-space: nowrap;
}
.nav-submenu a::after { display: none; }
.nav-submenu a:hover {
  background: rgba(46, 67, 148, 0.06);
  color: var(--mf-blue-700, var(--mf-green-700));
  padding-left: 1.5rem;
}
.nav-submenu a.is-active {
  background: rgba(46, 67, 148, 0.08);
  color: var(--mf-blue-700, var(--mf-green-700));
  font-weight: 500;
}
/* Forcer le texte sombre dans les sous-menus même quand le header est transparent */
.site-header.is-transparent .nav-submenu a { color: var(--mf-navy-900); }
.site-header.is-transparent .nav-submenu a:hover,
.site-header.is-transparent .nav-submenu a.is-active {
  color: var(--mf-blue-700, var(--mf-green-700));
}

/* Header transparent : couleurs claires pour le bouton submenu */
.site-header.is-transparent .nav-submenu-toggle {
  color: white;
}
.site-header.is-transparent .nav-submenu-toggle::after {
  background: white;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.25rem;
  background: var(--mf-green-800);
  color: white !important;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: all .3s var(--ease);
  position: relative;
  overflow: hidden;
}
.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--mf-green-700), var(--mf-green-900));
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.nav-cta span { position: relative; z-index: 1; }

/* === RECHERCHE GLOBALE === */
.header-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--mf-slate-200);
  color: var(--mf-slate-700);
  cursor: pointer;
  margin-left: auto;
  margin-right: 1rem;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}
.header-search-btn:hover {
  background: var(--mf-slate-50);
  border-color: var(--mf-blue-700, var(--mf-green-700));
  color: var(--mf-blue-700, var(--mf-green-700));
}
.site-header.is-transparent .header-search-btn {
  border-color: rgba(255, 255, 255, 0.35);
  color: white;
}
.site-header.is-transparent .header-search-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--mf-gold-300);
  color: var(--mf-gold-300);
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.search-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 49, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.search-modal {
  position: relative;
  max-width: 720px;
  margin: 6vh auto 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.25s var(--ease);
}
.search-overlay.is-open .search-modal {
  transform: translateY(0);
}
.search-modal-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--mf-slate-100);
}
.search-modal-icon { color: var(--mf-slate-400); flex-shrink: 0; }
.search-modal-head input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 1.1rem;
  font-family: inherit;
  background: transparent;
  color: var(--mf-navy-900);
  min-width: 0;
}
.search-modal-head input::placeholder { color: var(--mf-slate-400); }
.search-modal-head button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mf-slate-100);
  border: 0;
  cursor: pointer;
  color: var(--mf-slate-700);
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-modal-head button:hover { background: var(--mf-slate-200); }

.search-results-wrap {
  max-height: 65vh;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.search-hint {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--mf-slate-500);
  font-size: 0.92rem;
  margin: 0;
}
.search-loading,
.search-no-results {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--mf-slate-500);
}
.search-loading::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--mf-slate-200);
  border-top-color: var(--mf-blue-700, var(--mf-green-700));
  border-radius: 50%;
  animation: mfSpin 0.8s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.search-result {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--mf-slate-100);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover,
.search-result.is-focused {
  background: rgba(46, 67, 148, 0.04);
}
.search-result-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mf-bone, #fafaf8);
  border-radius: 6px;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.search-result-content { flex: 1; min-width: 0; }
.search-result-type {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mf-blue-700, var(--mf-green-700));
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.search-result-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--mf-navy-900);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.search-result-excerpt {
  font-size: 0.86rem;
  color: var(--mf-slate-700);
  line-height: 1.45;
  margin: 0 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-meta {
  font-size: 0.78rem;
  color: var(--mf-slate-500);
}
.search-result mark {
  background: rgba(232, 201, 138, 0.5);
  color: inherit;
  font-weight: 600;
  padding: 0 0.1em;
  border-radius: 2px;
}
.search-results-summary {
  padding: 0.65rem 1.5rem;
  font-size: 0.82rem;
  color: var(--mf-slate-500);
  background: var(--mf-bone, #fafaf8);
  border-bottom: 1px solid var(--mf-slate-100);
}

@media (max-width: 600px) {
  .search-modal { margin: 0; height: 100vh; max-width: none; border-radius: 0; }
  .search-results-wrap { max-height: calc(100vh - 80px); }
}

/* Bouton "Faire un don" doré dans la nav */
.nav-don-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  background: linear-gradient(135deg, #c9a55b, #b8893a);
  color: #fff !important;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  margin-left: 0.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(184, 137, 58, 0.25);
  transition: all 0.3s var(--ease);
}
.nav-don-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(184, 137, 58, 0.40);
  background: linear-gradient(135deg, #d4b06a, #c2934a);
}
.nav-don-btn span {
  font-size: 0.95rem;
  line-height: 1;
}
.site-header.is-transparent .nav-don-btn {
  background: linear-gradient(135deg, rgba(232, 201, 138, 0.95), rgba(184, 137, 58, 0.95));
}

/* Newsletter feedback messages */
.newsletter-feedback {
  margin-top: 0.65rem;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.3;
}
.newsletter-feedback-ok {
  background: rgba(46, 125, 50, 0.15);
  color: #a5d6a7;
  border-left: 3px solid #4caf50;
}
.newsletter-feedback-info {
  background: rgba(46, 67, 148, 0.15);
  color: #9fb1e0;
  border-left: 3px solid #5c7fc4;
}
.newsletter-feedback-err {
  background: rgba(192, 57, 43, 0.15);
  color: #e88577;
  border-left: 3px solid #c0392b;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46, 67, 148, 0.35);
}
.nav-cta:hover::before { opacity: 1; }

/* Burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 22px;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--mf-navy-900);
  transition: all .3s var(--ease);
  border-radius: 2px;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Quand le menu est ouvert : burger en sombre même si header transparent */
.nav-toggle.is-open span,
.site-header.is-transparent .nav-toggle.is-open span {
  background: var(--mf-navy-900) !important;
}

/* ============================== BUTTONS ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .03em;
  border-radius: 100px;
  transition: all .3s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.btn-primary {
  background: var(--mf-green-800);
  color: white;
  box-shadow: 0 8px 24px rgba(46, 67, 148, 0.25);
}
.btn-primary:hover {
  background: var(--mf-green-900);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(46, 67, 148, 0.35);
}
.btn-secondary {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,.1);
  border-color: white;
}
.btn-ghost {
  background: transparent;
  color: var(--mf-green-800);
  border: 1.5px solid var(--mf-green-800);
}
.btn-ghost:hover {
  background: var(--mf-green-800);
  color: white;
}
.btn-arrow { transition: transform .3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ============================== HERO ============================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
  padding-top: var(--header-h);
}
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Fallback animé : dégradé bleu en mouvement style "aurore" si la vidéo ne charge pas */
  background:
    radial-gradient(ellipse at 20% 30%, #2e4394 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, #1a2563 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, #243388 0%, transparent 70%),
    linear-gradient(135deg, #0f1631 0%, #1a2563 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: heroAurora 25s ease-in-out infinite alternate;
}
@keyframes heroAurora {
  0%   { background-position: 0% 0%, 100% 100%, 50% 50%, 0 0; }
  50%  { background-position: 100% 50%, 0% 50%, 80% 20%, 0 0; }
  100% { background-position: 30% 100%, 70% 0%, 20% 80%, 0 0; }
}
.hero-video video,
.hero-video img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  /* La vidéo apparaît en fondu une fois chargée */
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-video video.is-loaded { opacity: 1; }
.hero-video::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(46, 67, 148, 0.35), transparent 60%),
    linear-gradient(180deg, rgba(13, 17, 23, 0.55) 0%, rgba(13, 17, 23, 0.75) 60%, rgba(13, 17, 23, 0.95) 100%);
}
.hero-pattern {
  position: absolute; inset: 0;
  z-index: 1;
  opacity: .12;
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path fill='none' stroke='white' stroke-width='.5' d='M50 0L75 25L50 50L25 25Z M50 50L75 75L50 100L25 75Z'/></svg>");
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 6rem 0 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
}
.hero-text { min-width: 0; }

/* Logo MF en grand format à droite — fond transparent, halo subtil */
.hero-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  width: 100%;
  animation: heroLogoFadeIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

/* Halo doré flouté en arrière-plan */
.hero-logo-halo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92%);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(232, 201, 138, 0.35) 0%,
    rgba(232, 201, 138, 0.18) 30%,
    rgba(46, 67, 148, 0.22) 55%,
    transparent 75%
  );
  filter: blur(28px);
  border-radius: 50%;
  z-index: 0;
  animation: heroHaloPulse 6s ease-in-out infinite alternate;
}

/* Bordure dorée fine autour du logo (au lieu d'un cercle blanc CSS) */
.hero-logo-wrap::before {
  content: '';
  position: absolute;
  width: min(360px, 80%);
  aspect-ratio: 1;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(232, 201, 138, 0.85);
  box-shadow:
    0 0 40px rgba(232, 201, 138, 0.30),
    0 8px 30px rgba(0, 0, 0, 0.25);
  z-index: 1;
  pointer-events: none;
  animation: heroCircleFloat 8s ease-in-out infinite alternate;
}

/* Anneau décoratif extérieur très fin */
.hero-logo-wrap::after {
  content: '';
  position: absolute;
  width: min(380px, 84%);
  aspect-ratio: 1;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(232, 201, 138, 0.35);
  z-index: 1;
  pointer-events: none;
}

.hero-logo-img {
  position: relative;
  z-index: 2;
  width: min(320px, 70%);
  height: auto;
  border-radius: 50%;
  /* Le logo PNG contient désormais lui-même un fond blanc circulaire */
  box-shadow:
    0 4px 12px rgba(15, 22, 49, 0.20),
    0 1px 3px rgba(0, 0, 0, 0.10);
}

@keyframes heroLogoFadeIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes heroHaloPulse {
  from { opacity: 0.85; transform: translate(-50%, -50%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}
@keyframes heroCircleFloat {
  from { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  to   { transform: translate(-50%, -50%) scale(1.02) rotate(2deg); }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem 1.1rem;
  background: rgba(212, 165, 92, 0.12);
  border: 1px solid rgba(212, 165, 92, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mf-gold-300);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp .8s var(--ease-out) .2s forwards;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mf-gold-500);
  box-shadow: 0 0 12px var(--mf-gold-500);
}

.hero-title {
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  font-weight: 500;
  line-height: 1.05;
  color: white;
  max-width: 18ch;
  margin-bottom: 1.5rem;
  white-space: pre-line;
  opacity: 0;
  animation: fadeUp .9s var(--ease-out) .35s forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--mf-gold-300);
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(255,255,255,.85);
  max-width: 56ch;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp .9s var(--ease-out) .5s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp .9s var(--ease-out) .65s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,.6);
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  opacity: 0;
  animation: fadeUp 1.2s var(--ease-out) 1s forwards;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); transform-origin: top; }
  50% { transform: scaleY(0.4); }
}

/* ============================== PRESENTATION ============================== */
.presentation {
  background: var(--mf-bone);
  position: relative;
}
.presentation::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, var(--mf-bone), transparent);
  pointer-events: none;
}

.presentation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.presentation-text p {
  font-size: 1.05rem;
  color: var(--mf-slate-700);
  margin-bottom: 1.5rem;
  line-height: 1.75;
}
.presentation-arabic {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  color: var(--mf-green-800);
  text-align: right;
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-right: 3px solid var(--mf-gold-500);
  background: rgba(212, 165, 92, 0.05);
  border-radius: 4px 0 0 4px;
  direction: rtl;
}

.presentation-visual {
  position: relative;
}
.presentation-image {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--mf-green-900), var(--mf-navy-800));
  box-shadow: var(--shadow-xl);
}
.presentation-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(212, 165, 92, 0.3), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(37, 149, 99, 0.4), transparent 50%);
}
.presentation-image::after {
  content: '';
  position: absolute;
  inset: 2rem;
  border: 1px solid rgba(212, 165, 92, 0.4);
  pointer-events: none;
}
.presentation-image-pattern {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(212, 165, 92, 0.4);
}
.presentation-decor {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 200px;
  aspect-ratio: 1;
  border: 2px solid var(--mf-gold-500);
  border-radius: 4px;
  z-index: -1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--mf-slate-200);
}
.stat {
  text-align: left;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  color: var(--mf-green-800);
  margin-bottom: .5rem;
}
.stat-label {
  font-size: .85rem;
  color: var(--mf-slate-500);
  letter-spacing: .03em;
}

/* ============================== ACTUALITES ============================== */
.actualites { background: var(--mf-white); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.news-card {
  position: relative;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/5;
  transition: transform .5s var(--ease);
}
.news-card:hover { transform: translateY(-6px); }
.news-card-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--mf-green-900);
  transition: transform .8s var(--ease);
}
.news-card:hover .news-card-image { transform: scale(1.06); }
.news-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(13, 17, 23, 0.55) 65%, rgba(13, 17, 23, 0.95) 100%);
}
.news-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--mf-green-900), var(--mf-navy-800));
  opacity: .6;
}
.news-card-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.75rem;
  color: white;
  z-index: 1;
}
.news-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .85rem;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .9;
}
.news-card-category {
  padding: .25rem .75rem;
  background: var(--mf-green-700);
  border-radius: 100px;
  font-weight: 600;
}
.news-card-title {
  font-size: 1.25rem;
  color: white;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: .65rem;
}
.news-card-excerpt {
  font-size: .9rem;
  opacity: .85;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================== EVENTS ============================== */
.events {
  background: linear-gradient(180deg, var(--mf-bone), var(--mf-slate-50));
  position: relative;
}

.events-list {
  display: grid;
  gap: 1rem;
}
.event-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.75rem 2rem;
  background: white;
  border-radius: 4px;
  border-left: 3px solid var(--mf-green-700);
  transition: all .35s var(--ease);
  box-shadow: var(--shadow-sm);
}
.event-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--mf-gold-500);
}

.event-date {
  text-align: center;
  padding-right: 2rem;
  border-right: 1px solid var(--mf-slate-200);
}
.event-date-day {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--mf-green-800);
  line-height: 1;
}
.event-date-month {
  display: block;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mf-slate-500);
  margin-top: .35rem;
}

.event-info h3 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: .85rem;
  color: var(--mf-slate-500);
}
.event-meta-item {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.event-meta-item svg { width: 14px; height: 14px; opacity: .7; }

.event-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--mf-green-700);
  white-space: nowrap;
}
.event-cta svg { transition: transform .3s var(--ease); }
.event-item:hover .event-cta svg { transform: translateX(4px); }

/* ============================== PRECHES ============================== */
.preches { background: var(--mf-white); }

.preche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.preche-card {
  position: relative;
  background: var(--mf-bone);
  border-radius: 4px;
  overflow: hidden;
  transition: all .35s var(--ease);
  display: flex;
  flex-direction: column;
}
.preche-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.preche-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--mf-green-900), var(--mf-navy-800));
  overflow: hidden;
}
.preche-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.preche-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26, 37, 99, 0.4), rgba(46, 67, 148, 0.4));
}
.preche-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all .3s var(--ease);
}
.preche-card:hover .preche-play {
  background: var(--mf-gold-500);
  transform: translate(-50%, -50%) scale(1.1);
}
.preche-play svg {
  width: 24px; height: 24px;
  margin-left: 3px;
  fill: var(--mf-green-900);
}
.preche-duration {
  position: absolute;
  bottom: .85rem; right: .85rem;
  padding: .25rem .65rem;
  background: rgba(13, 17, 23, 0.85);
  color: white;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 4px;
  z-index: 2;
}
.preche-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.preche-theme {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mf-gold-700);
  margin-bottom: .65rem;
}
.preche-title {
  font-size: 1.2rem;
  margin-bottom: .65rem;
  line-height: 1.3;
}
.preche-imam {
  font-size: .85rem;
  color: var(--mf-slate-500);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--mf-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================== PRIERES (carte horaire d'accueil) ============================== */
.prayers-home {
  background: var(--mf-navy-900);
  color: white;
  position: relative;
  overflow: hidden;
}
.prayers-home::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(212, 165, 92, 0.15), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(37, 149, 99, 0.2), transparent 50%);
  pointer-events: none;
}
.prayers-home .section-kicker { color: var(--mf-gold-300); }
.prayers-home .section-kicker::before { background: var(--mf-gold-300); }
.prayers-home .section-title { color: white; }
.prayers-home .section-lead { color: rgba(255,255,255,.7); }

.prayers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.prayer-cell {
  background: var(--mf-navy-800);
  padding: 1.75rem 1rem;
  text-align: center;
  position: relative;
  transition: all .3s var(--ease);
}
.prayer-cell:hover { background: var(--mf-navy-700); }
.prayer-cell.is-next {
  background: linear-gradient(135deg, var(--mf-green-700), var(--mf-green-900));
}
.prayer-cell.is-next::before {
  content: 'Prochaine';
  position: absolute;
  top: .5rem; right: .5rem;
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mf-gold-300);
}
.prayer-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: .35rem;
  color: var(--mf-gold-300);
}
.prayer-fr {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: 1rem;
}
.prayer-time {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  color: white;
  line-height: 1;
}
.prayer-iqama {
  font-size: .7rem;
  margin-top: .5rem;
  opacity: .65;
}

/* ============================== PAGES INTERIEURES ============================== */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 6rem) 0 5rem;
  background: linear-gradient(135deg, var(--mf-navy-900) 0%, var(--mf-green-900) 100%);
  color: white;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path fill='none' stroke='%23d4a55c' stroke-width='.3' opacity='.2' d='M50 0L75 25L50 50L25 25Z M50 50L75 75L50 100L25 75Z M0 50L25 75L0 100M75 25L100 50L75 75'/></svg>");
  background-size: 80px 80px;
  opacity: .25;
}
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;        /* centrage horizontal */
  text-align: center;
}
.page-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mf-gold-300);
  margin-bottom: 1.25rem;
  justify-content: center;  /* aligne le contenu interne au centre */
}
.page-hero-kicker::before,
.page-hero-kicker::after {
  content: '';
  width: 32px; height: 1px;
  background: var(--mf-gold-300);
}
.page-hero h1 {
  color: white;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.25rem;
}
.page-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 60ch;
  line-height: 1.65;
  margin-left: auto;
  margin-right: auto;       /* centre aussi le paragraphe */
}

.breadcrumb { display: none; }

/* ============================== CARDS GENERIQUES ============================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.card {
  background: white;
  border-radius: 4px;
  overflow: hidden;
  transition: all .35s var(--ease);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--mf-green-900), var(--mf-navy-800));
  position: relative;
  overflow: hidden;
}
.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card-image img { transform: scale(1.05); }
.card-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: .35rem .85rem;
  background: rgba(255,255,255,.95);
  color: var(--mf-green-800);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 100px;
  z-index: 1;
}
.card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-meta {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mf-slate-500);
  margin-bottom: .75rem;
}
.card-title {
  font-size: 1.25rem;
  margin-bottom: .85rem;
  line-height: 1.3;
}
.card-excerpt {
  color: var(--mf-slate-700);
  font-size: .95rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--mf-green-700);
  margin-top: auto;
}
.card-link svg { transition: transform .3s var(--ease); }
.card:hover .card-link svg { transform: translateX(4px); }

/* ============================== TIMELINE ============================== */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--mf-slate-200);
}
.timeline-item {
  position: relative;
  padding: 0 0 3rem 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: .35rem;
  width: 1rem; height: 1rem;
  background: var(--mf-bone);
  border: 2px solid var(--mf-green-700);
  border-radius: 50%;
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: -2.15rem;
  top: .65rem;
  width: 6px; height: 6px;
  background: var(--mf-gold-500);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.timeline-item:hover::after { opacity: 1; }
.timeline-year {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--mf-green-800);
  line-height: 1;
  margin-bottom: .5rem;
}
.timeline-item h3 { margin-bottom: .65rem; }
.timeline-item p { color: var(--mf-slate-700); }

/* ============================== VALEURS ============================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--mf-slate-200);
  border: 1px solid var(--mf-slate-200);
}
.value-item {
  background: white;
  padding: 2.5rem;
  transition: all .35s var(--ease);
  position: relative;
}
.value-item:hover {
  background: var(--mf-bone);
  transform: translateY(-2px);
}
.value-icon {
  width: 56px; height: 56px;
  border-radius: 4px;
  background: var(--mf-green-50);
  color: var(--mf-green-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all .3s var(--ease);
}
.value-item:hover .value-icon {
  background: var(--mf-green-800);
  color: white;
}
.value-icon svg { width: 28px; height: 28px; }
.value-item h3 { margin-bottom: .65rem; }
.value-item p { color: var(--mf-slate-700); font-size: .95rem; }

/* ============================== FOOTER ============================== */
.site-footer {
  background: var(--mf-navy-900);
  color: rgba(255,255,255,.7);
  padding: 5rem 0 2rem;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--mf-gold-500), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-logo { margin-bottom: 1rem; }
.footer-logo-circle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(232, 201, 138, 0.65);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.25),
    0 0 16px rgba(232, 201, 138, 0.20);
  overflow: hidden;
}
.footer-logo-circle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(232, 201, 138, 0.30);
  pointer-events: none;
}
.footer-logo-circle img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  margin: 0;
}
.footer-tagline {
  color: rgba(255,255,255,.7);
  margin-bottom: 1.5rem;
  font-size: .95rem;
  line-height: 1.6;
}
.footer-social {
  display: flex;
  gap: .75rem;
}
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s var(--ease);
  color: rgba(255,255,255,.8);
}
.footer-social a:hover {
  background: var(--mf-green-700);
  transform: translateY(-2px);
  color: white;
}
.footer-social svg { width: 16px; height: 16px; }

.footer-title {
  color: white;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: .75rem;
}
.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 24px; height: 2px;
  background: var(--mf-gold-500);
}
.footer-list {
  list-style: none;
  display: grid;
  gap: .75rem;
}
.footer-list a {
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: all .25s var(--ease);
  display: inline-block;
}
.footer-list a:hover { color: var(--mf-gold-300); transform: translateX(4px); }
.footer-contact li { font-size: .9rem; }

.footer-newsletter { margin-top: 1.5rem; }
.footer-newsletter label {
  display: block;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .65rem;
}
.newsletter-row {
  display: flex;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
}
.newsletter-row input {
  flex: 1;
  padding: .85rem 1rem;
  background: transparent;
  border: 0;
  color: white;
  outline: none;
  font-size: .9rem;
}
.newsletter-row button {
  padding: 0 1.25rem;
  background: var(--mf-green-700);
  color: white;
  font-size: 1.2rem;
  transition: background .3s var(--ease);
}
.newsletter-row button:hover { background: var(--mf-green-800); }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: .8rem;
}
.footer-arabic {
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  color: var(--mf-gold-300);
}
.footer-legal {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.footer-legal a:hover { color: var(--mf-gold-300); }

/* ============================== UTILITAIRES ============================== */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1100px) {
  .nav-list { gap: 0; }
  .nav-list a { padding: .5rem .65rem; font-size: .85rem; }
}

/* ============== TABLETTE / MOBILE LARGE (≤ 960px) ============== */
@media (max-width: 960px) {
  /* Navigation mobile : burger + slide-in latéral */
  .nav-toggle { display: flex; }

  /* Le bouton recherche reste visible à côté du burger sur mobile */
  .header-search-btn {
    margin-left: 0;
    margin-right: 0.5rem;
    order: 1;
  }
  .nav-toggle { order: 2; }

  /* Overlay sombre cliquable derrière le panneau mobile ouvert */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 22, 49, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
    z-index: 100;
    pointer-events: none;
    cursor: pointer;
  }
  .nav-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(360px, 90vw);
    height: 100vh; height: 100svh;
    background: var(--mf-white);
    flex-direction: column;
    align-items: stretch;
    padding: calc(var(--header-h) + 2rem) 2rem 2rem;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    box-shadow: var(--shadow-xl);
    z-index: 105;
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-list li { width: 100%; border-bottom: 1px solid var(--mf-slate-100); }
  .nav-list a {
    padding: 1rem 0;
    font-size: 1rem;
    display: block;
    min-height: 44px;          /* touch target */
  }
  .nav-list a::after { display: none; }

  /* === SOUS-MENUS MOBILE (accordéon) === */
  .has-submenu { width: 100%; }
  .nav-submenu-toggle {
    width: 100%;
    padding: 1rem 0;
    font-size: 1rem;
    justify-content: space-between;
    color: var(--mf-navy-900) !important;
    border: 0;
    background: transparent;
    min-height: 44px;
  }
  .nav-submenu-toggle::after { display: none; }
  .nav-submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .has-submenu.is-open .nav-submenu {
    max-height: 500px;
    padding-bottom: 0.5rem;
  }
  .has-submenu.is-open .nav-chevron {
    transform: rotate(180deg);
  }
  .nav-submenu a {
    padding: 0.65rem 0 0.65rem 1.5rem;
    font-size: 0.92rem;
    color: var(--mf-slate-700);
    border-left: 2px solid var(--mf-slate-200);
    margin-left: 0.25rem;
    white-space: normal;
  }
  .nav-submenu a:hover {
    padding-left: 1.5rem;
    background: transparent;
  }
  .nav-submenu a.is-active {
    border-left-color: var(--mf-blue-700, var(--mf-green-700));
    background: transparent;
  }
  .nav-submenu li { border-bottom: 0; }

  .nav-cta {
    margin-top: 1.5rem;
    justify-content: center;
  }
  .nav-don-btn {
    margin: 1.5rem 0 0;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
  }
  /* IMPORTANT : quand le menu mobile est ouvert, le panneau est BLANC.
     On force la couleur foncée du texte pour qu'il soit lisible,
     même si le header est en mode transparent (haut de la home) */
  .main-nav.is-open .nav-list a {
    color: var(--mf-navy-900) !important;
  }
  .main-nav.is-open .nav-list a:hover,
  .main-nav.is-open .nav-list a.is-active {
    color: var(--mf-blue-700, var(--mf-green-700)) !important;
  }

  .site-header.is-transparent .logo-text-main,
  .site-header.is-transparent .logo-text-sub { color: white; }

  /* Sections : padding vertical réduit */
  section { padding: 4rem 0; }
  .container { padding: 0 1.5rem; }

  /* Grilles passées en colonnes plus simples */
  .presentation-grid { grid-template-columns: 1fr; gap: 3rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .prayers-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }

  /* Hero : 1 colonne, logo en haut puis texte centré */
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    padding: 5rem 0 3rem;
  }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .hero-title { max-width: 100%; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-logo-wrap { min-height: 220px; order: -1; }
  .hero-logo-img { max-width: 200px; max-height: 200px; }
  .hero-logo-wrap::before { width: min(280px, 75%); }
  .hero-logo-wrap::after { width: min(300px, 80%); }

  /* Page-hero : padding réduit */
  .page-hero { padding: calc(var(--header-h) + 4rem) 0 3rem; }
  .page-hero h1 { font-size: clamp(2rem, 6vw, 3rem); }
  .page-hero p { font-size: 1rem; }

  /* Section heads : empiler le titre + bouton */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* ============== MOBILE (≤ 600px) ============== */
@media (max-width: 600px) {
  /* Container plus serré */
  .container { padding: 0 1rem; }

  /* Sections encore plus compactes */
  section { padding: 3rem 0; }

  /* Typographie hero adaptée mobile */
  .hero-title { font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1.08; }
  .hero-subtitle { font-size: 1rem; }
  .hero-content { padding: 4rem 0 2.5rem; }

  /* Page hero mobile */
  .page-hero { padding: calc(var(--header-h) + 3rem) 0 2.5rem; }
  .page-hero h1 { font-size: clamp(1.85rem, 8vw, 2.5rem); }
  .page-hero-content { padding: 0 .25rem; }

  /* Header logo plus compact */
  .logo-circle { width: 48px; height: 48px; }
  .logo-img { width: 44px; height: 44px; }
  .logo-text-main { font-size: .95rem; }
  .logo-text-sub { font-size: .65rem; letter-spacing: .2em; }

  /* Toutes les grilles en 1 colonne */
  .news-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .prayers-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .cards-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .values-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Cards news : aspect-ratio plus compact sur mobile */
  .news-card { aspect-ratio: 16/10; }
  .news-card-content { padding: 1.25rem; }
  .news-card-title { font-size: 1.1rem; }

  /* Values, missions, cards génériques : padding réduit */
  .value-item { padding: 1.75rem 1.5rem; }
  .card-body { padding: 1.25rem; }
  .card-title { font-size: 1.05rem; }

  /* Prière : cellules plus compactes */
  .prayer-cell { padding: 1.25rem 0.75rem; }
  .prayer-name { font-size: .95rem; }
  .prayer-time { font-size: 1.4rem; }
  .prayer-fr { margin-bottom: .65rem; }

  /* Events : empilement vertical */
  .event-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }
  .event-date {
    padding-right: 0;
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--mf-slate-200);
    display: flex;
    gap: 1rem;
    align-items: baseline;
    text-align: left;
  }

  /* Hero : logo masqué pour gagner en lisibilité */
  .hero-logo-wrap { display: none; }

  /* Footer */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-legal { flex-wrap: wrap; gap: 1rem; }

  /* CTAs : pleine largeur pour faciliter le tap */
  .hero-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .btn { min-height: 44px; padding: .75rem 1.25rem; }

  /* Section-head : titre + bouton "Voir tout" en colonne */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .section-head .btn { align-self: flex-start; }

  /* Section title plus compact */
  .section-title { font-size: clamp(1.6rem, 6vw, 2.25rem); }

  /* Présentation : statistiques plus compactes */
  .stat-value { font-size: clamp(1.8rem, 6vw, 2.5rem) !important; }

  /* Page Religion / Tableaux Mentions / Confidentialité */
  .legal-table { font-size: .85rem; }
  .legal-table th, .legal-table td { padding: .55rem .6rem; }
  .legal-toc ol { columns: 1; }

  /* Centres : barre de recherche pleine largeur */
  .centres-search input { width: 100%; }

  /* Forms : inputs plein largeur */
  .footer-newsletter .newsletter-row { flex-wrap: wrap; }

  /* Prayers : carte Jumu'ah pleine largeur */
  .jumua-card { padding: 1.5rem; }
  .jumua-card .jumua-time { font-size: 2rem; }

  /* Touch targets génériques */
  a, button { min-height: 40px; }

  /* Préviens les débordements horizontaux */
  body { overflow-x: hidden; }
  img, video, iframe { max-width: 100%; height: auto; }

  /* Splash screen plus petit */
  .mf-splash-logo-wrap { width: clamp(180px, 60vw, 260px); height: clamp(180px, 60vw, 260px); }
}

/* ============== TRÈS PETIT MOBILE (≤ 380px) ============== */
@media (max-width: 380px) {
  .container { padding: 0 0.85rem; }
  .hero-title { font-size: clamp(1.7rem, 9vw, 2.2rem); }
  .stats { grid-template-columns: 1fr; }
  .prayers-grid { grid-template-columns: 1fr; }
}

/* ============== RESPECT prefers-reduced-motion ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
