/* ===================== */
/*  VARIABLES / GLOBAL   */
/* ===================== */
:root{
  --nav-h: 90px;
  --nav-bg: #06578b;     /* bleu */
  --nav-text: #fff;
  --nav-hover: #f15826;  /* orange */
  --container: 1240px;
}

html, body { 
    margin:0;
 }


body{ 
    padding-top: var(--nav-h);
 }   


/* ===================== */
/*        TOPBAR         */
/* ===================== */
.topbar{
  position: fixed; 
  top:0; 
  left:0; 
  width:100%; 
  height:var(--nav-h);
  z-index: 9999;
  background: var(--nav-bg);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.topbar .topbar-content{
  position: relative;                
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;    
  height: var(--nav-h);
}

/* Logo + nom */
.topbar-brand{
  display:flex; 
  align-items:center; 
  gap:12px;
  text-decoration:none; 
  color: var(--nav-text);
  margin-left: -30px;
  margin-top: -15px;
}


.topbar-brand img{ 
    height:60px; 
    width:auto; 
}


.topbar-brand span{
     font-size:30px; 
     }

/* ===================== */
/*         MENU          */
/* ===================== */

.menu{
  position: absolute;                
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 35px;
  margin: 0; 
  padding: 0; 
  list-style: none;
}

.menu_li{
  position: relative;
  padding-bottom: 10px;            
}

.menu_bouton{
  position: relative;
  display: inline-block;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 30px;
  letter-spacing: .2px;
  padding: 10px 0;
  transition: color .2s ease;
}

/* Soulignement animé */
#mainMenu .menu_bouton::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: #f15826;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: opacity .2s ease, transform .2s ease;
}

/* au hover ou focus */
#mainMenu .menu_bouton:hover::after,
#mainMenu .menu_bouton:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

/* ===================== */
/*     SOUS-MENUS        */
/* ===================== */

.menu_sousMenu{
  position: absolute;
  top: 100%;                      
  left: 50%;
  transform: translateX(0) translateY(8px); /* centré + petit slide */
  margin: 0;
  padding: 10px 0;
  list-style: none;
  width: max-content;               
  min-width: 220px;                
  background: var(--nav-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 10000;                   
}

.menu_li:hover .menu_sousMenu,
.menu_li:focus-within .menu_sousMenu,
.menu_sousMenu:hover{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.menu_sousMenu_li{ margin:0; }

.menu_sousMenu_bouton{
  display:block;
  padding: 10px 16px;
  color:#fff; 
  text-decoration:none;
  font-size: 20px; 
  white-space: nowrap;               /* pas de retour à la ligne */
  transition: background .2s ease, color .2s ease;
}
.menu_sousMenu_bouton:hover{
  background: rgba(255,255,255,.12);
  color:#fff;
}



/* ===================== */
/*   BOUTON BURGER BASE  */
/* ===================== */

.topbar-burger{
    display: none;                
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    border: 1px solid #f15826;
    background: rgba(0,0,0,.10);    
    cursor: pointer;
}

/* lignes du burger */
.topbar-burger span {
    background: #fff;
    transition: transform .25s ease, opacity .25s ease;
    width: 22px;
    height: 2px; /* plus fin = plus design */
}


.topbar-burger span + span{
    margin-top: 5px;
}




/* Bouton téléphone dans la barre */
.phone-btn {
    background: #f15826;        
    color: #fff;
    padding: 0px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    display: inline-block;
    transition: 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 60px;
    justify-content: center;
}


/* Bouton Boutique - encadré blanc */
.shop-btn {
  background-color: #ffffff;
  color: #174F82;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover */
.shop-btn:hover {
  background-color: #e84c16;
  color: #ffffff;
}

/* ===================== */
/*      RESPONSIVE       */
/* ===================== */

@media (max-width: 1024px){

    :root{
        --nav-h: 70px; 
    }
    .topbar{
        box-shadow: 0 3px 12px rgba(0,0,0,.25);
    }
    .topbar-content{
        max-width: 100%;
        padding: 0 16px;
        justify-content: space-between;   /* logo à gauche, burger à droite */
    }
    .menu {
        display: none; /* cacher le menu horizontal */
    }


    .topbar-burger{
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
    }

    .topbar-brand img{
        height: 48px;
        margin-left: 20px;
        margin-top: 10px;
    }

    .topbar-brand span{
        font-size: 20px;
        margin-right: 20px;
        margin-top: 10px;
    }

    .menu_sousMenu {
    position: static;             
    transform: none;
    opacity: 1;
    pointer-events: auto;
    list-style: none;
    margin: 4px auto 8px;
    padding: 10px 14px;
    width: 100%;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: none;
  }

  .menu_sousMenu_li {
    margin: 0;
  }

  .menu_sousMenu_bouton {
    display: block;
    padding: 6px 0;
    font-size: 25px;
    color: #ffffff;
    padding-left: 10px;
    border-radius: 10px;
    transition: background .25s ease, color .25s ease;
    background: rgba(255, 255, 255, 0); 
    border: 1px solid transparent;
  }

.menu_sousMenu_bouton:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid transparent; 
}
  }

@media (max-width: 900px) {

 /* Conteneur du menu burger */
    #mainMenu {
        position: fixed;
        top: var(--nav-h);              /* sous la barre */
        left: 0;
        right: 0;
        margin: 0;
        padding: 8px 14px;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: #00314c;
        box-shadow: 0 12px 24px rgba(0,0,0,.25);
        max-height: 0;                 /* fermé par défaut */
        overflow: hidden;
        opacity: 0;
        transform: translateY(-1px);
        pointer-events: none;
        z-index: 9998;
    }

    /* Menu ouvert */
    #mainMenu.menu-open {
        max-height: calc(100vh - var(--nav-h)); 
        overflow-y: auto;                       
        opacity: 1;
        pointer-events: auto;
    }

    .menu_li {
        position: static;
    }

    #mainMenu .menu_bouton {
        display: block;
        width: 90%;
        font-size: 20px;
        text-align: center;
        padding: 5px 0;
        color: var(--nav-text);
    }

    #mainMenu .menu_bouton::after {
        display: none;
    }

    /* Sous-menu Produits en mobile */
    #mainMenu .menu_sousMenu {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        margin-top: 15px;
        width: 90%;
        box-shadow: none;
    }

    #mainMenu .menu_sousMenu_li a {
        display: block;
        text-align: left;
        font-size: 17px;
        padding: 4px 12px;
    }




    /* Bouton téléphone dans le menu burger */
    #mainMenu .phone-btn {
      display: flex;
      justify-content: center;
      align-items: center; 
      width: 80%;
      margin: 5px auto 5px;
      padding: 10px 0;
      font-size: 20px;
      border-radius: 10px;
      text-align: center;
      white-space: nowrap;
      box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    }

        #mainMenu .shop-btn {
      color: #00314c;
      display: flex;
      justify-content: center;
      align-items: center; 
      width: 80%;
      margin: 5px auto 5px;
      padding: 10px 0;
      font-size: 20px;
      text-align: center;
      white-space: nowrap;
      box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    }
}