/* ========= HEADER UNIFIÉ BURGER ========= */
#header_container{
    width : 0;
    height : 0;
}


#global_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vw 4vw;
    width: 0vw;
    height: 7vw;
    background-color: transparent;
    position: relative;
    z-index: 100;
}

#menu_toggle {
    cursor: pointer;
    z-index: 101;
}

#menu_toggle img {
    width: 6vw;
    height: auto;
   /* margin-left: 2vw;*/
}


/* Logo centré ou aligné à droite si souhaité */
#logo_header img {
    height: 8vw;
    width: auto;
}

    #burger_icon {
        position: fixed;
        top: 2vw;
        left: 2vw; /* ou right: 2vw selon ton design */
        width: 2vw;
        height: auto;
        z-index: 1210;
    }


/* ========= MENU LATÉRAL BURGER ========= */

#burger_menu {
    position: fixed;
    top: 0;
    left: -50vw; /* ← c’est ici qu’on réduit : 50vw au lieu de 70/80 */
    width: 50vw; /* ← donc largeur réduite */
    height: 100vh;
    background-color: var(--back_header);
    box-shadow: 2px 0px 10px rgba(0, 0, 0, 0.5);
    transition: left 0.3s ease-in-out;
    padding-top: 5vh;
    padding-bottom: 30vh;
    z-index: 1200;
    overflow: hidden;
}

#burger_menu.menu_active {
    left: 0 !important;
    overflow: hidden;
}



#burger_menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#burger_menu ul li {
    padding: 3%;
    text-align: center;
}

#burger_menu ul li a {
    color: white;
    font-size: clamp(16px, 2.7vw, 38px);
    text-decoration: none;
    font-family: "Lora";

}


/* ========= ICÔNES (panier, compte) ========= */

#burger_menu ul li a img {
    width: 13%;
    height: auto;
    vertical-align: middle;
}

/* Voile derrière le menu (clic extérieur) */
#menu_overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1190; /* en dessous du menu (1200), au-dessus du contenu */
}

/* Empêche le scroll quand le menu est ouvert */
body.no-scroll {
  overflow: hidden;
}


.cart_badge {
  position: absolute;
  top: -1vw;
  right: -1vw;
  background: white;
  color: var(--back_header);
  font-size: 1.5vw;
  font-weight: bold;
  border-radius: 50%;
  padding: 0.5vw;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}




/* ========= RESPONSIVE ========= */

/* ====== TABLETTE (≤ 1024px) ====== */
@media (max-width: 1024px) {
  /* Header fixe */
  #global_header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: clamp(56px, 8vh, 72px);
    padding: 0 clamp(16px, 4vw, 24px);
    background: transparent;
    z-index: 1000;
    
  }

  /* Bouton burger TOUJOURS visible (au-dessus du menu) */
  #menu_toggle {
    position: fixed;         /* clé pour qu'il ne parte pas sous le panneau */
    top: 16px; left: 16px;
    width: clamp(44px, 12vw, 56px);
    height: clamp(44px, 12vw, 56px);
    display: grid; place-items: center;
    z-index: 1301;           /* plus haut que #burger_menu */
    -webkit-tap-highlight-color: transparent;
  }
  #burger_icon { position: static; width: 10vw; height: auto; }

  /* Logo */
  #logo_header img { height: clamp(28px, 6.5vw, 40px); width: auto; }

  /* Panneau burger : totalement hors écran fermé */
  #burger_menu {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(80vw, 380px);
    transform: translateX(-100%);        /* caché complètement */
    transition: transform 0.3s ease;
    background: var(--back_header);
    box-shadow: 2px 0 18px rgba(0,0,0,.35);
    padding-top: clamp(64px, 10vh, 80px);/* sous le header */
    z-index: 1200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #burger_menu.menu_active { transform: translateX(0); }

  /* Liens menu */
  #burger_menu ul { list-style: none; margin: 0; padding: 0; }
  #burger_menu ul li { padding: 0; }
  #burger_menu ul li a {

    display: flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 10px 12px;
    font-size:3.5vw;
    text-decoration: none; color: #fff; font-family: "Lora";
  }
  #burger_menu ul li a img { width: 6vw; height: auto; margin-left: 6px; }

  /* Décale le scroll pour le header fixe */
  body { scroll-padding-top: clamp(56px, 8vh, 72px); }
  
  
  .cart_badge {
  top: 15%;      
  left: 60%;       /* ← au lieu de 55% */
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  width: 18px;     /* largeur fixe (cercle parfait pour 1 chiffre) */
  height: 18px;
  padding: 0;      /* plus besoin de padding si width fixe */
  border-radius: 50%;
  display: flex;           
  align-items: center;     
  justify-content: center;
  line-height: 1;
}


}





/* ====== MOBILE (≤ 768px) ====== */
@media (max-width: 768px) {
  #global_header { height: clamp(56px, 9vh, 68px); padding: 0 16px; }

  /* Bouton burger / logo un peu plus compacts */
  #menu_toggle { top: 12px; left: 12px; width: clamp(44px, 13vw, 54px); height: clamp(44px, 13vw, 54px); }
  #burger_icon { width: 8vw;       z-index : 1210; }
  #logo_header img { height: clamp(24px, 7vw, 36px); }

  /* Panneau un peu plus étroit sur mobile */
  #burger_menu { 
      width: min(84vw, 380px); 
      padding-top: clamp(60px, 9vh, 76px); 
      z-index : 1200; 
      
      
      
  }


  #burger_menu ul li a img { 
      width: 18vw;
      
  }
  
  
.cart_badge {
  top: 15%;      
  left: 60%;       /* ← au lieu de 55% */
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  width: 18px;     /* largeur fixe (cercle parfait pour 1 chiffre) */
  height: 18px;
  padding: 0;      /* plus besoin de padding si width fixe */
  border-radius: 50%;
  display: flex;           
  align-items: center;     
  justify-content: center;
  line-height: 1;
}


  
  
  

    
    
}

/* ====== PETITS TÉLÉPHONES (≤ 420px) ====== */
@media (max-width: 420px) {
  #burger_menu { width: 88vw; }
  #burger_menu ul li a { font-size: 6vw; }
}


