.mega-menu__list {
  list-style: none;
  display: flex;
  justify-self: center;
  gap: 0rem;
  margin: 0;
  padding: 0;
}

.wp-block-social-links .linkedin-picto svg {
  width: 32px;
  height: 32px;
}

/* =========================================
   2. ÉLÉMENTS DE NIVEAU 1 (LABELS & ITEMS)
========================================= */
.mega-menu__label {
  border: none;
  cursor: pointer;
  display: block;
  padding: 20px 16px;
  background-color: white;
  border-radius: 4px 4px 0 0;
  text-decoration: none;
}

.mega-menu__item > .mega-menu__label {
  border-top: solid 1px transparent;
  border-right: solid 1px transparent;
  border-left: solid 1px transparent;
}

/* État actif OU hover : même style */
.mega-menu__label.active {
  background-color: var(--wp--preset--color--yellow);
}

.mega-menu__item:hover > .mega-menu__label {
  background-color: var(--wp--preset--color--yellow);
  border-top: solid 1px #0000001a;
  border-right: solid 1px #0000001a;
  border-left: solid 1px #0000001a;
}

/* Items avec bordure jaune et icône centrée (hover ou actif) */
.mega-menu__item--transformateurs > a,
.mega-menu__item--autotransformateurs > a,
.mega-menu__item--alimentations > a,
.mega-menu__item--autres-produits > a {
  position: relative;
  border-bottom: solid 4px var(--wp--preset--color--yellow);
}

.mega-menu__item--transformateurs > a:after,
.mega-menu__item--autotransformateurs > a:after,
.mega-menu__item--alimentations > a:after,
.mega-menu__item--autres-produits > a:after {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: block;
  content: "";
  width: 24px;
  height: 4px;
  background-image: url("/wp-content/themes/le-cosinus-2025/assets/img/menu_square_bordered.png");
}

/* Survol ou actif → icône blanche */
.mega-menu__item--transformateurs > a.active:after,
.mega-menu__item--autotransformateurs > a.active:after,
.mega-menu__item--alimentations > a.active:after,
.mega-menu__item--autres-produits > a.active:after,
.mega-menu__item--transformateurs > a:hover:after,
.mega-menu__item--autotransformateurs > a:hover:after,
.mega-menu__item--alimentations > a:hover:after,
.mega-menu__item--autres-produits > a:hover:after {
  background-image: url("/wp-content/themes/le-cosinus-2025/assets/img/menu_square_white.png");
}

/* Items avec bordure bleue */
.mega-menu__item--qui-sommes-nous,
.mega-menu__item--actualites {
  border-bottom: solid 4px var(--wp--preset--color--dark-blue);
}

/* =========================================
   3. PANNEAU DU MEGA-MENU
========================================= */
.mega-menu__panel {
  position: absolute;
  top: 100%;
  margin-left: -300px;
  width: fit-content;
  background: #fff;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, left 0.3s ease;
}

.mega-menu__item:hover .mega-menu__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================================
   4. CONTENU DU PANNEAU
========================================= */
.mega-menu-entries-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* flex: 1 1 300px; */
  gap: 0.5rem;
  min-width: 300px;
  max-width: 380px;
  width: max-content;
  border-left: solid 1px #0000001a;
}

.mega-menu__columns-group {
  padding: 16px;
}

.mega-menu__column {
  margin-bottom: 4px;
}

.mega-menu__category {
  font-weight: bold;
  font-size: 12px;
  margin: 0;
  text-transform: uppercase;
}

.mega-menu__links {
  border-top: solid 1px rgba(69, 116, 158, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 6px 0 0 0;
  margin: 0;
  width: fit-content;
}

.mega-menu__links li {
  margin-bottom: 0.25rem;
}

.mega-menu__links li a {
  color: var(--wp--preset--color--dark-blue);
  padding: 4px 8px;
  border: solid 1px rgba(23, 39, 53, 0.5);
  font-size: 12px;
  font-weight: 400;
}

/* =========================================
   5. LIENS DE SOUS-MENU
========================================= */
.mega-menu__link {
  text-decoration: none;
  color: #242424;
  border-radius: 2px;
}

.mega-menu__link:hover,
.mega-menu__link:focus,
.mega-menu__link.active {
  background-color: var(--wp--preset--color--dark-blue);
  color: var(--wp--preset--color--white);
}

.mobile-menu__cat-link-wrapper,
.mega-menu__cat-link-wrapper {
  border-top: solid 1px rgba(0, 0, 0, 0.1);
  border-bottom: solid 1px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.mobile-menu__cat-link,
.mega-menu__cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  text-decoration: none;
}
.mega-menu__cat-link {
  padding: 8px 16px;
}

.mega-menu__cat-link:hover {
  text-decoration: underline;
}

.mobile-menu__cat-link::after,
.mega-menu__cat-link::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 16px;
  margin-left: 8px;
  background-image: url(/wp-content/themes/le-cosinus-2025/assets/pictos/chevron-down.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transform: rotateZ(270deg);
}

/* =========================================
   6. IMAGE DE PRÉVISUALISATION
========================================= */
.mega-menu__image-container {
  border-top: solid 1px #0000001a;
  max-width: 300px;
  flex: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  box-sizing: border-box;
}

.mega-menu__preview-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
  aspect-ratio: 1/1;
}

/* =====================
   MENU DESKTOP
   ===================== */
.desktop-menu {
  position: relative;
  z-index: 100;
  transition: none;
  position: sticky;
  top: 80px; /* ajuster à la hauteur de ton top-menu */
  background: #fff;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.desktop-menu.wp-block-group {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.desktop-menu.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* petite ombre fluide */
  max-width: 100% !important;
  width: 100% !important;
}

/* =====================
     LOGO
     ===================== */
.menu-logo {
  max-width: 270px;
}

/* =====================
     MENU MOBILE (structure)
     ===================== */
.mobile-menu-container {
  display: none; /* caché en desktop */
  width: 46px;
  height: 46px;
}

.mobile-menu {
  width: 100%;
}

.top-menu {
  padding: 24px 16px 8px 16px;
}

.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle svg {
  width: 28px;
  height: 28px;
  stroke: var(--wp--preset--color--dark-blue); /* couleur */
}

.icon-close {
  display: none; /* cachée au départ */
}

/* =====================
     MENU MOBILE (contenu)
     ===================== */
.mobile-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-menu__item {
  position: relative;
  border-bottom: 4px solid var(--wp--preset--color--yellow);
}

.mobile-menu__item.open {
  border-bottom: none;
}

.mobile-menu__item--qui-sommes-nous,
.mobile-menu__item--actualites {
  border-bottom: 4px solid var(--wp--preset--color--dark-blue);
  padding: 20px 16px;
}

.mobile-menu__groups-wrapper {
  padding: 16px;
}

.mobile-menu__panel .mobile-menu__group:not(:last-child) {
  margin-bottom: 14px;
}

/* =====================================
   Chevron sur les boutons d’accordéon du menu mobile
===================================== */
.mobile-menu__toggle {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 16px;
  text-align: left;
  background: none;
  border: none;
  font-size: var(--wp--preset--font-size--14, 14px);
  font-weight: 600;
	font-family: 'Open Sans';
  color: var(--wp--preset--color--dark-blue);
  cursor: pointer;
  box-sizing: border-box;
}

/* Chevron (pictogramme) */
.mobile-menu__toggle::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 16px;
  margin-left: 8px;
  background-image: url("/wp-content/themes/le-cosinus-2025/assets/pictos/chevron-down.svg");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.25s ease;
  transform: rotate(0deg);
}

/* Chevron tourné quand le menu est ouvert */
.mobile-menu__toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Supprimer le chevron pour les éléments sans sous-menu */
.mobile-menu__item:not(:has(.mobile-menu__panel)) .mobile-menu__toggle::after {
  display: none;
}

.mobile-menu__category {
  font-size: var(--wp--preset--font-size--12);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

.mobile-menu__links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  text-decoration: none;
}

.mobile-menu__links li {
  margin: 0.3rem 0;
}

.mobile-menu__link,
.mobile-menu__toggle {
  font-size: var(--wp--preset--font-size--14);
  text-decoration: none;
  font-weight: 700;
}

.mobile-menu__links a:hover {
  text-decoration: underline;
}

.mobile-menu__see-all {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: #003b5c;
  text-decoration: none;
}

.mobile-menu__see-all::after {
  content: " ›";
  color: #f9a825;
}

.mobile-top-menu-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--wp--preset--spacing--8);
}

.mobile-panel__section.mobile-panel__social {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* =====================
     BOUTON HAMBURGER (SVG)
     ===================== */
.mobile-menu-toggle {
  display: none; /* masqué en desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-toggle__icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* =====================
     PANNEAU MOBILE
     ===================== */
.mobile-menu-wrapper {
  display: none; /* masqué par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  z-index: 1000;
  box-sizing: border-box;
}

/* Quand le menu est ouvert */
body.mobile-menu-open .mobile-menu-wrapper {
  display: block;
}

/* =====================
     RESPONSIVE
     ===================== */
@media (max-width: 1280px) {
  .mega-menu__panel {
    margin-left: 0px;
  }
}

@media (max-width: 1024px) {
  .mobile-menu-wrapper {
    margin-top: 54px;
  }

  /* Activer le mobile */
  .mobile-menu-container {
    display: block;
    background-color: rgba(242, 242, 242, 1);
    border: solid 1px #27415933;
    border-radius: 2px;
  }

  .mobile-menu-toggle {
    display: block; /* montrer le hamburger */
  }

  .desktop-menu {
    display: none; /* cacher le desktop */
  }

  .menu-logo {
    max-width: 150px;
  }

  .top-menu {
    padding: 8px;
    gap: 8px;
  }

  .is_desktop {
    display: none !important;
  }

  .is_mobile {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin: 1rem 0;
  }

  .search-contact-wrapper {
    flex-direction: row-reverse;
    justify-content: flex-start;
  }

  .lc-search-block {
    flex: 0;
  }

  .is-style-btn-mail a {
    flex-direction: column;
    align-items: center;
    font-size: var(--wp--preset--font-size--12);
    padding: 4px !important;
    text-align: center;
  }

  .lc-account-button {
    display: none !important;
  }
  .wp-block-button.is-style-btn-cart .wp-element-button::before {
    background-image: url(/wp-content/themes/le-cosinus-2025/assets/pictos/cart.svg);
  }

  .is-style-btn-cart a {
    background-color: var(--wp--preset--color--white);
    color: var(--wp-preset--color-dark-blue);
  }

  .mobile-panel__actions {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: var(--wp--preset--spacing--8);
  }

  .mobile-menu-container .lc-account-button {
    display: block !important;
  }

  .mobile-menu-container .lc-account-toggle {
    margin-left: 0;
  }

  .mobile-panel__actions a {
    font-size: 12px;
  }
}

@media screen and (max-width: 375px) {
  .menu-logo {
    max-width: 150px;
  }
  .is-style-btn-mail a {
    font-size: 10px;
  }
  .mobile-panel__actions {
    justify-content: flex-start;
  }
}

/* WPML Language Selector  */

.mobile-panel__languages a {
  display: inline-block;
  text-decoration: none;
}

.mobile-panel__languages a:not(:last-child) {
  display: inline-block;
  margin-right: 8px;
}

.mobile-panel__languages img {
  width: 35px;
  height: auto;
  border-radius: 2px;
}

/* =====================
     PAR DEFAUT
     ===================== */
.is_mobile {
  display: none;
}

.is_desktop {
  display: flex; /* ou block */
  gap: 8px;
}

/* ===========================================================================
   Sélecteur de langue TranslatePress — Desktop + Mobile
   À ajouter à la fin de assets/css/menu.css du thème le-cosinus-2026.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Conteneur générique (desktop ET mobile)
   --------------------------------------------------------------------------- */

.lc-language-switcher {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* Réinitialisation des marges par défaut du shortcode TP */
.lc-language-switcher .trp-language-switcher,
.lc-language-switcher .trp-floater-ls {
    margin: 0;
    padding: 0;
}

/* ---------------------------------------------------------------------------
   2. Variante DESKTOP (barre supérieure dark-blue, à gauche du LinkedIn)
   --------------------------------------------------------------------------- */

.lc-language-switcher--desktop {
    margin-right: 12px;
}

/* Langue actuelle (label cliquable du dropdown) */
.lc-language-switcher--desktop .trp-language-switcher > div > a,
.lc-language-switcher--desktop .trp-ls-shortcode-current-language {
    color: #FFFFFF !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 2px !important;
    padding: 4px 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* Liste déroulante des autres langues sur desktop */
.lc-language-switcher--desktop .trp-ls-shortcode-language {
    background: #023047 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin-top: 2px !important;
    z-index: 10000;
}

.lc-language-switcher--desktop .trp-ls-shortcode-language a {
    color: #FFFFFF !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    text-decoration: none !important;
    display: block;
}

.lc-language-switcher--desktop .trp-ls-shortcode-language a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ---------------------------------------------------------------------------
   3. Variante MOBILE (panneau déroulant, à droite du LinkedIn)
   --------------------------------------------------------------------------- */

.lc-language-switcher--mobile {
    margin-left: 12px;
}

/* Sur mobile : couleurs sombres car panneau blanc */
.lc-language-switcher--mobile .trp-language-switcher > div > a,
.lc-language-switcher--mobile .trp-ls-shortcode-current-language {
    color: #023047 !important;
    background: transparent !important;
    border: 1px solid rgba(2, 48, 71, 0.2) !important;
    border-radius: 2px !important;
    padding: 6px 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

.lc-language-switcher--mobile .trp-ls-shortcode-language {
    background: #FFFFFF !important;
    border: 1px solid rgba(2, 48, 71, 0.2) !important;
    margin-top: 2px !important;
    z-index: 10000;
}

.lc-language-switcher--mobile .trp-ls-shortcode-language a {
    color: #023047 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: block;
}

.lc-language-switcher--mobile .trp-ls-shortcode-language a:hover {
    background: rgba(2, 48, 71, 0.05) !important;
}

/* ---------------------------------------------------------------------------
   4. Drapeaux (commun)
   --------------------------------------------------------------------------- */

.lc-language-switcher .trp-flag-image {
    width: 18px;
    height: auto;
    vertical-align: middle;
    margin-right: 4px;
    border-radius: 1px;
}

/* ---------------------------------------------------------------------------
   Compensation de la WP Admin Bar pour les éléments sticky/fixed du header.
   N'a aucun effet pour les visiteurs non connectés (classe .admin-bar absente).


#wpadminbar {
	position: relative;
}

@media screen and (max-width: 782px) {
    #wpadminbar {
        position: relative;
    }
}
   --------------------------------------------------------------------------- */