/* header button{
    all: initial !important;
  display: block !important;
} */

:root{
    --font1: "Montserrat", sans-serif;
    --color1: black;
    --color2: #27c7d8;
    --color3: white;
    --color_bulle: #27c7d8;
}
header{
    font-family: var(--font1);
      position: fixed;
  
  width: 100%;
  background-color: white;
  z-index: 9999; /* très important */
    top: 0;
    left: 0;
}
header section:first-child li a:not(#btn_header) {
  transition: color 0.3s ease;
}

header section:first-child li:hover a:not(#btn_header) {
  color: var(--color2) !important;
}

header .sous-menu li a{
    transition: color 0.2s ease;
}
header .sous-menu li{
    transition: background-color 0.3s ease;
}
header .sous-menu li:hover a{
    color: var(--color3) !important;
}
header .sous-menu li:hover{
    background-color: var(--color2) !important;
}

/* top menu  */
#btn_header{
    background-color: var(--color2);
    color: white !important;
    border-radius: 20px;
    padding: 2px 10px !important;
    animation: 2s ease-in-out 2s;
}
#section_menu aside{
    background-color: white;
}
/* #section_menu{
    background-color: white;
} */
#btn_header:hover{
 scale: 1.05;
 background-color: white !important;
 color: var(--color2) !important;
 outline: 1px solid var(--color2) !important;
}
.nav_top li{
    margin: 0 5px !important;
}
.nav_top li a{
    color: black !important;
    animation: 2s ease-in-out 2s;
    font-size: 0.9rem !important;
}
.div_logo a{
width: 10vw !important;
}
.div_logo a:hover img{
    transform: scale(1.1);
}
.div_logo img{
width: 100% !important;

}
/* sous menu  */
.sous-menu{
    padding-bottom: 0!important;
    box-shadow: 0 4px 6px -2px rgba(0,0,0,0.3);
}
.sous-menu li{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    position: relative;
}

.sous-menu li a{
    color: black !important;
    font-weight: 600;
    font-size: 0.85rem;
}
header li a{
    text-decoration: none;
}


/* recherche header  */
.recherche_header{
    border: 1.5px solid var(--color2);
    border-radius: 20px;
    background-color:white;
    padding: 0 !important;
    animation: 2s ease-in-out 2s;
    position: relative;
    height: 30px;
    overflow: visible !important;
    
}
/* .recherche_header button{
    transform: scale(1);
    transition: transform 0.3s ease;
} */
.recherche_header:hover button{
    transform: none !important;
    scale: 1 !important;
}
.recherche_header .form-control{
    padding: 0 !important;
    margin-left: 20px;
    width: 80% !important;
    height: 70%;
}
.recherche_header i{
    color: white;
}
.recherche_header button i{
    height: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color2) !important;
  background-color: var(--color2);
  border-radius: 50%;
  margin-right: -1px !important;
}
.recherche_header button {
    /* height: 110%; */
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color2) !important;
  background-color: var(--color2);
  border-radius: 50%;
  margin-right: -1px !important;
}
.recherche_header input{
    border: none;
    background-color: transparent;
}

.sous-menu ul {
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.sous-menu li {
  margin: 0;
  padding: 4px 6px;
}

/* SOUS SOUS MENU */
#section_menu{
   background-color: white;
    width: 100% !important;
    z-index: 50;
    margin: 0!important;
    padding: 2vh 0 !important;
    box-shadow: 0 4px 6px -2px black;
}
.ss_ss_menu {
    width: 100%;
    padding:  0 !important;
    margin: 0 !important;
}

.ss_ss_menu a{
    text-decoration: none;
    color: black !important;
    animation: 2s ease-in-out 2s;
}
.ss_ss_menu a:hover{
    scale: 1.1;
    color: var(--color1) !important;
}
.div_img_ss_ss_menu{
    overflow: hidden;
}

/* alphaNum  */
#dynamicAside{
    height: 77vh !important;
    overflow-y: scroll !important;
}
#dynamicAside .columns-container {
    display: flex;
    gap: 20px;
    width: 100%;
}

#dynamicAside .column {
    flex: 1;
    min-width: 0;
}
#dynamicAside a:hover{
    scale: 1.01 !important;
}

#dynamicAside .letter-header {
    font-weight: bold;
    color: #ff8c42;
    margin: 15px 0 8px 0;
    font-size: 1.1rem;
}

#dynamicAside .column a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 2px 0;
    font-size: 14px;
}
#dynamicAside h3{
    color: black !important;
    border-bottom: 1px solid black;
}

/* invisible  */
header .invisible {
    display: none !important;
}
.decale{
    height: 17vh;
}

/* bulles - VERSION AMÉLIORÉE */
.menu-label {
    position: absolute;
    z-index: 5;
    top: -20px !important;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-height: 22px;
    font-size: 0.5vw;
    line-height: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: var(--color_bulle);
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Triangle pointant vers le lien */
.menu-label::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid var(--color_bulle);
}

/* Burger mobile - caché par défaut */
.mobile-burger {
    display: none;
}

.burger_responsive {
    display: none;
}

/* Enlever border du burger responsive */
#burgerBtn {
    border: none !important;
    outline: none !important;
    background: none;
}

#burgerBtn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ===============================================
   RESPONSIVE TABLETTE & DESKTOP INTERMÉDIAIRE
=============================================== */

/* Entre 1200px et 1400px - Optimisation légère */
@media (max-width: 1400px) and (min-width: 1200px) {
    .sous-menu li {
        padding: 8px 8px;
    }
    
    .sous-menu li a {
        font-size: 0.6rem !important;
    }
    
    .nav_top li a {
        font-size: 0.7rem !important;
    }
}

/* Entre 992px et 1200px - Réduction importante */
@media (max-width: 1199px) and (min-width: 992px) {
    .sous-menu li {
        padding: 6px 6px;
    }
    
    .sous-menu li a {
        font-size: 0.5rem !important;
    }
    
    .nav_top li a {
        font-size: 0.6rem !important;
    }
    
    #btn_header {
        font-size: 0.8rem;
        padding: 2px 8px;
    }
    
    header .col-4 img {
        max-width: 130px;
    }
    
    /* Masquer bulle en tablette */
    .menu-label {
        display: none;
    }
}

/* Tablette (768px - 992px) */
@media (max-width: 991px) and (min-width: 768px) {
    .sous-menu li {
        padding: 5px 4px;
    }
    
    .sous-menu li a {
        font-size: 0.4rem !important;
        line-height: 1.2;
    }
    
    .nav_top li a {
        font-size: 0.4rem !important;
    }
    
    #btn_header {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    header .col-4 img {
        max-width: 110px;
    }
    
    .recherche_header .form-control {
        font-size: 0.85rem;
        margin-left: 10px;
    }
    
    #dynamicAside .columns-container {
        gap: 12px;
    }
    
    #dynamicAside .column a {
        font-size: 12px;
    }
    
    .menu-label {
        display: none;
    }
}

/* ===============================================
   RESPONSIVE MOBILE (< 768px)
=============================================== */
@media (max-width: 767px) {
    /* Afficher burger, masquer recherche et nav_top */
    .burger_responsive {
        display: flex !important;
    }
    
    .recherche_header, 
    .nav_top li:not(:first-child) {
        display: none !important;
    }
    
    #btn_header {
        font-size: 65%;
    }
    
    /* Masquer menu desktop */
    .sous-menu {
        display: none !important;
    }
    
    #section_menu {
        display: none !important;
    }
    
    .decale {
        height: 15vh;
    }
    
    /* Masquer bulle en mobile */
    .menu-label {
        display: none !important;
    }
    
    /* ===== MENU MOBILE PRINCIPAL ===== */
    .mobile-menu {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        background: white;
        z-index: 1001;
        overflow-y: auto;
        padding: 70px 20px 20px 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-menu.active {
        transform: translateX(0);
    }
    
    /* Bouton fermer menu principal - BIEN VISIBLE */
    .mobile-menu-close {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        color: black !important;
        border: none !important;
        font-size: 2rem !important;
        width: 45px !important;
        height: 45px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1010 !important;
        cursor: pointer !important;
        line-height: 1 !important;
        font-weight: 300 !important;
        background-color: transparent !important;
    }
    
    .mobile-menu-close:hover {
        transform: scale(1.1) !important;
    }
    
    /* Liens du menu mobile */
    .mobile-menu-link {
        display: block;
        padding: 12px 0;
        color: black !important;
        text-decoration: none;
        border-bottom: 1px solid #eee;
        font-size: 1rem;
    }
    
    .mobile-menu-link:hover {
        color: var(--color1) !important;
    }

    
    /* ===== SUBMENU MOBILE ===== */
    .mobile-submenu {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        background: white;
        z-index: 1002;
        overflow-y: auto;
        padding: 70px 20px 20px 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-submenu.active {
        transform: translateX(0);
    }
    
    /* Bouton fermer submenu */
    .close-submenu {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        background: transparent !important;
        color: black !important;
        border: none !important;
        font-size: 2rem !important;
        width: 45px !important;
        height: 45px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1011 !important;
        cursor: pointer !important;
        line-height: 1 !important;
        font-weight: 300 !important;
    }
    
    .close-submenu:hover {
        transform: scale(1.1) !important;
        opacity: 0.9 !important;
    }
    
    /* Titre du submenu */
    .mobile-submenu h3 {
        margin-top: 0;
        margin-bottom: 20px;
        font-size: 1.3rem;
        color: black !important;
        border-bottom: 2px solid var(--color1);
        padding-bottom: 10px;
    }
    
    /* Asides dans submenu */
    .mobile-submenu aside {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px;
    }
    
    .mobile-submenu aside > div {
        width: 100% !important;
    }
    
    .mobile-submenu aside div:not(#dynamicAside div) {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Images dans submenu */
    .mobile-submenu .div_img_ss_ss_menu {
        max-width: 200px;
        margin: 0 auto 10px;
    }
    
    /* Liens dans submenu */
    .mobile-submenu a {
        display: block;
        padding: 8px 0;
        color: black !important;
        text-decoration: none;
    }
    
    .mobile-submenu a:hover {
        color: var(--color1) !important;
    }
    
    /* DynamicAside en mobile */
    #dynamicAside .columns-container {
        flex-direction: column;
    }
    
    #dynamicAside .column {
        width: 100%;
    }
    
    #dynamicAside .letter-header {
        font-size: 1.2rem;
        margin: 20px 0 10px 0;
        color: var(--color1);
    }
    
    #dynamicAside a {
        padding: 8px 0;
        font-size: 0.95rem;
    }
}

/* ===== DROPDOWN DE RECHERCHE ===== */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: -1px;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: #f8f9fa;
    color: var(--color1);
}

.search-dropdown-item strong {
    font-weight: 600;
}

/* Scrollbar personnalisée pour la dropdown */
.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 20px 0;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile - ajustements dropdown */
@media (max-width: 767px) {
    .search-dropdown-item {
        padding: 14px 15px;
        font-size: 0.95rem;
    }
}

/* ======= Taille fluide de base ======= */

.sous-menu li a {
    display: flex!important;
    align-items: center !important;
    justify-content: center !important;
     padding: 0.4vw 1vw !important;
     height: 100% !important;
     width: 100% !important;
}
.sous-menu li a p{
  font-size: 0.95vw !important; /* Taille fluide selon la largeur de l’écran */
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
}

/* ======= NAV_TOP (liens de droite harmonisés) ======= */
.nav_top ul{
    display: flex;
  align-items: center;
  justify-content: center;
}
.nav_top li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0 0.2vw 0 0 !important;
}

.nav_top li a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0.4vw 0.5vw !important;
  font-size: 1vw !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: all 0.2s ease-in-out !important;
}
/* Ajoutez ces media queries spécifiques */
@media (max-width: 1250px) and (min-width: 1200px) {
  .nav_top li a {
    padding: 0.4vw 0.6vw !important; /* Réduire le padding horizontal */
  }
}

@media (max-width: 850px) and (min-width: 768px) {
  .nav_top li a {
    padding: 0.4vw 0.4vw !important;
  }
}
@media (max-width: 1200px) and (min-width: 768px) {
 .nav_top li a {
    font-size: 0.7vw !important;
 }
}
.custom-ratio {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 ratio - ajustez selon vos besoins */
    /* 
    Ratios courants :
    - 56.25% = 16:9
    - 75% = 4:3
    - 100% = 1:1 (carré)
    - 133.33% = 3:4 (portrait)
    - 66.66% = 3:2
    */
    overflow: hidden;
}

.custom-ratio img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.col-custom_header {
  flex: 0 0 17%;  /* ~8 par ligne */
  max-width: 12%;
}
#section_menu aside{
    gap: 4% !important;
}

/* ===================================== mobile ================================== */
/* ===================================== mobile ================================== */
/* ===================================== mobile ================================== */

   .burger-btn.active span:nth-child(1) {
            transform: rotate(-45deg) translate(-6px, 6px);
        }

        .burger-btn.active span:nth-child(2) {
            opacity: 0;
        }

        .burger-btn.active span:nth-child(3) {
            transform: rotate(45deg) translate(-6px, -6px);
        }

        /* Menu Burger */
        .burger-menu {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            max-width: 400px;
            height: 100vh;
            background: white;
            box-shadow: -2px 0 10px rgba(0,0,0,0.1);
            z-index: 1000;
            transition: right 0.3s ease;
            overflow-y: auto;
        }

        .burger-menu.active {
            right: 0;
        }

        /* Overlay */
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background: rgba(0,0,0,0.5);
            z-index: 999;
            display: none;
        }

        .overlay.active {
            display: block;
        }

        /* Navigation principale */
        .burger-nav {
            padding: 80px 20px 20px;
        }

        .burger-nav ul {
            list-style: none;
        }

        .burger-nav > ul > li {
            border-bottom: 1px solid #eee;
        }

        .burger-nav a {
            display: block;
            padding: 15px 10px;
            color: #333;
            text-decoration: none;
            transition: background 0.3s;
        }

        .burger-nav a:hover {
            background: #27c7d8; /*a voir */
            color: white !important;
        }

        /* Items avec sous-menu */
        .has-submenu {
            position: relative;
        }

        .has-submenu > a {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .submenu-toggle {
            background: none;
            border: none;
            cursor: pointer;
            padding: 15px;
            font-size: 20px;
            color: #333;
            transition: transform 0.3s;
        }

        .has-submenu.active .submenu-toggle {
            transform: rotate(180deg);
        }

        /* Sous-menu */
        .submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background: #f9f9f9;
        }

        .has-submenu.active .submenu {
            max-height: 2000px;
        }

        .submenu li {
            border-bottom: 1px solid #e0e0e0;
        }

        .submenu li:last-child {
            border-bottom: none;
        }

        .submenu a {
            padding: 12px 20px 12px 30px;
            font-size: 14px;
        }

        .submenu h3 {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 5px;
        }

        /* Label Promo */
      


    .burger-menu {
        max-width: 100%;
    }

    .recherche_mobile{
    display: none;
    }
    @media (max-width: 767px) {
        .recherche_mobile{
        display: block !important;
        }
        .recherche_header:last-child{
        display: flex !important;
        }
        .div_logo a {
    width: 20vw !important;
}
    }

#closeBurger{
    position: absolute;
    z-index: 22;
    right: 30px;
    top: 30px;
    font-size: 2rem;
    transform: translateX(-50%);
    transform: translateY(-50%);
}



/* ----- CORRECTION DU ZOOM INFINI SUR LE BOUTON DE RECHERCHE ----- */

/* 1) Annule toute ancienne utilisation de la propriété non standard 'scale' */
.recherche_header:hover button,
.recherche_header button,
.recherche_header button:hover,
.recherche_header button:focus {
  /* utilisation standard et sûre */
  transform: none !important;
  transition: transform 180ms ease !important;
}

/* 2) Définir une taille explicite et limites pour le bouton (évite reflow infini) */
.recherche_header button {
  width: 36px;           /* ou 2.4rem selon ton design */
  height: 36px;          /* garde la forme circulaire */
  min-width: 36px;
  min-height: 36px;
  box-sizing: border-box;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-right: -1px !important;
  border: 2px solid var(--color2) !important;
  background-color: var(--color2);
  transform-origin: center center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

/* 3) Si tu veux un petit effet au hover (optionnel, discret) */
.recherche_header button:hover,
.recherche_header button:focus {
  transform: scale(1.06); /* très léger, stable */
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* 4) S'assurer que le parent ne déclenche pas un scale différent */
.recherche_header:hover button {
  /* ne rien appliquer ici — l'effet hover est géré directement sur le bouton */
  transform: none;
}

/* 5) Sécurités Safari/anciens navigateurs : forcer transform standard */
@supports (transform: translateZ(0)) {
  .recherche_header:hover button { transform: none; }
}
 }
}