/* 1) Toujours mettre le header au-dessus de Leaflet */
.site-header,
.main-header-bar,
.elementor-location-header,
.header-main-layout {
  position: relative;
  z-index: 3000;
}

/* 2) Forcer Leaflet à rester sous le header */
#pn-view-map,
#pn-map,
.leaflet-container { z-index: 1; }

.leaflet-control-container,
.leaflet-top,
.leaflet-bottom,
.leaflet-control { z-index: 900 !important; }

.leaflet-control-fullscreen { z-index: 900 !important; }

#pn-mobile-bar,
.pn-filter-panel { z-index: 2500; }

/* PN — Barre haute header */
.elementor .elementor-element-3d9f43d{
  transition: opacity .2s ease, transform .2s ease, height .2s ease, padding .2s ease, margin .2s ease;
  will-change: opacity, transform, height;
}

body.pn-scrolled .elementor .elementor-element-3d9f43d{
  opacity: 0;
  transform: translateY(-8px);
  height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

/* ===========================
   6) HEADER / BURGER / RECHERCHE
   =========================== */

form[role="search"] { pointer-events: auto !important; z-index: 9999 !important; position: relative; }
form[role="search"] input[type="search"] {
  width: 100%; padding: 8px 12px; font-size: 16px; border: 1px solid #ccc; border-radius: 25px;
}

.hfe-nav-menu-icon svg, .logo-scroll svg, .cart-button img {
  width: 48px; height: 48px; max-width: 100%; max-height: 100%; display: inline-block; vertical-align: middle; object-fit: contain;
}
@media (max-width: 1024px) {
  .hfe-nav-menu-icon svg, .logo-scroll svg, .cart-button img { width: 36px; height: 36px; }
}
@media (max-width: 768px) {
  .hfe-nav-menu-icon svg, .logo-scroll svg, .cart-button img { width: 28px; height: 28px; }
}

.custom-burger-menu { position: relative; display: flex; align-items: center; max-height: 100%; min-height: 40px; flex: 1 1 auto; width: 100%; }
.burger-toggle { font-size: 40px !important; color: #fff !important; background: none; border: none; cursor: pointer; padding: 8px 12px; z-index: 11000; }

@media (max-width: 1024px) {
  .burger-nav {
    opacity: 0; visibility: hidden; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh; background: rgba(255, 255, 255, 0.95);
    z-index: 10999; transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    padding: 40px 20px; box-sizing: border-box; backdrop-filter: blur(2px); pointer-events: auto;
  }
  .burger-nav.show { opacity: 1; visibility: visible; }
  .burger-nav ul { list-style: none; margin: 0; padding: 0; width: 100vw; text-align: center; position: relative; z-index: 2; }
  .burger-nav li { width: 100%; }
  .burger-nav li a {
    display: block; padding: 16px 24px; font-size: 20px; text-decoration: none; color: #333;
    border-bottom: 1px solid #ddd; text-align: center; transition: background 0.3s ease; word-break: break-word; width: 100%; background: transparent;
  }
  .burger-nav li a:hover { background: #f2f2f2; }
  .burger-nav::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: white; z-index: 1; }
  .elementor-container > .elementor-column:nth-child(1) { z-index: 10000; }
  .elementor-container > .elementor-column:nth-child(2) { z-index: 1; }
  .elementor-container > .elementor-column:nth-child(1) .elementor-widget-container { position: relative; z-index: 10000; }
  .burger-nav { width: 100vw !important; max-width: none !important; flex-grow: 1 !important; }
}

.hfe-nav-menu-icon { padding: 12px; display: flex; align-items: center; justify-content: center; }
.hfe-nav-menu-icon svg { transition: transform 0.3s ease, filter 0.3s ease; }
.hfe-nav-menu-icon svg:hover { transform: scale(1.1); filter: brightness(1.2); }
.cart-button img:hover, .cart-button:hover img, .hfe-nav-menu-icon:hover svg {
  transform: scale(1.1); transition: transform 0.3s ease; filter: brightness(1.2);
}

@media (max-width: 450px) {
  .cart-button img[src*="LOGO-CONNEXION-2-1.svg"],
  .cart-button img[src*="LOGO-PANIER"] {
    width: 25px !important; height: 25px !important; max-width: 25px !important; max-height: 25px !important;
    object-fit: contain; display: inline-block; vertical-align: middle;
  }
}

.header-sticky {
  opacity: 0; transform: translateY(-100%); pointer-events: none; position: fixed; top: 0; left: 0; right: 0;
  background: white; z-index: 9999; display: flex; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: opacity 1.9s ease, transform 1.9s ease; height: 60px; min-height: 60px; box-sizing: border-box;
}
.header-sticky.sticky-active { opacity: 1; transform: translateY(0); transition: opacity 1.9s ease, transform 1.9s ease; pointer-events: auto; }
.header-sticky:not(.sticky-active) > .logo-scroll,
.header-sticky:not(.sticky-active) > .cart-button { opacity: 0; max-height: 0; overflow: hidden; transition: opacity 0.3s ease, max-height 1.8s ease; }
.header-sticky.sticky-active > .logo-scroll { opacity: 1; max-height: 60px; transition: opacity 0.3s ease, max-height 1.8s ease; }
.header-top { position: relative !important; z-index: 1; }

.cart-button img, .header-sticky .logo-scroll svg, .header-sticky .cart-button svg, .hfe-nav-menu-icon svg {
  width: 36px; height: 36px; max-width: 36px; max-height: 36px; object-fit: contain; display: inline-block; vertical-align: middle; overflow: hidden; transition: none !important;
}

header.site-header, #masthead, .header-sticky { margin-top: 0 !important; padding-top: 0 !important; top: 0 !important; }
.header-sticky { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; }

header.site-header, #masthead, .header-sticky {
  position: fixed !important; top: 0 !important; left: 0; right: 0; width: 100%; z-index: 9999; height: 100px; margin: 0 !important; padding: 0 !important;
}

/* Compensation header — sans Elementor, sans sidebar */
main,
.site-main,
.primary,
.ast-container,
.content-area {
  padding-top: 100px !important;
  margin-top: 0 !important;
  box-sizing: border-box;
}

@media screen and (min-width: 1025px) {
  .ast-container:has(article.pn-article),
  .content-area:has(article.pn-article),
  .site-main:has(> article.pn-article),
  main:has(> article.pn-article) {
    padding-top: 180px !important;
  }
}

@media screen and (max-width: 1024px) {
  header.site-header, #masthead, .header-sticky { height: 70px; }

  main,
  .site-main,
  .primary,
  .ast-container,
  .content-area {
    padding-top: 30px !important;
  }
}

@media (max-width:1024px){
  main:has(article.pn-article),
  .ast-container:has(article.pn-article),
  .site-main:has(article.pn-article) {
      padding-top: 60px !important;
  }
}

.custom-burger-nav { position: relative; z-index: 9999; }
.burger-menu {
  position: absolute; top: 150%; left: -30px; width: 100vw; max-width: 450px; background-color: #fff;
  border: 2px solid #759739; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  visibility: hidden; opacity: 0; max-height: 0; overflow: hidden; transition: opacity 0.3s ease, max-height 0.5s ease;
}
.burger-menu.active { visibility: visible; opacity: 0.95; max-height: 1000px; padding: 2rem 1rem 1.5rem 1rem; }
@media (max-width: 1024px) { .burger-menu { top: 140%; left: -20px; width: calc(100vw + 20px); } }
@media (max-width: 800px)  { .burger-menu { top: 120%; left: -15px; width: calc(100vw + 15px); } }
@media (max-width: 400px)  { .burger-menu { top: 110%; left: -10px; width: calc(100vw + 10px); } }

.search-form { order: -1; position: relative; max-width: 100%; margin-top: 0; margin-bottom: 0.5rem; box-sizing: border-box; }
.burger-wp-menu { list-style: none; margin: 0; padding: 0; }
.burger-wp-menu li { margin: 0; padding: 0; border-bottom: 1px solid #ccc; }
.burger-wp-menu li:last-child { border-bottom: 1px solid #ccc; }
.burger-wp-menu li a { display: block; padding: 1rem 1.5rem; color: #759739; text-decoration: none; font-size: 1.05rem; transition: background-color 0.2s ease, color 0.2s ease; }
.burger-wp-menu li a:hover, .burger-wp-menu li a:focus { background-color: #eef3e1; color: #759739; }
.search-field { width: 100%; padding: 10px 44px 10px 16px; border: 1px solid #ccc; border-radius: 25px; font-size: 1rem; box-sizing: border-box; }
.search-field::placeholder { font-size: 0.8rem; opacity: 0.9; }
.search-submit { position: absolute; top: 50%; right: 1.5rem; transform: translateY(-50%); background: transparent !important; border: none !important; box-shadow: none !important; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.search-submit .svg-icon { width: 20px; height: 20px; object-fit: contain; display: block; }

.svg-icon[src*="MENU-BURGEUR.svg"] { width: 45px; height: 45px; max-width: 45px; max-height: 45px; object-fit: contain; display: inline-block; vertical-align: middle; }
@media (max-width: 1024px) { .svg-icon[src*="MENU-BURGEUR.svg"] { width: 38px; height: 38px; max-width: 38px; max-height: 38px; } }
@media (max-width: 600px)  { .svg-icon[src*="MENU-BURGEUR.svg"] { width: 32px; height: 32px; max-width: 32px; max-height: 32px; } }

/* Icônes menu */
:root{
  --pn-ic-size: 22px;
  --pn-ic-gap: 12px;

  --ic-articles:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23759939' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='4' width='14' height='16' rx='2'/%3E%3Cpath d='M7 8h6M7 12h6M7 16h4'/%3E%3Cpath d='M17 8h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H7'/%3E%3C/svg%3E");
  --ic-boutique:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23759939' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8h12l-1 10a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L6 8Z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E");
  --ic-agenda:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23759939' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3Cpath d='M9.5 15.5h5v4h-5z'/%3E%3C/svg%3E");
  --ic-apropos:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23759939' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 10v6'/%3E%3Cpath d='M12 7.5h.01'/%3E%3C/svg%3E");
  --ic-contact:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23759939' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.86 19.86 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.86 19.86 0 0 1 2.08 4.18 2 2 0 0 1 4.06 2h3a2 2 0 0 1 2 1.72c.12.86.34 1.7.66 2.5a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.58-1.18a2 2 0 0 1 2.11-.45c.8.32 1.64.54 2.5.66A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

li.articles > a,
li.boutique > a,
li.agenda > a,
li.apropos > a,
li.contact > a,
li.articles > a.elementor-item,
li.boutique > a.elementor-item,
li.agenda > a.elementor-item,
li.apropos > a.elementor-item,
li.contact > a.elementor-item,
li.articles > a.hfe-menu-item,
li.boutique > a.hfe-menu-item,
li.agenda > a.hfe-menu-item,
li.apropos > a.hfe-menu-item,
li.contact > a.hfe-menu-item{
  position: relative;
  padding-left: calc(var(--pn-ic-size) + var(--pn-ic-gap)) !important;
}

li.articles > a::before,
li.boutique > a::before,
li.agenda > a::before,
li.apropos > a::before,
li.contact > a::before,
li.articles > a.elementor-item::before,
li.boutique > a.elementor-item::before,
li.agenda > a.elementor-item::before,
li.apropos > a.elementor-item::before,
li.contact > a.elementor-item::before,
li.articles > a.hfe-menu-item::before,
li.boutique > a.hfe-menu-item::before,
li.agenda > a.hfe-menu-item::before,
li.apropos > a.hfe-menu-item::before,
li.contact > a.hfe-menu-item::before{
  content:"";
  position:absolute; left:0; top:50%;
  width:var(--pn-ic-size); height:var(--pn-ic-size);
  transform:translateY(-50%);
  background-repeat:no-repeat; background-position:center; background-size:var(--pn-ic-size) var(--pn-ic-size);
  pointer-events:none;
}

li.articles > a::before{ background-image:var(--ic-articles); }
li.boutique > a::before{ background-image:var(--ic-boutique); }
li.agenda   > a::before{ background-image:var(--ic-agenda); }
li.apropos  > a::before{ background-image:var(--ic-apropos); }
li.contact  > a::before{ background-image:var(--ic-contact); }

.ast-desktop .main-header-menu > .menu-item > .menu-link,
.ast-mobile-popup-drawer .main-header-menu > .menu-item > .menu-link{
  position:relative;
  padding-left: calc(var(--pn-ic-size) + var(--pn-ic-gap)) !important;
}

.ast-desktop .main-header-menu > .menu-item.articles  > .menu-link::before,
.ast-mobile-popup-drawer .main-header-menu > .menu-item.articles  > .menu-link::before{ background-image:var(--ic-articles) !important; }
.ast-desktop .main-header-menu > .menu-item.boutique  > .menu-link::before,
.ast-mobile-popup-drawer .main-header-menu > .menu-item.boutique  > .menu-link::before{ background-image:var(--ic-boutique) !important; }
.ast-desktop .main-header-menu > .menu-item.agenda    > .menu-link::before,
.ast-mobile-popup-drawer .main-header-menu > .menu-item.agenda    > .menu-link::before{ background-image:var(--ic-agenda) !important; }
.ast-desktop .main-header-menu > .menu-item.apropos   > .menu-link::before,
.ast-mobile-popup-drawer .main-header-menu > .menu-item.apropos   > .menu-link::before{ background-image:var(--ic-apropos) !important; }
.ast-desktop .main-header-menu > .menu-item.contact   > .menu-link::before,
.ast-mobile-popup-drawer .main-header-menu > .menu-item.contact   > .menu-link::before{ background-image:var(--ic-contact) !important; }

.elementor-nav-menu--main .menu-item > .elementor-item,
.hfe-nav-menu .menu-item > a.hfe-menu-item{
  position:relative;
  padding-left: calc(var(--pn-ic-size) + var(--pn-ic-gap)) !important;
}

.elementor-nav-menu--main .menu-item > .elementor-item::before,
.hfe-nav-menu .menu-item > a.hfe-menu-item::before{
  content:"";
  position:absolute; left:0; top:50%;
  width:var(--pn-ic-size); height:var(--pn-ic-size); transform:translateY(-50%);
  background-repeat:no-repeat; background-position:center; background-size:var(--pn-ic-size) var(--pn-ic-size);
}

.burger-menu .burger-wp-menu li > a{
  position:relative;
  padding-left: calc(var(--pn-ic-size) + var(--pn-ic-gap)) !important;
}

.burger-menu .burger-wp-menu li > a::before{
  content:""; position:absolute; left:0; top:50%;
  width:var(--pn-ic-size); height:var(--pn-ic-size);
  transform:translateY(-50%);
  background-repeat:no-repeat; background-position:center; background-size:var(--pn-ic-size) var(--pn-ic-size);
}

.burger-menu .burger-wp-menu li.articles  > a::before{ background-image:var(--ic-articles) !important; }
.burger-menu .burger-wp-menu li.boutique  > a::before{ background-image:var(--ic-boutique) !important; }
.burger-menu .burger-wp-menu li.agenda    > a::before{ background-image:var(--ic-agenda) !important; }
.burger-menu .burger-wp-menu li.apropos   > a::before{ background-image:var(--ic-apropos) !important; }
.burger-menu .burger-wp-menu li.contact   > a::before{ background-image:var(--ic-contact) !important; }

li.articles > a:hover,
li.boutique > a:hover,
li.agenda > a:hover,
li.apropos > a:hover,
li.contact > a:hover,
.burger-menu .burger-wp-menu li > a:hover{
  color:#759739 !important;
}

@media (max-width: 600px){ :root{ --pn-ic-size: 20px; } }

/* Masquer la barre mobile sur les écrans desktop */
@media (min-width: 1025px) {
  .pn-mobile-bar {
    display: none !important;
  }
}

/* PN — Fondu progressif du bandeau */
.elementor-element-3d9f43d,
[data-id="3d9f43d"]{
  --pn-hide: 0;
  opacity: calc(1 - var(--pn-hide));
  transform: translateY(calc(-12px * var(--pn-hide)));
  backface-visibility: hidden;
  transform: translateZ(0) translateY(calc(-12px * var(--pn-hide)));
  transition: opacity .15s linear, transform .15s linear;
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce){
  .elementor-element-3d9f43d,
  [data-id="3d9f43d"]{
    transition: none !important;
  }
}