/* =========================================================
   WILAYA.SN — DESIGN SYSTEM
   Fédération des groupements religieux et culturels
   des disciples de Cheikh Ahmadou Bamba
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Couleurs */
  --aubergine: #3B1D1F;
  --aubergine-deep: #281415;
  --lavande: #C3C5EC;
  --lavande-soft: #E8E9F4;
  --paper: #FAF9FC;
  --ink: #1A1418;
  --gold: #C9A24B;
  --terracotta: #8B6F4E;
  --white: #FFFFFF;

  /* Couleurs sémantiques personnalisées (demande client) */
  --color-primary: #C3C5EC;        /* couleur principale du site */
  --color-primary-deep: #ABAEDE;   /* variante plus saturée pour hover/contraste */
  --color-border: #3B1D1F;         /* couleur de toutes les bordures du site */

  /* Couleurs de catégorie */
  --cat-federation: #3B1D1F;
  --cat-federation-bg: #C3C5EC;
  --cat-mouridisme: #8C7AA8;
  --cat-mouridisme-bg: #E6E1F0;
  --cat-khadim: #9C3D4E;
  --cat-khadim-bg: #F0DDE0;
  --cat-touba: #8B6F4E;
  --cat-touba-bg: #EFE6D8;

  /* Typo */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;

  /* Ombres / rayons */
  --shadow-sm: 0 2px 8px rgba(42, 30, 38, 0.08);
  --shadow-md: 0 8px 24px rgba(42, 30, 38, 0.12);
  --shadow-lg: 0 16px 48px rgba(42, 30, 38, 0.16);
  --radius: 4px;

  /* Layout */
  --max-width: 1280px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

/* ---------- Skip link / focus ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 16px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* =========================================================
   TICKER — bandeau d'actualités défilant
   ========================================================= */
.ticker {
  background: var(--aubergine);
  color: var(--lavande-soft);
  overflow: hidden;
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
}
.ticker-label {
  background: var(--gold);
  color: var(--aubergine-deep);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 2;
}
.ticker-track-wrap {
  overflow: hidden;
  flex: 1;
  height: 100%;
  position: relative;
}
.ticker-track {
  display: flex;
  gap: 56px;
  position: absolute;
  white-space: nowrap;
  align-items: center;
  height: 100%;
  animation: ticker-scroll 38s linear infinite;
  padding-left: 24px;
}
.ticker-track a {
  font-size: 13px;
  font-weight: 500;
  color: var(--lavande-soft);
  opacity: 0.92;
}
.ticker-track a:hover { color: var(--gold); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: var(--paper);
  border-bottom: 1.5px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ---------- Menu secondaire (sous le menu principal) ---------- */
.secondary-nav {
  background: var(--aubergine);
  position: sticky;
  top: 65px;
  z-index: 99;
}
.secondary-nav .container {
  display: flex;
  align-items: center;
}
.secondary-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: wrap;
}
.secondary-nav ul li a {
  display: block;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lavande-soft);
  opacity: 0.85;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.secondary-nav ul li a:hover {
  opacity: 1;
  background: rgba(250, 249, 252, 0.08);
}
.secondary-nav ul li.current-menu-item a {
  opacity: 1;
  color: var(--gold);
}
@media (max-width: 760px) {
  .secondary-nav { position: static; }
  .secondary-nav ul { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .secondary-nav ul li a { white-space: nowrap; }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 24px;
}
.logo-block { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 48px; height: 48px; flex-shrink: 0;
  object-fit: contain;
}
.logo-text { display: flex; flex-direction: column; }
.logo-text .name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--aubergine);
  line-height: 1;
}
.logo-text .tagline {
  font-size: 10.5px;
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 3px;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 11px 16px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  transition: color 0.25s ease;
}
/* Soulignement animé : un fin trait doré qui se déploie depuis le centre,
   plus raffiné qu'un simple fond plein au survol. */
.main-nav > ul > li > a::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--aubergine));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
  color: var(--aubergine);
}
.main-nav > ul > li > a:hover::before,
.main-nav > ul > li.active > a::before {
  transform: scaleX(1);
}
.main-nav .has-sub > a::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.55;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.main-nav .has-sub:hover > a::after,
.main-nav .has-sub:focus-within > a::after {
  transform: rotate(225deg) translateY(1px);
  opacity: 0.85;
}
.submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--white);
  background-image: linear-gradient(165deg, var(--lavande-soft) 0%, var(--white) 45%);
  box-shadow: 0 18px 44px rgba(59, 29, 31, 0.2), 0 2px 8px rgba(59, 29, 31, 0.08);
  border: 1px solid var(--lavande);
  border-radius: 12px;
  min-width: 230px;
  list-style: none;
  padding: 9px;
  opacity: 0;
  visibility: hidden;
  transform: perspective(600px) rotateX(-8deg) translateY(2px) scale(0.96);
  transform-origin: top center;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
}
/* Petite flèche pointant vers le lien parent, pour ancrer visuellement le sous-menu. */
.submenu::before {
  content: '';
  position: absolute;
  top: -6px; left: 22px;
  width: 12px; height: 12px;
  background: var(--white);
  border-left: 1px solid var(--lavande);
  border-top: 1px solid var(--lavande);
  transform: rotate(45deg);
  border-radius: 2px;
}
.has-sub:hover .submenu,
.has-sub:focus-within .submenu {
  opacity: 1; visibility: visible; transform: perspective(600px) rotateX(0deg) translateY(0) scale(1);
}
.submenu li {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Apparition en cascade : chaque élément du sous-menu se révèle avec un
   léger délai progressif par rapport au précédent, pour un effet plus
   raffiné qu'un simple fondu d'ensemble. */
.has-sub:hover .submenu li:nth-child(1), .has-sub:focus-within .submenu li:nth-child(1) { transition-delay: 0.03s; }
.has-sub:hover .submenu li:nth-child(2), .has-sub:focus-within .submenu li:nth-child(2) { transition-delay: 0.07s; }
.has-sub:hover .submenu li:nth-child(3), .has-sub:focus-within .submenu li:nth-child(3) { transition-delay: 0.11s; }
.has-sub:hover .submenu li:nth-child(4), .has-sub:focus-within .submenu li:nth-child(4) { transition-delay: 0.15s; }
.has-sub:hover .submenu li:nth-child(n+5), .has-sub:focus-within .submenu li:nth-child(n+5) { transition-delay: 0.18s; }
.has-sub:hover .submenu li,
.has-sub:focus-within .submenu li {
  opacity: 1;
  transform: translateY(0);
}
.submenu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.submenu-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--lavande-soft);
  color: var(--aubergine);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.submenu-icon svg { width: 15px; height: 15px; }
.submenu-label { flex: 1; }
.submenu a:hover {
  background: linear-gradient(90deg, var(--lavande-soft), transparent);
  color: var(--aubergine);
  padding-left: 15px;
}
.submenu a:hover .submenu-icon {
  background: var(--gold);
  color: var(--aubergine-deep);
  transform: scale(1.08);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Sélecteur de langue ---------- */
.lang-switcher { position: relative; }
.lang-switcher-trigger {
  display: flex; align-items: center; gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 20px;
  color: var(--aubergine);
  background: var(--lavande-soft);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.22s ease;
}
.lang-switcher-trigger:hover { background: var(--lavande); }
.lang-switcher-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }
.lang-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--lavande);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(59, 29, 31, 0.18);
  list-style: none;
  min-width: 110px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 50;
}
.lang-switcher.open .lang-switcher-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.lang-switcher-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-switcher-option:hover { background: var(--lavande-soft); color: var(--aubergine); }
.lang-switcher-option.active { color: var(--aubergine); background: var(--lavande-soft); }
.lang-switcher-option.active::after { content: ' ✓'; }
@media (max-width: 760px) {
  .lang-switcher-trigger .lang-switcher-current { display: inline; }
}
.btn-search {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--aubergine);
  background: var(--lavande-soft);
  transition: background 0.22s ease, transform 0.22s ease;
}
.btn-search:hover { background: var(--lavande); transform: scale(1.06); }
.btn-live {
  display: flex; align-items: center; gap: 7px;
  background: var(--color-primary);
  border: 1.5px solid var(--color-border);
  color: var(--aubergine);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
.btn-live:hover { background: var(--color-primary-deep); box-shadow: 0 4px 14px rgba(59,29,31,0.18); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #E0556B;
  animation: pulse-dot 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.burger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  border-radius: 50%;
  transition: background 0.22s ease;
}
.burger:hover { background: var(--lavande-soft); }
.burger span {
  width: 22px; height: 2px;
  background: var(--aubergine);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.25s ease;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 20, 24, 0.85);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-box {
  width: min(640px, 90vw);
  display: flex;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.search-box input {
  flex: 1;
  border: none;
  padding: 18px 20px;
  font-size: 16px;
  font-family: var(--font-body);
}
.search-box input:focus { outline: none; }
.search-box button {
  background: var(--aubergine);
  color: var(--white);
  padding: 0 22px;
  font-weight: 700;
}
.search-close {
  position: absolute;
  top: 24px; right: 24px;
  color: var(--white);
  font-size: 28px;
  width: 44px; height: 44px;
}

/* =========================================================
   SECTION DIVIDER — dôme/arche signature
   ========================================================= */
.dome-divider {
  width: 100%;
  height: 28px;
  display: flex;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
}
.dome-divider svg { height: 100%; width: auto; opacity: 0.55; }

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-eyebrow .arch-icon { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }
.section-eyebrow h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--aubergine);
}
.section-eyebrow .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--lavande), transparent);
}

/* =========================================================
   HERO SLIDER
   ========================================================= */
/* =========================================================
   BANNIÈRES (slider 1200x250, leaderboard 728x90, pavé 300x250)
   ========================================================= */
.banner-slider-1200 {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1200 / 250;
  background: var(--lavande-soft);
}
.banner-slider-1200 .banner-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.banner-slider-1200 .banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-slider-1200 .banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-slider-1200 .banner-dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 2;
}
.banner-slider-1200 .banner-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(250,249,252,0.55);
  border: 1px solid rgba(59,29,31,0.3);
  transition: background 0.2s, transform 0.2s;
}
.banner-slider-1200 .banner-dot.active { background: var(--gold); transform: scale(1.2); }
.banner-tag {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(40,20,21,0.6);
  color: var(--white);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  z-index: 2;
}

.banner-leaderboard-wrap {
  display: flex;
  justify-content: center;
  margin: 32px auto;
}
.banner-leaderboard {
  width: 100%;
  max-width: 728px;
  aspect-ratio: 728 / 90;
  border-radius: 6px;
  overflow: hidden;
  display: block;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.banner-leaderboard img { width: 100%; height: 100%; object-fit: cover; display: block; }

.banner-sidebar-300 {
  display: block;
  width: 100%;
  aspect-ratio: 300 / 250;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--color-border);
  position: relative;
}
.banner-sidebar-300 img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 760px) {
  .banner-leaderboard { max-width: 92vw; }
}

.hero-section {
  padding: 32px 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16/10;
  background: var(--aubergine-deep);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,20,24,0) 30%, rgba(26,20,24,0.88) 100%);
  display: flex;
  align-items: flex-end;
  padding: 32px;
}
.hero-slide-content { color: var(--white); max-width: 80%; }
.hero-slide-cat {
  display: inline-block;
  background: var(--gold);
  color: var(--aubergine-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}
.hero-slide-content h1, .hero-slide-content h3 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}
.hero-slide-content p { font-size: 14px; opacity: 0.85; }
.hero-controls {
  position: absolute;
  bottom: 24px; right: 24px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero-arrow {
  width: 38px; height: 38px;
  background: rgba(250,249,252,0.18);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(250,249,252,0.35);
  border-radius: 50%;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}
.hero-arrow:hover { background: rgba(250,249,252,0.32); }
.hero-dots {
  position: absolute;
  bottom: 24px; left: 32px;
  display: flex; gap: 7px; z-index: 5;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(250,249,252,0.4);
  transition: background 0.2s, transform 0.2s;
}
.hero-dot.active { background: var(--gold); transform: scale(1.2); }

.hero-side { display: flex; flex-direction: column; gap: 16px; }
.side-article {
  display: flex; gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--color-border);
}
.side-article:last-child { border-bottom: none; padding-bottom: 0; }
.side-article img {
  width: 84px; height: 84px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.side-article-body .cat-tag { font-size: 10.5px; }
.side-article-body h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin: 5px 0 4px;
}
.side-article-body .meta { font-size: 11.5px; color: var(--terracotta); }

/* =========================================================
   CATEGORY EXPLORER
   ========================================================= */
.section-eyebrow h2.gradient-title,
h2.gradient-title {
  background: linear-gradient(100deg, var(--aubergine) 0%, #8C5A4E 35%, var(--gold) 70%, #B7BADC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Repli pour les navigateurs sans support de background-clip:text :
     le dégradé n'apparaît pas, mais le texte reste lisible en aubergine. */
}
@supports not (background-clip: text) {
  .section-eyebrow h2.gradient-title,
  h2.gradient-title {
    color: var(--aubergine) !important;
    -webkit-text-fill-color: var(--aubergine);
  }
}
/* ---------- Barre de navigation des rubriques (remplace la grille de cartes) ---------- */
.category-nav-bar {
  background: #5D3C29;
  margin: 0;
}
.category-nav-bar ul {
  display: flex;
  align-items: stretch;
  list-style: none;
  flex-wrap: wrap;
}
.category-nav-bar li { position: relative; }
.category-nav-bar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 26px;
  color: #D1CDEA;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.25s ease, color 0.25s ease;
}
.category-nav-bar a svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
/* Soulignement animé, cohérent avec le menu principal du header. */
.category-nav-bar a::after {
  content: '';
  position: absolute;
  left: 26px; right: 26px;
  bottom: 10px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.category-nav-bar a:hover {
  background: rgba(209, 205, 234, 0.08);
  color: #FFFFFF;
}
.category-nav-bar a:hover svg { opacity: 1; transform: scale(1.08); }
.category-nav-bar a:hover::after { transform: scaleX(1); }
@media (max-width: 760px) {
  .category-nav-bar ul { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .category-nav-bar a { padding: 15px 18px; white-space: nowrap; }
}

/* =========================================================
   TV EN DIRECT
   ========================================================= */
.tv-section { padding: 48px 0; }
.tv-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  background: var(--aubergine);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.tv-player-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
}
.tv-player-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.tv-side { color: var(--lavande-soft); display: flex; flex-direction: column; gap: 16px; }
.tv-live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(250,249,252,0.1);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  width: fit-content;
}
.tv-side h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
}
.tv-side p { font-size: 13.5px; opacity: 0.8; }
.btn-subscribe {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold);
  color: var(--aubergine-deep);
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: 20px;
  width: fit-content;
  margin-top: 4px;
}
.btn-subscribe:hover { background: #DCB766; }

.video-slider-wrap { margin-top: 24px; position: relative; }
.video-slider-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.video-slider-head h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--aubergine);
}
.video-slider-arrows { display: flex; gap: 6px; }
.vs-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lavande-soft);
  color: var(--aubergine);
  display: flex; align-items: center; justify-content: center;
}
.vs-arrow:hover { background: var(--lavande); }
.video-slider-track-wrap { overflow: hidden; }
.video-slider-track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s ease;
}
.video-slide {
  flex: 0 0 calc(25% - 12px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: left;
  display: block;
  width: 100%;
  padding: 0;
}
.video-slide:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.video-slide.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}
.video-thumb { position: relative; aspect-ratio: 16/9; background: var(--aubergine-deep); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.video-play-icon svg {
  width: 38px; height: 38px;
  color: var(--white);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.video-slide-body { padding: 12px; }
.video-slide-body h5 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Slider 1 : vidéo hero (galerie YouTube) ---------- */
.video-gallery { padding: 48px 0; }

/* ---------- Mini album photo (aperçu accueil) ---------- */
.photo-album-section { padding: 48px 0; }
.photo-album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.photo-album-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  box-shadow: var(--shadow-sm);
}
.photo-album-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.4s ease;
}
.photo-album-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(40, 20, 21, 0.78) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.photo-album-item:hover img {
  transform: scale(1.12);
  filter: brightness(0.92);
}
.photo-album-item:hover::after { opacity: 1; }
.photo-album-caption {
  position: absolute;
  bottom: 12px; left: 14px; right: 14px;
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
  line-height: 1.3;
}
.photo-album-item:hover .photo-album-caption {
  opacity: 1;
  transform: translateY(0);
}
.photo-album-zoom-icon {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(250,249,252,0.92);
  color: var(--aubergine);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
}
.photo-album-zoom-icon svg { width: 15px; height: 15px; }
.photo-album-item:hover .photo-album-zoom-icon {
  opacity: 1;
  transform: scale(1);
}
@media (max-width: 1080px) {
  .photo-album-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .photo-album-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
.media-library-intro {
  margin-bottom: 28px;
  max-width: 620px;
}
.media-library-intro h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--aubergine);
  margin-bottom: 8px;
}
.media-library-intro p {
  font-size: 14.5px;
  color: #4A3E45;
  line-height: 1.6;
}
.video-hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: var(--aubergine-deep);
}
.video-hero-slide {
  display: none;
  width: 100%;
}
.video-hero-slide.active { display: block; }
.video-hero-player {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  background-size: cover;
  background-position: center;
}
.video-hero-player iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.video-hero-caption {
  padding: 18px 24px;
  background: var(--aubergine);
  color: var(--white);
}
.video-hero-caption h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 8px 0 4px;
  line-height: 1.3;
}
.video-hero-caption .meta { font-size: 12.5px; opacity: 0.75; }
.video-hero-controls {
  position: absolute;
  top: calc(50% - 60px);
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}
.video-hero-controls .hero-arrow { pointer-events: auto; }
.video-hero-dots {
  position: absolute;
  top: 16px; right: 16px;
  display: flex; gap: 7px;
}

/* =========================================================
   MAIN GRID — articles + sidebar
   ========================================================= */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 48px 0 64px;
}

.article-list { display: flex; flex-direction: column; gap: 28px; }
.article-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1.5px solid var(--color-border);
}
.article-card:last-child { border-bottom: none; }
.article-card.no-image { grid-template-columns: 1fr; }
.article-card img {
  width: 100%; height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
}
.cat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
}
.cat-tag.fed { background: var(--cat-federation-bg); color: var(--cat-federation); }
.cat-tag.mou { background: var(--cat-mouridisme-bg); color: var(--ink); }
.cat-tag.kha { background: var(--cat-khadim-bg); color: var(--cat-khadim); }
.cat-tag.tou { background: var(--cat-touba-bg); color: var(--cat-touba); }

.article-card h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  margin: 10px 0 8px;
}
.article-card h3 a:hover { color: var(--aubergine); text-decoration: underline; }
.article-card p { font-size: 14px; color: #4A3E45; margin-bottom: 8px; }
.article-card .meta { font-size: 12px; color: var(--terracotta); font-weight: 600; }

.load-more {
  align-self: center;
  margin-top: 8px;
  padding: 12px 28px;
  border: 1.5px solid var(--color-border);
  color: var(--aubergine);
  background: var(--white);
  border-radius: 20px;
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.2s, color 0.2s;
}
.load-more:hover { background: var(--color-primary); color: var(--aubergine); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget {
  background: var(--white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
}
.widget h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--aubergine);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.widget h4 svg { width: 17px; height: 17px; color: var(--gold); }

/* Météo */
.weather-widget {
  background: linear-gradient(160deg, var(--aubergine) 0%, var(--aubergine-deep) 100%);
  color: var(--white);
  border: none;
}
.weather-widget h4 { color: var(--white); }
.weather-now { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.weather-temp { font-family: var(--font-display); font-size: 42px; font-weight: 600; }
.weather-desc { font-size: 13px; opacity: 0.85; }
.weather-icon { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.weather-stats { display: flex; gap: 16px; font-size: 11.5px; opacity: 0.8; margin-bottom: 16px; }
.weather-forecast { display: flex; justify-content: space-between; border-top: 1px solid rgba(250,249,252,0.18); padding-top: 14px; }
.weather-day { text-align: center; font-size: 11px; }
.weather-day .d { opacity: 0.7; margin-bottom: 6px; text-transform: uppercase; }
.weather-day .t { font-weight: 700; }

.facebook-widget {
  text-align: center;
  background: linear-gradient(160deg, var(--lavande-soft) 0%, var(--white) 100%);
}
.facebook-widget-cover {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--aubergine);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(59, 29, 31, 0.25);
}
.facebook-widget-cover svg { width: 26px; height: 26px; }
.facebook-widget h4 { justify-content: center; }
.facebook-widget p { font-size: 13px; color: #4A3E45; margin-bottom: 16px; line-height: 1.55; }
.btn-facebook {
  display: inline-flex; align-items: center; gap: 9px;
  background: #1877F2;
  color: var(--white);
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 20px;
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.btn-facebook:hover {
  background: #1465D8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.35);
}

.tv-link-widget {
  background: var(--aubergine);
  color: var(--white);
  text-align: center;
  border: none;
}
.tv-link-widget h4 { color: var(--white); justify-content: center; }
.tv-link-widget p { font-size: 13px; opacity: 0.8; margin-bottom: 14px; }
.tv-link-widget .btn-watch {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold);
  color: var(--aubergine-deep);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 20px;
}

.most-read-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.most-read-item { display: flex; gap: 12px; align-items: flex-start; }
.most-read-rank {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--lavande);
  line-height: 1;
  width: 28px;
  flex-shrink: 0;
}
.most-read-item h5 { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.most-read-item .meta { font-size: 11px; color: var(--terracotta); margin-top: 4px; }

.newsletter-widget input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px;
  margin-bottom: 10px;
}
.newsletter-widget button {
  width: 100%;
  background: var(--aubergine);
  color: var(--white);
  padding: 11px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13.5px;
}
.newsletter-widget button:hover { background: var(--aubergine-deep); }
.newsletter-widget p.note { font-size: 11.5px; color: var(--terracotta); margin-top: 8px; }

.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-link {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--lavande-soft);
}
.social-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.social-link:hover { background: var(--lavande); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--aubergine-deep);
  color: var(--lavande-soft);
  margin-top: 24px;
}
.footer-top { padding: 56px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  width: 56px; height: 56px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
  background: var(--white);
  border-radius: 8px;
  padding: 4px;
}
.footer-brand .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
}
.footer-brand p { font-size: 13px; opacity: 0.7; margin-top: 12px; line-height: 1.6; }
.footer-col h5 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; opacity: 0.78; }
.footer-col a:hover { opacity: 1; color: var(--gold); }

.footer-widgets-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid rgba(250,249,252,0.12);
}
.footer-widgets-row .footer-widget h4,
.footer-widgets-row .footer-widget h5 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-widgets-row .footer-widget p,
.footer-widgets-row .footer-widget li,
.footer-widgets-row .footer-widget a {
  font-size: 13px;
  color: var(--lavande-soft);
  opacity: 0.8;
}
.footer-widgets-row .footer-widget a:hover { opacity: 1; color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(250,249,252,0.12);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.6;
}

/* =========================================================
   PAGE HEADER (used by category/article/contact pages)
   ========================================================= */
.page-banner {
  padding: 40px 0;
  color: var(--white);
  background: var(--aubergine);
}
.page-banner .eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 10px;
}
.page-banner h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
}
.breadcrumb { font-size: 13px; opacity: 0.8; margin-top: 12px; }
.breadcrumb a:hover { color: var(--gold); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; overflow-x: auto; }
  .side-article { min-width: 260px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .tv-grid { grid-template-columns: 1fr; }
  .video-slide { flex: 0 0 calc(50% - 8px); }
  .main-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .main-nav.mobile-open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 14px;
    box-shadow: 0 18px 40px rgba(59, 29, 31, 0.18);
    border-top: 1px solid var(--lavande);
    z-index: 90;
    animation: mobile-menu-in 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  @keyframes mobile-menu-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .main-nav.mobile-open > ul { flex-direction: column; width: 100%; align-items: stretch; gap: 2px; }
  .main-nav.mobile-open > ul > li > a {
    padding: 13px 14px;
    border-radius: 8px;
    justify-content: space-between;
  }
  .main-nav.mobile-open > ul > li > a::before { display: none; }
  .main-nav.mobile-open > ul > li > a:hover,
  .main-nav.mobile-open > ul > li.active > a {
    background: var(--lavande-soft);
  }
  .main-nav.mobile-open .has-sub > a::after {
    margin-left: auto;
    transition: transform 0.25s ease;
  }
  .main-nav.mobile-open .has-sub.expanded > a::after {
    transform: rotate(135deg);
  }
  .main-nav.mobile-open .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: var(--lavande-soft);
    background-image: none;
    display: none; margin: 4px 0 6px; padding: 6px;
    max-height: 0; overflow: hidden;
  }
  .main-nav.mobile-open .submenu::before { display: none; }
  .main-nav.mobile-open .submenu li,
  .main-nav.mobile-open .has-sub.expanded .submenu li {
    opacity: 1; transform: none; transition-delay: 0s;
  }
  .main-nav.mobile-open .has-sub.expanded .submenu {
    display: block; max-height: 400px;
    animation: submenu-expand 0.25s ease;
  }
  @keyframes submenu-expand {
    from { opacity: 0; } to { opacity: 1; }
  }
  .main-nav.mobile-open .submenu a:hover { padding-left: 12px; }
  .burger { display: flex; }
  .btn-live span.label { display: none; }
  .logo-text .name { font-size: 19px; }
  .article-card { grid-template-columns: 1fr; }
  .article-card img { height: 200px; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .video-slide { flex: 0 0 calc(100% - 0px); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-banner h1 { font-size: 28px; }
  .hero-slide-content h1, .hero-slide-content h3 { font-size: 22px; }
}
