/* ══════════════════════════════════════════════
   MANIFESTATIONS SECTION
   CHARTE : rouge #980F1E · or · parchemin
   (même style que les pages actualités / agenda)
══════════════════════════════════════════════ */

/* Polices : à charger une seule fois dans le layout si ce n'est pas déjà fait
   <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&family=DM+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
*/

/* ─── VARIABLES (identiques aux autres pages ; sans effet si déjà définies) ─── */
:root {
  --d-red: #980F1E;
  --d-red-light: #b81a2a;
  --d-red-dark: #6f0a15;
  --d-red-glow: rgba(152, 15, 30, 0.35);
  --d-red-soft: rgba(152, 15, 30, 0.09);
  --d-red-border: rgba(152, 15, 30, 0.35);

  --d-gold: #b8923a;
  --d-gold-light: #dcbd70;
  --d-gold-soft: rgba(184, 146, 58, 0.16);
  --d-gold-border: rgba(184, 146, 58, 0.45);

  --d-parchment: #f6ead3;
  --d-parchment-2: #efdfc2;
  --d-parchment-3: #e6d2ad;
  --d-paper: #fffaf0;
  --d-navy: #1d2939;
  --d-text2: #5b4a3a;
  --d-text3: #8f7b63;

  --d-shadow: 0 10px 30px rgba(111, 10, 21, 0.10);
  --d-shadow-lg: 0 18px 40px -10px rgba(111, 10, 21, 0.28);
  --d-radius: 22px;

  --d-font-display: 'Ubuntu', 'DM Sans', sans-serif;
  --d-font-body: 'DM Sans', sans-serif;
  --d-transition: all 0.25s ease;
}

.dark {
  --d-parchment: #1a1210;
  --d-parchment-2: #241915;
  --d-parchment-3: #30221c;
  --d-paper: #2a1d18;
  --d-navy: #f3e6cf;
  --d-text2: #d6c3a4;
  --d-text3: #a58f70;
  --d-red-soft: rgba(220, 70, 85, 0.14);
  --d-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --d-shadow-lg: 0 18px 40px -10px rgba(0, 0, 0, 0.6);
}

/* ══ MANIFESTATIONS SECTION ══ */
.manifests-section {
  padding: 100px 0 80px;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* Same calligraphy background as diversite */

.manifests-section::before {
  content: '';
  position: absolute;
  inset: 0;
  /*background: url('../images/section_services.png') center / cover no-repeat;*/
  background: url('../images/bg1.jpg') center / cover no-repeat;
  /*opacity: 1;*/
  opacity: 0.9;
  mix-blend-mode: normal;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
  }
@media (max-width: 768px) {
  .manifests-section::before {

  
	 background: url('../images/bg1m.jpg') center / cover no-repeat;
}}
/* RTL : inversion horizontale */
[dir="rtl"] .manifests-section::before {
  transform: scaleX(-1);
}
.dark .manifests-section::after { display: none; }


.manifests-section, .manifests-section * { box-sizing: border-box; }

.manifests-inner {
  position: relative;
  z-index: 1;
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── ONGLETS (filtres) ─── */
.manifests-section .div-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 24px;
  border-radius: 40px;
  border: 1.5px solid var(--d-gold-border);
  background: var(--d-paper);
  color: var(--d-navy);
  font-family: var(--d-font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--d-transition);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.manifests-section .div-tab i { color: var(--d-gold); }

.manifests-section .div-tab:hover {
  border-color: var(--d-red);
  background: var(--d-paper);
  color: var(--d-red);
  transform: translateY(-2px);
}

.manifests-section .div-tab.active {
  background: var(--d-red);
  border-color: var(--d-red);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 14px var(--d-red-glow);
}

.manifests-section .div-tab.active i { color: var(--d-gold-light); }

/* ─── GRILLE 3 COLONNES ─── */
.manifests-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding-top: 16px;
}

/* Cartes au-delà des 6 premières : masquées tant que la grille n'est pas dépliée */
.manifests-grid .div-card:nth-child(n+7) { display: none; }
.manifests-grid.expanded .div-card:nth-child(n+7) { display: flex; }

/* ─── CARTE ─── */
.manifests-grid .div-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  height: 180px;             /* hauteur de la carte : ajustable */
  aspect-ratio: unset;
  overflow: hidden;
  border-radius: var(--d-radius);
  background: var(--d-paper);
  border: 1.5px solid var(--d-red-border);
  box-shadow: var(--d-shadow);
  transition: var(--d-transition);
}

/* Barre dégradée rouge → or, toujours visible */
.manifests-grid .div-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--d-red), var(--d-gold), transparent);
  pointer-events: none;
  z-index: 4;
}

.manifests-grid .div-card:hover {
  transform: translateY(-5px);
  border-color: var(--d-red);
  box-shadow: var(--d-shadow-lg);
}


/* ══ LEFT SIDE — blurred dark text panel ══ */
.manifests-grid .div-card-body {
  position: relative;
  inset: unset;
  width: 52%;                 /* ← left panel width — adjust freely */
  flex-shrink: 0;
  order: 1;                   /* LEFT */
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  z-index: 2;
  overflow: hidden;

  /* Blurred dark overlay — mirrors the old layout aesthetic */
  background: rgba(10, 8, 5, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  /* Subtle inner right border separating panel from image */
  border-right: 1px solid rgba(201,168,76,0.18);
}

/* Badge — sits inside the body panel, top-left */
.manifests-grid .div-card-cat {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 9px;
  padding: 3px 9px;
  z-index: 3;
}

/* Date */
.manifests-grid .div-card-date {
  font-size: 11.5px;
  color: var(--gold);
  margin-bottom: 0;
  margin-top: 22px;           /* push below badge */
  font-weight: 500;
}

/* Title */
.manifests-grid .div-card-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;                /* always white — we're on a dark panel */
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  margin-bottom: 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Description */
.manifests-grid .div-card-body p {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Tab styles ── */
.manifests-section .div-tab {
    position: relative;
    border: 2px solid #980F1E;
    color: #1B2A3A;
    background: rgba(255, 255, 255, 0.38);
    font-weight: 600;
    border-radius: 30px;

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    transition: all 0.25s ease;
       box-shadow: 0 18px 40px -10px rgba(111, 10, 21, 0.48);
}

.manifests-section .div-tab:hover {
     background: #980F1E;
    border-color: #980F1E;
    color: #fff;
    box-shadow: 0 4px 10px rgba(152, 15, 30, 0.18);
}

.manifests-section .div-tab.active {
    background: #980F1E;
    border-color: #980F1E;
    color: #fff;
    box-shadow: 0 4px 10px rgba(152, 15, 30, 0.18);
}

/* ─── IMAGE ─── */
.manifests-grid .div-card-img {
  position: relative;
  inset: unset;
  order: 2;
  flex: 1;
  min-width: 0;
  background-color: var(--d-parchment-3);
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

/* Plus de voile sombre : l'image reste naturelle */
.manifests-grid .div-card-img::after { content: none; }

.manifests-grid .div-card:hover .div-card-img { transform: scale(1.04); }

/* ─── ACCESSIBILITÉ ─── */
.manifests-section a:focus-visible,
.manifests-section button:focus-visible { outline: 3px solid var(--d-gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .manifests-section * { transition: none !important; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .manifests-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .manifests-section { padding: 70px 0 60px; }
  .manifests-grid { grid-template-columns: 1fr; }
  .manifests-grid .div-card { height: 170px; }
  .manifests-grid .div-card-body { width: 55%; padding: 16px; }
}
/* ═══════════════════════════════════════════════
   BOUTONS AGENDA — VOIR PLUS / VOIR TOUT
═══════════════════════════════════════════════ */

.agenda-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Les deux boutons ont exactement la même hauteur */
.agenda-buttons .div-tab {
    height: 46px;
    min-height: 46px;
    padding: 12px 32px;
    font-size: 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
    line-height: 1;
}

/* Icônes Font Awesome */
.agenda-buttons .div-tab i {
    color: var(--d-gold);
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}

/* Au hover */
.agenda-buttons .div-tab:hover i {
    color: #fff;
}

/* Flèche */
.agenda-arrow {
    transition: transform 0.25s ease;
}

/* ═══════════════════════════════════════════════
   RTL
═══════════════════════════════════════════════ */

/* En arabe, la flèche pointe vers la gauche */
[dir="rtl"] .agenda-arrow {
    transform: scaleX(-1);
}