:root {
    --bgEntete : url(entete_WRC_Sombre.webp);
    --bgPistes : url(WRC_bg_piste_darck.webp);
    --bgEcuries : url(WRC_bg_ecuries_darck.webp);
    --paraphColor : #d1d1d1;
    --img_toggle : url(toggle_darck.webp);
    --background_color : #3d3d3d;
    --background_color_2 : #505050;
    --background_color_3 : #606060;
    --borderColor : #606060;
    --footer-color: #525252;
    --ancre-color: #363636;
    --text-color: #d1c9c9;
    --menu-color: #363636;

}

body{
    margin: 0px;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--paraphColor);
    background: var(--background_color);
}

a {
    text-decoration: none;
    color: var(--paraphColor);
}

#menu{
    position: sticky;
    top: 0;
    left: 0;
    background: var(--menu-color);
    display: flex;
    justify-content: space-between;
}

#menu ul {
    display: flex;
    list-style: none;
    padding: 0px;
    margin: 0px;
}

#menu li a {
    font-size: large;
    display: block;
    padding: 20px;
}

#menu li a:hover {
    background-color : var(--background_color_2);
    border-bottom: var(--borderColor) solid 5px;
    padding-bottom: 15px;
}

#entete {
    background: var(--bgEntete) center no-repeat;
    background-size: cover;
    padding-top: 12.5%;
    padding-bottom: 12.5%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#switchBtn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    width: 80px;
    background: var(--img_toggle) center no-repeat;
    background-size: contain;
}

.paragraphe {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    padding: 1%;
}

.titre {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5%;
}

.element {
    background-color: var(--background_color_3);
    color: var(--paraphColor);
    font-size: larger;
    text-align: justify;
    display: flex;
    flex-direction: row;
    height: 24%;
    margin: 1% 0%;
}

.logo {
    width: 10%;
    margin: auto 1%;
    height: 80%;
}

#box_WRC {
    margin: 3% 5%;
}

#box_typePistes {
    background: var(--bgPistes) center no-repeat;
    background-size: cover;
    padding: 2% 0%;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-bottom: 2%;
}

#box_lesEcuries {
    background: var(--bgEcuries) center no-repeat;
    background-size: cover;
    padding: 2% 0%;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.titleBox {
    background: var(--background_color_2);
    border-radius: 5px;
    padding: 0.5%;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 0.5%;
}

.paraphBox {
    background: var(--background_color_3);
    border-radius: 5px;
    padding: 1%;
    width: 80%;
    font-size: larger;
    text-align: justify;
}

#photobas {

    border-radius: 5px;
    display: flex;
    margin: auto;
    width: 95%;
}

#photobas2 {

    border-radius: 5px;
    margin: 0%;
    width: 10%;
}


#ancre {
    list-style: none;
    text-decoration: none;   
    color: #d1d1d1;
    background-color: var(--ancre-color);
    border-radius: 5px;
    border: 2px double;
    margin: 1%;
    padding: 0.5%;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer {
    background-color: var(--footer-color);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

footer ul {

    list-style: none;
    padding: 0px;
    margin: 0%;

    display: grid;
    grid-template-columns: [first] 250px [line2] 250px [line3] 150px [col4-start] 150px [end];
    justify-items: center;
    justify-content: space-between;
}

footer li a {
    text-decoration: none;
    font-size: large;
    display: block;
    padding: 6px;

}

/* Hamburger button styles */
.hamburger-button {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 15px;
}

.hamburger-button span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}


/* Add these media queries at the end of your existing CSS file */
@media screen and (max-width: 768px) {
    .hamburger-button {
        display: flex;
        z-index: 4;
    }

    /* Animate hamburger to X when menu is open */
    .hamburger-button.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger-button.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-button.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    #menu {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    #menu ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--menu-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        z-index: 3;
    }

    #menu ul.active {
        display: flex;
    }

    #menu li {
        width: 100%;
        text-align: center;
    }

    #menu li a {
        padding: 20px;
        font-size: 1.2em;
    }

    #switchBtn {
        display: flex;
        width: 60px; /* Slightly smaller on mobile */
        height: 30px;
        margin: 10px;
        z-index: 4; /* Keep it above the menu overlay */
        background-size: contain;
        background-position: center;
    }

    /* Ensure switch stays visible when menu is open */
    #menu.active #switchBtn {
        position: relative;
        z-index: 5;
    }

    #entete #paraphEntete {
        text-align: center;
    }

    #box_WRC {
        margin: 3% 5%;
        flex-direction: column;
    }

    .element {
        background-color: var(--background_color_3);
        color: var(--paraphColor);
        font-size: medium;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: justify;
        height: 24%;
        margin: 1% 0%;
    }
    
    #box_typePistes {
        background: var(--bgPistes) center no-repeat;
        background-size: cover;
        padding: 2% 0%;
        height: 100%;
        display: flex;
        align-items: center;
        flex-direction: column;
        margin-bottom: 2%;
    }
    
    #box_lesEcuries {
        background: var(--bgEcuries) center no-repeat;
        background-size: cover;
        padding: 2% 0%;
        height: 100%;
        display: flex;
        align-items: center;
        flex-direction: column;
    }
    
    .titleBox {
        background: var(--background_color_2);
        border-radius: 5px;
        padding: 1%;
        width: 60%;
        font-size: 2rem;
        font-weight: bold;
        text-align: center;
        margin: 0.5%;
    }
    
    .paraphBox {
        background: var(--background_color_3);
        border-radius: 5px;
        padding: 2%;
        width: 80%;
        font-size: medium;
        text-align: justify;
    }

    footer {
        flex-direction: column;
    }

    /* Footer adjustments */
    footer ul {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    footer li a {
        text-align: center;
        padding: 10px;
    }

    /* Photo section adjustments */
    #photobas {
        flex-direction: column;
        align-items: center;
        width: 60%;
    }

    #photobas2 {
        width: 5%;
        margin: 5px 0;
    }

    /* Intro section adjustment */
    .intro {
        padding: 1rem;
        margin: 1rem;
    }

    /* Button adjustment */
    #boutton {
        float: none;
        display: block;
        margin: 10px auto;
        padding: 10px;
    }
}
