/* =====================================================================
   MTP Gabon — Main Stylesheet
   Colors: Green #008E1C | Light #e8f5eb | Dark text #0F0F0F | Body #444
   Font: Inter, sans-serif
   ===================================================================== */

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

:root {
  --green:       #008E1C;
  --green-dk:    #006B15;
  --green-lght:  #d5eeda;
  --green-lt:    #e8f5eb;
  --txt-dark:    #0F0F0F;
  --txt-body:    #444444;
  --txt-muted:   #55595C;
  --border:      #DDDDDD;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.07);
  --shadow-md:   0 9px 24px rgba(0,0,0,.11);
  --r:           4px;
  --max-w:       1200px;
  --hdr-h:       130px;
  --nav-h:       52px;
}

html { scroll-behavior: smooth; }
body { font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; font-size:15px; line-height:1.65; color:var(--txt-body); background:#fff; }
a { color:var(--green); text-decoration:none; transition:color .2s; }
a:hover { color:var(--green-dk); }
img { max-width:100%; height:auto; display:block; }
.container { max-width:var(--max-w); margin:0 auto; padding:0 20px; }
body.no-scroll { overflow:hidden; }

/* ── Flag stripe ──────────────────────────────────────────────────── */
.site-topbar {
    width: 100%;
    height: 13.5px; /* 3 bars × 6px each */
    display: flex;
    flex-direction: column;
}

.site-topbar::before,
.site-topbar::after,
.site-topbar div {
    content: "";
    display: block;
    width: 100%;
    height: 4.5px;
}

.site-topbar::before {
    background-color: #008e1c; /* Green */
}

.site-topbar div {
    background-color: #e7d404; /* Yellow */
}

.site-topbar::after {
    background-color: #00288e; /* Blue */
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header { 
  background:#fff; 
  position:sticky; 
  top:0; 
  z-index:99999;
  box-shadow:0 1px 0 var(--border);
 }

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 20px;
    max-width: var(--max-w);
    margin: 0 auto;
}

/* Logo */
.site-logo { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo-bar { width:7px; height:40px; flex-shrink:0;
  background:linear-gradient(to bottom,#008e1c 33%,#e7d404 33% 66%,#00288e 66%); }

  
.logo-text {
    font-size: 16.5px;
    font-weight: 900;
    color: var(--txt-dark);
    line-height: 1;
    max-width: 70%;
     /* Makes text appear thicker */
    letter-spacing: -0.3px;

    /* Subtle thickness enhancement */
    text-shadow: 
        0 0 0.4px currentColor,
        0 0 0.4px currentColor;
}
.logo-text span { display:block; }
.site-logo img.custom-logo { height:44px; width:auto; }

/* Header actions */
.header-actions { display:flex; align-items:center; gap:13px; }
.btn-search { background:none; border:none; cursor:pointer; padding:6px; color:var(--txt-dark); font-size:20px; display:flex; align-items:center; transition:color .2s; }
.btn-search:hover { color:var(--green); }
.flag-emblem { width:80px;  border-radius:2px; overflow:hidden; flex-shrink:0; display:block; }
.flag-emblem img { width:100%; height:100%; object-fit:cover; }

/* ── Nav bar ─────────────────────────────────────────────────────── */
/*
 * position:relative is the containing block for .mega-menu (position:absolute).
 * NEVER use overflow:hidden here — it would clip dropdowns.
 */
.site-nav-bar {
  border-top: 1px solid var(--border);
  background: #fff;
  position: relative;
  /* No z-index here — sub-menus escape into the site-header stacking context (z-index:1000) */
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  align-items: stretch;
  list-style: none;
  flex: 1;
  overflow: visible;      /* clips items; dropdowns escape via position:fixed */
  min-width: 0;
  position: relative;
}
.primary-menu li { position: relative; flex-shrink: 0; }

/* Top-level link/button */
.primary-menu > li > a,
.primary-menu > li > .menu-toggle,
.primary-menu > li > .menu-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 15px;
  /*height: var(--nav-h);*/
  font-size: 14px;
  font-weight: 500;
  color: var(--txt-dark);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  cursor: pointer;
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit;
  text-decoration: none;
  position: relative;
}
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-ancestor > a,
.primary-menu > li.current-menu-ancestor > .menu-toggle,
.primary-menu > li.menu-open > a,
.primary-menu > li.menu-open > .menu-toggle {
  color: var(--green);
  border-bottom-color: var(--green);
}

.menu-arrow {
  font-size: 9px;
  margin-left: 2px;
  transition: transform .25s;
  display: inline-block;
  pointer-events: none;
}
.primary-menu > li.menu-open > a .menu-arrow,
.primary-menu > li.menu-open > .menu-toggle .menu-arrow {
  transform: rotate(180deg);
}

/* Nav right: Contact + Hamburger */
.nav-right { display:flex; align-items:center; gap:9px; margin-left:auto; flex-shrink:0; }
.btn-contact {
  background:var(--green); color:#fff !important; border:none;
  padding:9px 20px; border-radius:3px; font-size:13.5px; font-weight:600;
  cursor:pointer; text-decoration:none; display:inline-flex; align-items:center;
  transition:background .2s; white-space:nowrap; font-family:inherit;
}
.btn-contact:hover { background:var(--green-dk); color:#fff !important; }
.btn-hamburger {
  background:none; border:1px solid var(--border); padding:7px 9px;
  cursor:pointer; border-radius:3px; color:var(--txt-dark); font-size:17px;
  display:flex; align-items:center; transition:border-color .2s,color .2s;
}
.btn-hamburger:hover { border-color:var(--green); color:var(--green); }

/* ══════════════════════════════════════════════════════════════════
   STANDARD DROPDOWN  (has-dropdown / menu-item-has-children)
   ─ Opens/closes on CLICK (JS adds .menu-open class)
   ─ All levels: → arrow bullets
   ─ Nested sub-menus open to the right on mouse proximity
   ══════════════════════════════════════════════════════════════════ */


.site-header,
.header-inner,
.container,
.site-navigation,
.primary-menu {
    overflow: visible !important;
}
/* First-level dropdown panel */
.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border-top: 2px solid var(--green);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  list-style: none;
  padding: 5px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 999999;
}
.menu-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}

/* Arrow → bullet on every sub-menu link */
.sub-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  color: var(--txt-dark);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.sub-menu li a::before { content: '→'; color: var(--green); font-size: 11px; flex-shrink: 0; }
.sub-menu li a:hover   { background: var(--green-lt); color: var(--green); }

/* Side-opening nested sub-menu — appears on mouse proximity (mouseenter) */
.sub-menu--side {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 220px;
  border-top: 2px solid var(--green);
}
.has-sub.side-open > .sub-menu--side {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(0);
}
.sub-menu .has-sub > a .sub-arrow {
  font-size: 9px;
  margin-left: auto;
  flex-shrink: 0;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   MINISTRY MEGA MENU  (has-mega)
   ─ position:absolute on .site-nav-bar → always flush under nav
   ─ 78% max-width, centred
   ─ max-height 350px; columns scroll internally when content overflows
   ─ Opens/closes on CLICK (JS adds .mega-open class on .has-mega)
   ─ First child panel shown by default when opened
   ══════════════════════════════════════════════════════════════════ */
.has-mega { position: static; }  /* stays in normal flow */

.mega-menu {
  /* Anchors to .site-nav-bar (position:relative).
     top:100% = flush under the nav bar. Works with sticky header. */
  position: fixed;
  top: var(--mega-top, 130px);  /* fallback matches your --hdr-h */
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 78%;
  max-width: 1100px;
  z-index: 850;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.14);
  border-top: 2px solid var(--green);
  border-radius: 0 0 6px 6px;
  /* Hidden — JS adds .mega-open on .has-mega */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s, transform .22s, visibility .22s;
}
.has-mega.mega-open > .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* Inner layout: 3 equal columns, max 350px tall */
.mega-inner {
  display: flex;
  align-items: stretch;
  height: 350px;      /* fixed height so flex children can scroll inside it */
  max-height: 350px;
}

/* ── Col 1: Title ────────────────────────────────────────────────── */
.mega-col-label {
  width: calc(100% / 3);
  flex-shrink: 0;
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}
.mega-col-label h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
/* Colour variants */
.mega-title--green  { background: var(--green-lt); }
.mega-title--green  h3 { color: #004d0f; }
.mega-title--blue   { background: #e6f0fb; }
.mega-title--blue   h3 { color: #1a3a6b; }
.mega-title--yellow { background: #fdf8e1; }
.mega-title--yellow h3 { color: #6b5800; }

/* ── Col 2: Ministry links ───────────────────────────────────────── */
.mega-col-links {
  width: calc(100% / 3);
  flex-shrink: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.mega-child-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--txt-dark);
  text-decoration: none;
  border-radius: 3px;
  transition: color .15s, background .15s;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.mega-child-link::before { content: '→'; color: var(--green); font-size: 10px; flex-shrink: 0; }
.mega-child-link:hover,
.mega-child-link.is-active {
  color: var(--green);
  background: var(--green-lt);
}

/* ── Col 3: Dynamic content ──────────────────────────────────────── */
.mega-col-content {
  flex: 1;
  padding: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.mega-content-panel         { display: none; }
.mega-content-panel.is-visible { display: block; }

/* Nested links inside Col 3 — same style as standard dropdown */
.mega-nested-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mega-nested-links li { position: relative; }
.mega-nested-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--txt-dark);
  text-decoration: none;
  border-radius: 3px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.mega-nested-links li a::before { content: '→'; color: var(--green); font-size: 10px; flex-shrink: 0; }
.mega-nested-links li a:hover { color: var(--green); background: var(--green-lt); }

/* Side sub-menu inside Col 3 — mouseenter proximity */
.mega-nested-links .sub-menu--side { top: 0; left: 100%; }
.mega-nested-links .has-sub.side-open > .sub-menu--side {
  opacity: 1; visibility: visible; pointer-events: all; transform: translateX(0);
}

/* ── "About minister" panel ──────────────────────────────────────── */
.mega-about { display: flex; gap: 1.25rem; align-items: flex-start; padding: 20px; }
.mega-about-left { flex: 1; min-width: 0; }
.mega-about-left .f-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-dark);
  margin-bottom: .3rem;
}
/* Minister name — larger, shown above the link title */
.mega-about-left .f-minister-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: .2rem;
}
.mega-about-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.mega-about-links li a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--txt-dark);
  text-decoration: none;
  border-radius: 3px;
  transition: color .15s, background .15s;
}
.mega-about-links li a::before { content: '→'; color: var(--green); font-size: 10px; flex-shrink: 0; }
.mega-about-links li a:hover { color: var(--green); background: var(--green-lt); }

/* Minister photo — minimum 120×160px, object-fit covers any dimensions */
.mega-about-right { flex-shrink: 0; }
.mega-about-right img {
  width: 130px;
  height: 170px;
  min-width: 120px;
  min-height: 160px;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
  display: block;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}



/* ══════════════════════════════════════════════════════════════════
   OVERFLOW SCROLL BUTTONS
   Injected by initOverflowScroll() in main.js — no PHP changes.
   ══════════════════════════════════════════════════════════════════ */

/* Horizontal (primary nav) — prev/next left/right */
.mtp-hscroll {
  position: relative;
  overflow: visible;  /* must NOT clip — sub-menus are position:absolute children */
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
}
.mtp-hscroll-inner {
  display: flex;
  align-items: stretch;
  flex: 1;
  overflow-x: clip;   /* hides horizontal overflow without creating a scroll container
                         and without clipping vertical (sub-menus drop down freely) */
  overflow-y: visible;
  min-width: 0;
}
.mtp-hscroll-btn {
  display: none;
  position: absolute;
  top: 0; bottom: 0;
  width: 28px;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--txt-dark);
  transition: color .15s;
  z-index: 5;
  padding: 0;
}
.mtp-hscroll-btn.is-visible { display: flex; }
.mtp-hscroll-btn:hover { color: var(--green); }
.mtp-hscroll-btn.btn-prev {
  left: 0;
  background: linear-gradient(to right, #fff 55%, transparent);
}
.mtp-hscroll-btn.btn-next {
  right: 0;
  background: linear-gradient(to left, #fff 55%, transparent);
}

/* Vertical (mega columns) — prev/next top/bottom */
.mtp-vscroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.mtp-vscroll-inner {
  flex: 1;
  min-height: 0;
  overflow-y: hidden; /* JS scrolls via scrollTop */
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: .75rem .875rem;
  gap: 1px;
}
.mtp-vscroll-inner::-webkit-scrollbar { display: none; }
.mega-col-content .mtp-vscroll-inner { padding: .75rem 1rem; gap: 0; }
.mtp-vscroll-btn {
  display: none;
  width: 100%;
  height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--txt-muted);
  flex-shrink: 0;
  transition: color .15s, background .15s;
  padding: 0;
}
.mtp-vscroll-btn.is-visible { display: flex; }
.mtp-vscroll-btn:hover { color: var(--green); background: var(--green-lt); }
.mtp-vscroll-btn.btn-prev { border-bottom: 1px solid var(--border); }
.mtp-vscroll-btn.btn-next { border-top:    1px solid var(--border); }

/* ── Overlays (Search + Contact) ─────────────────────────────────── */
.overlay {
  position:fixed; inset:0; z-index:99999;
  display:flex; pointer-events:none; opacity:0;
  transition:opacity .25s;
}
.overlay.open { opacity:1; pointer-events:all; }
.ov-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.4); cursor:pointer; }
.ov-panel {
  position:relative; background:#fff;
  width:360px; max-width:100vw; height:100%; overflow-y:auto;
  padding:2rem; transform:translateX(-100%);
  transition:transform .3s cubic-bezier(.4,0,.2,1);
  display:flex; flex-direction:column; gap:18px;
}
.overlay.open .ov-panel { transform:translateX(0); }
.panel-close {
  background:none; border:none; font-size:22px; cursor:pointer;
  color:var(--txt-dark); padding:0; line-height:1; align-self:flex-start;
  transition:color .2s;
}
.panel-close:hover { color:var(--green); }
.panel-title { font-size:17px; font-weight:600; color:var(--txt-dark); }

/* Search form */
.search-form-row { display:flex; border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.search-form-row input[type="search"] { flex:1; border:none; padding:11px 13px; font-size:15px; font-family:inherit; outline:none; color:var(--txt-dark); }
.search-form-row input::placeholder { color:#bbb; }
.search-form-row button { background:var(--green); border:none; padding:11px 15px; color:#fff; cursor:pointer; font-size:15px; transition:background .2s; }
.search-form-row button:hover { background:var(--green-dk); }

/* Contact map + about */
.ov-map { width:100%; height:215px; border-radius:var(--r); overflow:hidden; border:1px solid var(--border); background:var(--green-lt); }
.ov-map iframe { width:100%; height:100%; border:0; }
.ov-about { border-top:1px solid var(--border); padding-top:14px; }
.ov-about h4 { font-size:15px; font-weight:600; color:var(--txt-dark); margin-bottom:7px; }
.ov-about p { font-size:13.5px; line-height:1.65; color:var(--txt-body); }
.ov-about strong { color:var(--txt-dark); }

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb-bar { padding:10px 0; border-bottom:1px solid var(--border); background:#fafafa; }
.breadcrumb { display:flex; align-items:center; gap:5px; font-size:12.5px; color:var(--txt-muted); list-style:none; flex-wrap:wrap; }
.breadcrumb li { display:flex; align-items:center; gap:5px; }
.breadcrumb li:not(:last-child)::after { content:'/'; color:#ccc; }
.breadcrumb a { color:var(--green); }

/* ==========================================
   HERO SLIDER
   MAX HEIGHT: 350px
========================================== */

.hero-slider-section {
    margin: 28px 0;
    position: relative;
    z-index: 0;  /* stays below sticky header dropdowns */
}

.hero-slider {
    position: relative;
    overflow: hidden;
    background: #ececec;
    max-height: 350px;
}

.hero-track {
    display: flex;
    transition: transform .9s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

.hero-slide {
    min-width: 100%;
    display: flex;
    align-items: stretch;
    background: #ececec;
    overflow: hidden;
    height: 350px;
    max-height: 350px;
}

/* ==========================================
   LEFT IMAGE
========================================== */

.hero-image-wrapper {
    width: 50%;
    height: 350px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transform: translateX(0);
    transition:
        transform 1s ease,
        scale .5s ease;
}

/* subtle hover zoom */
.hero-slide:hover .hero-image {
    transform: scale(1.03);
}

/* ==========================================
   RIGHT CONTENT
========================================== */

.hero-content {
    width: 50%;
    height: 350px;

    padding: 30px 45px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    transform: translateX(0);
    transition: transform 1.1s ease;

    overflow: hidden;
}

/* category badges */
.post-cats {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 0px;
}


/* title */
.hero-title {
    font-size:clamp(1.3rem, 1.3vw, 1.3rem);
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 16px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-title a {
    color: #1d1d1d;
    text-decoration: none;
    transition: color .25s ease;
}



/* excerpt */
.hero-excerpt {
    font-size: .98rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* date */
.hero-date {
    color: var(--green);
    font-size: .95rem;
    font-weight: 500;
    margin-top: 0px;
}

/* ==========================================
   ARROWS
========================================== */

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;

    width: 54px;
    height: 54px;

    border: none;
    background: rgba(0,0,0,0.521);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;

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

    transition:
        background .3s ease,
        color .3s ease,
        transform .25s ease;
}

/* hover state */
.hero-arrow:hover {
    background:var(--green);
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

/* arrow positions */
.hero-prev {
    left: 18px;
}

.hero-next {
    left: calc(50% - 72px);
}

/* ==========================================
   SLIDE ANIMATION
   image & content move independently
========================================== */

.hero-slide.animating .hero-image {
    transform: translateX(-35px);
}

.hero-slide.animating .hero-content {
    transform: translateX(-70px);
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 992px) {

    .hero-slider,
    .hero-slide {
        max-height: unset;
        height: auto;
    }

    .hero-slide {
        flex-direction: column;
    }

    .hero-image-wrapper {
        width: 100%;
        height: 250px;
    }

    .hero-content {
        width: 100%;
        height: auto;
        padding: 28px 24px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-excerpt {
        -webkit-line-clamp: 3;
    }

    .hero-next {
        left: auto;
        right: 18px;
    }
}

@media (max-width: 576px) {

    .hero-image-wrapper {
        height: 220px;
    }

    .hero-content {
        padding: 22px 20px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-arrow {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }
}
/* ── Section heading ─────────────────────────────────────────────── */
.section-head { display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.section-head h2 { font-size:20px; font-weight:700; color:var(--txt-dark); }
.section-head::before { content:''; display:block; width:5px; height:23px; background:var(--green); border-radius:2px; flex-shrink:0; }

/* ── Posts grid ──────────────────────────────────────────────────── */
.posts-section { padding:26px 0; }
.posts-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:17px; }
.post-card {
  display:flex; flex-direction:column; background:#fff;
  border:1px solid var(--border); border-radius:3px; overflow:hidden;
  transition:box-shadow .2s,transform .2s;
}
.post-card .post-cats a{ 
  background-color: var(--green-lght); 
  color: var(--txt-dark); 
  padding:0px 10px 2px 10px;
  font-size: 13px;
}

.post-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.card-thumb { overflow:hidden; background:var(--border); }
.card-thumb img { width:100%; aspect-ratio:16/10; object-fit:cover; transition:transform .3s; display:block; }
.post-card:hover .card-thumb img { transform:scale(1.04); }
.card-body { padding:11px 12px 13px; display:flex; flex-direction:column; gap:6px; flex:1; }
.card-body h3 { font-size:18px; font-weight:600; color:var(--txt-dark); line-height:1.4; flex:1; display:-webkit-box; -webkit-line-clamp:10; -webkit-box-orient:vertical; overflow:hidden; padding: 0px 5px 5px 0px; }
.card-body h3 a { color:inherit; }
.card-body h3 a:hover { color:var(--txt-dark); text-decoration: underline; }
.card-foot { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:0px; }
.read-arrow {    
  color: var(--green);
    font-size: 28px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .2s;
    display: inline-flex;
    font-family: 'Line Awesome Free';
    line-height: 0;
    -webkit-font-smoothing: antialiased;}
.read-arrow:hover { transform:translateX(4px); }

/* ══════════════════════════════════════════════════════════════════
   ANNONCES OFFICIELLES  (maquette annonces.png)
   Fond #EBEFFA, slider fade
════════════════════════════════════════════════════════════════ */
.ann-section {
  background: #fff;
}
.ann-section .container {
  background: #EBEFFA;
  padding: 40px  30px;
}
.ann-header { max-width: 620px; margin-bottom: 28px; }
.ann-header h2 { font-size: 20px; font-weight: 700; color: var(--txt-dark); margin-bottom: 8px; }
.ann-header p  { font-size: 14px; color: var(--txt-body); line-height: 1.6; }

.ann-slider { position: relative; min-height: 100px; }
.ann-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; text-align: center;
  padding: 10px 0;
}
.ann-slide.is-active { opacity: 1; visibility: visible; position: static; }

.ann-title {
  font-size: 15px; font-weight: 600;
  color: var(--txt-dark); text-decoration: none;
  transition: color .15s;
}
.ann-title:hover { color: var(--green); }
.ann-excerpt { font-size: 13.5px; color: var(--txt-body); line-height: 1.55; max-width: 580px; }
.ann-date    { font-size: 12px; color: var(--txt-muted); }
.ann-empty   { font-size: 14px; color: var(--txt-muted); font-style: italic; }

.ann-dots {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 22px;
}
.ann-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(0,0,0,.2); border: none; cursor: pointer;
  transition: background .2s, transform .2s; padding: 0;
}
.ann-dot.is-active { background: var(--green); transform: scale(1.25); }
.ann-dot:hover     { background: var(--green); }

/* ══════════════════════════════════════════════════════════════════
   DÉCOUVRIR NOTRE MINISTÈRE  (maquette organigramme.png)
   Cards 4 colonnes, label top-left, titre, description, flèche
════════════════════════════════════════════════════════════════ */
.discover-section { padding: 36px 0; }
.discover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width:900px) { .discover-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:550px) { .discover-grid { grid-template-columns: 1fr; } }

.discover-card {
  background: var(--green-lt);
  border: 1px solid rgba(0,142,28,.15);
  border-radius: var(--r);
  padding: 18px 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
  min-height: 160px;
}
.discover-card:hover { background: var(--green-lght); box-shadow: var(--shadow-sm); }
.discover-card--organi { background: #fff; border-color: var(--border); }
.discover-card--organi:hover { background: var(--green-lt); }

.dc-label {
  font-size: 10.5px; font-weight: 600;
  color: var(--green); text-transform: uppercase; letter-spacing: .4px;
}
.dc-title {
  font-size: 14px; font-weight: 600;
  color: var(--txt-dark); line-height: 1.35;
}
.dc-desc { font-size: 12.5px; color: var(--txt-body); line-height: 1.5; }
.dc-arrow {
  color: var(--green); font-size: 18px;
  margin-top: auto; align-self: flex-end;
  transition: transform .2s;
}
.discover-card:hover .dc-arrow { transform: translateX(4px); }
.discover-empty { font-size: 14px; color: var(--txt-muted); padding: 20px 0; }

/* ══════════════════════════════════════════════════════════════════
   ÉVÉNEMENTS  (maquette evenements.png)
   Cards image background, titre centré, date icône calendrier
════════════════════════════════════════════════════════════════ */
.events-section { padding: 36px 0; }
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width:600px) { .events-grid { grid-template-columns: 1fr; } }

.ev-card {
  position: relative;
  min-height: 200px;
  border-radius: var(--r);
  /* No image → primary colour background so the SVG placeholder is tinted */
  background: var(--green) center/cover no-repeat;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.ev-card-overlay {
  position: absolute; inset: 0;
  /* Gradient uses the theme primary colour so the overlay tone matches the chosen palette.
     The colour is applied via a CSS variable so it updates automatically when the
     user switches palette in the Customizer — no JS needed.
     Layer 1 (bottom): opaque primary          → strong tinted base for text legibility
     Layer 2 (middle): semi-transparent primary → smooth mid-tone transition
     Layer 3 (top):    transparent              → photo/colour shows through at the top */
  background:var(--green-lt);
}
/* Fallback for browsers without color-mix (Safari < 16.2, Firefox < 113) */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .ev-card-overlay {
    background: linear-gradient(
      to top,
      rgba(0,0,0,.65) 0%,
      rgba(0,0,0,.20) 60%,
      transparent 100%
    );
  }
}
.ev-card-body {
  position: relative; z-index: 1;
  width: 100%; padding: 20px 18px 16px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 10px;
}
.ev-card-title {
  font-size: 1.5em; font-weight: 600;
  line-height: 1.4;
}
.ev-card-title a { color: var(--txt-dark); text-decoration: none; }
.ev-card-title a:hover { text-decoration: underline; }
.ev-card-date {
  display: flex; align-items: center; gap: 6px;
  font-size: 1.5em; color: var(--green);
}
.ev-card-date svg { flex-shrink: 0; }

/* ── Footer pre (ministry text + blazon) ─────────────────────────── */
.footer-pre { background: #f3f3f3; padding: 42px 0 34px; }
.footer-pre-inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: 30px; align-items: center;
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
}
.fpi-title { font-size: 20px; font-weight: 700; color: var(--green); margin-bottom: 14px; }
.fpi-body  { font-size: 13.5px; color: var(--txt-body); line-height: 1.7; max-width: 560px; }
.footer-blazon { width: 120px; height: auto; object-fit: contain; }
.site-footer { background:#fff; color:var(--txt-body); border-top:1px solid var(--border); color:#ccc; padding:30px 0 0; }
.footer-grid { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:26px; max-width:var(--max-w); margin:0 auto; padding:0 20px 26px; }
.f-logo-row { display:flex; align-items:center; gap:9px; margin-bottom:9px; text-decoration:none; }
.f-logo-img { width:42px; height:42px; object-fit:contain; border-radius:2px; }
.f-logo-name { font-size:12px; font-weight:600; color:#fff; line-height:1.3; }
.footer-col h4 { font-size:13px; font-weight:600; color:var(--txt-dark); margin-bottom:11px; padding-bottom:7px; border-bottom:1px solid var(--border); }
.footer-col p { font-size:12.5px; color:var(--txt-body); line-height:1.6; }
.f-site-name { font-size:13px; font-weight:600; color:var(--txt-dark); margin-top:8px; line-height:1.4; max-width:180px; }
.footer-links { list-style:none; display:flex; flex-direction:column; gap:6px; }
.footer-links a { font-size:12.5px; color:#999; text-decoration:none; display:flex; align-items:center; gap:5px; transition:color .2s; }
.footer-links a::before { content:'✓'; color:var(--green); font-size:10px; }
.footer-links a:hover { color:#fff; }
.social-row { display:flex; gap:7px; margin-top:4px; }
.social-row a { width:31px; height:31px; background:#333; border-radius:3px; display:flex; align-items:center; justify-content:center; color:#ccc; font-size:14px; text-decoration:none; transition:background .2s,color .2s; }
.social-btn:hover { background:var(--green); transform:translateY(-2px); }
.footer-bottom { border-top:1px solid var(--border); padding:12px 20px; max-width:var(--max-w); margin:0 auto; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px; }
.footer-bottom p,.footer-bottom a { font-size:12px; color:var(--txt-muted); text-decoration:none; }
.footer-bottom a:hover { color:var(--green); }
.footer-bottom nav { display:flex; gap:13px; }

/* ── Interior page layout ────────────────────────────────────────── */
.page-layout { padding:26px 0 42px; }
.page-columns { display:grid; grid-template-columns:1fr 265px; gap:26px; max-width:var(--max-w); margin:0 auto; padding:0 20px; }
.page-content h1 { font-size:23px; font-weight:700; color:var(--txt-dark); margin-bottom:15px; line-height:1.3; display:flex; align-items:center; gap:9px; }
.page-content h1::before { content:''; display:inline-block; width:4px; height:1.1em; background:var(--green); border-radius:2px; flex-shrink:0; }
.entry-content { font-size:15px; line-height:1.75; color:var(--txt-body); }
.entry-content h2 { font-size:18px; font-weight:600; color:var(--txt-dark); margin:22px 0 10px; }
.entry-content h3 { font-size:16px; font-weight:600; color:var(--txt-dark); margin:18px 0 8px; }
.entry-content p { margin-bottom:13px; }
.entry-content ul,.entry-content ol { margin:10px 0 13px 22px; }
.entry-content li { margin-bottom:5px; }
.entry-content a { color:var(--green); text-decoration:underline; }
.entry-content img { border-radius:3px; margin:14px 0; }
.share-bar { display:flex; align-items:center; gap:8px; margin-top:20px; padding-top:13px; border-top:1px solid var(--border); font-size:13px; color:var(--txt-muted); flex-wrap:wrap; }
.share-bar strong { font-weight:600; color:var(--txt-dark); }
.share-btn { display:inline-flex; align-items:center; gap:4px; padding:5px 10px; border-radius:3px; font-size:12.5px; font-weight:500; text-decoration:none; transition:opacity .2s; }
.share-btn:hover { opacity:.85; }
.share-btn.fb { background:#1877f2; color:#fff; }
.share-btn.tw { background:#1da1f2; color:#fff; }
.share-btn.li { background:#0a66c2; color:#fff; }

/* Sidebar widgets */
.page-sidebar { display:flex; flex-direction:column; gap:18px; }
.sw { background:#fff; border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.sw-title { font-size:13.5px; font-weight:600; color:var(--txt-dark); padding:10px 14px; border-bottom:1px solid var(--border); background:#fafafa; }
.sw-search { display:flex; padding:10px; gap:6px; }
.sw-search input { flex:1; border:1px solid var(--border); border-radius:var(--r); padding:7px 9px; font-size:13.5px; font-family:inherit; outline:none; }
.sw-search input:focus { border-color:var(--green); }
.sw-search button { background:var(--green); border:none; color:#fff; padding:7px 12px; border-radius:var(--r); cursor:pointer; font-size:13px; }
.sw-search button:hover { background:var(--green-dk); }
.sw-links { list-style:none; }
.sw-links li { border-bottom:1px solid var(--border); }
.sw-links li:last-child { border-bottom:none; }
.sw-links a { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; font-size:13.5px; color:var(--txt-dark); text-decoration:none; transition:background .15s,color .15s; }
.sw-links a:hover { background:var(--green-lt); color:var(--green); }
.sw-links .arr { color:var(--green); font-size:13px; }
.sw-event { padding:10px 14px; border-bottom:1px solid var(--border); }
.sw-event:last-child { border-bottom:none; }
.sw-event-date { font-size:11px; font-weight:600; color:var(--green); margin-bottom:2px; }
.sw-event-title a { font-size:13px; color:var(--txt-dark); text-decoration:none; line-height:1.4; }
.sw-event-title a:hover { color:var(--green); }

/* ── Archive ─────────────────────────────────────────────────────── */
.archive-title { font-size:22px; font-weight:700; color:var(--txt-dark); display:flex; align-items:center; gap:9px; margin-bottom:20px; }
.archive-title::before { content:''; display:inline-block; width:4px; height:1.1em; background:var(--green); border-radius:2px; flex-shrink:0; }
.archive-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:19px; }
.pagination { display:flex; justify-content:center; gap:5px; margin-top:26px; flex-wrap:wrap; }
.pagination a,.pagination span { display:flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:var(--r); font-size:13.5px; font-weight:500; text-decoration:none; transition:background .15s,color .15s; border:1px solid var(--border); color:var(--txt-dark); }
.pagination a:hover { background:var(--green); color:#fff; border-color:var(--green); }
.pagination .current { background:var(--green); color:#fff; border-color:var(--green); }

/* ── Contact page ────────────────────────────────────────────────── */
.contact-page { padding:24px 0 42px; }
.contact-map-full { width:100%; height:310px; border-radius:var(--r); overflow:hidden; margin-bottom:28px; border:1px solid var(--border); }
.contact-map-full iframe { width:100%; height:100%; border:0; }
.contact-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(245px,1fr)); gap:18px; }
.c-dept { background:#fff; border:1px solid var(--border); border-radius:var(--r); padding:17px; }
.c-dept h4 { font-size:14px; font-weight:700; color:var(--txt-dark); margin-bottom:10px; padding-bottom:7px; border-bottom:1px solid var(--border); }
.c-dept ul { list-style:none; display:flex; flex-direction:column; gap:5px; }
.c-dept li { display:flex; align-items:flex-start; gap:7px; font-size:13px; color:var(--txt-body); }
.ci { color:var(--green); font-size:13px; flex-shrink:0; margin-top:2px; }
.contact-cta { margin-top:26px; padding:18px; border:1px solid rgba(0,142,28,.3); border-radius:var(--r); text-align:center; background:var(--green-lt); }
.contact-cta h3 { font-size:15px; font-weight:600; margin-bottom:9px; }
.contact-cta a { display:inline-flex; align-items:center; gap:5px; color:var(--green); font-weight:600; padding:8px 18px; border:2px solid var(--green); border-radius:3px; transition:background .2s,color .2s; }
.contact-cta a:hover { background:var(--green); color:#fff; }

/* ── 404 ─────────────────────────────────────────────────────────── */
.error-page { padding:60px 20px; text-align:center; }
.error-page h1 { font-size:80px; font-weight:700; color:var(--green); line-height:1; }
.error-page h2 { font-size:24px; font-weight:600; color:var(--txt-dark); margin:12px 0; }
.error-page p { color:var(--txt-body); margin-bottom:20px; }

/* ── Mobile nav ──────────────────────────────────────────────────── */
.mobile-bar { display:none; align-items:center; justify-content:space-between; padding:8px 15px; border-top:1px solid var(--border); }
.mob-contact-btn { background:var(--green); color:#fff; border:none; padding:7px 15px; border-radius:3px; font-size:13.5px; font-weight:600; cursor:pointer; font-family:inherit; }
.mob-ham { background:none; border:none; font-size:21px; cursor:pointer; color:var(--txt-dark); padding:4px; }

/* Mobile overlay */
.mob-overlay { position:fixed; inset:0; z-index:3000; pointer-events:none; opacity:0; transition:opacity .25s; z-index: 99999; }
.mob-overlay.open { opacity:1; pointer-events:all; }
.mob-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.5); }
.mob-drawer { position:absolute; inset:0 60px 0 0; max-width:375px; background:#fff; overflow-y:auto; transform:translateX(-100%); transition:transform .3s cubic-bezier(.4,0,.2,1); }
.mob-overlay.open .mob-drawer { transform:translateX(0); }
.mob-close { position:absolute; top:13px; right:13px; background:none; border:none; font-size:22px; cursor:pointer; color:var(--txt-dark); z-index:5; }
.mob-nav { list-style:none; }
.mob-nav > li { border-bottom:1px solid var(--border); }
.mob-nav > li > a,.mob-nav > li > .mob-item { display:flex; align-items:center; justify-content:space-between; padding:14px 19px; font-size:15px; font-weight:500; color:var(--txt-dark); text-decoration:none; cursor:pointer; background:none; border:none; width:100%; font-family:inherit; }
.mob-nav > li.current-menu-item > a,.mob-nav > li.current-menu-item > .mob-item { background:var(--green); color:#fff; }
.mob-arr { font-size:13px; color:#999; }
.current-menu-item .mob-arr { color:rgba(255,255,255,.7); }
/* Sub panels */
.mob-sub { position:absolute; inset:0; background:#fff; transform:translateX(100%); transition:transform .3s cubic-bezier(.4,0,.2,1); overflow-y:auto; z-index:5; }
.mob-sub.open { transform:translateX(0); }
.mob-sub-head { display:flex; align-items:center; gap:8px; padding:14px 19px; border-bottom:2px solid var(--green); }
.mob-sub-head h3 { font-size:15px; font-weight:600; color:var(--txt-dark); }
.mob-back { background:none; border:none; font-size:17px; cursor:pointer; color:var(--txt-muted); padding:0; }
.mob-sub-list { list-style:none; }
.mob-sub-list li { border-bottom:1px solid var(--border); }
.mob-sub-list a { display:flex; align-items:center; gap:7px; padding:12px 19px; font-size:14px; color:var(--txt-dark); text-decoration:none; }
.mob-sub-list a::before { content:'→'; color:var(--green); font-size:11px; }
.mob-sub-list a:hover { background:var(--green-lt); color:var(--green); }
.mob-featured { padding:14px 19px; border-bottom:1px solid var(--border); }
.mob-featured-name { font-size:14px; font-weight:600; margin-bottom:7px; }
.mob-featured-links { display:flex; flex-direction:column; gap:4px; }
.mob-featured-links a { display:flex; align-items:center; gap:5px; font-size:13.5px; color:var(--green); text-decoration:none; }
.mob-featured-links a::before { content:'→'; font-size:10px; }
.mob-featured img { width:72px; height:62px; object-fit:cover; border-radius:3px; margin-top:8px; }

/* ══════════════════════════════════════════════════════════════════
   TROMBI / ORGANIGRAMME
════════════════════════════════════════════════════════════════ */
.trombi-page { padding: 30px 0 50px; }
.organi-header { margin-bottom: 32px; padding-bottom: 18px; border-bottom: 2px solid var(--green); }
.organi-title  { font-size: 26px; font-weight: 700; color: var(--txt-dark); margin-bottom: 8px; }
.organi-desc   { font-size: 14px; color: var(--txt-body); line-height: 1.6; }
.trombi-empty  { font-size: 14px; color: var(--txt-muted); padding: 20px 0; }

.trombi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.trombi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.trombi-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }

.trombi-photo img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover; display: block;
}
.trombi-info { padding: 10px 10px 12px; }
.trombi-name { font-size: 13px; font-weight: 600; color: var(--txt-dark); line-height: 1.35; }
.trombi-role { font-size: 11.5px; color: var(--green); margin-top: 3px; }

/* Modal */
.trombi-modal {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; transition: opacity .22s;
}
.trombi-modal:not([hidden]) { opacity: 1; }
.trombi-modal[hidden] { display: none; }

.trombi-modal-inner {
  background: #fff;
  border-radius: var(--r);
  max-width: 660px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: trombi-in .22s ease;
}
@keyframes trombi-in { from { transform:scale(.94); opacity:0; } to { transform:scale(1); opacity:1; } }

.trombi-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--txt-muted); line-height: 1;
  transition: color .15s;
}
.trombi-modal-close:hover { color: var(--txt-dark); }

.trombi-modal-body {
  display: flex; gap: 22px; padding: 28px 24px 24px;
  align-items: flex-start;
}
.trombi-modal-photo img {
  width: 130px; height: 160px;
  object-fit: cover; border-radius: 4px; flex-shrink: 0; display: block;
}
.trombi-modal-text { flex: 1; min-width: 0; }
.trombi-modal-text h2 { font-size: 18px; font-weight: 700; color: var(--txt-dark); margin-bottom: 4px; }
.trombi-modal-role { font-size: 13px; color: var(--green); margin-bottom: 14px; }
.trombi-modal-content { font-size: 13.5px; color: var(--txt-body); line-height: 1.65; }
.trombi-modal-content p { margin-bottom: 10px; }
.footer-blazon{width: 300px;}

@media (max-width:500px) {
  .trombi-modal-body { flex-direction: column; align-items: center; }
  .trombi-modal-photo img { width: 100px; height: 120px; }
}


/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width:1024px) {
  .posts-grid { grid-template-columns:repeat(2,1fr); }
  .primary-menu > li > a,.primary-menu > li > .menu-toggle { padding:0 11px; font-size:13px; }
}
@media (max-width:768px) {
  :root { --hdr-h:106px; }
  .site-nav-bar { display:none; }
  .mobile-bar { display:flex; }
  .hero-card { grid-template-columns:1fr; }
  .hero-body { padding:17px; }
  .hero-body h2 { font-size:17px; }
  .posts-grid { grid-template-columns:1fr; gap:11px; }
  .archive-grid { grid-template-columns:1fr; }
  .footer-pre-inner { grid-template-columns:1fr; }
  .footer-blazon { display:none; }
  .footer-grid { grid-template-columns:1fr; gap:22px; }
  .page-columns { grid-template-columns:1fr; }
  .page-sidebar { display:none; }
  .contact-grid { grid-template-columns:1fr; }
  .discover-grid { grid-template-columns:repeat(2,1fr); }
  .announcements-section { padding:24px 0; }
}
@media (max-width:480px) {
  .discover-grid { grid-template-columns:1fr; }
  .hero-body h2 { font-size:15px; }
  .section-head h2 { font-size:17px; }
}

/* ── Utilities ───────────────────────────────────────────────────── */
.visually-hidden,.screen-reader-text{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}

/* ── Broken / placeholder image ──────────────────────────────────── */
img.img-ph {
  background: #e8e8e8;
  object-fit: contain;
  object-position: center;
}
/* Fill card containers */
.card-thumb img.img-ph,
.post-thumb img.img-ph,
.hero-image-wrapper img.img-ph,
.hero-slide img.img-ph {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
/* Minister photo in mega menu */
.mega-about-right img.img-ph {
  width: 130px; height: 170px;
  object-fit: cover;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   ANNONCES & ÉVÉNEMENTS SECTION  v4
═══════════════════════════════════════════════════════════════ */

.ann-header {
  text-align: left;
  margin-bottom: 32px;
}
.ann-header h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .5rem;
}
.ann-header p {
  font-size: 15px;
  color: var(--txt-muted);
  max-width: 620px;
}
.ann-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ann-slider {
  position: relative;
  min-height: 120px;
}
.ann-slide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  transition: opacity .45s ease;
}
.ann-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: static;
}
.ann-slide-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  min-height: 120px;
}
.ann-slide-inner--empty {
  justify-content: center;
  align-items: center;
  color: var(--txt-muted);
}
.ann-thumb {
  flex-shrink: 0;
  width: 140px;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-light);
}
.ann-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ann-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.ann-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  width: fit-content;
}
.ann-badge--annonce {
  background:var(--green-lght);
  color: var(--green-dk);
}
.ann-badge--event {
  background: #fff3e0;
  color: #b45309;
}
.ann-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  line-height: 1.35;
  display: block;
}
.ann-title:hover { color: var(--green); }
.ann-excerpt {
  font-size: 14px;
  color: var(--txt-muted);
  line-height: 1.55;
  margin: 0;
}
.ann-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.ann-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--txt-muted);
}
.ann-readmore {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.ann-readmore:hover { text-decoration: underline; }
.ann-empty { color: var(--txt-muted); font-size: 15px; }
.ann-dots-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.ann-dots {
  display: flex;
  gap: 9px;
  align-items: center;
}
.ann-empty-state {
  text-align: center;
  padding: 40px 0;
}
.ann-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.ann-dot.is-active {
  background: var(--green);
  transform: scale(1.25);
}
@media (max-width: 600px) {
  .ann-slide-inner { flex-direction: column; }
  .ann-thumb { width: 100%; height: 160px; }
}

/* ═══════════════════════════════════════════════════════════════
   ORGANIGRAMME PAGE  v4
═══════════════════════════════════════════════════════════════ */
.organi-page { padding: 40px 0 60px; }
.organi-header { margin-bottom: 36px; }
.organi-type-badge { margin-bottom: 8px; }
.type-badge {
  display: inline-block;
  background: var(--green-lt);
  color: var(--green-dk);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.organi-title { font-size: clamp(1.4rem,3vw,2rem); font-weight: 700; margin: .25rem 0; }
.organi-description { color: var(--txt-muted); font-size: 15px; max-width: 640px; }
.organi-empty { color: var(--txt-muted); font-size: 15px; padding: 20px 0; }

/* ── Org chart container ────────────────────────────────────── */
.organi-chart-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
  position: relative;
}
.organi-chart-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 6px;
}
.orgchart-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: background .15s;
}
.orgchart-btn:hover { background: var(--green-lt); }
.orgchart-container {
  width: 100%;
  height: 520px;
  overflow: hidden;
  cursor: grab;
}
.orgchart-container:active { cursor: grabbing; }
#orgchart-svg {
  width: 100%;
  height: 100%;
}
/* D3 OrgChart node styles injected via JS */
/* ── Orgchart nodes — formal institutional design ─────────── */
.oc-node {
  cursor: pointer;
}
.oc-node rect {
  transition: fill .15s;
}
.oc-link {
  fill: none;
  stroke: #1A3A5C;
  stroke-width: 1.5;
}
/* Print button */
.orgchart-btn--print {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-left: 1px solid var(--border);
  margin-left: 4px;
}
.orgchart-btn--print svg { pointer-events: none; }

/* ── Member card grid ──────────────────────────────────────── */
.membres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  padding: 8px 0 40px;
}
.membre-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.membre-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.membre-thumb {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-light);
}
.membre-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.membre-card:hover .membre-thumb img { transform: scale(1.04); }
.membre-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.membre-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--dark);
}
.membre-position {
  font-size: 12px;
  color: var(--green-dk);
  font-weight: 500;
  margin: 0;
}
.membre-more-btn {
  margin-top: auto;
  padding-top: 10px;
  background: none;
  border: 1.5px solid var(--green);
  border-radius: 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  transition: background .15s, color .15s;
  align-self: flex-start;
}
.membre-more-btn:hover { background: var(--green); color: #fff; }

/* ── Membre overlay ─────────────────────────────────────────── */
.membre-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.membre-overlay[hidden] { display: none; }
.membre-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
}
.membre-overlay-panel {
  position: relative;
  background: #fff;
  border-radius: 14px;
  max-width: 760px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  z-index: 1;
}
.membre-overlay-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--txt-muted);
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
}
.membre-overlay-close:hover { background: var(--bg-light); }
.membre-overlay-body {
  display: flex;
  gap: 28px;
  padding: 36px;
  align-items: flex-start;
}
.mob-photo-col {
  flex-shrink: 0;
  width: 140px;
}
.mob-photo-col img {
  width: 140px;
  height: 175px;
  object-fit: cover;
  border-radius: 10px;
  border: 3px solid var(--green-lt);
}
.mob-text-col { flex: 1; min-width: 0; }
.mob-text-col h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 4px; }
.mob-position {
  font-size: 13px;
  color: var(--green-dk);
  font-weight: 600;
  margin: 0 0 16px;
}
.mob-content { font-size: 14px; line-height: 1.7; color: var(--txt); }
.mob-content p:last-child { margin-bottom: 0; }
@media (max-width: 520px) {
  .membre-overlay-body { flex-direction: column; padding: 24px; }
  .mob-photo-col { width: 100%; }
  .mob-photo-col img { width: 100%; height: 200px; border-radius: 8px; }
}

/* ══════════════════════════════════════════════════════════════════
   MEMBER CARD — role + name always visible, historical dates  v4.1
══════════════════════════════════════════════════════════════════ */
.membre-role {
  font-size: 11px;
  font-weight: 500;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 3px;
  line-height: 1.3;
}
.membre-dates {
  font-size: 12px;
  color: var(--green-dk);
  font-weight: 500;
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.membre-dates-label {
  font-weight: 700;
  color: var(--green);
}
.membre-dates em { font-style: italic; color: var(--txt-muted); }

/* Overlay role + dates */
.mob-role {
  font-size: 12px;
  font-weight: 500;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 4px;
}
.mob-dates {
  font-size: 13px;
  color: var(--green-dk);
  font-weight: 600;
  margin: 4px 0 14px;
  padding: 6px 12px;
  background: var(--green-lt);
  border-left: 3px solid var(--green);
  border-radius: 0 4px 4px 0;
}

/* ══════════════════════════════════════════════════════════════════
   FULL RESPONSIVE — all screens  v4.1
   Breakpoints: 1200 · 1024 · 900 · 768 · 600 · 480 · 360
══════════════════════════════════════════════════════════════════ */

/* ── 1200 — constrain container ─────────────────────────────────── */
@media (max-width: 1240px) {
  .container { padding: 0 24px; }
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── 1024 — tablet landscape ────────────────────────────────────── */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .mega-menu { width: 90%; }
  .membres-grid { grid-template-columns: repeat(3, 1fr); }
  .orgchart-container { height: 420px; }
  /* Header */
  .site-header .header-inner { gap: 10px; }
}

/* ── 900 — tablet ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .discover-grid { grid-template-columns: repeat(2, 1fr); }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .membres-grid { grid-template-columns: repeat(2, 1fr); }
  .ann-slide-inner { flex-direction: column; }
  .ann-thumb { width: 100%; height: 180px; }
  /* Footer */
  .site-footer .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 768 — tablet portrait ───────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav: hide desktop, show hamburger */
  .site-nav-bar { display: none; }
  .hamburger { display: flex; }

  /* Header layout */
  .site-header .header-actions .search-toggle,
  .site-header .header-actions .contact-btn { font-size: 13px; }

  .hero-slider { gap: 0; }
  .hero-image-wrapper { height: 220px; }
  .hero-content { padding: 20px; }
  .hero-title { font-size: 1.3rem; }

  .posts-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .discover-grid { grid-template-columns: 1fr 1fr; }
  .events-grid { grid-template-columns: 1fr; }

  /* Organigramme page */
  .organi-page { padding: 24px 0 40px; }
  .orgchart-container { height: 380px; }
  .membre-overlay-body { padding: 24px; gap: 18px; }

  /* Footer */
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
}

/* ── 600 — large phone ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .container { padding: 0 16px; }

  /* Section headings */
  .section-head h2 { font-size: 17px; }
  .ann-header h2 { font-size: 1.2rem; }

  /* Grids → 1 column */
  .posts-grid { grid-template-columns: 1fr; }
  .discover-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .membres-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* Ann slide */
  .ann-slide-inner { flex-direction: column; padding: 18px; }
  .ann-thumb { width: 100%; height: 160px; }

  /* Overlay full-screen on phone */
  .membre-overlay-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    top: auto;
    max-height: 88vh;
  }
  .membre-overlay { align-items: flex-end; }
  .membre-overlay-body { flex-direction: column; padding: 20px; gap: 16px; }
  .mob-photo-col { width: 100%; }
  .mob-photo-col img { width: 100%; height: 180px; border-radius: 8px; }

  /* Orgchart toolbar */
  .organi-chart-toolbar { gap: 4px; }
  .orgchart-btn { width: 28px; height: 28px; font-size: 14px; }
  .orgchart-container { height: 320px; }
}

.post-card .post-cats a {
    background-color: var(--green-lght);
    color: var(--green);
}


/* ── 480 — phone ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .membres-grid { grid-template-columns: 1fr; }
  .hero-image-wrapper { height: 180px; }
  .hero-title { font-size: 1.15rem; }
  .hero-excerpt { display: none; }
  .ev-card { min-height: 160px; }
  .discover-card { padding: 18px 16px; }
  .orgchart-container { height: 280px; }
  /* Posts grid */
  .post-card .card-thumb { height: 160px; }
}

/* ── 360 — very small phones ─────────────────────────────────────── */
@media (max-width: 360px) {
  .container { padding: 0 12px; }
  .hero-content { padding: 14px; }
  .ann-slide-inner { padding: 14px; }
  .membre-overlay-body { padding: 14px; }
  .orgchart-container { height: 240px; }
}

/* ── Print ───────────────────────────────────────────────────────── */
@media print {
  .site-nav-bar, .hamburger, .site-topbar,
  .hero-slider-section, .ann-section, .discover-section,
  .events-section, .site-footer,
  .organi-chart-toolbar, .membre-overlay { display: none !important; }
  .orgchart-container { height: auto; overflow: visible; }
  #orgchart-svg { width: 100%; height: auto; }
}

/* ══════════════════════════════════════════════════════════════════
   V5 ADDITIONS
══════════════════════════════════════════════════════════════════ */

/* ── Flag stripe above footer ───────────────────────────────────── */
.site-topbar--footer {
  margin-top: 0;           /* flush against footer-pre top edge */
}

/* ── Ancien organigramme badge ──────────────────────────────────── */
.organi-ancien-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.badge-ancien {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 3px;
  background: #fff3e0;
  color: #7c4700;
  border: 1px solid #f5c07a;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-ancien::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}
.badge-ancien-dates {
  font-size: 14px;
  font-weight: 600;
  color: #92600a;
}

/* ── Member overlay — always above everything including the nav ─── */
.membre-overlay {
  z-index: 999999 !important;   /* higher than .site-header (z-index:1000) */
}

/* ── Orgchart toolbar — download buttons ───────────────────────── */
.orgchart-btn--dl {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  min-width: 56px;
  width: auto;
  border-left: 1px solid var(--border);
  margin-left: 2px;
  white-space: nowrap;
}
.orgchart-btn--dl svg { flex-shrink: 0; pointer-events: none; }

/* ── Non-hierarchical grid export toolbar ──────────────────────── */
.organi-grid-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

/* ── Orgchart node lines use theme colour (set inline via JS COLORS) */
/* already handled by JS getCSSVar, no extra CSS needed */

/* ── Overlay z-index: ensure it covers the sticky header too ────── */
.membre-overlay-backdrop { z-index: 0; }
.membre-overlay-panel    { z-index: 1; }
