@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700;800&display=swap");

/* ===== LECIM — Ligue des Établissements Confessionnels et Madrassas en Côte d'Ivoire ===== */

:root {
  --green-dark: #0a3d63;
  --green: #043872;
  --green-light: #4f749c;
  --gold: #e0a52c;
  --gold-light: #f3c869;
  --cream: #f4f8fb;
  --text-dark: #14232f;
  --text-muted: #58707f;
  --white: #ffffff;
  --border: #dce8f0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 48px rgba(10, 61, 99, 0.10);
  --shadow-lg: 0 26px 64px rgba(10, 61, 99, 0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", "Poppins", Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: var(--flash-bar-offset, 0px);
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1380px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-dark);
}

.brand svg, .brand-logo { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-weight: 500; font-size: 0.65rem; color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px;
}

.nav-pill a {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.86rem;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}

.nav-pill a:hover { color: var(--green); background: rgba(4,56,114,.08); }

.nav-pill a.active {
  color: var(--green);
  background: rgba(4,56,114,.14);
}

.nav-pill li { position: relative; display: flex; align-items: center; }

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-inline-start: -2px;
  background: none;
  border: none;
  padding: 0;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.dropdown-toggle:hover { background: rgba(4,56,114,.08); }

.dropdown-caret {
  width: 10px;
  height: 10px;
  opacity: .55;
  pointer-events: none;
  transition: transform .18s ease;
}

.nav-pill li:hover .dropdown-caret,
.nav-pill li:focus-within .dropdown-caret,
.nav-pill li.dropdown-open .dropdown-caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 120;
}

.nav-pill li:hover .nav-dropdown,
.nav-pill li:focus-within .nav-dropdown,
.nav-pill li.dropdown-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.nav-dropdown a:hover { background: var(--cream); color: var(--green); }

#identite, #missions, #gouvernance, #fondateurs, #historique,
#nos-services, #comment-ca-marche,
#terminees, #a-venir,
#recherche, #doc-categories, #resultats, #initiatives-list, #devenir-partenaire,
#comment-ca-se-passe, #formulaire, #coordonnees, #localisation, #ecoles-list {
  scroll-margin-top: 90px;
}

.nav-utility {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-utility a {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.nav-utility a:hover { color: var(--green); }

.nav-utility .nav-don-link {
  background: var(--gold);
  color: var(--green-dark);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  transition: background .15s ease, transform .15s ease;
}
.nav-utility .nav-don-link:hover { background: var(--gold-light); color: var(--green-dark); transform: translateY(-1px); }

.nav-cta { padding: 11px 26px; }

.nav-search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .15s ease, border-color .15s ease;
}
.nav-search-trigger:hover { color: var(--green); border-color: var(--green); }
.nav-search-trigger svg { width: 17px; height: 17px; }

/* ===== Recherche globale ===== */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,30,.55);
  z-index: 200;
  padding: 10vh 20px 20px;
}
.search-overlay.open { display: block; }

.search-panel {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 74vh;
  display: flex;
  flex-direction: column;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.search-input-row svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.search-input-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: none;
}
#search-close {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
#search-close:hover { color: var(--green); }
#search-close svg { width: 18px; height: 18px; }

.search-results { overflow-y: auto; padding: 8px 0; }

.search-result-group { padding: 6px 20px 12px; }
.search-result-group h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 4px;
  padding: 0 4px;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background .12s ease;
}
.search-result-item:hover { background: var(--cream); }
.search-result-title { font-weight: 600; color: var(--text-dark); font-size: 0.92rem; }
.search-result-subtitle { font-size: 0.78rem; color: var(--text-muted); }

.search-empty-hint { padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.88rem; }

.search-highlight { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: var(--radius-sm); transition: outline-color .3s ease; }

/* ===== Prochains événements (accueil) ===== */
.evenements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.evenement-card {
  display: flex;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.evenement-date-badge {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.evenement-date-badge strong { font-size: 1.2rem; font-weight: 800; }
.evenement-date-badge span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .03em; }

.evenement-card h4 { font-size: 0.95rem; color: var(--green-dark); margin-bottom: 6px; }

/* ===== Baromètre des résultats ===== */
.taux-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.taux-pill.good { background: rgba(15,122,76,.12); color: var(--green); }
.taux-pill.mid { background: rgba(224,165,44,.16); color: #b8860b; }
.taux-pill.low { background: rgba(220,53,69,.14); color: #dc3545; }

/* ===== Bandeau notifications push ===== */
.push-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  display: none;
  align-items: center;
  gap: 16px;
  z-index: 150;
}
.push-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.push-banner-text strong { color: var(--green-dark); font-size: 0.95rem; }
.push-banner-text span { color: var(--text-muted); font-size: 0.8rem; }
.push-banner-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.push-banner-dismiss { background: none; border: none; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.push-banner-dismiss:hover { color: var(--text-dark); }
.push-banner .btn-primary { padding: 9px 18px; font-size: 0.85rem; }

@media (max-width: 560px) {
  .push-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .push-banner-actions { justify-content: center; }
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); }

.btn-gold { background: var(--gold); color: var(--green-dark); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn-outline { background: transparent; border: 2px solid var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.15); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--green-dark); display: block; }

/* ===== Hero ===== */
.hero {
  background-color: var(--green-dark);
  background-image: url("../img/hero-bg-illustration.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  color: var(--white);
  padding: 90px 24px 110px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(224,165,44,.18) 0, transparent 45%),
                     radial-gradient(circle at 85% 75%, rgba(224,165,44,.15) 0, transparent 40%);
}

/* Photo de fond du hero, ajoutée par l'admin via Contenu du site (remplace le
   dégradé animé ; le voile sombre appliqué en JS garde le texte lisible). */
.hero.has-bg-image { animation: none; }
.hero.has-bg-image::before { opacity: .6; }

/* Couche dédiée à la photo (posée par script.js via la variable --hero-bg-image),
   séparée du ::before décoratif ci-dessus pour pouvoir l'animer seule : lent
   zoom-respiration continu, effet "paisible" plutôt qu'un simple fond statique. */
.hero.has-bg-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  animation: heroSlowZoom 26s ease-in-out infinite alternate;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  text-align: left;
}

.hero-text { min-width: 0; }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual img {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.18));
}

.hero-float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--text-dark);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 16px 32px rgba(10,61,99,.22);
  white-space: nowrap;
}

.hero-float-badge strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.2;
}

.hero-float-badge small {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-float-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(4,56,114,.14);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-float-icon svg { width: 19px; height: 19px; }

.hero-float-badge-1 { top: 6%; left: -8%; }
.hero-float-badge-2 { bottom: 8%; right: -8%; }

[dir="rtl"] .hero-float-badge-1 { left: auto; right: -8%; }
[dir="rtl"] .hero-float-badge-2 { right: auto; left: -8%; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  letter-spacing: .5px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -.02em;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1 span { color: var(--gold-light); }

.hero p {
  max-width: 560px;
  margin: 0 0 34px;
  font-size: 1.05rem;
  color: rgba(255,255,255,.88);
}

.hero-actions { display: flex; gap: 16px; justify-content: flex-start; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero p { margin: 0 auto 34px; }
  .hero-visual { order: -1; margin-bottom: 12px; }
  .hero-visual img { max-width: 300px; }
  .hero-float-badge { padding: 8px 12px; gap: 8px; }
  .hero-float-badge strong { font-size: .95rem; }
  .hero-float-badge small { font-size: .64rem; }
  .hero-float-icon { width: 30px; height: 30px; }
  .hero-float-icon svg { width: 15px; height: 15px; }
  .hero-float-badge-1, [dir="rtl"] .hero-float-badge-1 { top: 2%; left: 2%; right: auto; }
  .hero-float-badge-2, [dir="rtl"] .hero-float-badge-2 { bottom: 2%; right: 2%; left: auto; }
}

@media (max-width: 420px) {
  .hero-float-badge { display: none; }
}

.hero-stats {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
}

.stat-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(4px);
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.stat-card:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.3);
  transform: translateY(-3px);
}

.stat-card strong { display: block; font-size: 1.8rem; color: var(--gold-light); }
.stat-card span { font-size: 0.82rem; color: rgba(255,255,255,.8); }

.partenaires-marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.partenaires-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: partenaires-scroll 32s linear infinite;
}

@keyframes partenaires-scroll {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .partenaires-track { animation: none; }
}

.partenaires-logo {
  height: 56px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity .2s ease;
}
.partenaires-logo:hover { opacity: 1; }

.partenaire-chip {
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 10px;
}

.step-card strong { display: block; font-size: 0.9rem; color: var(--green-dark); }

.initiatives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.initiative-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.initiative-card h3 { margin: 8px 0; color: var(--green-dark); font-size: 1.05rem; }
.initiative-card p { color: var(--text-muted); font-size: 0.9rem; }
.initiative-partenaire-link {
  display: inline-block; margin-top: 14px; font-size: 0.82rem; font-weight: 700;
  color: var(--green);
}
.initiative-partenaire-link:hover { text-decoration: underline; }

.initiative-statut {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(224,165,44,.15);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ===== Section shell ===== */
section { padding: 80px 0; }
.section-alt { background: var(--cream); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--green-dark); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); }

/* ===== Missions grid ===== */
.missions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.mission-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.mission-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(4,56,114,.18);
}

.mission-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.mission-icon svg { width: 28px; height: 28px; stroke: var(--gold-light); }

.mission-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--green-dark); }
.mission-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ===== News feed ===== */
.news-list { display: flex; flex-direction: column; gap: 0; }

.news-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.news-item:last-child { border-bottom: none; }
.news-item.reverse { grid-template-columns: 1fr 300px; }
.news-item.reverse .news-media { order: 2; }

.news-media {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.news-media svg { width: 64px; height: 64px; stroke: rgba(255,255,255,.55); }
.news-media img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 0; }
.news-media::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(224,165,44,.35), transparent 60%);
}

.news-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(15,122,76,.08);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.news-item h3 { font-size: 1.3rem; color: var(--green-dark); margin-bottom: 12px; font-weight: 800; text-transform: uppercase; }
.news-item p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== CTA band ===== */
.cta-band {
  background: linear-gradient(120deg, var(--gold), var(--gold-light));
  border-radius: var(--radius);
  padding: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--green-dark); font-size: 1.5rem; margin-bottom: 6px; }
.cta-band p { color: #5a4415; }

/* ===== Exam banner ===== */
.exam-band {
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  border-radius: var(--radius);
  padding: 26px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.exam-band-text {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--white);
}
.exam-band-text svg { width: 34px; height: 34px; flex-shrink: 0; stroke: var(--gold-light); }
.exam-band-text strong { display: block; font-size: 1.1rem; }
.exam-band-text span { color: rgba(255,255,255,.8); font-size: 0.88rem; }
.exam-band .btn { flex-shrink: 0; }

@media (max-width: 680px) {
  .exam-band { flex-direction: column; text-align: center; }
  .exam-band-text { flex-direction: column; }
}

/* ===== Timeline (Activités) ===== */
.page-banner {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 70px 24px;
  text-align: center;
}
.page-banner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 10px; }
.page-banner p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto; }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.breadcrumb a { color: var(--gold-light); font-weight: 600; }

.rss-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-size: 0.82rem; font-weight: 700; color: var(--gold-light);
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 16px;
  transition: background .15s ease, color .15s ease;
}
.rss-link:hover { background: rgba(255,255,255,.15); color: var(--white); }
.rss-link svg { width: 15px; height: 15px; }

.timeline { position: relative; max-width: 820px; margin: 0 auto; padding: 80px 0; }
.timeline::before {
  content: "";
  position: absolute;
  left: 29px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item { position: relative; padding-left: 76px; margin-bottom: 34px; }
.timeline-dot {
  position: absolute; left: 20px; top: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--green);
}
.timeline-item.past .timeline-dot { border-color: var(--text-muted); }

.timeline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}
.timeline-item.past .timeline-card { border-left-color: var(--text-muted); opacity: .85; }

.timeline-card .tdate { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.timeline-card h3 { color: var(--green); font-size: 1.15rem; margin-bottom: 8px; }
.timeline-item.past .timeline-card h3 { color: var(--text-muted); }
.timeline-card p { color: var(--text-muted); font-size: 0.92rem; }
.ics-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
}
.ics-link svg { width: 14px; height: 14px; }
.ics-link:hover { text-decoration: underline; }

.activity-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.activity-actions .ics-link { margin-top: 0; }
.btn-inscription-toggle {
  background: none; border: 1px solid var(--green); color: var(--green);
  border-radius: 999px; padding: 5px 14px; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn-inscription-toggle:hover { background: var(--green); color: var(--white); }
.inscription-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.inscription-form input {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
  font-size: 0.85rem; font-family: inherit;
}
.inscription-form .btn { align-self: flex-start; }
.inscription-success { margin-top: 12px; font-size: 0.85rem; font-weight: 700; color: var(--green); }
.timeline-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(224,165,44,.15);
  color: #8a6510;
  margin-bottom: 10px;
}

/* ===== About page ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.about-media {
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  display: flex; align-items: center; justify-content: center;
}
.about-media svg { width: 120px; height: 120px; stroke: rgba(255,255,255,.5); }

.about-text h2 { color: var(--green-dark); font-size: 1.8rem; margin-bottom: 16px; font-weight: 800; }
.about-text p { color: var(--text-muted); margin-bottom: 14px; }

.about-affiliation {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; font-size: 0.88rem; color: var(--text-dark, #1c2b1e) !important;
}
.about-affiliation svg { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--gold); margin-top: 1px; }
.about-affiliation a { color: var(--green-dark); font-weight: 700; text-decoration: underline; }
.about-affiliation a:hover { color: var(--green); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.value-card strong { display: block; color: var(--green-dark); margin-bottom: 8px; }
.value-card p { font-size: 0.88rem; color: var(--text-muted); }

.vision-mission-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.vision-mission-grid .value-card { text-align: start; padding: 30px 28px; }
.vision-mission-grid .value-card strong { font-size: 1.1rem; }

.org-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.org-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  border: 1px solid var(--border);
}
.org-avatar {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--gold));
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800; font-size: 1.3rem;
  overflow: hidden;
}
.org-avatar img { width: 100%; height: 100%; object-fit: cover; }
.org-avatar-wrap { position: relative; width: 74px; margin: 0 auto 14px; }
.org-avatar-wrap .org-avatar { margin: 0; }
.org-adjoint-badge {
  position: absolute; bottom: -2px; right: -8px;
  width: 30px; height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800; font-size: 0.6rem;
}
.org-adjoint-badge img { width: 100%; height: 100%; object-fit: cover; }
.org-card h4 { color: var(--green-dark); margin-bottom: 4px; }
.org-card span { font-size: 0.82rem; color: var(--text-muted); }

/* ===== Organigramme pyramidal (Président > Vice-présidents > Secrétariats) ===== */
.gouvernance-wrap { display: flex; flex-direction: column; gap: 40px; }
.orgchart-scroll { overflow-x: auto; padding-bottom: 8px; }
.orgchart, .orgchart ul {
  list-style: none; margin: 0; padding: 24px 0 0; position: relative;
  display: flex; justify-content: center;
}
.orgchart { padding-top: 0; }
.orgchart li {
  position: relative; padding: 24px 14px 0; display: flex; flex-direction: column; align-items: center;
}
.orgchart li::before, .orgchart li::after {
  content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 24px;
  border-top: 2px solid var(--border);
}
.orgchart li::after { right: auto; left: 50%; border-left: 2px solid var(--border); }
.orgchart li:only-child { padding-top: 0; }
.orgchart li:only-child::before, .orgchart li:only-child::after { display: none; }
.orgchart li:first-child::before, .orgchart li:last-child::after { border: none; }
.orgchart li:last-child::before { border-right: 2px solid var(--border); border-radius: 0 6px 0 0; }
.orgchart li:first-child::after { border-radius: 6px 0 0 0; }
.orgchart > li { padding-top: 0; }
.orgchart > li::before, .orgchart > li::after { display: none; }
.orgchart ul::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 0; height: 24px;
  border-left: 2px solid var(--border);
}
.orgchart .org-card { width: 190px; margin: 0; }
.org-card-president { background: linear-gradient(160deg, var(--green), var(--green-dark)); border-color: var(--green-dark); }
.org-card-president h4, .org-card-president span { color: var(--white); }
.org-card-president .org-avatar { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.org-card-vice_president { border-color: var(--gold); width: 170px; }
.org-card-secretariat { padding: 16px; width: 150px; }
.org-card-secretariat .org-avatar { width: 54px; height: 54px; font-size: 1rem; }
.org-card-secretariat h4 { font-size: 0.9rem; }
.org-card-secretariat span { font-size: 0.75rem; }
.gouvernance-autres-title { font-size: 1rem; font-weight: 800; color: var(--green-dark); margin-bottom: 16px; text-align: center; }

/* ===== Sondage express (avis du grand public) ===== */
.sondage-express-card {
  max-width: 560px; margin: 0 auto; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow); text-align: start;
}
.sondage-express-question { font-size: 1.1rem; font-weight: 800; color: var(--green-dark); margin-bottom: 18px; }
.sondage-express-options { display: flex; flex-direction: column; gap: 10px; }
.sondage-express-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: start; background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 16px; cursor: pointer; font-family: inherit;
  font-size: 0.9rem; color: var(--text-dark); transition: background .15s ease, border-color .15s ease;
}
.sondage-express-option:hover { background: rgba(4,56,114,.06); border-color: var(--green); }
.sondage-express-results { display: flex; flex-direction: column; gap: 12px; }
.sondage-express-result-row { font-size: 0.88rem; }
.sondage-express-result-label { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--text-dark); }
.sondage-express-result-track { height: 8px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.sondage-express-result-fill { height: 100%; border-radius: 999px; background: var(--gold); transition: width .8s cubic-bezier(.16,.8,.24,1); }
.sondage-express-total { margin-top: 16px; font-size: 0.78rem; color: var(--text-muted); text-align: center; }

/* ===== Témoignages d'écoles membres ===== */
.temoignages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.temoignage-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.temoignage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.temoignage-quote-icon { width: 28px; height: 28px; color: var(--gold); margin-bottom: 12px; }
.temoignage-text {
  font-size: 0.92rem; color: var(--text-dark); line-height: 1.65; font-style: italic;
  margin-bottom: 20px; flex: 1;
}
.temoignage-author { display: flex; align-items: center; gap: 12px; }
.temoignage-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--green), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800; font-size: 0.95rem;
}
.temoignage-avatar img { width: 100%; height: 100%; object-fit: cover; }
.temoignage-author-name { font-weight: 700; color: var(--green-dark); font-size: 0.88rem; }
.temoignage-author-role { font-size: 0.78rem; color: var(--text-muted); }

/* ===== Objectifs, principes et moyens ===== */
.opm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.opm-block {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow);
}
.opm-block h3 { color: var(--green-dark); font-size: 1.05rem; margin-bottom: 16px; }
.opm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.opm-list li {
  position: relative; padding-inline-start: 22px; font-size: 0.9rem; color: var(--text-dark); line-height: 1.5;
}
.opm-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}

.about-media-logo {
  background: var(--white);
  border-radius: 50%;
  overflow: hidden;
  width: 62%;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}
.about-media-logo img { width: 100%; height: 100%; object-fit: contain; }

.historique-grid, .fondateurs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.historique-card, .fondateur-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}
.historique-photo, .fondateur-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid var(--gold-light);
}
.fondateur-photo { border-color: var(--gold); }
.historique-card h4, .fondateur-card h4 { color: var(--green-dark); margin-bottom: 2px; }
.historique-period, .fondateur-role { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.historique-mot, .fondateur-mot { font-size: 0.88rem; color: var(--text-dark); font-style: italic; }
.historique-mot::before, .fondateur-mot::before { content: "\201C"; }
.historique-mot::after, .fondateur-mot::after { content: "\201D"; }

@media (max-width: 900px) {
  .historique-grid, .fondateurs-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .historique-grid, .fondateurs-grid { grid-template-columns: 1fr; }
}

/* ===== Contact page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 46px;
}

.contact-info-card {
  background: var(--green-dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 36px 30px;
}
.contact-info-card h3 { font-size: 1.2rem; margin-bottom: 20px; color: var(--gold-light); }
.contact-row { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-row svg { width: 22px; height: 22px; stroke: var(--gold-light); flex-shrink: 0; margin-top: 2px; }
.contact-row strong { display: block; font-size: 0.85rem; color: rgba(255,255,255,.65); margin-bottom: 2px; }
.contact-row span, .contact-row a { font-size: 0.95rem; }

.social-row { display: flex; gap: 10px; margin-top: 26px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
}
.social-row svg { width: 17px; height: 17px; stroke: var(--white); }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--cream);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--green);
}
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; }

.form-group.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input[type="checkbox"] {
  width: auto; flex-shrink: 0; margin-top: 3px; padding: 0; accent-color: var(--green); cursor: pointer;
}
.checkbox-row label { font-size: 0.85rem; font-weight: 500; line-height: 1.5; cursor: pointer; }

.diplome-verif-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 0 auto;
}
.diplome-verif-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.diplome-verif-tab {
  flex: 1; min-width: 160px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--cream); color: var(--text-muted); font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.diplome-verif-tab.active { background: var(--green); border-color: var(--green); color: var(--white); }
.diplome-verif-badge {
  padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 0.95rem; margin-top: 18px;
}
.diplome-verif-badge-ok { background: rgba(15,122,76,.12); color: var(--green); }
.diplome-verif-badge-ko { background: rgba(192,57,43,.1); color: #c0392b; }
.diplome-verif-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }
.diplome-verif-details { margin-top: 4px; }
.diplome-verif-details h3 { font-size: 1.1rem; color: var(--green-dark); margin: 10px 0 2px; }
.diplome-verif-sub { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 10px; }
.diplome-verif-details dl { margin: 0; font-size: 0.85rem; }
.diplome-verif-details dl div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.diplome-verif-details dl div:last-child { border-bottom: none; }
.diplome-verif-details dt { color: var(--text-muted); }
.diplome-verif-details dd { margin: 0; font-weight: 600; color: var(--text-dark); text-align: right; }
.diplome-verif-sep { border: none; border-top: 1px dashed var(--border); margin: 18px 0; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 320px;
  margin-top: 50px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ===== Footer ===== */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.85);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--white); font-weight: 700; font-size: 1.1rem; }
.footer-brand svg, .footer-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.site-footer ul li { margin-bottom: 10px; font-size: 0.88rem; }
.site-footer ul li a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 15px; height: 15px; stroke: var(--white); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; font-size: 0.82rem; color: rgba(255,255,255,.6);
  flex-wrap: wrap; gap: 10px;
}

/* ===== Documents publics ===== */
.doc-category { margin-bottom: 48px; }
.doc-category h2 { font-size: 1.25rem; color: var(--green-dark); font-weight: 800; margin-bottom: 20px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.doc-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start;
}
.doc-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  display: flex; align-items: center; justify-content: center;
}
.doc-icon svg { width: 22px; height: 22px; stroke: var(--gold-light); }
.doc-card h3 { font-size: 0.98rem; color: var(--green-dark); margin-bottom: 6px; }
.doc-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.doc-card .doc-meta { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 10px; }
.doc-card a.btn { font-size: 0.82rem; padding: 8px 16px; }

/* ===== Ressources officielles (manuels, programmes, enseignement islamique) ===== */
.ressource-officielle-group { margin-bottom: 44px; }
.ressource-officielle-group:last-child { margin-bottom: 0; }
.ressource-officielle-group-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--gold);
}
.ressource-officielle-group-head h3 {
  font-size: 1.15rem; font-weight: 800; color: var(--green-dark); margin: 0;
}
/* Défilement horizontal plutôt qu'une grille qui s'allonge sans limite : l'espace
   occupé reste constant quel que soit le nombre de ressources publiées, on fait
   défiler au lieu d'empiler des rangées supplémentaires. */
.ressource-officielle-grid {
  display: flex; gap: 22px;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ressource-officielle-card {
  flex: 0 0 220px; scroll-snap-align: start;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.ressource-officielle-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.ressource-officielle-photo { position: relative; width: 100%; aspect-ratio: 3 / 4; background: var(--cream); overflow: hidden; }
.ressource-officielle-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ressource-officielle-langue {
  position: absolute; top: 10px; inset-inline-end: 10px; background: var(--gold); color: var(--green-dark);
  font-size: 0.72rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; letter-spacing: .02em;
}
.ressource-officielle-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ressource-officielle-body h4 { font-size: 0.95rem; color: var(--green-dark); margin: 0; line-height: 1.35; }
.ressource-officielle-body p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.ressource-officielle-download {
  margin-top: auto; align-self: flex-start; font-size: 0.8rem; font-weight: 700; color: var(--green);
  border: 1px solid var(--green); border-radius: 999px; padding: 6px 16px; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.ressource-officielle-download:hover { background: var(--green); color: var(--white); }

/* Sélecteur de niveau scolaire (manuel_scolaire) : grille de boutons CP1->Tle, puis
   choix de la langue, avant d'afficher les manuels correspondants dans la grille
   .ressource-officielle-grid existante. */
.niveau-picker-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.niveau-btn {
  flex: 0 0 auto; background: var(--white); border: 1.5px solid var(--border);
  color: var(--green-dark); font-weight: 700; font-size: 0.88rem;
  padding: 8px 18px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.niveau-btn:hover { border-color: var(--green); }
.niveau-btn.active { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }

.niveau-langue-picker { margin-bottom: 18px; }
.niveau-langue-choisir { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 10px; }
.niveau-langue-buttons { display: flex; gap: 10px; }
.niveau-langue-btn {
  flex: 0 0 auto; background: var(--cream); border: 1.5px solid var(--gold);
  color: var(--green-dark); font-weight: 700; font-size: 0.85rem;
  padding: 7px 20px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.niveau-langue-btn:hover { background: var(--gold); }
.niveau-langue-btn.active { background: var(--gold); color: var(--green-dark); }

/* ===== Écoles affiliées ===== */
.ecoles-tabs-row {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.ecoles-tabs {
  display: flex; gap: 8px; background: var(--cream);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px; width: fit-content;
}
.ecoles-tab {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 0.86rem; color: var(--text-muted);
  padding: 9px 20px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.ecoles-tab:hover { color: var(--green); }
.ecoles-tab.active { background: var(--green); color: var(--white); }

.ecoles-view-toggle {
  display: flex; gap: 8px; background: var(--cream);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px; width: fit-content;
}
.ecoles-view-btn {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 0.82rem; color: var(--text-muted);
  padding: 8px 16px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.ecoles-view-btn:hover { color: var(--green); }
.ecoles-view-btn.active { background: var(--green-dark); color: var(--white); }

.ecoles-toolbar {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  margin-bottom: 28px; padding: 18px 20px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.ecoles-search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.ecoles-search input {
  width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.9rem; font-family: inherit; background: var(--cream);
}
.ecoles-search input:focus { outline: none; border-color: var(--green); background: var(--white); }
.ecoles-search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: var(--text-muted); pointer-events: none;
}
.ecoles-region-select {
  padding: 10px 34px 10px 16px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; font-family: inherit; background: var(--cream);
  color: var(--text-dark); cursor: pointer; max-width: 240px;
}
.ecoles-region-select:focus { outline: none; border-color: var(--green); background: var(--white); }

.ecoles-count { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.ecoles-count strong { color: var(--green-dark); }
.ecoles-regions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px;
}
.ecoles-regions a {
  font-size: 0.78rem; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  background: var(--cream); color: var(--green-dark); border: 1px solid var(--border);
}
.ecoles-regions a:hover { background: var(--green); color: var(--white); border-color: var(--green); }
.ecole-zone {
  margin-bottom: 14px; scroll-margin-top: 90px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--white); overflow: hidden;
}
.ecole-zone-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; background: none; border: none; cursor: pointer; font-family: inherit;
  text-align: left;
}
[dir="rtl"] .ecole-zone-header { text-align: right; }
.ecole-zone-header:hover { background: var(--cream); }
.ecole-zone-name { font-size: 1.05rem; color: var(--green-dark); font-weight: 800; }
.ecole-zone-count {
  font-size: 0.72rem; font-weight: 700; color: var(--green-dark); background: var(--gold-light);
  border-radius: 999px; padding: 3px 12px; margin-inline-start: auto; margin-inline-end: 12px; white-space: nowrap;
}
.ecole-zone-header svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--green); transition: transform .2s ease; }
.ecole-zone.open > .ecole-zone-header svg { transform: rotate(180deg); }
.ecole-zone-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.ecole-zone.open > .ecole-zone-body { max-height: 6000px; }
.ecole-zone-body-inner { padding: 4px 22px 20px; display: flex; flex-direction: column; gap: 10px; }

.ecole-commune { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--cream); overflow: hidden; }
.ecole-commune-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left;
}
[dir="rtl"] .ecole-commune-header { text-align: right; }
.ecole-commune-header:hover { background: rgba(4,56,114,.06); }
.ecole-commune-name { font-size: 0.88rem; color: var(--text-dark); font-weight: 700; }
.ecole-commune-count { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; margin-inline-start: auto; margin-inline-end: 10px; }
.ecole-commune-header svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-muted); transition: transform .2s ease; }
.ecole-commune.open > .ecole-commune-header svg { transform: rotate(180deg); }
.ecole-commune-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.ecole-commune.open > .ecole-commune-body { max-height: 4000px; }
.ecole-commune-body-inner { padding: 4px 16px 16px; }

.ecole-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.ecole-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); display: flex; gap: 13px; align-items: center;
  transition: transform .15s, box-shadow .15s;
}
.ecole-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(10,61,99,.12); }
.ecole-card img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--cream);
}
.ecole-card-body h3 { font-size: 0.92rem; color: var(--green-dark); line-height: 1.3; margin-bottom: 4px; }
.ecole-card-body span.niveau {
  font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em;
}
.ecole-card-body span.agrement-badge {
  display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px;
  background: rgba(4,56,114,.12); color: var(--green); font-size: 0.68rem; font-weight: 700;
}
.ecole-card-body span.agrement-badge.en_cours { background: rgba(224,165,44,.16); color: #b8860b; }
.ecole-card-body span.agrement-badge.expire { background: rgba(220,53,69,.14); color: #dc3545; }
.ecole-card-body span.ecole-modele-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; margin-inline-start: 6px;
  padding: 2px 10px; border-radius: 999px; background: rgba(224,165,44,.16); color: #8a6510;
  font-size: 0.68rem; font-weight: 700;
}
.ecole-card-body span.ecole-modele-badge svg { width: 11px; height: 11px; }
.ecole-card-body span.ecole-engagee-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; margin-inline-start: 6px;
  padding: 2px 10px; border-radius: 999px; background: rgba(4,56,114,.10); color: var(--green);
  font-size: 0.68rem; font-weight: 700;
}
.ecole-card-body span.ecole-engagee-badge svg { width: 11px; height: 11px; }
#ecoles-empty { display: none; text-align: center; color: var(--text-muted); margin-top: 30px; }

/* ===== Calendrier scolaire national ===== */
.calendrier-scolaire-list { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.calendrier-scolaire-item {
  display: flex; align-items: flex-start; gap: 18px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 22px; box-shadow: var(--shadow);
}
.calendrier-scolaire-date { flex-shrink: 0; min-width: 120px; font-weight: 700; color: var(--green); font-size: 0.88rem; }
.calendrier-scolaire-body h3 { font-size: 1.05rem; color: var(--green-dark); margin-bottom: 6px; }
.calendrier-scolaire-body p { color: var(--text-muted); font-size: 0.88rem; margin: 6px 0 0; }
.calendrier-scolaire-type { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; }
.calendrier-scolaire-type.rentree { background: rgba(4,56,114,.12); color: var(--green); }
.calendrier-scolaire-type.vacances { background: rgba(224,165,44,.16); color: #8a6510; }
.calendrier-scolaire-type.examen { background: rgba(220,53,69,.14); color: #dc3545; }
.calendrier-scolaire-type.autre { background: rgba(88,112,127,.12); color: var(--text-muted); }

/* ===== Actualités ===== */
.news-read-more {
  display: inline-block; margin-top: 10px; font-weight: 700; font-size: 0.85rem; color: var(--green);
}

.actualites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.actualite-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.actualite-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.actualite-card-media { height: 170px; background: var(--cream); overflow: hidden; }
.actualite-card-media img { width: 100%; height: 100%; object-fit: cover; }
.actualite-card-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.actualite-card-noimg svg { width: 40px; height: 40px; color: var(--border); }

.actualite-card-body { padding: 18px 20px; }
.actualite-card-body h3 { font-size: 1.02rem; color: var(--green-dark); margin: 6px 0 8px; }
.actualite-card-body p { font-size: 0.88rem; color: var(--text-muted); }

#actualites-empty { display: none; text-align: center; color: var(--text-muted); margin-top: 20px; }

.actualite-detail-image {
  width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px;
}
#actualite-detail h1 { font-size: 1.8rem; color: var(--green-dark); margin: 10px 0 20px; }
.actualite-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tts-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cream); border: 1px solid var(--border); color: var(--green-dark);
  border-radius: 999px; padding: 8px 16px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: background .15s ease;
}
.tts-btn:hover { background: rgba(4,56,114,.08); }
.actualite-detail-body { font-size: 1.02rem; line-height: 1.8; color: var(--text-dark); max-width: 760px; }

/* ===== Galerie photo ===== */
.galerie-grid {
  columns: 4 260px;
  column-gap: 18px;
}
.galerie-item {
  break-inside: avoid;
  margin: 0 0 18px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}
.galerie-item img { width: 100%; display: block; }
.galerie-item figcaption { padding: 10px 14px; font-size: 0.82rem; color: var(--text-muted); }
#galerie-empty { display: none; text-align: center; color: var(--text-muted); margin-top: 20px; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.video-card {
  background: var(--white); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--cream); overflow: hidden; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,61,99,.28); transition: background .2s ease;
}
.video-play-icon svg { width: 52px; height: 52px; color: #fff; filter: drop-shadow(0 2px 10px rgba(0,0,0,.45)); }
.video-card:hover .video-play-icon { background: rgba(10,61,99,.45); }
.video-body { padding: 14px 18px 18px; }
.video-body h4 { font-size: 0.95rem; color: var(--green-dark); margin: 0 0 4px; }
.video-body p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
#video-empty { display: none; text-align: center; color: var(--text-muted); margin-top: 20px; }

/* ===== FAQ ===== */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--green-dark);
}
[dir="rtl"] .faq-question { text-align: right; }
.faq-question svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .2s ease; color: var(--green); }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p { padding: 0 20px 20px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }
#faq-empty { display: none; text-align: center; color: var(--text-muted); margin-top: 20px; }

.transparence-note {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .missions-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .steps-row { grid-template-columns: repeat(2, 1fr); }
  .initiatives-grid { grid-template-columns: 1fr; }
  .news-item, .news-item.reverse { grid-template-columns: 1fr; }
  .news-item.reverse .news-media { order: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .org-grid { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .opm-grid { grid-template-columns: 1fr 1fr; }
  .temoignages-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .evenements-grid { grid-template-columns: 1fr; }
}

/* Palier intermédiaire : la barre horizontale reste visible (pas de menu ☰)
   mais tout est resserré pour tenir sur les petits ordinateurs portables. */
@media (max-width: 1460px) and (min-width: 1071px) {
  .nav { padding: 12px 16px; gap: 8px; }
  .brand-text small { display: none; }
  .brand { font-size: 0.95rem; gap: 8px; }
  .brand svg, .brand-logo { width: 32px; height: 32px; }
  .nav-links { gap: 8px; }
  .nav-pill { gap: 0; padding: 3px; }
  .nav-pill a { padding: 7px 8px; font-size: 0.74rem; }
  .dropdown-toggle { width: 20px; height: 20px; margin-inline-start: -4px; }
  .dropdown-caret { width: 8px; height: 8px; }
  .nav-utility a { font-size: 0.74rem; }
  .nav-utility .nav-don-link { display: none; }
  .nav-search-trigger { width: 32px; height: 32px; }
}

@media (max-width: 1070px) {
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: stretch; padding: 20px 24px; gap: 18px;
    box-shadow: var(--shadow); display: none; max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-pill { flex-direction: column; align-items: stretch; background: none; border: none; padding: 0; gap: 4px; }
  .nav-pill li { align-items: stretch; flex-wrap: wrap; }
  .nav-pill a { padding: 12px 16px; flex: 1; }
  .nav-pill a.active { background: rgba(4,56,114,.10); }
  .dropdown-toggle { width: 44px; height: auto; border-radius: 0; margin-inline-start: 0; }
  .nav-dropdown {
    position: static;
    display: none;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    background: var(--cream);
    border: none;
    box-shadow: none;
    border-radius: 10px;
    margin: 0 0 6px 16px;
    padding: 4px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .nav-pill li.dropdown-open .nav-dropdown,
  .nav-pill li:hover .nav-dropdown,
  .nav-pill li:focus-within .nav-dropdown {
    position: static;
    left: auto;
    transform: none;
    display: none;
  }
  .nav-pill li.dropdown-open .nav-dropdown { display: block; }
  .nav-utility { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
  .nav-cta { text-align: center; }
}

@media (max-width: 680px) {
  .missions-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .org-grid, .values-grid, .opm-grid, .vision-mission-grid, .temoignages-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
}

/* ===== Arabe (RTL) ===== */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .timeline::before { left: auto; right: 29px; }
[dir="rtl"] .timeline-item { padding-left: 0; padding-right: 76px; }
[dir="rtl"] .timeline-dot { left: auto; right: 20px; }
[dir="rtl"] .timeline-card { border-left: none; border-right: 4px solid var(--green); }
[dir="rtl"] .timeline-item.past .timeline-card { border-left-color: transparent; border-right-color: var(--text-muted); }
[dir="rtl"] .breadcrumb a { margin-left: 4px; }
[dir="rtl"] .lang-switch { direction: ltr; }

/* ===== LECIM cinematic hero ===== */
.hero.hero-cinematic {
  position: relative;
  width: 100%;
  min-height: 88vh;
  background-color: #071d2f;
  background-image: url("../img/lecim-hero-wide.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}
.hero.hero-cinematic::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg,
      rgba(3,18,31,.88) 0%,
      rgba(3,18,31,.67) 28%,
      rgba(3,18,31,.38) 50%,
      rgba(3,18,31,.14) 72%,
      rgba(3,18,31,.04) 100%),
    linear-gradient(0deg,
      rgba(3,18,31,.46) 0%,
      rgba(3,18,31,.08) 48%,
      rgba(3,18,31,.02) 100%);
}
/* Le ::after reste disponible pour la photo de fond modifiable par l'admin
   (voir .hero.has-bg-image::after plus haut) — seulement masque par defaut,
   quand aucune photo n'est configuree, pour laisser voir l'image livree
   par defaut (background-image ci-dessus). */
.hero.hero-cinematic::after { display: none; }
.hero.hero-cinematic.has-bg-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  animation: heroSlowZoom 26s ease-in-out infinite alternate;
}

.hero.hero-cinematic .hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6vw;
  gap: 0;
}
[dir="rtl"] .hero.hero-cinematic .hero-inner {
  justify-content: flex-start;
}

.hero.hero-cinematic .hero-text {
  width: min(620px, 100%);
  padding: 34px 34px 36px;
  border-radius: 26px;
  background: rgba(4,24,40,.42);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: right;
}
.hero.hero-cinematic .hero-badge {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
  color: #fff;
}
.hero.hero-cinematic h1 {
  color: #fff;
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
  line-height: 1.12;
  text-shadow: 0 3px 24px rgba(0,0,0,.36);
}
.hero.hero-cinematic h1 span { color: #f2b633; }
.hero.hero-cinematic p {
  max-width: 600px;
  font-size: 1.08rem;
  line-height: 1.95;
  color: rgba(255,255,255,.92);
}
.hero.hero-cinematic .hero-actions { justify-content: flex-start; }

.hero.hero-cinematic .hero-stats {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 48px));
  margin: -28px auto 28px;
  gap: 12px;
}
.hero.hero-cinematic .stat-card {
  background: rgba(4,24,40,.52);
  border-color: rgba(255,255,255,.14);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero.hero-cinematic .stat-card strong { color: #f2b633; }

@media (max-width: 900px) {
  .hero.hero-cinematic {
    min-height: 86vh;
    background-position: 58% center;
  }
  .hero.hero-cinematic .hero-inner {
    min-height: 62vh;
    align-items: flex-end;
    padding: 0 18px 28px;
  }
  .hero.hero-cinematic .hero-text {
    width: 100%;
    padding: 24px 22px 26px;
    border-radius: 18px;
    background: rgba(4,24,40,.56);
  }
  .hero.hero-cinematic h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .hero.hero-cinematic .hero-stats {
    width: calc(100% - 36px);
    margin: 12px auto 18px;
  }
}
@media (max-width: 560px) {
  .hero.hero-cinematic {
    min-height: 92vh;
    background-position: 62% center;
  }
  .hero.hero-cinematic .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 901px) {
  .hero.hero-cinematic .hero-inner {
    justify-content: flex-start !important;
    align-items: center;
    padding-inline: 5.5vw 4vw;
  }

  [dir="rtl"] .hero.hero-cinematic .hero-inner {
    justify-content: flex-start !important;
  }

  .hero.hero-cinematic .hero-text {
    width: min(860px, 54vw);
    min-height: 260px;
    padding: 26px 40px 30px;
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(3,18,31,.42), rgba(3,18,31,.24));
    border: 1px solid rgba(255,255,255,.18);
    box-shadow:
      0 24px 64px rgba(0,0,0,.20),
      inset 0 1px 0 rgba(255,255,255,.07);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
  }

  .hero.hero-cinematic .hero-text::before {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: 0 0 14px auto;
    border-radius: 999px;
    background: linear-gradient(90deg, #f2b633, rgba(242,182,51,.35));
  }

  .hero.hero-cinematic .hero-badge {
    padding: 7px 13px;
    font-size: .82rem;
    margin-bottom: 6px;
  }

  .hero.hero-cinematic h1 {
    max-width: 760px;
    margin: 8px 0 12px;
    font-size: clamp(2.05rem, 3.15vw, 3.35rem);
    line-height: 1.18;
  }

  .hero.hero-cinematic .hero-text p {
    max-width: 760px;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.85;
  }

  .hero.hero-cinematic .hero-actions {
    gap: 12px;
    margin-top: 4px;
  }

  .hero.hero-cinematic .hero-actions .btn {
    min-width: 150px;
    justify-content: center;
  }
}

@media (min-width: 1400px) {
  .hero.hero-cinematic .hero-text {
    width: min(900px, 52vw);
    min-height: 270px;
    padding: 28px 44px 32px;
  }
}

@media (max-width: 900px) {
  .hero.hero-cinematic .hero-text {
    width: 100%;
    min-height: auto;
    border-radius: 18px;
    background: rgba(4,24,40,.42);
    border-color: rgba(255,255,255,.16);
  }
}

html[lang="fr"] .hero.hero-cinematic .hero-text {
  text-align: left;
}

html[lang="fr"] .hero.hero-cinematic .hero-text::before {
  margin-left: 0;
  margin-right: auto;
}

html[lang="fr"] .hero.hero-cinematic .hero-actions {
  justify-content: flex-start;
}


/* ===== Arabic typography system ===== */
html[lang="ar"],
html[dir="rtl"] {
  font-family: "Cairo", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

html[lang="ar"] body,
html[dir="rtl"] body,
html[lang="ar"] button,
html[dir="rtl"] button,
html[lang="ar"] input,
html[dir="rtl"] input,
html[lang="ar"] textarea,
html[dir="rtl"] textarea,
html[lang="ar"] select,
html[dir="rtl"] select {
  font-family: "Cairo", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: "Cairo", "Noto Sans Arabic", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

html[lang="ar"] .hero h1,
html[dir="rtl"] .hero h1 {
  font-family: "Cairo", "Noto Sans Arabic", sans-serif;
  font-weight: 800;
  letter-spacing: -.02em;
}

html[lang="ar"] .hero-text p,
html[dir="rtl"] .hero-text p {
  font-family: "Noto Sans Arabic", "Cairo", sans-serif;
  font-weight: 500;
  line-height: 2;
}

html[lang="ar"] .nav a,
html[lang="ar"] .btn,
html[lang="ar"] .brand-text,
html[lang="ar"] .hero-badge,
html[dir="rtl"] .nav a,
html[dir="rtl"] .btn,
html[dir="rtl"] .brand-text,
html[dir="rtl"] .hero-badge {
  font-family: "Cairo", "Noto Sans Arabic", sans-serif;
}

html[lang="ar"] .nav a,
html[lang="ar"] .btn,
html[dir="rtl"] .nav a,
html[dir="rtl"] .btn {
  font-weight: 600;
}

html[lang="ar"] p,
html[lang="ar"] li,
html[lang="ar"] small,
html[lang="ar"] label,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select,
html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] small,
html[dir="rtl"] label,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  font-family: "Noto Sans Arabic", "Cairo", sans-serif;
}


/* ===== Arabic link typography hardening ===== */
html[lang="ar"] a,
html[dir="rtl"] a,
html[lang="ar"] a *,
html[dir="rtl"] a *,
html[lang="ar"] button,
html[dir="rtl"] button,
html[lang="ar"] button *,
html[dir="rtl"] button *,
html[lang="ar"] .nav,
html[dir="rtl"] .nav,
html[lang="ar"] .nav *,
html[dir="rtl"] .nav *,
html[lang="ar"] footer,
html[dir="rtl"] footer,
html[lang="ar"] footer *,
html[dir="rtl"] footer *,
html[lang="ar"] .site-footer,
html[dir="rtl"] .site-footer,
html[lang="ar"] .site-footer *,
html[dir="rtl"] .site-footer *,
html[lang="ar"] .nav-dropdown,
html[dir="rtl"] .nav-dropdown,
html[lang="ar"] .nav-dropdown *,
html[dir="rtl"] .nav-dropdown * {
  font-family: "Cairo", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
}

html[lang="ar"] a,
html[dir="rtl"] a,
html[lang="ar"] button,
html[dir="rtl"] button {
  letter-spacing: 0 !important;
}

/* ===== Animations & micro-interactions ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Respiration lente de la photo de fond du hero — effet calme, pas un zoom marqué.
   Les badges flottants au-dessus (hero-float-badge) ont déjà leur propre animation
   douce (floatBadge, plus bas dans ce fichier) — inutile d'en ajouter une autre ici. */
@keyframes heroSlowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

body { animation: fadeIn .5s ease both; }

/* Entrée animée de la bannière d'accueil */
.hero-badge { animation: fadeInUp .7s ease both; }
.hero-text h1 { animation: fadeInUp .7s ease .1s both; }
.hero-text p { animation: fadeInUp .7s ease .2s both; }
.hero-actions { animation: fadeInUp .7s ease .3s both; }
.hero-visual { animation: fadeInUp .8s ease .25s both; }

/* Ombre progressive de l'en-tête au défilement */
.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 28px rgba(10,61,99,.12); }

/* Révélation au défilement (classe ajoutée par script.js — un visiteur sans
   JavaScript voit directement le contenu final, jamais de section masquée) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,.8,.24,1), transform .7s cubic-bezier(.16,.8,.24,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Micro-interactions sur les boutons */
.btn { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.btn:hover { box-shadow: 0 10px 22px rgba(10,61,99,.16); }
.btn:active { transform: translateY(0) scale(.96); box-shadow: none; }

/* Lift au survol pour l'ensemble des cartes du site */
.evenement-card,
.initiative-card,
.doc-card,
.opm-block,
.historique-card,
.fondateur-card,
.value-card,
.actualite-card,
.faq-item {
  transition: transform .25s ease, box-shadow .25s ease;
}
.evenement-card:hover,
.initiative-card:hover,
.doc-card:hover,
.opm-block:hover,
.historique-card:hover,
.fondateur-card:hover,
.value-card:hover,
.faq-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Sous-lignage animé des liens texte */
.news-read-more, .initiative-partenaire-link {
  position: relative;
  transition: color .15s ease;
}
.news-read-more::after, .initiative-partenaire-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: currentColor;
  transition: right .25s ease;
}
.news-read-more:hover::after, .initiative-partenaire-link:hover::after { right: 0; }

/* Icônes d'avatar : leger zoom au survol des cartes d'organigramme et de galerie */
.org-card, .galerie-item { transition: transform .25s ease, box-shadow .25s ease; }
.org-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.org-card .org-avatar, .org-card .org-avatar-wrap { transition: transform .25s ease; }
.org-card:hover .org-avatar, .org-card:hover .org-avatar-wrap { transform: scale(1.06); }
.galerie-item:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }

/* ===== Animations avancées : dégradé, flottement, tilt, blur-up, progression ===== */

/* Effet "verre" + légère respiration sur les badges flottants du hero */
.hero-float-badge {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: floatBadge 5s ease-in-out infinite;
}
.hero-float-badge-2 { animation-delay: 1.2s; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Machine à écrire sur le mot mis en avant du titre du hero */
.hero-text h1 span {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  border-inline-end: 3px solid var(--gold);
  animation: heroTypewriter 1.4s steps(11, end) .9s both, heroCaretBlink .8s step-end infinite 2.3s;
}
@keyframes heroTypewriter {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes heroCaretBlink {
  0%, 100% { border-color: var(--gold); }
  50% { border-color: transparent; }
}

/* Parallaxe douce sur l'illustration du hero (translation appliquée en JS) */
.hero-visual { will-change: transform; }

/* Bascule 3D au survol des cartes (rotation appliquée en JS via transform inline) */
.tilt-card { transform-style: preserve-3d; will-change: transform; }

/* Image en "blur-up" : nette progressivement une fois chargée */
img.img-blur-up { filter: blur(14px); transition: filter .6s ease; }
img.img-blur-up.is-loaded { filter: blur(0); }

/* Barre de progression de lecture, fixée en haut de page */
.reading-progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--green));
  z-index: 999; transition: width .1s linear;
}

/* Bouton "retour en haut" */
.back-to-top {
  position: fixed; bottom: 26px; inset-inline-end: 26px; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green); color: var(--white); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease, visibility .3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green-light); }
.back-to-top svg { width: 20px; height: 20px; }

/* Assistant automatisé (FAQ) — bulle de discussion flottante, toutes les pages */
#faq-assistant-toggle {
  position: fixed; bottom: 26px; inset-inline-start: 26px; z-index: 149;
  width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--green); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
#faq-assistant-toggle:hover { transform: translateY(-2px) scale(1.05); background: var(--green-light); }
#faq-assistant-toggle svg { width: 24px; height: 24px; }
@media (max-width: 640px) {
  #faq-assistant-toggle { bottom: 20px; inset-inline-start: 16px; width: 46px; height: 46px; }
}

#faq-assistant-panel {
  position: fixed; bottom: 88px; inset-inline-start: 26px; z-index: 149;
  width: 320px; max-width: calc(100vw - 40px); max-height: 440px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.98);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
#faq-assistant-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
@media (max-width: 640px) { #faq-assistant-panel { bottom: 74px; inset-inline-start: 16px; } }

.faq-assistant-header {
  background: var(--green); color: var(--white); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.faq-assistant-header strong { font-size: 0.92rem; }
.faq-assistant-header button {
  background: none; border: none; color: var(--white); cursor: pointer;
  opacity: .8; font-size: 1.1rem; line-height: 1; padding: 2px;
}
.faq-assistant-header button:hover { opacity: 1; }

#faq-assistant-messages {
  flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
  min-height: 180px;
}
.faq-msg { max-width: 88%; padding: 9px 13px; border-radius: 14px; font-size: 0.85rem; line-height: 1.5; }
.faq-msg-bot { background: var(--cream); color: var(--text-dark); align-self: flex-start; border-end-start-radius: 3px; }
.faq-msg-user { background: var(--green); color: var(--white); align-self: flex-end; border-end-end-radius: 3px; }
.faq-msg-bot a { color: var(--green); font-weight: 600; text-decoration: underline; }

#faq-assistant-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
#faq-assistant-input {
  flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px;
  font-size: 0.85rem; font-family: inherit;
}
#faq-assistant-form button {
  background: var(--green); color: var(--white); border: none; border-radius: 999px;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
#faq-assistant-form button svg { width: 17px; height: 17px; }
[dir="rtl"] #faq-assistant-form button svg { transform: scaleX(-1); }

/* Bande d'informations flash déroulante, en haut de toutes les pages, visible une fois
   qu'au moins un message actif est configuré par l'admin */
#flash-info-bar {
  position: sticky; top: 0; z-index: 101;
  display: flex; align-items: stretch;
  background: var(--white); border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.flash-info-badge {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: var(--gold); color: var(--green-dark);
  font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .5px;
  padding: 8px 16px; white-space: nowrap;
}
.flash-info-badge svg { width: 13px; height: 13px; }
.flash-info-track { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.flash-info-content { display: inline-block; animation: flashInfoScroll 28s linear infinite; }
.flash-info-track:hover .flash-info-content { animation-play-state: paused; }
.flash-info-item { display: inline-block; color: var(--text-dark); font-size: 0.85rem; font-weight: 600; padding: 8px 0; }
.flash-info-item a { color: var(--green); text-decoration: underline; }
.flash-info-sep { display: inline-block; color: var(--text-muted); margin: 0 24px; }
@keyframes flashInfoScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
[dir="rtl"] .flash-info-content { animation-direction: reverse; }
@media (max-width: 640px) {
  .flash-info-badge { padding: 6px 10px; font-size: 0.65rem; }
  .flash-info-item { font-size: 0.78rem; }
  .flash-info-sep { margin: 0 16px; }
}

/* Bouton flottant de contact WhatsApp, visible sur toutes les pages une fois configuré par l'admin */
#whatsapp-float-btn {
  position: fixed; bottom: 84px; inset-inline-end: 26px; z-index: 149;
  width: 50px; height: 50px; border-radius: 50%;
  background: #25d366; color: var(--white);
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .18s ease, box-shadow .18s ease;
}
#whatsapp-float-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 30px rgba(37,211,102,.4); }
#whatsapp-float-btn svg { width: 26px; height: 26px; }
@media (max-width: 640px) {
  #whatsapp-float-btn { bottom: 80px; inset-inline-end: 20px; width: 46px; height: 46px; }
  #whatsapp-float-btn svg { width: 24px; height: 24px; }
}

/* Compteur de visiteurs en ligne, visible sur toutes les pages */
#live-visitors-badge {
  position: fixed; top: calc(88px + var(--flash-bar-offset, 0px)); inset-inline-start: 16px; z-index: 90;
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px 7px 11px; box-shadow: var(--shadow);
  font-size: 0.8rem; font-weight: 600; color: var(--text-dark, #1c2b1e);
  pointer-events: none;
}
[dir="rtl"] #live-visitors-badge { padding: 7px 11px 7px 14px; }
.live-visitors-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; flex-shrink: 0;
  box-shadow: 0 0 0 rgba(46,204,113,.6);
  animation: liveVisitorsPulse 2s ease-out infinite;
}
.live-visitors-label { color: var(--text-muted); font-weight: 500; }
@keyframes liveVisitorsPulse {
  0% { box-shadow: 0 0 0 0 rgba(46,204,113,.55); }
  70% { box-shadow: 0 0 0 7px rgba(46,204,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}
@media (max-width: 640px) {
  #live-visitors-badge { top: auto; bottom: 84px; inset-inline-start: 16px; font-size: 0.75rem; padding: 6px 12px 6px 9px; }
  [dir="rtl"] #live-visitors-badge { padding: 6px 9px 6px 12px; }
}

/* Transition douce entre les pages */
body.page-fade-out { opacity: 0; transition: opacity .22s ease; }

/* Squelettes de chargement (avant l'arrivée des données) */
.skeleton-card {
  border-radius: var(--radius); min-height: 170px;
  background: linear-gradient(90deg, var(--cream) 25%, #e7eef4 37%, var(--cream) 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
}
@keyframes skeletonShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Message "aucun contenu" generique, reutilise partout ou une section peut etre vide */
.empty-state { text-align: center; color: var(--text-muted); margin: 20px 0; }

/* Barres animées du baromètre des résultats */
.taux-bar-track {
  width: 100%; max-width: 160px; height: 7px; border-radius: 999px;
  background: var(--cream); overflow: hidden; margin-top: 6px; margin-inline-start: auto;
}
.taux-bar-fill {
  height: 100%; width: 0%; border-radius: 999px;
  transition: width 1.1s cubic-bezier(.16,.8,.24,1);
}
.taux-bar-fill.good { background: var(--green); }
.taux-bar-fill.mid { background: var(--gold); }
.taux-bar-fill.low { background: #dc3545; }

/* Barre de progression du formulaire d'adhésion */
.form-progress-wrap { margin-bottom: 22px; }
.form-progress-label {
  display: flex; justify-content: space-between; font-size: 0.78rem;
  color: var(--text-muted); font-weight: 700; margin-bottom: 6px;
}
.form-progress-track { width: 100%; height: 8px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.form-progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--green));
  transition: width .35s ease;
}

/* Pop d'apparition pour les messages de succès des formulaires */
@keyframes successPop {
  0% { opacity: 0; transform: scale(.92) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
#adhesion-success, #partenariat-success, #don-success { animation: successPop .5s cubic-bezier(.2,.9,.3,1.2) both; }
#adhesion-success svg { animation: successPop .5s cubic-bezier(.2,.9,.3,1.2) .15s both; }
.form-submit-success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; background: rgba(15,122,76,.12);
  color: var(--green); margin-bottom: 14px; animation: successPop .5s cubic-bezier(.2,.9,.3,1.2) .1s both;
}
.form-submit-success-icon svg { width: 26px; height: 26px; }

/* Lightbox de la galerie photo */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(10,20,30,.86);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 90vw; max-height: 85vh; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); transform: scale(.94); transition: transform .3s ease;
}
.lightbox-overlay.open img { transform: scale(1); }
.lightbox-caption {
  position: absolute; bottom: 24px; left: 0; right: 0; text-align: center;
  color: var(--white); font-size: 0.9rem;
}
.lightbox-close {
  position: absolute; top: 20px; inset-inline-end: 24px; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: var(--white);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-close svg { width: 20px; height: 20px; }
.galerie-item { cursor: zoom-in; }

@media (hover: none) {
  .tilt-card { transform: none !important; }
}

/* Etat de chargement (squelette) pendant la récupération des données */
.is-loading-pulse { animation: softPulse 1.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Mode économie de données : désactive les animations décoratives coûteuses
   (parallaxe, tilt, défilement) et n'affiche pas les photos de fond en HD. */
html.data-saver *, html.data-saver *::before, html.data-saver *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
html.data-saver .reveal { opacity: 1; transform: none; }
html.data-saver .hero-visual { transform: none !important; }
html.data-saver .hero.has-bg-image::after,
html.data-saver .hero-float-badge { animation: none !important; }

.data-saver-toggle {
  background: none; border: none; color: rgba(255,255,255,.6);
  font-size: 0.78rem; text-decoration: underline; cursor: pointer;
  padding: 0;
}
.data-saver-toggle:hover { color: var(--white); }
