/* HEADER GENERAL */
#mainHeader { 
    background-color: #fbffde,; /* fond plus clair pour contraste */
    box-shadow: 0 2px 4px #333333;
    margin-bottom: 20px;
    width: 100%;
    height: auto;
}

/* Wrapper principal */
.wrapper-header {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 10px 20px;
    gap: 10px;
}

.main {
    margin-top: 10px;
}

/* LOGO CONTAINER */
.logoMat {
    height: 80px; /* hauteur fixe */
    max-width: none; 
    display: flex;
    align-items: center;
}

#logoImg {
    height: 90px !important; 
    width: auto !important; 
    display: block;
    margin: 0 auto;
    object-fit: contain;
}



/* MENU BURGER HIDDEN BY DEFAULT */
#menuToggler {
    display: none;
}

/* BOUTON MENU BURGER */
#togollerButtonContains {
    width: 30px;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

#togollerButtonContains span,
#togollerButtonContains span::before,
#togollerButtonContains span::after {
    display: block;
    width: 30px;
    height: 4px;
    background-color: black;
    border-radius: 2px;
    position: absolute;
    transition: rotate .2s, background-color .2s;
}

#togollerButtonContains span::before {
    content: '';
    margin-top: -8px;
}

#togollerButtonContains span::after {
    content: '';
    margin-top: 8px;
}

#buttonMenu {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* EFFET CROIX QUAND OUVERT */
#menuToggler:checked + #togollerButtonContains span {
    background-color: whitesmoke;
}

#menuToggler:checked + #togollerButtonContains span::before {
    margin-top: 0;
    rotate: 45deg;
}

#menuToggler:checked + #togollerButtonContains span::after {
    margin-top: 0;
    rotate: -45deg;
}

/* MENU MOBILE */
#mainMenu {
    position: absolute;
    top: 125px;
    left: -100vw;
    background-color: whitesmoke;
    width: 100%;
    opacity: 1;
    height: calc(100vh - 120px); /* corrigé */
    z-index: 1000;
    overflow-y: auto;
    transition: left .5s;
}

#mainMenu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: end;
    padding: 20px 30px;
}

#mainMenu ul a {
    font-family: 'kollektif-BoldItalic';
    text-decoration: none;
    font-size: 2rem;
    color: #333333;
}

#mainMenu ul a:hover {
    text-decoration: underline;
    color: #255B94;
    transition: color .5s;
}

/* AFFICHER MENU SI OUVERT */
#mainHeader:has(#menuToggler:checked) #mainMenu {
    left: 0;
}

/* RESPONSIVE DESIGN */

@media screen and (max-width: 576px) {
    .logoMat {
        max-width: 250px;
    }

    #logoImg {
        max-height: 60px;
    }
}

/* BREAKPOINTS RESPONSIVE WIDTH */
@media screen and (min-width: 576px) {
    .wrapper-header {
        width: 540px;
    }
}

@media screen and (min-width: 768px) {
    .wrapper-header {
        width: 720px;
    }
}

@media screen and (min-width: 992px) {
    .wrapper-header {
        width: 960px;
        display: grid;
        grid-template-columns: 200px 1fr;
        align-items: center;
        margin: 0 auto;
        padding: auto;
    }

    #mainHeader {
        height: 100%;
    }

    #buttonMenu {
        display: none;
    }

    #mainMenu {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        position: static;
        background: none;
        height: auto;
    }

    #mainMenu ul {
        flex-direction: row;
        gap: 20px;
        padding: 0;
    }

    #mainMenu ul li a {
        text-transform: capitalize;
        font-size: 1rem;
        color: black;
        text-decoration: none;
        font-weight: 500;
    }

    #mainMenu ul li a:hover {
        color: #2f4f4f;
        font-size: 1.2rem;
    }

    .wrapper-header a.logo {
        justify-self: start;
        display: flex;
        align-items: center;
    }
}

@media screen and (min-width: 1200px) {
    .wrapper-header {
        width: 1140px;
    }
}

@media screen and (min-width: 1400px) {
    .wrapper-header {
        width: 1320px;
    }
}
