/* Styles mobiles (max-width: 768px) par défaut */
header {
    height: auto;
    position: fixed;
    width: 100%;
    background-color: #fff;
    z-index: 1000;
    top: 0;
    left:0;
    padding-top: 1rem;
}
.logo {
    display: none;
}
.logo img {
    height: auto;
    max-width: inherit;
}
a {
    text-decoration: none;
}
.header-container {
    display: grid;
    grid-template-columns: 120px 1fr;
}
button:disabled {
    cursor: unset;
}
.header-nav[hidden],
.subnav[hidden] {
    display: none;
}
.nav-hamburger {
    background-color: #ffffff;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 40px;
    z-index: 1000;
}
.nav-grid {
    grid-column: 1 / span 2;
    justify-self: auto;
}
.header-nav {
    opacity: 1;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
    height: 90vh;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    padding: 1rem;
    flex-direction: column-reverse;
    overflow-y: scroll;
    scrollbar-color: var(--main-half-color);
    scrollbar-width: thin;
    display: flex;
    flex-direction: column-reverse;
}
.nav-label, .nav-label-vide {
    background: none;
    border: none;
    font-size: 1.05rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-weight: bold;
    color: var(--dark-blue);
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.mainnav, .subnav, .headlinks {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mainnav > li {
    position: relative;
    padding: 1rem 0;
    border-top: 1px solid #aaa;
    list-style: none;
}
.mainnav > li a {
    color: var(--dark-blue);
    text-align: left;
    font: var(--font-figtree);
    font-size: 1.em;
    letter-spacing: 0px;
    

}
.mainnav > li a:hover {
    font-weight: bold;
}
.submenu-title, .submenu-title-eco {
        font-weight: bold !important;
        text-transform: uppercase;
        font-size: 1.05em !important;
        background-color: #ae504725;
        padding:0.25em;
        margin-left:-0.75em;
        border-radius:5px;
}
.submenu-item, .submenu-item-eco {
        text-transform: uppercase;
        
}
.submenu-item-eco::after, .submenu-title-eco::after {
    content: url("../icons/tourisme/eco-feuille-a-4dsX1.svg");
    margin-right: 1em;
    height:20px;
    width:auto;
    display: inline-flex;
    vertical-align: middle;
}

.subtitle {
    text-transform: none !important;
    font-size: 0.85em;
}
.subnav > li > ul  {
    padding-left: 0;
}
.subnav > li > ul > li  {
    padding-bottom: 1em;
}
.subnav > li > ul > li > span {
    font-size: 1.25em;
}
.subnav > li > ul > li, .subnav > li   {
    list-style: none;
}
.menuselected {
    font-weight: bold;
    text-decoration: none;
    color: var(--dark-blue);
    letter-spacing: 0px;
    line-height: 2em;
    font-size:1em !important;
}
.navcontainer {
    position: relative;
    background: #fff;
    min-width: 200px;
    z-index: 100;
    box-shadow: none;
    font-size: 0.75em;
    padding: 1rem 2rem;

}
.close-button,
.close-buttonSP {
    color: #aaa;
    text-align: right;
    font-size: 28px;
    font-weight: bold;
    grid-column-start: -1;
}
.close-button {
    display: none;
}
.close-buttonSP {
    width: 100%;
    display: inline-block;
    padding-top: 2rem;
    font-size: 48px;
}
.close-button:hover,
.close-button:focus,
.close-buttonSP:hover,
.close-buttonSP:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.headlinks {
    display: block;
    text-align: center;
    padding: 0 1.5rem 1rem 0;
    width:100%
}
.headlinks >  li {
         border-top: 1px solid #aaa;
         padding:1rem 0 1rem 0;
         list-style: none;
    }
.headlinks > li > a {
    
    color: var(--dark-blue);
    padding: 1rem 0 1rem 0;
    
   
}
.header_search {
    padding-left:1em;
}
.header_search input[type="search"] {
    padding: 0.5em 2.5em 0.5em 2.5em;
    border: 2px solid var(--dark-blue);
    color:var(--dark-blue);
    border-radius: 2em;
    outline: none;
    font-size: 0.75rem;
    transition: border-color 0.2s;
    background: no-repeat left var(--searchlens-url);
}
.header-pipe {
        display: none;
    }
.icon {
    min-width:35px;
    .vpa-picto {
    width: auto;
    max-height: 35px;
    max-width:35px;
    }
}

/* Styles desktop (min-width: 768px) */
@media screen and (min-width: 768px) {
    .logo {
        display: block;
        grid-column: 1 / span 1;
    }
    header {
        border-bottom: none;
    }
    .nav-hamburger {
        display: none;
    }
    .nav-grid {
        grid-column: 2 / span 1;
        justify-self: end;
    }
    .header-nav {
        height: auto;
        box-shadow: none;
        padding: 0;
        flex-direction: column;
        overflow-y: visible;
        display: flex;
        flex-direction: column;
    }
    .mainnav {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        height: 100%;
    }
    .mainnav > li {
        padding: 0 1rem;
        border-top: none;
        
    }
    .header-container {
        margin-bottom: 1em;
    }
    .navcontainer {
        position: fixed;
        z-index: 10;
        top: 80px;
        margin: 1em auto;
        max-width: 1200px;
        display: grid;
        grid-auto-rows: minmax(25px, auto);
        grid-auto-flow: row dense;
        margin-top:1.5em;
        border-radius: 20px;
        border: solid 0.85px #e3e3e3;
    }
    .navcontainer .pos-1 { grid-column: 1; }
    .navcontainer .pos-2 { grid-column: 2; }
    .navcontainer .pos-3 { grid-column: 3; }
    .navcontainer .pos-4 { grid-column: 4; }
    .size-4 {
        grid-template-columns: repeat(4, 1fr);
        width: 95%;
        left: 50%;
        transform: translateX(-50%);
    }
    .size-2 {
        grid-template-columns: repeat(2, 1fr);
        width: 40%;
        right: 25%;
        transform: translateX(25%);
    }
    .close-buttonSP {
        display: none;
    }
    .close-button {
        display: inline-block;
    }
    .menuselected {
        text-decoration: underline;
        text-decoration-thickness: 3px;
        text-underline-offset: 10px;
        text-decoration-color: var(--main-color);
    }
    .navcontainer {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        font-size: 1em;
        padding: 2rem;
    }
    .headlinks  {
        display: block ruby;
        padding: 0;
        text-align: right;
        
    }
    .headlinks > li {
        padding: 0 0 1em 0;
        border-top: none;
        
    }
    .headlinks > li > a {
        border-top: none;
        padding: 0;
        font-size: 15px;
    }
    .header-pipe {
        display: inline;
    }
    .header-space {
        padding-right: 1em;
    }
}