/* ===== Pérène Mobile Menu - Apple-like (Drilldown) ===== */

@media (min-width: 1280px){
  .perene-mm{ display:none !important; }
}

@media (max-width: 1279px){
  .perene-mm{ position: relative; z-index: 999999; }
  .perene-mm, .perene-mm a{
    font-family: 'Jost', Helvetica, Arial, Lucida, sans-serif !important;
  }

  /* Toggle (hamburger / X animé) */
  .perene-mm__toggle{
    position: relative;
    top: auto;
    right: auto;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    margin-left: auto; /* pousse le burger à droite */
  }

  .perene-mm__icon{
    display:block;
    width: 22px; height: 2px;
    background: #fff;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
  }
  .perene-mm__icon:before,
  .perene-mm__icon:after{
    content:"";
    position:absolute;
    width: 22px; height: 2px;
    background: #fff;
    left: 0;
  }
  .perene-mm__icon:before{ top: -8px; }
  .perene-mm__icon:after{ top: 8px; }

  .perene-mm.is-open .perene-mm__icon{ background: transparent; }
  .perene-mm.is-open .perene-mm__icon:before{ top: 0; transform: rotate(45deg); }
  .perene-mm.is-open .perene-mm__icon:after{ top: 0; transform: rotate(-45deg); }

  /* Évite 2 croix : on cache le toggle quand l'overlay est ouvert */
  .perene-mm.is-open .perene-mm__toggle{
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Overlay */
  .perene-mm__panel{
    position: fixed;
    inset: 0;
    width: 100vw; height: 100vh;
    background: rgba(255,255,255,0.98);
    z-index: 1000000;
    overflow: hidden;

    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
  }
  .perene-mm__panel.is-visible{
    opacity: 1;
    transform: translateY(0);
  }

  /* Topbar */
  .perene-mm__topbar{
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    z-index: 2;
    background: rgba(255,255,255,0.96);
  }

  .perene-mm__back{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;

    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    padding: 10px 8px;
  }
  .perene-mm__backicon{ font-size: 28px; transform: translateY(-1px); }

  .perene-mm__close{
    border: 0;
    background: transparent;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    width: 44px;
    height: 44px;
  }

  .perene-mm.is-sublevel .perene-mm__back{
    opacity: 1;
    pointer-events: auto;
  }

  /* Contenu */
  .perene-mm__inner{ position: absolute; inset: 56px 0 0 0; }
  .perene-mm__viewport{
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 24px 40px;
  }
  .perene-mm__track{
    max-width: 520px;
    margin: 0 auto;
  }

  /* Liste sans puces (tous niveaux) */
  .perene-mm__track ul,
  .perene-mm__track li{
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Liens niveau principal */
  .perene-mm__track a{
    display:block;
    color:#111;
    text-decoration:none;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 600;
    padding: 10px 0;
  }
  .perene-mm__track a:active{ opacity: 0.65; }

  /* Chevron pour items avec enfants */
  .perene-mm__track .menu-item-has-children > a{
    position: relative;
    padding-right: 28px;
  }
  .perene-mm__track .menu-item-has-children > a:after{
    content:"›";
    position:absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    opacity: 0.6;
  }

  /* --- DRILLDOWN (sans déplacer les UL parents -> compatible partout) --- */

  /* Sous-menus cachés par défaut */
  .perene-mm__track ul ul{ display:none; }

  /* Quand un LI est "ouvert", on cache son lien et on affiche son UL enfant */
  .perene-mm__track li.mm-open > a{ display:none; }
  .perene-mm__track li.mm-open > ul{ display:block; }

  /* Dans un UL qui contient un item ouvert, on masque les autres items */
  .perene-mm__track ul.mm-has-open > li{ display:none; }
  .perene-mm__track ul.mm-has-open > li.mm-open{ display:block; }

  /* Style des liens dans sous-menus (un peu plus petit) */
  .perene-mm__track ul ul a{
    font-size: 22px;
    font-weight: 600;
    padding: 10px 0;
  }

  /* Transition discrète (entrée) */
  .perene-mm__track ul.mm-anim-in{
    animation: pereneMmIn 180ms ease both;
  }
  .perene-mm__track ul.mm-anim-out{
    animation: pereneMmOut 180ms ease both;
  }
  @keyframes pereneMmIn{
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  @keyframes pereneMmOut{
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(10px); }
  }

  /* Lock scroll */
  html.perene-mm--lock,
  body.perene-mm--lock{
    overflow:hidden !important;
    height:100% !important;
    touch-action:none !important;
  }
  body.perene-mm--lock{
    position: fixed !important;
    width: 100% !important;
  }

  /* SR */
  .perene-mm__sr{
    position:absolute !important;
    width:1px; height:1px;
    padding:0; margin:-1px;
    overflow:hidden; clip:rect(0,0,0,0);
    white-space:nowrap; border:0;
  }
  
  /* Bouton Retour (flèche + texte) */
.perene-mm__back,
.perene-mm__backicon{
  color: #ffa300 !important;
}

/* Lien actif – style Apple (point discret à gauche) */
.perene-mm__track .current-menu-item > a,
.perene-mm__track .current-menu-ancestor > a{
  color: #111 !important;              /* reste noir */
  position: relative;
  padding-left: 16px;                  /* place pour le point */
}

/* Point orange */
.perene-mm__track .current-menu-item > a::before,
.perene-mm__track .current-menu-ancestor > a::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: #ffa300;
  border-radius: 50%;
  transform: translateY(-50%);
}

.perene-mm__fixedbar{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

.perene-mm__logo{
  margin-right: 12px !important;
}

.perene-mm__toggle{
  margin-left: auto !important;
  position: relative !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
}


/* Tap / active : feedback tactile Apple */
.perene-mm__track a:active{
  color: #ffa300 !important;
}

/* Barre fixe en haut */
.perene-mm__fixedbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: #001f5b;
  z-index: 999990;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

/* Logo */
.perene-mm__logo{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.perene-mm__logoimg{
  height: 40px;
  width: auto;
  display: block;
}
.perene-mm__logotext{
  color: #fff;
  font-weight: 600;
}

/* Burger dans la barre fixe */
.perene-mm__toggle{
  position: static;       /* <-- plus fixed */
  width: 44px; height: 44px;
}

/* Mets l’overlay sous la barre */
.perene-mm__panel{
  padding-top: 64px;      /* réserve la place de la barre fixe */
}

/* Décale le contenu du site pour ne pas passer sous la barre */
@media (max-width: 1279px){
  body{
    padding-top: 64px;
  }
  /* Burger blanc */
.perene-mm__icon,
.perene-mm__icon:before,
.perene-mm__icon:after{
  background: #fff !important;
}

/* Aligner le burger à droite dans la barre */
.perene-mm__fixedbar{
  justify-content: space-between; /* logo à gauche, burger à droite */
}
.perene-mm__logoimg{
  height: 30px;   /* ajuste: 28–36 selon ton goût */
  width: auto;
}

}




}
