/*
Theme Name: Anti Nuisibles Child
Template: anti-nuisibles
Version: 1.1.0
*/


/* =====================================================
   VARIABLES GLOBALES
===================================================== */

:root{
  --zeb-green:#31420f;
  --zeb-green-dark:#223006;
  --zeb-gold:#d9bd73;

  --zeb-header-height:72px;
  --zeb-header-height-desktop:84px;

  --zeb-header-max-width:1600px;
  --zeb-side-space:44px;

  --zeb-transition:.28s ease;
}


/* =====================================================
   RESET GLOBAL
===================================================== */

html{
  scrollbar-gutter:stable;
  -webkit-text-size-adjust:100%;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

body{
  margin:0;
  overflow-x:hidden;

  font-family:'Manrope',Arial,sans-serif;
}


/* =====================================================
   HEADER
===================================================== */

.zeb-header{
  position:sticky;
  top:0;
  z-index:9999;

  width:100%;
  margin:0 !important;

  background:#31420f;

  box-shadow:0 8px 24px rgba(0,0,0,.14);
}

.admin-bar .zeb-header{
  top:46px;
}


/* =====================================================
   CONTENEUR INTERNE
===================================================== */

.zeb-header__inner{
  width:calc(100% - 20px);
  margin:0 auto;

  display:grid;

  grid-template-columns:
    var(--zeb-side-space)
    minmax(0,1fr)
    auto;

  align-items:center;
  column-gap:9px;
}


/* =====================================================
   EMPLACEMENT DU HAMBURGER
===================================================== */

.zeb-header__sidebarSlot{
  position:relative;
  z-index:10020;

  grid-column:1;

  width:var(--zeb-side-space);
  min-width:var(--zeb-side-space);
  min-height:var(--zeb-header-height);

  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.zeb-header__sidebarSlot .zeb-side-trigger{
  position:relative;

  top:auto;
  right:auto;
  bottom:auto;
  left:auto;

  margin:0 !important;

  flex:0 0 32px;
}


/* =====================================================
   BOUTON HAMBURGER — STYLE CRITIQUE
===================================================== */

.zeb-side-trigger{
  position:relative;
  z-index:10020;

  width:32px;
  height:32px;
  flex:0 0 32px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3.5px;

  margin:0;
  padding:0;

  border:1px solid rgba(217,189,115,.34);
  border-radius:999px;

  background:rgba(255,255,255,.055);

  cursor:pointer;

  transition:
    background-color .25s ease,
    border-color .25s ease,
    transform .25s ease;
}

.zeb-side-trigger:hover,
.zeb-side-trigger:focus-visible{
  background:rgba(255,255,255,.10);
  border-color:rgba(217,189,115,.62);

  transform:translateY(-1px);
}

.zeb-side-trigger:focus-visible{
  outline:2px solid var(--zeb-gold);
  outline-offset:3px;
}

.zeb-side-trigger span{
  display:block;

  width:14px;
  height:1.4px;

  margin:0;

  border-radius:999px;

  background:#f7f3e8;

  transition:
    transform .32s ease,
    opacity .22s ease;
}

body.zeb-sidebar-open .zeb-side-trigger span:nth-child(1){
  transform:translateY(4.9px) rotate(45deg);
}

body.zeb-sidebar-open .zeb-side-trigger span:nth-child(2){
  opacity:0;
}

body.zeb-sidebar-open .zeb-side-trigger span:nth-child(3){
  transform:translateY(-4.9px) rotate(-45deg);
}




/* =====================================================
   SIDEBAR — SOCLE CRITIQUE
   Évite tout déplacement avant sidebar.css
===================================================== */

.zeb-side-overlay{
  position:fixed;
  inset:0;
  z-index:10000;

  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.zeb-side{
  position:fixed;
  inset:0 auto 0 0;
  z-index:10010;

  width:min(340px,88vw);
  height:100dvh;

  overflow:hidden;

  visibility:hidden;

  transform:translate3d(-105%,0,0);
}

body.zeb-sidebar-open{
  overflow:hidden;
}


/* =====================================================
   LOGO ET IDENTITÉ
===================================================== */

.zeb-header__brand{
  grid-column:2;

  min-width:0;
  min-height:var(--zeb-header-height);

  display:flex;
  align-items:center;
  gap:9px;

  color:#fff;
  text-decoration:none;
}

.zeb-header__logoWrap{
  width:42px;
  height:42px;
  flex:0 0 42px;

  display:grid;
  place-items:center;

  overflow:hidden;

  border-radius:999px;

  background:#fff;

  box-shadow:0 5px 16px rgba(0,0,0,.16);
}

.zeb-header__logo{
  display:block;

  width:100%;
  height:100%;

  padding:2px;

  object-fit:contain;
  object-position:center;
}

.zeb-header__brandText{
  min-width:0;

  display:flex;
  flex-direction:column;
}

.zeb-header__name{
  color:#fff;

  font-size:11.5px;
  font-weight:700;
  line-height:1.15;

  text-transform:uppercase;
  white-space:nowrap;
}

.zeb-header__tagline{
  display:none;
}


/* =====================================================
   CTA MOBILE
===================================================== */

.zeb-header__mobileCta{
  grid-column:3;

  min-width:62px;
  min-height:35px;
  max-width:100%;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:8px 11px;

  border:1px solid rgba(255,255,255,.45);
  border-radius:999px;

  background:#fff;
  color:var(--zeb-green-dark);

  font-size:9.5px;
  font-weight:700;
  line-height:1;
  letter-spacing:.04em;

  text-decoration:none;
  text-transform:uppercase;
  white-space:nowrap;

  overflow:hidden;
  text-overflow:ellipsis;
}


/* =====================================================
   NAVIGATION MOBILE / TABLETTE
===================================================== */

.zeb-header__nav{
  grid-column:1 / -1;

  width:calc(100% + 20px);

  margin-left:-10px;
  padding:0 10px 8px;

  overflow-x:auto;
  overflow-y:visible;

  background:transparent;

  scrollbar-width:none;
  -ms-overflow-style:none;

  -webkit-overflow-scrolling:touch;
}

.zeb-header__nav::-webkit-scrollbar{
  display:none;
}

.zeb-menu{
  width:max-content;
  min-width:100%;

  margin:0;
  padding:0;

  display:flex;
  align-items:flex-start;
  gap:24px;

  list-style:none;
}

.zeb-menu__item{
  position:relative;

  flex:0 0 auto;

  margin:0;
  padding:0;

  list-style:none;
}

.zeb-menu__mainLine{
  min-height:44px;

  display:flex;
  align-items:center;
  gap:6px;
}

.zeb-menu__mainLine > a{
  position:relative;

  min-height:44px;

  display:inline-flex;
  align-items:center;

  padding:0;

  color:#fff;

  text-decoration:none;
  white-space:nowrap;

  font-size:12px;
  font-weight:600;
  line-height:1;
}

.zeb-menu__mainLine > a::after{
  content:"";

  position:absolute;
  left:0;
  bottom:5px;

  width:0;
  height:1px;

  background:var(--zeb-gold);

  transition:width var(--zeb-transition);
}

.zeb-menu__mainLine > a:hover::after,
.zeb-menu__mainLine > a:focus-visible::after,
.zeb-menu__item.is-open .zeb-menu__mainLine > a::after{
  width:100%;
}

.zeb-menu__mainLine > a:hover,
.zeb-menu__mainLine > a:focus-visible,
.zeb-menu__item.is-open .zeb-menu__mainLine > a{
  color:var(--zeb-gold);
}


/* =====================================================
   BOUTONS DES SOUS-MENUS
===================================================== */

.zeb-menu__toggle{
  position:relative;
  z-index:4;

  width:24px;
  height:36px;
  flex:0 0 24px;

  display:grid;
  place-items:center;

  margin-left:2px;
  padding:0;

  border:0;

  background:transparent;

  cursor:pointer;
}

.zeb-menu__toggle::before{
  content:"";

  width:6px;
  height:6px;

  border-right:1.5px solid #fff;
  border-bottom:1.5px solid #fff;

  transform:rotate(45deg) translateY(-2px);

  transition:
    transform var(--zeb-transition),
    border-color var(--zeb-transition);
}

.zeb-menu__item.is-open .zeb-menu__toggle::before,
.zeb-menu__item:focus-within .zeb-menu__toggle::before{
  border-color:var(--zeb-gold);

  transform:rotate(225deg) translate(-1px,-1px);
}


/* =====================================================
   DROPDOWN MOBILE / TABLETTE
===================================================== */

.zeb-dropdown{
  position:fixed;

  top:var(--zeb-dropdown-top,124px);

  left:max(10px,env(safe-area-inset-left));
  right:max(10px,env(safe-area-inset-right));

  z-index:10050;

  max-height:var(
    --zeb-dropdown-max-height,
    calc(100dvh - var(--zeb-dropdown-top,124px) - 12px)
  );

  margin:0;

  padding:
    12px
    12px
    max(12px,env(safe-area-inset-bottom));

  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-content:start;
  gap:4px;

  overflow-x:hidden;
  overflow-y:auto;

  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;

  touch-action:pan-y;

  list-style:none;

  background:rgba(34,48,6,.99);

  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;

  box-shadow:0 22px 48px rgba(0,0,0,.30);

  opacity:0;
  visibility:hidden;
  pointer-events:none;

  transform:translateY(-8px);

  transition:
    opacity var(--zeb-transition),
    visibility var(--zeb-transition),
    transform var(--zeb-transition);
}

.zeb-menu__item--hasDropdown.is-open > .zeb-dropdown{
  opacity:1;
  visibility:visible;
  pointer-events:auto;

  transform:translateY(0);
}

.zeb-dropdown li{
  min-width:0;

  margin:0;
  padding:0;

  list-style:none;
}

.zeb-dropdown a{
  width:100%;
  min-height:44px;

  display:flex;
  align-items:center;

  padding:11px 12px;

  border-radius:9px;

  color:rgba(255,255,255,.94);

  text-decoration:none;
  overflow-wrap:anywhere;

  font-size:12px;
  font-weight:500;
  line-height:1.35;
}

.zeb-dropdown a:hover,
.zeb-dropdown a:focus-visible{
  color:var(--zeb-gold);

  background:rgba(255,255,255,.07);
}

.zeb-menu__item--cta{
  display:none;
}


/* =====================================================
   TABLETTE
===================================================== */

@media (min-width:560px) and (max-width:919px){

  :root{
    --zeb-header-height:78px;
    --zeb-side-space:48px;
  }

  .zeb-header__inner{
    width:calc(100% - 36px);

    column-gap:12px;
  }

  .zeb-header__sidebarSlot{
    min-height:var(--zeb-header-height);
  }

  .zeb-header__logoWrap{
    width:48px;
    height:48px;
    flex-basis:48px;
  }

  .zeb-header__name{
    font-size:14px;
  }

  .zeb-header__tagline{
    display:block;

    margin-top:4px;

    color:rgba(255,255,255,.70);

    font-size:9.5px;
    line-height:1.25;

    white-space:nowrap;
  }

  .zeb-header__mobileCta{
    min-width:76px;
    min-height:38px;

    padding:9px 15px;

    font-size:10.5px;
  }

  .zeb-header__nav{
    width:calc(100% + 36px);

    margin-left:-18px;

    padding-inline:18px;
  }

  .zeb-menu{
    width:100%;
    min-width:100%;

    justify-content:center;
    align-items:center;

    gap:34px;
  }

  .zeb-menu__mainLine > a{
    font-size:13px;
  }

  .zeb-dropdown{
    left:max(18px,env(safe-area-inset-left));
    right:max(18px,env(safe-area-inset-right));

    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}


/* =====================================================
   DESKTOP
===================================================== */

@media (min-width:920px){

  .admin-bar .zeb-header{
    top:32px;
  }

  .zeb-header__inner{
    width:100%;
    max-width:var(--zeb-header-max-width);
    min-height:var(--zeb-header-height-desktop);

    margin:0 auto;
    padding-inline:24px;

    display:flex;
    align-items:center;
    gap:24px;
  }

  .zeb-header__sidebarSlot{
    width:32px;
    min-width:32px;
    min-height:var(--zeb-header-height-desktop);
    flex:0 0 32px;

    display:flex;
    align-items:center;
    justify-content:center;
  }

  .zeb-header__mobileCta{
    display:none;
  }

  .zeb-header__brand{
    min-width:0;
    min-height:var(--zeb-header-height-desktop);
    flex:0 1 auto;

    gap:12px;
  }

  .zeb-header__logoWrap{
    width:52px;
    height:52px;
    flex-basis:52px;
  }

  .zeb-header__name{
    font-size:16px;
  }

  .zeb-header__tagline{
    display:block;

    margin-top:5px;

    color:rgba(255,255,255,.70);

    font-size:10.5px;
    line-height:1.25;

    white-space:nowrap;
  }

  .zeb-header__nav{
    position:static;

    width:auto;
    min-width:0;

    margin:0 0 0 auto;
    padding:0;

    overflow:visible;
  }

  .zeb-menu{
    width:auto;
    min-width:0;

    align-items:center;
    gap:30px;
  }

  .zeb-menu__mainLine{
    min-height:var(--zeb-header-height-desktop);

    gap:0;
  }

  .zeb-menu__mainLine > a{
    min-height:var(--zeb-header-height-desktop);

    font-size:13px;

    text-transform:uppercase;
  }

  .zeb-menu__mainLine > a::after{
    bottom:24px;
  }

  .zeb-menu__item--hasDropdown .zeb-menu__toggle{
    width:22px;
    flex-basis:22px;

    margin-left:7px;
  }

  .zeb-menu__item--hasDropdown .zeb-menu__toggle::before{
    transform:rotate(45deg) translateY(-1px);
  }

  .zeb-menu__item--hasDropdown:hover .zeb-menu__toggle::before,
  .zeb-menu__item--hasDropdown:focus-within .zeb-menu__toggle::before,
  .zeb-menu__item--hasDropdown.is-open .zeb-menu__toggle::before{
    border-color:var(--zeb-gold);

    transform:rotate(225deg) translate(-1px,-1px);
  }

  .zeb-menu__item--cta{
    display:block;
    flex:0 0 auto;
  }

  .zeb-menu__item--cta > a{
    min-width:104px;
    min-height:48px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:0 22px;

    border:1px solid rgba(255,255,255,.38);
    border-radius:999px;

    background:#fff;
    color:var(--zeb-green-dark);

    font-size:12px;
    font-weight:700;
    line-height:1;
    letter-spacing:.04em;

    text-decoration:none;
    text-transform:uppercase;
    white-space:nowrap;
  }

  .zeb-dropdown{
    position:absolute;

    top:100%;
    left:50%;
    right:auto;

    z-index:20;

    width:216px;
    max-height:none;

    margin:0;
    padding:10px;

    display:block;

    overflow:visible;

    border-radius:0 0 14px 14px;

    opacity:0;
    visibility:hidden;
    pointer-events:none;

    transform:translateX(-50%) translateY(10px);
  }

  .zeb-menu__item--hasDropdown:hover > .zeb-dropdown,
  .zeb-menu__item--hasDropdown:focus-within > .zeb-dropdown,
  .zeb-menu__item--hasDropdown.is-open > .zeb-dropdown{
    opacity:1;
    visibility:visible;
    pointer-events:auto;

    transform:translateX(-50%) translateY(0);
  }
}


/* =====================================================
   DESKTOP INTERMÉDIAIRE
===================================================== */

@media (min-width:920px) and (max-width:1180px){

  .zeb-header__inner{
    padding-inline:18px;
    gap:16px;
  }

  .zeb-header__brand{
    gap:9px;
  }

  .zeb-header__name{
    font-size:14px;
  }

  .zeb-header__tagline{
    font-size:9.5px;
  }

  .zeb-menu{
    gap:18px;
  }

  .zeb-menu__mainLine > a{
    font-size:11.5px;
  }

  .zeb-menu__item--hasDropdown .zeb-menu__toggle{
    margin-left:4px;
  }

  .zeb-menu__item--cta > a{
    min-width:90px;
    min-height:44px;

    padding:0 15px;

    font-size:11px;
  }
}


/* =====================================================
   TRÈS PETITS ÉCRANS
===================================================== */

@media (max-width:380px){

  :root{
    --zeb-side-space:40px;
  }

  .zeb-header__inner{
    column-gap:6px;
  }

  .zeb-header__sidebarSlot{
    width:40px;
    min-width:40px;
  }

  .zeb-header__logoWrap{
    width:38px;
    height:38px;
    flex-basis:38px;
  }

  .zeb-header__name{
    font-size:10px;
  }

  .zeb-header__mobileCta{
    min-width:54px;
    min-height:33px;

    padding:7px 9px;

    font-size:8.5px;
  }

  .zeb-menu{
    gap:20px;
  }
}


/* =====================================================
   PETITS MOBILES
===================================================== */

@media (max-width:479px){

  .zeb-dropdown{
    grid-template-columns:1fr;
    gap:2px;

    padding:
      9px
      9px
      max(9px,env(safe-area-inset-bottom));

    border-radius:12px;
  }

  .zeb-dropdown a{
    min-height:42px;

    padding:10px 11px;
  }
}


/* =====================================================
   ASSISTANCE — BULLE CRITIQUE ANTI-CLS
===================================================== */

.zeb-assist{
  position:fixed;

  right:max(16px,env(safe-area-inset-right));
  bottom:max(16px,env(safe-area-inset-bottom));

  z-index:100000;

  width:50px;
  height:50px;
  max-width:calc(100vw - 24px);

  margin:0;
  padding:0;

  overflow:visible;

  font-family:'Manrope',Arial,sans-serif;

  pointer-events:auto;
}


/* =====================================================
   BULLE PRINCIPALE
===================================================== */

.zeb-assist__bubble{
  position:absolute;
  right:0;
  bottom:0;
  z-index:3;

  width:50px;
  height:50px;
  min-width:50px;
  min-height:50px;

  display:grid;
  place-items:center;

  margin:0;
  padding:0;

  border:0;
  border-radius:999px;

  appearance:none;
  -webkit-appearance:none;

  background:
    linear-gradient(
      135deg,
      #31420f,
      #172104
    );

  color:#fff;

  cursor:pointer;

  box-shadow:0 14px 34px rgba(0,0,0,.24);
}

.zeb-assist__bubble span{
  width:25px;
  height:25px;

  display:grid;
  place-items:center;

  border-radius:999px;

  background:#d9bd73;
  color:#172104;

  font-size:16px;
  font-weight:900;
  line-height:1;
}


/* =====================================================
   ÉTAT INITIAL DU TEASER
===================================================== */

.zeb-assist__teaser{
  position:absolute;
  right:0;
  bottom:62px;
  z-index:4;

  width:260px;
  max-width:calc(100vw - 32px);

  margin:0;

  opacity:0;
  visibility:hidden;

  pointer-events:none;
}


/* =====================================================
   ÉTAT INITIAL DU PANNEAU
===================================================== */

.zeb-assist__panel{
  position:absolute;
  right:0;
  bottom:62px;
  z-index:2;

  width:330px;
  max-width:calc(100vw - 24px);

  margin:0;

  opacity:0;
  visibility:hidden;

  pointer-events:none;
}


/* =====================================================
   ÉTATS ACTIFS — SÉCURITÉ D’OUVERTURE
===================================================== */

.zeb-assist.is-teasing .zeb-assist__teaser{
  opacity:1;
  visibility:visible;

  pointer-events:auto;
}

.zeb-assist.is-open .zeb-assist__panel{
  opacity:1;
  visibility:visible;

  pointer-events:auto;
}

.zeb-assist.is-open .zeb-assist__teaser{
  opacity:0;
  visibility:hidden;

  pointer-events:none;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width:520px){

  .zeb-assist{
    right:max(12px,env(safe-area-inset-right));
    bottom:max(12px,env(safe-area-inset-bottom));

    width:48px;
    height:48px;
  }

  .zeb-assist__bubble{
    width:48px;
    height:48px;
    min-width:48px;
    min-height:48px;
  }

  .zeb-assist__teaser,
  .zeb-assist__panel{
    bottom:60px;
  }
}


/* =====================================================
   TRÈS PETITS ÉCRANS
===================================================== */

@media (max-width:380px){

  .zeb-assist{
    right:max(9px,env(safe-area-inset-right));
    bottom:max(9px,env(safe-area-inset-bottom));
  }
}


/* =====================================================
   ACCESSIBILITÉ
===================================================== */

@media (prefers-reduced-motion:reduce){

  .zeb-header *,
  .zeb-header *::before,
  .zeb-header *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}
