/* =========================================
   OPTIMISATIONS MOBILE - BGFIBank Congo
   Feuille de style dédiée aux écrans ≤ 1023px
   ========================================= */

/* =========================================
   0. FIX IMAGE-AVANT — fond couvrant sans répétition (TOUTES pages)
   Problème (récurrent, revu 10/08/2026) : les pages créées par COPIE
   Elementor (ex. Homme clé 7629, Banque privée RSE 6843) perdent les
   réglages « Taille : Couvrir / Répétition : aucune » de l'arrière-plan.
   Résultat : le CSS généré (post-*.css) ne contient QUE background-image
   → l'image s'affiche en taille réelle (1920px+) et se répète en tuiles
   dans le container .image-avant (min-height 128-600px).
   Fix : forcer cover + no-repeat sur TOUS les containers .image-avant du
   site (desktop ET mobile), avec !important pour battre les post CSS
   Elementor et les éventuels overrides du thème.
   Portée : toutes les rubriques (particuliers, PME, privée, corporate,
   entreprise) — y compris les futures pages copiées.
   ========================================= */
.image-avant {
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

/* =========================================
   0. VISIBILITÉ TABLETTE (768px - 1023px)
   Forcer .barre-raccourcis.elementor-hidden-desktop visible entre mobile et tablet portrait
   (Elementor le cache via responsive visibility "Hidden on Desktop")
   ========================================= */

@media (min-width: 768px) and (max-width: 1023px) {

  .barre-raccourcis.elementor-hidden-desktop {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    top: auto !important;
    z-index: 1000;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Conteneur horizontal : Logo | Search | Burger */
  .barre-raccourcis.elementor-hidden-desktop > .e-con:first-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 12px !important;
    flex-wrap: nowrap !important;
  }

  /* Logo */
  .barre-raccourcis.elementor-hidden-desktop .elementor-widget-image {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .elementor-widget-image img {
    max-height: 32px !important;
    width: auto !important;
  }

  /* Search (toggle loupe) — version compacte */
  .barre-raccourcis.elementor-hidden-desktop .elementor-widget-bgfi-search-form {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  /* Champ de recherche : icône visible, champ caché tant non activé */
  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-form {
    justify-content: flex-end !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-input {
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0 !important;
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease !important;
    pointer-events: none !important;
    height: 34px !important;
    border-radius: 34px !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-submit {
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-submit i {
    font-size: 16px !important;
    color: #003a74 !important;
  }

  /* État actif (toggle via JS) */
  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-form.search-active .bgfi-search-input {
    width: 60% !important;
    padding: 6px 30px 6px 12px !important;
    border: 2px solid #003a74 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-form.search-active .bgfi-search-submit {
    position: absolute !important;
    right: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* Menu burger */
  body .barre-raccourcis.elementor-hidden-desktop .menu-part,
  .barre-raccourcis.elementor-hidden-desktop .menu-part {
    flex: 0 0 auto !important;
    position: static !important;
    top: auto !important;
    z-index: 1001 !important;
  }

  body .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle,
  .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle {
    margin: 0 !important;
    padding: 6px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border-radius: 8px !important;
  }

  body .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle i,
  .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle i {
    font-size: 20px !important;
    color: #003a74 !important;
  }

  /* Menu overlay plein écran (reprise depuis mobile) — pour tablettes portrait */
  body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown,
  .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    background-color: #003a74 !important;
    z-index: 9999 !important;
    padding: 60px 16px 40px 16px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    animation: menuFadeIn 0.3s ease forwards !important;
  }

  /* Masquer l'overlay quand le menu est fermé */
  body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown[aria-hidden="true"],
  .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown[aria-hidden="true"] {
    display: none !important;
    animation: none !important;
  }

  /* Bouton close dans l'overlay */
  body .barre-raccourcis.elementor-hidden-desktop .elementor-menu-toggle.elementor-active,
  .barre-raccourcis.elementor-hidden-desktop .elementor-menu-toggle.elementor-active {
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 10000 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
  }

  /* Éviter le scroll du body quand le menu est ouvert */
  body.menu-mobile-open {
    overflow: hidden !important;
  }

}

/* =========================================
   1. BARRE DE RACCOURCIS MOBILE (≤ 767px — conservé)
   ========================================= */

.barre-raccourcis.elementor-hidden-desktop {
  position: relative !important;
  top: auto !important;
  z-index: 1000;
  padding: 0 !important;
}

.barre-raccourcis.elementor-hidden-desktop > .e-con:first-child {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 8px 12px !important;
  flex-wrap: nowrap !important;
}

/* ---------- Logo ---------- */
.barre-raccourcis.elementor-hidden-desktop .elementor-widget-image {
  flex: 0 0 auto !important;
  width: auto !important;
}

.barre-raccourcis.elementor-hidden-desktop .elementor-widget-image img {
  max-height: 36px !important;
  width: auto !important;
}

/* ---------- Barre de recherche (toggle loupe) ---------- */
.barre-raccourcis.elementor-hidden-desktop .elementor-widget-bgfi-search-form {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* État normal : seule l'icône est visible */
.barre-raccourcis.elementor-hidden-desktop .bgfi-search-form {
  justify-content: flex-end !important;
}

.barre-raccourcis.elementor-hidden-desktop .bgfi-search-input {
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  opacity: 0 !important;
  transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease !important;
  pointer-events: none !important;
  height: 38px !important;
  border-radius: 36px !important;
}

.barre-raccourcis.elementor-hidden-desktop .bgfi-search-submit {
  min-width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
}

.barre-raccourcis.elementor-hidden-desktop .bgfi-search-submit i {
  font-size: 18px !important;
  color: #003a74 !important;
}

/* État actif (toggle via JS) : le champ de recherche s'affiche */
.barre-raccourcis.elementor-hidden-desktop .bgfi-search-form.search-active .bgfi-search-input {
  width: 100% !important;
  padding: 8px 34px 8px 14px !important;
  border: 2px solid #003a74 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.barre-raccourcis.elementor-hidden-desktop .bgfi-search-form.search-active .bgfi-search-submit {
  position: absolute !important;
  right: 4px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* ---------- Menu burger ---------- */
/* NOTE: on surcharge les sélecteurs Elementor (spécificité) — sélecteurs génériques multi-rubriques */
body .barre-raccourcis.elementor-hidden-desktop .menu-part,
.barre-raccourcis.elementor-hidden-desktop .menu-part {
  flex: 0 0 auto !important;
  position: static !important;
  top: auto !important;
  z-index: 1001 !important;
}

body .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle,
.barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle {
  margin: 0 !important;
  padding: 8px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border-radius: 8px !important;
}

body .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle i,
.barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle i {
  font-size: 22px !important;
  color: #003a74 !important;
}


/* =========================================
   2. MENU OVERLAY PLEIN ÉCRAN
   Le dropdown couvre tout l'écran
   ========================================= */

/* Le container du dropdown en overlay */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  background-color: #003a74 !important;
  z-index: 9999 !important;
  padding: 60px 20px 40px 20px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: menuFadeIn 0.3s ease forwards !important;
}

/*
 * Sous-menus dans l'overlay mobile
 * On laisse Elementor gérer l'affichage/masquage (display togglé via JS).
 * On corrige uniquement le positionnement pour éviter les flyouts desktop.
 */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  transform: none !important;
  background-color: rgba(0, 0, 0, 0.2) !important;
  padding: 4px 0 !important;
  border: none !important;
  box-shadow: none !important;
  /* NE PAS forcer display ici, Elementor le gère */
}

/* Animation fluide d'ouverture/fermeture des sous-menus */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu:not([style*="display: none"]),
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu:not([style*="display: none"]) {
  overflow: hidden !important;
}

/* Masquer l'overlay quand le menu est fermé */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown[aria-hidden="true"],
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown[aria-hidden="true"] {
  display: none !important;
  animation: none !important;
}

/* Animation */
@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bouton close dans l'overlay */
body .barre-raccourcis.elementor-hidden-desktop .elementor-menu-toggle.elementor-active,
.barre-raccourcis.elementor-hidden-desktop .elementor-menu-toggle.elementor-active {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 10000 !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
}

body .barre-raccourcis.elementor-hidden-desktop .elementor-menu-toggle.elementor-active i,
.barre-raccourcis.elementor-hidden-desktop .elementor-menu-toggle.elementor-active i {
  color: #ffffff !important;
  font-size: 20px !important;
}

/* ---------- Items du menu overlay ---------- */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .menu-item,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .menu-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item {
  padding: 16px 12px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: left !important;
  white-space: normal !important;
  line-height: 1.3 !important;
  background: transparent !important;
  border-left: 3px solid transparent !important;
  transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

/* Indicateur ▶ pour les items qui ont un sous-menu */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .menu-item-has-children > .elementor-item::after,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .menu-item-has-children > .elementor-item::after {
  content: '\f054' !important; /* chevron FontAwesome */
  font-family: 'Font Awesome 5 Free' !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  margin-left: auto !important;
  margin-right: 4px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  transition: transform 0.3s ease !important;
}

/* Chevron tourné quand le sous-menu est ouvert */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .menu-item-has-children.highlighted > .elementor-item::after,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .menu-item-has-children.highlighted > .elementor-item::after {
  transform: rotate(90deg) !important;
}

body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item i,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item i {
  font-size: 20px !important;
  min-width: 28px !important;
  text-align: center !important;
}

/* Item actif / hover */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item:hover,
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item:focus,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item:hover,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item:focus {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-left-color: #E1EEB6 !important;
}

/* Item parent quand son sous-menu est ouvert */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item.highlighted,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item.highlighted {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-left-color: #E1EEB6 !important;
  color: #E1EEB6 !important;
}

/* ---------- Sous-menus dans l'overlay ---------- */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item {
  padding: 14px 12px 14px 52px !important;
  font-size: 15px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  align-items: center !important;
  border-left: 3px solid transparent !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item:hover,
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item:focus,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item:hover,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item:focus {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #E1EEB6 !important;
  border-left-color: #E1EEB6 !important;
}

/* Dernier élément du sous-menu : pas de bordure */
body .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .menu-item:last-child .elementor-sub-item,
.barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .sub-menu .menu-item:last-child .elementor-sub-item {
  border-bottom: none !important;
}

/* Éviter le scroll du body quand le menu est ouvert */
body.menu-mobile-open {
  overflow: hidden !important;
}


/* =========================================
   3. TOUCH OPTIMISATIONS
   Zones tactiles agrandies
   ========================================= */

@media (max-width: 767px) {

  /* Tous les liens et boutons : taille tactile minimum 44px */
  .elementor-nav-menu--dropdown .elementor-item,
  .elementor-nav-menu--dropdown .elementor-sub-item {
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
  }

  /* Icônes plus grandes */
  .elementor-nav-menu .fa-2x {
    font-size: 1.5em !important;
  }

  /* Supprimer les <br> dans les titres de menu pour mobile si nécessaire */
  .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item br {
    display: inline !important;
    content: " " !important;
  }

  /* Espacement entre les éléments du menu principal (segment navbar) */
  .barre-navigation-principale .elementor-nav-menu .elementor-item {
    padding: 12px 8px !important;
    font-size: 10px !important;
    min-height: 44px !important;
  }

}


/* =========================================
   4. CORRECTIONS DIVERSES MOBILE
   ========================================= */

@media (max-width: 767px) {

  /* Réduire le padding global sur mobile */
  .barre-raccourcis.elementor-hidden-desktop {
    padding: 0 !important;
  }

  /* Le menu desktop ne doit pas apparaitre en mobile — voir bloc ≤1024px en fin de fichier */

  /* S'assurer que les transitions sont fluides */
  .elementor-nav-menu--dropdown,
  .bgfi-search-input,
  .elementor-menu-toggle {
    -webkit-tap-highlight-color: transparent !important;
  }

  /* Éviter le zoom sur les inputs en iOS */
  .bgfi-search-input {
    font-size: 16px !important;
  }

  /* Fix pour le menu overlay - barre de fermeture en haut */
  .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown::before {
    content: '';
    display: block;
    height: 56px;
    margin: -60px -20px 20px -20px;
    background: transparent;
  }

}


/* =========================================
   5. OPTIMISATIONS TRÈS PETITS ÉCRANS (≤ 375px)
   iPhone SE, etc.
   ========================================= */

@media (max-width: 375px) {

  .barre-raccourcis.elementor-hidden-desktop > .e-con:first-child {
    padding: 6px 8px !important;
    gap: 4px !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .elementor-widget-image img {
    max-height: 28px !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-submit {
    min-width: 34px !important;
    height: 34px !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle {
    padding: 6px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .menu-part .elementor-menu-toggle i {
    font-size: 20px !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .elementor-nav-menu--dropdown .elementor-item {
    padding: 14px 10px !important;
    font-size: 15px !important;
  }

}

/* =========================================
   6. BREAKPOINT TABLETTE ÉTENDU (768px — 1014px)
   Forcer l'affichage de la barre mobile et masquer
   la barre desktop jusqu'au breakpoint Elementor desktop (1025px)
   afin de garder un rendu cohérent sur les écrans de taille
   intermédiaire (tablettes en mode landscape, petits laptops).
   ========================================= */

@media (min-width: 768px) and (max-width: 1014px) {

  /* Forcer la barre mobile visible dans cette zone */
  .barre-raccourcis.elementor-hidden-desktop {
    display: flex !important;
  }

  /* Masquer la barre desktop dans cette zone (sinon Elementor la montre à partir de 1025px) */
  .barre-raccourcis.elementor-hidden-mobile {
    display: none !important;
  }

  /* Forcer le champ de recherche visible (sinon opacity:0/width:0 du mode loupe reste actif) */
  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-form {
    justify-content: flex-start !important;
  }

  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-input {
    opacity: 1 !important;
    width: auto !important;
    pointer-events: auto !important;
  }

  /* Le bouton de soumission reste visible normalement (pas en mode icône flottante) */
  .barre-raccourcis.elementor-hidden-desktop .bgfi-search-submit {
    position: static !important;
    transform: none !important;
  }

}

/* =========================================
   MENU LATÉRAL : masqué sur tablette + mobile (≤1024px)
   Sur tablettes portrait (800-834px), Elementor affiche le conteneur
   .menu-laterale mais sans rendre ses items — on le masque complètement
   jusqu'au breakpoint desktop Elementor (1025px).
   La liste d'ids couvre les 4 rubriques (PME_PMI n'a pas la classe .menu-laterale).
   ========================================= */

@media (max-width: 1024px) {

  /* HEADER : neutraliser --width:1400px du template particuliers (post-6121).
     Sans cette règle, le header fait 1400px centré en tablette → logo à gauche
     et burger à droite sortent de l'écran (contenu de top-menu-bgfi invisible).
     Applicable à toutes les rubriques (les autres n'ont pas --width, aucun effet). */
  .top-menu-bgfi {
    --width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
  }

  .menu-laterale,
  .elementor-element-99e8e51,
  .elementor-element-5444cc4,
  .elementor-element-1789563,
  .elementor-element-5522217 {
    display: none !important;
  }

}

/* ============================================================
   FIX MOBILE RSE — onglets (e-n-tabs) + grille posts (elementor-grid)
   Page « Nos actions RSE » — validé en local le 05/08/2026
   Scope .bgfi-tabs : ne touche que le widget Tabs de la page RSE.
   Cause : le Custom CSS du widget forçait row+nowrap+max-width:60%
   sur mobile -> heading 548px dans un viewport 390px -> onglet 2024
   inaccessible et grids débordants. Fix : onglets empilés en colonne.
   ============================================================ */
@media (max-width: 767px) {

  /* --- Onglets : empilés en colonne, pleine largeur --- */
  .bgfi-tabs .e-n-tabs-heading {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    overflow: visible !important;
    justify-content: stretch !important;
    align-items: stretch !important;
  }

  .bgfi-tabs button.e-n-tab-title {
    flex: 1 1 auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 16px !important;
    padding: 14px 16px 14px 14px !important;
  }

  .bgfi-tabs button.e-n-tab-title::before {
    width: 36px !important;
    height: 36px !important;
    background-size: 16px 16px !important;
  }

  .bgfi-tabs button.e-n-tab-title .e-n-tab-title-text {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  /* --- Grille d'articles : 1 colonne + typo adaptée --- */
  .bgfi-tabs .elementor-posts-container.elementor-grid {
    grid-template-columns: repeat(1, 1fr) !important;
    grid-column-gap: 0 !important;
    column-gap: 0 !important;
  }

  .bgfi-tabs .elementor-posts-container.elementor-grid .elementor-grid-item {
    width: 100% !important;
    max-width: 100% !important;
  }

  .bgfi-tabs .elementor-post__thumbnail img {
    height: auto !important;
    max-height: 220px;
  }

  .bgfi-tabs .elementor-post__text {
    padding: 20px 18px !important;
  }

  .bgfi-tabs .elementor-post__title {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  .bgfi-tabs .elementor-post__excerpt {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  .bgfi-tabs .elementor-post__read-more {
    font-size: 15px !important;
  }

}

/* ============================================================
   FIX TABLETTE PORTRAIT (768-1024px) — onglets RSE compacts
   Objectif : titres « Nos actions 2026/2025/2024 » sur UNE ligne.
   ============================================================ */
@media (min-width: 768px) and (max-width: 1024px) {

  .bgfi-tabs .e-n-tabs-heading {
    gap: 10px !important;
  }

  .bgfi-tabs button.e-n-tab-title {
    gap: 10px !important;
    padding: 12px 14px 12px 12px !important;
  }

  .bgfi-tabs button.e-n-tab-title::before {
    width: 30px !important;
    height: 30px !important;
    background-size: 14px 14px !important;
  }

  .bgfi-tabs button.e-n-tab-title .e-n-tab-title-text {
    font-size: 15px !important;
    white-space: nowrap !important;
  }

}

/* ============================================================
   FIX ICON-BOX — page article « BGFIDay – 11ème Édition » (post 25236)
   ------------------------------------------------------------------
   OBJECTIF
   Centrer VERTICALEMENT l'icône (cercle orange) des 2 widgets icon-box
   (« Institut des Jeunes Sourds de Brazzaville » et « Complexe Crèche
   Pouponnière Garderie de Mvou-Mvou à Pointe-Noire ») par rapport au
   bloc texte (titre + description), SANS toucher au texte.

   POURQUOI CE SÉLECTEUR / CES PROPRIÉTÉS
   1. Le wrapper .elementor-icon-box-wrapper est en flex row
      (classe elementor-position-inline-start) et le CSS du post
      (post-25236) lui impose align-items:start -> l'icône était calée
      en HAUT, alignée sur la première ligne du titre.
   2. align-items:center sur le wrapper centrerait AUSSI le contenu
      texte (titre + description) -> interdit, on veut « juste l'icône ».
   3. align-self:center sur L'ITEM .elementor-icon-box-icon ne centre
      QUE l'icône dans la hauteur du wrapper ; le texte garde son
      alignement gauche (text-align:start déjà en place).
   4. !important : nécessaire pour battre align-items:start du post CSS
      et les éventuels overrides Elementor (même technique que les
      autres fixes de ce fichier).
   5. Scope .elementor-25236 : ne s'applique QU'à la page de l'article
      BGFIDay (2 icon-box concernés), aucune autre page du site.
   6. Media query (min-width:768px) : sur mobile, le widget passe en
      elementor-mobile-position-block-start (icône AU-DESSUS du texte
      en bloc) où le centrage vertical n'a pas de sens -> mobile intact.
   ============================================================ */
@media (min-width: 768px) {
  .elementor-25236 .elementor-icon-box-icon {
    align-self: center !important;
  }
}
