/*
Theme Name: République Gabonaise
Theme URI: https://github.com/aninf/ministere-gabon
Author: ANINF
Author URI: http://www.aninf.ga/
Description: Thème WordPress pour les ministères de la République Gabonaise. Version 3.3 : base v3.2 (corrections d'audit + sécurité) fusionnée avec les évolutions fonctionnelles du footer, et durcissement HTTP conforme au rapport DISI (en-têtes de sécurité, SRI). Suppression des dépendances CDN, cloisonnement des médias, accessibilité RGAA, restitution complète des réglages du Customizer. Dépend du mu-plugin likia-migration.php pour les types de contenu « agent », « likia_event » et « document » (voir README.md).
Version: 3.3.3
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ministere-gabon
Domain Path: /languages
Tags: government, institutional, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, translation-ready
*/

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body, #ffffff);
}

/* ===========================================
   Preloader
   =========================================== */
/*
 * P0-01 : le préloader n'est PLUS affiché par défaut. En 3.1, ce calque plein
 * écran n'était jamais masqué par le CSS : sa disparition dépendait uniquement
 * de GSAP, chargé depuis un CDN. Une simple indisponibilité d'unpkg.com ou de
 * cdnjs rendait le site entièrement invisible.
 * Il n'apparaît désormais que si JavaScript s'exécute (classe `js` posée sur
 * <html> par ministere_gabon_html_js_class()), et un setTimeout de sécurité
 * de 3 s le retire quoi qu'il arrive (assets/js/theme.js).
 */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

html.js #preloader {
  display: flex;
}

#preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preloader-logo {
  max-width: 120px;
  height: auto;
}

.preloader-texts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.preloader-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preloader-sitename {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.preloader-progress-wrap {
  width: 200px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.preloader-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 2px;
  transition: none;
}

.preloader-percent {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gabarais-green {
  color: var(--color-primary, #009639);
}

.bg-gabarais-green {
  background-color: var(--color-primary, #009639);
}

.bg-gabarais-yellow {
  background-color: var(--color-secondary, #FFD100);
}

.bg-gabarais-blue {
  background-color: var(--color-accent, #0072C6);
}

.text-gabarais-green {
  color: var(--color-primary, #009639);
}

.border-gabarais-green {
  border-color: var(--color-primary, #009639);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.hero-carousel-track {
  position: relative;
}

.hero-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-carousel-btn-prev {
  left: 1rem;
}

.hero-carousel-btn-next {
  right: 1rem;
}

.hero-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 9999px;
}

.hero-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

.hero-carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.hero-carousel-progress-bar {
  height: 100%;
  width: 0;
  background: var(--color-primary, #009639);
  transition: width 0.1s linear;
}

.header-logo-2 {
  min-width: 3rem;
}

@media (max-width: 767px) {
  .hero-carousel-btn {
    width: 2.25rem;
    height: 2.25rem;
  }

  .hero-carousel-btn-prev {
    left: 0.5rem;
  }

  .hero-carousel-btn-next {
    right: 0.5rem;
  }
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary, #009639);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.card-hover {
  transition: transform 0.3s, box-shadow 0.3s;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-card {
  transition: all 0.3s;
}

.service-card:hover {
  background-color: #e8f5e9;
}

.arrow-btn {
  transition: transform 0.3s;
}

.arrow-btn:hover {
  transform: translateX(4px);
}

.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

.search-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-panel {
  transform: translateY(-30px);
  transition: transform 0.3s ease;
}

.search-overlay.open .search-panel {
  transform: translateY(0);
}

/* Custom adjustments for dynamic WordPress menu styling to match the mock */
.nav-container {
  position: relative;
}

.nav-container > ul {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;
}

.nav-container > ul > li {
  position: relative;
  margin: 0 1rem;
}

.nav-container > ul > li:first-child {
  margin-left: 0;
}

.nav-container > ul > li > a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  transition: color 0.2s;
  position: relative;
}

.nav-container > ul > li > a:hover {
  color: var(--color-primary, #009639);
}

/* Active menu item — top level */
.nav-container > ul > .current-menu-item > a,
.nav-container > ul > .current-menu-ancestor > a,
.nav-container > ul > .current-menu-parent > a {
  color: var(--color-primary, #009639);
}

.nav-container > ul > .current-menu-item > a::after,
.nav-container > ul > .current-menu-ancestor > a::after,
.nav-container > ul > .current-menu-parent > a::after {
  width: 100%;
}

.nav-container > ul > .current-menu-item:not(.menu-item-has-children) > a::after,
.nav-container > ul > .current-menu-ancestor:not(.menu-item-has-children) > a::after,
.nav-container > ul > .current-menu-parent:not(.menu-item-has-children) > a::after {
  transform: scaleX(1);
}

/* Active sub-menu item */
.nav-container .sub-menu li.current-menu-item > a,
.nav-container .sub-menu li.current-menu-ancestor > a {
  background-color: #f0fdf4;
  color: var(--color-primary, #009639);
  font-weight: 600;
}

/* Underline animation — top-level links only (not chevron parents) */
.nav-container > ul > li:not(.menu-item-has-children) > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary, #009639);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.nav-container > ul > li:not(.menu-item-has-children) > a:hover::after {
  transform: scaleX(1);
}

/* ===========================================
   Dropdown Sub-menus
   =========================================== */

.nav-container .menu-item-has-children {
  position: relative;
}

/* Invisible bridge so hover is not lost between parent and panel */
.nav-container .menu-item-has-children::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 49;
}

/* Sub-menu: hidden by default */
.nav-container .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 50;
  padding: 0.25rem 0;
  margin: 0;
  list-style: none;
}

/* Show direct sub-menu on hover or keyboard focus */
.nav-container .menu-item-has-children:hover > .sub-menu,
.nav-container .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-container .sub-menu li {
  position: relative;
  width: 100%;
}

.nav-container .sub-menu li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem !important;
  white-space: nowrap;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  font-weight: 400;
  color: #374151;
  transition: background-color 0.15s, color 0.15s;
}

.nav-container .sub-menu li:last-child > a {
  border-bottom: none;
}

.nav-container .sub-menu li a:hover,
.nav-container .sub-menu li a:focus {
  background-color: #f9fafb;
  color: var(--color-primary, #009639);
}

.menu-icon {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--color-primary, #009639);
  opacity: 0.65;
}

.sub-menu li a:hover .menu-icon {
  opacity: 1;
}

.menu-item-title {
  flex: 1;
}

/* Dropdown chevron — top-level parents only */
.nav-container > ul > .menu-item-has-children > a {
  padding-right: 1.5rem !important;
}

.nav-container > ul > .menu-item-has-children > a::after {
  content: '';
  position: absolute;
  right: 0.25rem;
  top: 50%;
  bottom: auto;
  left: auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.5;
  transform: translateY(-50%);
  background: none;
}

/* Nested sub-menu items with children */
.nav-container .sub-menu .menu-item-has-children > a {
  padding-right: 2rem !important;
}

.nav-container .sub-menu .menu-item-has-children > a::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
  opacity: 0.5;
  transform: translateY(-50%);
}

/* 3rd level sub-menu: flyout to the right */
.nav-container .sub-menu .sub-menu {
  top: -4px;
  left: 100%;
  margin-left: -1px;
}

.nav-container .sub-menu .menu-item-has-children:hover > .sub-menu,
.nav-container .sub-menu .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===========================================
   Mobile Menu Submenus
   =========================================== */

#mobileMenu .sub-menu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
}

#mobileMenu .sub-menu .sub-menu {
  padding-left: 1rem;
}

#mobileMenu .sub-menu.open {
  display: block;
}

#mobileMenu .sub-menu li a {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
}

#mobileMenu .sub-menu li a::after {
  display: none !important;
}

#mobileMenu .menu-item-has-children > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 0.5rem;
}

#mobileMenu .menu-item-has-children > a::after {
  display: inline-block;
  content: '';
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.5;
  transition: transform 0.2s;
}

#mobileMenu .menu-item-has-children > a.toggled::after {
  transform: rotate(180deg);
}

/* ===========================================
   Archive Page Pagination
   =========================================== */

.pagination-archive .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pagination-archive .nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.pagination-archive .nav-links .page-numbers:hover {
  background-color: #f3f4f6;
  border-color: var(--color-primary, #009639);
  color: var(--color-primary, #009639);
}

.pagination-archive .nav-links .page-numbers.current {
  background-color: var(--color-primary, #009639);
  border-color: var(--color-primary, #009639);
  color: #fff;
  font-weight: 600;
}

.pagination-archive .nav-links .prev,
.pagination-archive .nav-links .next {
  border: none;
  color: var(--color-primary, #009639);
}

.pagination-archive .nav-links .prev:hover,
.pagination-archive .nav-links .next:hover {
  background-color: #e8f5e9;
}

/* ===========================================
   Archive Search Input Focus
   =========================================== */

.focus\:border-gabarais-green:focus {
  border-color: var(--color-primary, #009639);
}

.focus\:ring-gabarais-green:focus {
  --tw-ring-color: var(--color-primary, #009639);
}

/* ===========================================
   Mega Menu (nav-container walker)
   =========================================== */

.nav-container .mega-menu-item {
  position: static !important;
}

.nav-container .mega-menu-item::before {
  display: none;
}

.nav-container .mega-menu-item > .mega-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: none;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 50;
  padding: 1.5rem;
}

.nav-container .mega-menu-item:hover > .mega-container,
.nav-container .mega-menu-item:focus-within > .mega-container {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 4-column grid */
.nav-container .mega-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr 1fr;
  gap: 1.5rem;
}

/* Column 1 — Description */
.nav-container .mega-col-desc {
  background: var(--megamenu-col1-bg, #f9fafb);
  padding: 1rem;
  border-radius: 6px;
}

.nav-container .mega-col-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.75rem 0;
}

.nav-container .mega-col-desc-text {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

/* Column 2 — Parent links */
.nav-container .mega-col-parents {
  border-right: 1px solid #e5e7eb;
  padding-right: 1rem;
}

.nav-container .mega-parents-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-container .mega-parent-item {
  margin-bottom: 0.25rem;
}

.nav-container .mega-parent-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-container .mega-parent-link:hover,
.mega-container .mega-parent-link:focus {
  background: #f0fdf4;
  color: var(--color-primary, #009639);
}

.nav-container .mega-parent-chevron {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.nav-container .mega-parent-link:hover .mega-parent-chevron {
  opacity: 1;
  transform: translateX(2px);
}

/* Column 3 — Children panels */
.nav-container .mega-col-children {
  padding: 0 1rem;
  min-height: 120px;
}

.nav-container .mega-children-panel {
  display: none;
}

.nav-container .mega-children-panel.active {
  display: block;
}

.nav-container .mega-children-title {
  display: none;
}

.nav-container .mega-children-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-container .mega-child-link {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-container .mega-child-link:hover {
  color: var(--color-primary, #009639);
}

.nav-container .mega-children-placeholder {
  font-size: 0.8125rem;
  color: #9ca3af;
  font-style: italic;
  margin: 0;
}

/* Column 4 — Minister */
.nav-container .mega-col-minister {
  text-align: center;
  padding-left: 1rem;
  border-left: 1px solid #e5e7eb;
}

.nav-container .minister-photo-wrap {
  margin-bottom: 0.75rem;
}

.nav-container .minister-photo {
  width: 100%;
  max-width: 140px;
  height: auto;
  border-radius: 0;
  border: 0;
  display: block;
  margin: 0 auto;
}

.nav-container .minister-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #374151;
  margin: 0;
  line-height: 1.3;
}

/* ===========================================
   Mega Menu (alternate megamenu walker)
   =========================================== */

/* Mega Menu Panel */
.megamenu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: 3px solid var(--color-primary, #009639);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
  max-width: 1400px;
  margin: 0 auto;
}

.megamenu-top-item:hover .megamenu-panel,
.megamenu-top-item:focus-within .megamenu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.megamenu-inner {
  padding: 2rem 3rem;
}

.megamenu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Mega Menu Column */
.megamenu-column {
  padding: 0;
}

.megamenu-column-header {
  margin-bottom: 1rem;
}

.megamenu-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary, #009639);
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.megamenu-col-title:hover {
  color: var(--color-primary, #009639);
}

.megamenu-col-desc {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

/* Mega Menu Sublinks */
.megamenu-sublinks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.megamenu-sublink-item {
  margin-bottom: 0.5rem;
}

.megamenu-sublink {
  font-size: 0.9375rem;
  color: #4b5563;
  text-decoration: none;
  display: block;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  position: relative;
}

.megamenu-sublink::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary, #009639);
  transition: width 0.2s ease;
}

.megamenu-sublink:hover {
  color: var(--color-primary, #009639);
  padding-left: 0.75rem;
}

.megamenu-sublink:hover::before {
  width: 4px;
}

.megamenu-sublink-active {
  color: var(--color-primary, #009639);
  font-weight: 600;
}

/* Mega Menu Top Item */
.megamenu-top-item {
  position: static;
}

.megamenu-top-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
  position: relative;
}

.megamenu-top-link:hover {
  color: var(--color-primary, #009639);
}

.megamenu-top-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary, #009639);
  transition: width 0.2s ease;
}

.megamenu-top-link:hover::after {
  width: 100%;
}

.megamenu-current {
  color: var(--color-primary, #009639) !important;
}

.megamenu-current::after {
  width: 100% !important;
}

.megamenu-chevron {
  transition: transform 0.2s ease;
}

.megamenu-has-children:hover .megamenu-chevron {
  transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 1024px) {
  .megamenu-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
  }

  .megamenu-inner {
    padding: 0;
  }

  .megamenu-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .megamenu-col-title {
    font-size: 0.9375rem;
  }
}

/* ===========================================
   Archive / News listing
   =========================================== */

.archive-breadcrumb {
  background-color: #f9fafb;
}

.archive-card {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.archive-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.archive-search-input:focus {
  border-color: var(--color-primary, #009639);
  box-shadow: 0 0 0 1px var(--color-primary, #009639);
}

/* ===========================================
   Featured News Slider
   =========================================== */

.featured-slide-content {
  will-change: transform, opacity;
}

/* ===========================================
   Scroll-Triggered Reveal
   =========================================== */

[data-reveal] {
  will-change: transform, opacity;
}

/* ===========================================
   "Plus d'actualités" link
   =========================================== */

.more-news-link {
  position: relative;
  transition: color 0.3s;
}

.more-news-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary, #009639);
  transition: width 0.3s ease;
}

.more-news-link:hover::after {
  width: 100%;
}


/* Correctif hors audit : une ligne parasite « Specificity: (0,1,0) »,
   probablement collée depuis un inspecteur de navigateur, invalidait
   cette règle en 3.1. */
.site-topbar {
    min-height: 13.5px;
}

.site-topbar {
    width: 100%;
    height: 13.5px;
    display: flex;
    flex-direction: column;
}

/*
 * CFG-03 : les trois bandes étaient codées en dur, avec des valeurs DIFFÉRENTES
 * des défauts annoncés dans le Customizer (#008e1c / #e7d404 / #00288e contre
 * #009639 / #FFD100 / #0072C6). Les réglages « Couleur secondaire » et
 * « Couleur d'accent » n'avaient donc aucun effet visible sur le site.
 */
.site-topbar::before {
    background-color: var(--color-primary, #009639);
}

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

.site-topbar::after {
    background-color: var(--color-accent, #0072C6);
}

.site-topbar div {
    background-color: var(--color-secondary, #FFD100);
}


/* ===========================================================================
   Ajouts de la version 3.2 — correctifs d'audit
   =========================================================================== */

/* ---------------------------------------------------------------------------
   A11Y-2 · Lien d'évitement et texte réservé aux lecteurs d'écran
   La 3.1 ne définissait AUCUNE classe .screen-reader-text / .sr-only, et
   n'offrait aucun lien d'évitement (WCAG 2.4.1).
   --------------------------------------------------------------------------- */
.screen-reader-text,
.sr-only {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus,
.sr-only:focus,
.skip-link:focus {
  background-color: #ffffff;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--color-primary, #009639);
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  height: auto;
  left: 6px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 6px;
  width: auto;
  z-index: 100000;
}

/* ---------------------------------------------------------------------------
   A11Y-1 · Indicateur de focus
   La 3.1 appliquait `focus:outline-none` sur quatre champs de formulaire sans
   aucun style de remplacement, et ne comportait aucune règle :focus-visible
   (WCAG 2.4.7).
   --------------------------------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--color-primary, #009639);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Le repère principal ne doit pas dessiner de contour quand on l'atteint
   par le lien d'évitement (il reçoit le focus par programme). */
#content:focus {
  outline: none;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   A11Y-5 · Respect de prefers-reduced-motion
   Lenis et GSAP étaient imposés à tous les utilisateurs, y compris à ceux
   souffrant de troubles vestibulaires (WCAG 2.3.3). Le JavaScript neutralise
   déjà les animations ; ces règles couvrent les transitions CSS.
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto !important;
  }

  #preloader {
    display: none !important;
  }
}

/* ---------------------------------------------------------------------------
   P1-09 · Variantes hover: de la palette institutionnelle
   La 3.1 utilisait 163 fois des classes du type `hover:text-gabarais-green`
   qu'aucune règle ne définissait et que le CDN Tailwind ne pouvait générer,
   faute de tailwind.config. Résultat : aucun retour visuel au survol sur la
   quasi-totalité des liens du site.
   Ces règles sont désormais également produites par la compilation locale
   (assets/css/app.css) ; elles sont conservées ici comme filet de sécurité
   pour les contenus migrés qui utiliseraient ces classes dans post_content.
   --------------------------------------------------------------------------- */
.hover\:text-gabarais-green:hover,
.group:hover .group-hover\:text-gabarais-green,
.group\/slider:hover .group-hover\/slider\:text-gabarais-green {
  color: var(--color-primary, #009639);
}

.hover\:bg-gabarais-green:hover {
  background-color: var(--color-primary, #009639);
}

.hover\:bg-gabarais-green-dark:hover {
  background-color: var(--color-primary-dark, #00702a);
}

.hover\:border-gabarais-green:hover,
.group:hover .group-hover\:border-gabarais-green {
  border-color: var(--color-primary, #009639);
}

.hover\:text-gabarais-yellow:hover {
  color: var(--color-secondary, #FFD100);
}

/* ---------------------------------------------------------------------------
   CFG-03 / CFG-05 · Palette dérivée
   Les nuances sont émises par ministere_gabon_custom_colors_css() à partir des
   trois réglages de couleur du Customizer.
   --------------------------------------------------------------------------- */
.bg-gabarais-green-dark   { background-color: var(--color-primary-dark, #00702a); }
.bg-gabarais-green-light  { background-color: var(--color-primary-light, #ccebd7); }
.bg-gabarais-green-soft   { background-color: var(--color-primary-soft, #e9f7ef); }
.text-gabarais-green-dark { color: var(--color-primary-dark, #00702a); }
.border-gabarais-green-light { border-color: var(--color-primary-light, #ccebd7); }

.bg-gabarais-secondary      { background-color: var(--color-secondary, #FFD100); }
.bg-gabarais-secondary-soft { background-color: var(--color-secondary-soft, #fff9e0); }
.text-gabarais-secondary    { color: var(--color-secondary, #FFD100); }
.text-gabarais-secondary-dark { color: var(--color-secondary-dark, #8c7300); }

.bg-gabarais-accent        { background-color: var(--color-accent, #0072C6); }
.bg-gabarais-accent-dark   { background-color: var(--color-accent-dark, #005595); }
.bg-gabarais-accent-soft   { background-color: var(--color-accent-soft, #e6f2fb); }
.text-gabarais-accent      { color: var(--color-accent, #0072C6); }
.text-gabarais-accent-dark { color: var(--color-accent-dark, #005595); }
.border-gabarais-accent      { border-color: var(--color-accent, #0072C6); }
.border-gabarais-accent-dark { border-color: var(--color-accent-dark, #005595); }
.border-gabarais-accent-light { border-color: var(--color-accent-light, #cce3f4); }

/* ---------------------------------------------------------------------------
   CFG-04 · La variable --bg-section a enfin un consommateur
   Le réglage « Fond des sections alternées » émettait `--bg-section` dans le
   <head>, mais aucune règle ne l'utilisait : zéro occurrence de
   `var(--bg-section` dans toute la feuille de style de la 3.1.
   --------------------------------------------------------------------------- */
.section-alt,
.archive-card-wrap,
.mediatheque-filters {
  background-color: var(--bg-section, #f3f4f6);
}

/* ---------------------------------------------------------------------------
   P1-10 · Classes .prose
   Huit gabarits enveloppaient le contenu éditorial dans `.prose`, une classe
   fournie par @tailwindcss/typography — plugin absent du CDN Tailwind et non
   défini dans style.css. Tout le contenu rédigé par les administrateurs était
   donc rendu sans aucun style typographique, aggravé par le Preflight de
   Tailwind qui annule les styles par défaut du navigateur.
   Le plugin est désormais intégré à la compilation locale (assets/css/app.css).
   Les règles ci-dessous complètent la mise en forme pour les contenus migrés
   depuis Likia et servent de repli si app.css venait à manquer.
   --------------------------------------------------------------------------- */
.prose > * + * { margin-top: 1.1em; }
.prose p { line-height: 1.75; }
.prose h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin-top: 2em; margin-bottom: 0.6em; line-height: 1.3; }
.prose h3 { font-size: 1.25rem; font-weight: 700; color: #111827; margin-top: 1.6em; margin-bottom: 0.5em; line-height: 1.35; }
.prose h4 { font-size: 1.05rem; font-weight: 600; color: #1f2937; margin-top: 1.4em; margin-bottom: 0.4em; }
.prose ul { list-style: disc; padding-left: 1.5em; }
.prose ol { list-style: decimal; padding-left: 1.5em; }
.prose li { margin-top: 0.4em; }
.prose li > ul, .prose li > ol { margin-top: 0.4em; }
.prose a { color: var(--color-primary, #009639); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--color-primary-dark, #00702a); }
.prose strong { font-weight: 700; color: #111827; }
.prose blockquote {
  border-left: 4px solid var(--color-primary, #009639);
  padding-left: 1em;
  font-style: italic;
  color: #4b5563;
}
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.5em 0.75em; text-align: left; }
.prose th { background-color: var(--bg-section, #f3f4f6); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid #e5e7eb; margin: 2em 0; }
.prose code {
  background-color: #f3f4f6;
  padding: 0.15em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ---------------------------------------------------------------------------
   P2-11 (j) · Pagination de la médiathèque produite par paginate_links()
   --------------------------------------------------------------------------- */
.mediatheque-page .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: #ffffff;
  color: #4b5563;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.mediatheque-page .page-numbers:hover {
  border-color: var(--color-primary, #009639);
  color: var(--color-primary, #009639);
}

.mediatheque-page .page-numbers.current {
  background-color: var(--color-primary, #009639);
  border-color: var(--color-primary, #009639);
  color: #ffffff;
}

/* ---------------------------------------------------------------------------
   P1-07 · Cartes de service devenues des liens véritables
   --------------------------------------------------------------------------- */
a.service-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

[data-href][role="link"] {
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Sommaire (template-parts/table-of-contents.php)
   --------------------------------------------------------------------------- */
.toc ol { counter-reset: none; }
.toc a { display: block; padding: 0.15rem 0.5rem; margin-left: -0.5rem; border-radius: 3px; }
.toc a:hover { background-color: var(--color-primary-soft, #e9f7ef); color: var(--color-primary, #009639); }
