@import 'variables.css';

body {
    background-color: var(--light-grey);
    font-family: var(--font-main);
    overflow-x: hidden;
}

html, body {
    height: 100%;
    margin: 0;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    margin: 0 10%; 
    flex: 1;
    margin-block-end: 50px;
}

h1 {
    font-family: var(--font-logo);
}

h2,
h3 {
    font-family: var(--font-title);
}

h1,
h2 {
    font-size: 2rem;
    text-align: center;
    margin-block-end: 50px;
}

section {
    max-width: 90%;
    margin: auto;
    border-radius: 25px;
    background-color: var(--white);
    box-shadow: var(--main-shadow);
}

section p {
    margin-block-end: 20px;
}

section ul {
    list-style-type: disc;
    margin-block-start: -10px;
    margin-inline-start: 20px;
    margin-block-end: 20px;
    padding-inline-start: 20px;
}

section ol {
    list-style-type: decimal;
    margin-block-start: -10px;
    margin-inline-start: 20px;
    margin-block-end: 20px;
    padding-inline-start: 20px;
}

section li {
    margin-block-end: 10px;
    line-height: 1.5;
}

section a {
    color: var(--dark-blue);
}

section a:hover {
    color: var(--main-blue);
}

header {
    background-color: var(--light-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-block-end: 50px;
    width: 100%;
    box-shadow: var(--main-shadow);
}

header img {
    width: 150px;
    height: 150px;
}

p, li, a, span {
    font-weight: 705 !important;
}

.no_content {
    margin-block-end: 200px !important; 
} 

.burger-menu, .close-menu {
    display: none;
}

/* Style de la barre de navigation principale */
.header_nav {
    margin-inline-end: 50px;
}

.header_nav_item {
    position: relative;
    list-style: none;
    display: inline-block;
    margin-inline-start: 20px;
}

.header_nav_item_link {
    display: block;
    padding: 10px;
    transition: all 0.3s ease;
}

.header_nav_item_link:active,
.header_nav_item_link:hover {
    background-color: var(--white);
    border-radius: 25px;
}

/* Styles pour le dropdown */
.header_nav_dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    list-style-type: none;
    padding: 16px 0 16px 0;
    border-radius: 25px;
    box-shadow: var(--menu-shadow);
}

.header_nav_dropdown.active {
    display: block;
    background-color: var(--white);
}

/* Lien de navigation avec dropdown actif */
.header_nav_item_link.active {
    background-color: var(--white);
    border-radius: 20px;
}

.header_nav_dropdown li a {
    display: block;
    text-decoration: none;
    color: var(--black);
}

.header_nav_dropdown li a:hover {
    color: var(--main-blue);
}

@media (max-width: 1220px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }

    section {
        max-width: 100%;
    }

    .header_nav {
        margin-inline-end: 0;
    }
}
@media (max-width: 1024px) {

    main {
        margin: 0 2%; 
        flex: 1;
        margin-block-end: 50px;
    }
}

@media (max-width: 920px) {

    header {
        flex-direction: row;
    }

    main {
        margin: 0 0; 
        flex: 1;
        margin-block-end: 50px;
    }

    section {
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
    }

    header img {
        width: 120px;
        height: 120px;
    }

    .burger-menu {
        display: block;
        width: 80px;
        height: 80px;
        color: var(--dark-blue);
        border: none;
        background:none;
        font-size: 2rem;
        padding: .5rem;
    }

    .header_nav {
        display: none;
        /* Cacher le menu par défaut sur mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--light-blue);
        /* Couleur de fond du menu */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        /* Assurez-vous que le menu est au-dessus des autres éléments */
    }

    .header_nav.active {
        display: flex;
        /* Afficher le menu quand il est actif */
    }

    .close-menu {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 80px;
        height: 80px;
        color: var(--dark-blue);
        border: none;
        background:none;
        border-radius: 50%;
        font-size: 2rem;
        padding: .5rem;
    }

    .header_nav_list {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        /* Prendre toute la largeur disponible */
    }

    .header_nav_item_link.active {
        background-color: var(--white);
        border-radius: 0;
    }

    .header_nav_list li {
        margin: 10px 0;
        /* Espacement entre les éléments du menu */
        font-size: 24px;
        /* Taille de police des éléments du menu */
        width: 100%;
        /* Prendre toute la largeur disponible */
        text-align: center;
        /* Centrer le texte */
    }

    .header_nav_dropdown {
        position: relative;
        top: 0;
        left: 0;
        transform: translateX(-0);
        min-width: 0;
        list-style-type: none;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
}
