/* ==========================================================================
   1. STYLE DU MENU PRINCIPAL
   ========================================================================== */
/* Couleur du texte par défaut des liens du menu principal */ /* colsite */
.navbar {
	/* make it stick */
	position: sticky;
	position: -webkit-sticky;
	top: 0;
	/* in front of all other elements */
	z-index: 99;
	/* set background */
	background-color: #0087c3;  /* col site : fond menu principal */
	padding: 10px 1%;

	/* define flex */
	display: flex;
	justify-content: space-between;
	align-items: center;
}
header a, 
.navbar a, 
a.monmenu {
	color: #e2e8f0 !important;          /* Blanc cassé très doux et lisible */ /* colsite : couleur police menu principal*/
	text-decoration: none !important;
	transition: color 0.2s ease-in-out;
	font: bold 22px sans-serif;
}

/* Survol (Hover) des liens du menu principal */
header a:hover, 
.navbar a:hover, 
a.monmenu:hover {
	color: #6ee7b7 !important;          /* Vert menthe lumineux au survol */ /* col site : couleur police menu principal survol */
	text-decoration: none;
}
/* les autres liens */
/* Couleur du texte par défaut des liens du menu principal */ /* colsite */
.navinside{
  font-size: 16px;
  margin-bottom: 3px;
  padding-left: 7px;
  padding-right: 7px;
  text-align: center;
  color: #222;
}
.intitulesmallsub a,
.navinside a {
	color: #065f46 !important;          /* Blanc cassé très doux et lisible */ /* colsite */
	text-decoration: none !important;
	transition: color 0.2s ease-in-out;
	font: bold 22px sans-serif;
}

/* Survol (Hover) des liens du menu principal */
.intitulesmallsub a:hover,
.navinside a:hover {
	color: #6ee7b7 !important;          /* Vert menthe lumineux au survol */ /* col site */
	text-decoration: none;
}
.nav-menu {
    margin: 0;
    padding: 0;
    list-style-type: none;
    list-style-image: none;
}

.menu-item {
    display: inline-block;
    margin-left: 0px;
	margin-left: 10px;
}
.nav-menu-members {
    margin: 0;
    padding: 0;
    list-style-type: none;
    list-style-image: none;
}

.menu-item-members {
    display: inline-block;
    margin-left: 10px;
}
.bar {
    background-color: black;
    margin: 4px auto;
	height: 4px;
	width: 30px;
	transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
	border-radius: 3px;
}

.menu-icon {
    display: none;
}

@media only screen and (max-width: 700px) {
    .navbar {
        flex-direction: column;
    }

    .logo-container {
        width: 100%;
    }

    .menu-item {
        display: block;
        width: 100%;
        padding: 5px 0;
        text-align: end;
		margin: 0 -5px;
    }

    .menu-icon {
        display: block;
        position: absolute;
        top: 10px;
        right: 2%;
    }

    .menu-icon:hover .bar {
        background-color: darkcyan;
    }

    .nav-menu {
        display: none;
        width: 100%;
    }
    
	.nav-menu.active {
		display: block;
	}
}
*{box-sizing:border-box;line-height:normal}

.hidden {
    display: none;
    height: 0;
    overflow: hidden;
}

/* ==========================================================================
   1. STYLE DES BOUTONS du sous menu
   ========================================================================== */
a.sub-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #065f46;
    background-color: #ffffff;
    border: 1px solid #a7f3d0;
	color: #065f46 !important; /* Vert sombre */ /* col site */
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    text-decoration: none !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    box-sizing: border-box;
}

a.sub-nav-item:hover {
    background-color: #d1fae5;
    color: #047857; /* Vert */ /* col site */
    border-color: #34d399;
}

a.sub-nav-item.active {
    background-color: #059669;
    color: #ffffff;
    border-color: #059669;/* Vert sombre */ /* col site */
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
    pointer-events: none;
    text-decoration: none !important; 
}

/* ==========================================================================
   2. CONTENEUR PAR DÉFAUT (PC / Navigateurs de bureau)
   ========================================================================== */
.sub-nav-container {
    display: flex;
    flex-wrap: wrap;             /* Passage à la ligne dynamique sur PC */
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
	justify-content: center;
    background-color: #ecfdf5; /* col site */
    border-bottom: 2px solid #a7f3d0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* ==========================================================================
   3. ADAPTATION ÉCRANS TACTILES UNIQUEMENT (Mobiles / Tablettes)
   ========================================================================== */
@media (pointer: coarse) and (max-width: 767px) {
    .sub-nav-container {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        
        padding-left: 16px;
        padding-right: 16px;

        /* Par défaut : aucun masque (texte net des deux côtés) */
        -webkit-mask-image: none;
        mask-image: none;
    }

    /* Estompe à DROITE uniquement (quand on peut scroller vers la droite) */
    .sub-nav-container.has-scroll-right {
        -webkit-mask-image: linear-gradient(to right, black calc(100% - 60px), transparent);
        mask-image: linear-gradient(to right, black calc(100% - 60px), transparent);
    }

    /* Estompe à GAUCHE uniquement (quand on a commencé à scroller) */
    .sub-nav-container.has-scroll-left {
        -webkit-mask-image: linear-gradient(to right, transparent, black 60px);
        mask-image: linear-gradient(to right, transparent, black 60px);
    }

    /* Estompe DES DEUX CÔTÉS (quand on est au milieu du scroll) */
    .sub-nav-container.has-scroll-left.has-scroll-right {
        -webkit-mask-image: linear-gradient(to right, transparent, black 60px, black calc(100% - 60px), transparent);
        mask-image: linear-gradient(to right, transparent, black 60px, black calc(100% - 60px), transparent);
    }
    
    .sub-nav-container::-webkit-scrollbar {
        display: none;
    }
}