/*
Theme Name: GOOSSENS PRO Child Theme
Template: prohauz
Version: 1.0
*/

/* =========================================================
   PLOMBERIE — Template "Plomberie – Menu gauche"
   ========================================================= */

/* 1) Lever les blocages fréquents (sticky casse si parent overflow/transform) */
body.gp-plomberie-template .btContentWrap,
body.gp-plomberie-template .btContentHolder,
body.gp-plomberie-template .btContent,
body.gp-plomberie-template .bt_bb_port{
  overflow: visible !important;
  transform: none !important;
}

/* 2) Largeur 1600 pour le layout */
body.gp-plomberie-template .gp-plomberie-wrap{
  max-width: 1600px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 30px !important;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* (optionnel) Hero full width si tu utilises .gp-plomberie-hero dans le template */
body.gp-plomberie-template .gp-plomberie-hero{
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}

/* 3) Colonne gauche : sticky (PAS de overflow ici) */
body.gp-plomberie-template .gp-plomberie-nav{
  flex: 0 0 320px;
  position: -webkit-sticky;
  position: sticky;
  top: 110px; /* ajuste si besoin */
  align-self: flex-start;
  overflow: visible !important;
  z-index: 50;
}

/* Admin bar (quand tu es connecté) */
body.admin-bar.gp-plomberie-template .gp-plomberie-nav{
  top: 142px; /* 110 + ~32px */
}

/* 4) Scroll interne sur le menu (UL), pas sur l’aside */
body.gp-plomberie-template .gp-plomberie-menu{
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;

  max-height: calc(100vh - 130px); /* menu scroll si long */
  overflow-y: auto;
}

/* Liens */
body.gp-plomberie-template .gp-plomberie-menu li a{
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

body.gp-plomberie-template .gp-plomberie-menu li:last-child a{ border-bottom: 0; }

body.gp-plomberie-template .gp-plomberie-menu .current-menu-item > a,
body.gp-plomberie-template .gp-plomberie-menu .current_page_item > a{
  font-weight: 700;
}

/* 5) Contenu */
body.gp-plomberie-template .gp-plomberie-content{
  flex: 1 1 auto;
  min-width: 0;
}

/* Éviter que des sections “boxed” recentrent dans la colonne droite */
body.gp-plomberie-template .gp-plomberie-content .bt_bb_section.boxed_1600,
body.gp-plomberie-template .gp-plomberie-content .bt_bb_section.boxed_1200,
body.gp-plomberie-template .gp-plomberie-content .bt_bb_section.boxed_1000,
body.gp-plomberie-template .gp-plomberie-content .bt_bb_port{
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 6) Mobile : menu au-dessus, sticky OFF */
@media (max-width: 768px){
  body.gp-plomberie-template .gp-plomberie-wrap{
    flex-direction: column;
    padding: 0 15px !important;
  }
  body.gp-plomberie-template .gp-plomberie-nav{
    position: static;
    top: auto;
    flex: 0 0 auto;
  }
  body.gp-plomberie-template .gp-plomberie-menu{
    max-height: none;
    overflow: visible;
  }
}
:root{ --gp-sticky-top: 110px; }
body.admin-bar{ --gp-sticky-top: 142px; } /* 110 + ~32px */

body.gp-plomberie-template .gp-plomberie-wrap{
  position: relative; /* nécessaire pour l'état "bottom" en absolute */
}

body.gp-plomberie-template .gp-plomberie-nav .gp-plomberie-menu{
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}