/*.vsg-menu__burger {
  position: relative;
  z-index: 1000001;
}*/

/* ==========================================================
   VSG MENU
   - Desktop : menu déroulant classique
   - Mobile  : drilldown plein écran
   - Couleur principale : #294a8f
   ========================================================== */

.vsg-menu {
  --vsg-blue: #294a8f;
  --vsg-line: rgba(255, 255, 255, 0.20);
  --vsg-text: #ffffff;
  --vsg-panel-height: 64px;
  --vsg-mobile-header-offset: 0px;
  position: relative;
}


/* ==========================================================
   CTA bouton de menu mis en avant
   ========================================================== */

.cta-menu-nav .vsg-menu__link {
  background-color: var(--vsg-text) !important;
  color: var(--vsg-blue) !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem !important;
}

li.cta-menu-nav a:hover {
  text-decoration: none !important;
}

.vsg-menu__panel .cta-menu-nav .vsg-menu__link {
  border-radius: 0 !important;
}

/* ==========================================================
   BOUTON BURGER
   ========================================================== */

.vsg-menu__burger {
  display: none;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 0;
  color: var(--vsg-text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  position: relative;
  z-index: 1000001;
}

.vsg-menu__burger-box {
  position: relative;
  width: 28px;
  height: 22px;
  display: inline-block;
}

.vsg-menu__burger-line {
  position: absolute;
  left: 0;
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    top 0.25s ease;
}

.vsg-menu__burger-line--top {
  top: 0;
}

.vsg-menu__burger-line--middle {
  top: 10px;
}

.vsg-menu__burger-line--bottom {
  top: 20px;
}

/* Etat ouvert = croix */
.vsg-menu.is-open .vsg-menu__burger-line--top {
  top: 10px;
  transform: rotate(45deg);
}

.vsg-menu.is-open .vsg-menu__burger-line--middle {
  opacity: 0;
}

.vsg-menu.is-open .vsg-menu__burger-line--bottom {
  top: 10px;
  transform: rotate(-45deg);
}

/* ==========================================================
   DESKTOP
   ========================================================== */

.vsg-menu__desktop {
  display: block;
}

.vsg-menu__desktop .vsg-menu__list--desktop {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.vsg-menu__desktop .vsg-menu__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vsg-menu__desktop .vsg-menu__link {
  color: var(--vsg-text);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
}

.vsg-menu__desktop .vsg-menu__link:hover,
.vsg-menu__desktop .vsg-menu__link:focus {
  text-decoration: underline;
}

.vsg-menu__desktop-toggle {
  background: transparent;
  border: 0;
  color: var(--vsg-text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  min-width: 20px;
  min-height: 20px;
}

/* Sous-menus desktop */
.vsg-menu__desktop .vsg-menu__item > .vsg-menu__list--desktop {
  position: absolute;
  top: 100%;
  /*transform: translateY(25px);*/
  left: 0;
  min-width: 240px;
  display: none;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--vsg-blue);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  z-index: 9999;
}

.vsg-menu__desktop .vsg-menu__item:hover > .vsg-menu__list--desktop,
.vsg-menu__desktop .vsg-menu__item:focus-within > .vsg-menu__list--desktop,
.vsg-menu__desktop .vsg-menu__item.is-open > .vsg-menu__list--desktop {
  display: flex;
}

.vsg-menu__desktop .vsg-menu__item > .vsg-menu__list--desktop > .vsg-menu__item {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--vsg-line);
}

.vsg-menu__desktop .vsg-menu__item > .vsg-menu__list--desktop > .vsg-menu__item:last-child {
  border-bottom: 0;
}

.vsg-menu__desktop .vsg-menu__item > .vsg-menu__list--desktop .vsg-menu__link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 12px 16px;
  white-space: normal;
}

.vsg-menu__desktop .vsg-menu__item > .vsg-menu__list--desktop .vsg-menu__desktop-toggle {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sous-sous-menu à droite */
.vsg-menu__desktop .vsg-menu__item > .vsg-menu__list--desktop .vsg-menu__item {
  position: relative;
}

.vsg-menu__desktop .vsg-menu__item > .vsg-menu__list--desktop .vsg-menu__item > .vsg-menu__list--desktop {
  top: 0;
  left: 100%;
}

/* ==========================================================
   MOBILE OVERLAY / DRILLDOWN
   ========================================================== */

/* Panneau principal mobile : pas de barre retour */
.vsg-menu__panel[data-panel="0"] .vsg-menu__panelbar {
  display: none;
}

/* Le contenu du panneau principal commence directement en haut */
.vsg-menu__panel[data-panel="0"] .vsg-menu__panelcontent {
  padding-top: 0;
}

.vsg-menu__overlay {
  position: fixed;
  top: var(--vsg-mobile-header-offset);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999999;
  background: var(--vsg-blue);
  color: var(--vsg-text);
  border-top: 1px solid rgba(255, 255, 255, 0.20);
}

.vsg-menu__panels {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.vsg-menu__panel {
  position: absolute;
  inset: 0;
  background: var(--vsg-blue);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}

.vsg-menu__panel.is-active {
  transform: translateX(0);
}

.vsg-menu__panel.is-left {
  transform: translateX(-100%);
}

.vsg-menu__panelbar {
  height: var(--vsg-panel-height);
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  border-bottom: 1px solid var(--vsg-line);
}

.vsg-menu__back,
.vsg-menu__panelspacer {
  width: 64px;
  height: var(--vsg-panel-height);
}

.vsg-menu__title {
  text-align: center;
  font-size: 1rem;
  opacity: 0.95;
}

.vsg-menu__panelcontent {
  flex: 1;
  overflow: auto;
}

/* Liste mobile */
.vsg-menu__panelcontent .vsg-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vsg-menu__panelcontent .vsg-menu__item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--vsg-line);
}

/* Lien prend tout l'espace */
.vsg-menu__panelcontent .vsg-menu__link {
  flex: 1;
  padding: 18px 18px;
  color: var(--vsg-text);
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* Bouton drill + bouton retour */
.vsg-menu__drill,
.vsg-menu__back {
  width: 56px;
  border: 0;
  background: var(--vsg-text);
  color: var(--vsg-blue);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================
   BREAKPOINT
   ========================================================== */

@media (max-width: 1199px) {
  
  .vsg-menu__desktop {
    display: none;
  }

  .vsg-menu__burger {
    display: inline-flex;
  }
}

@media (min-width: 1200px) {
  .vsg-menu__overlay {
    display: none !important;
  }
}