/* -- CSS GÉNÉRAL POUR TOUTES LES PAGES DU SITE -- */
html,
body {
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

/* Affiche un contour bleu autour de tous les éléments focus */
:focus-visible {
  outline: 1.5px solid #9dd6ff;
  border-radius: 4px;
}

body {
    background-color: #42464e;
    color: #fff;
    font-family: 'Lexend', Arial, sans-serif;
    margin: 0;
}

/* -- BARRE DE NAVIGATION -- */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px;
    background: #323232;
    position: fixed; /* La barre reste toujours visible en haut de l'écran, même lors du défilement */
    top: 0; /* Positionne la barre de navigation collée en haut de la page */
    width: 100%;
    z-index: 1000;
    transition: top 0.3s;
}

.nav_hidden {
    top: -155px; /* Cache la barre de navigation en la déplaçant vers le haut */
}

.logo img {
    height: 50px;
    margin-left: 20px;
}

.navigation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0px 15px;
}

.navigation a {
    text-decoration: none;
    color: #fff;
    font-size: 1.03rem;
    font-weight: bold;
    padding: 0px 15px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: all 0.3s;
}

.navigation a:hover {
    color: #adadad;
}

.navigation a::after {
    content: ""; /* Crée un élément, appelée pseudo-élément pour ajouter un soulignement animé */
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #9dd6ff;
    transform: translateX(-50%); /* Centre l'élément */
    transition: all 0.2s;
}

/* Effet de soulignement pour les liens survolé et celui qui possède la classe active */
.navigation a:hover::after,
.navigation a.active::after {
    width: 50%;
}

.searchBar {
    display: flex;
    gap: 5px;
    padding-right: 40px;
}

.searchBar input {
    padding: 8px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 200px;
}

.searchBar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.searchBar button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.searchBar button:hover {
    color: #9dd6ff;
}

.menu-burger {
    display: none; /* Cache le menu burger par défaut (sur PC) */
}

.menu-burger .fa-xmark {
    display: none; /* Cache l'icône de croix */
}

.menu-burger.cache .fa-bars {
    display: none; /* Cache l'icône de menu burger lorsque le menu est actif */
}

.menu-burger.cache .fa-xmark {
    display: block; /* Affiche l'icône de croix lorsque le menu est actif */
}

/* -- FOOTER -- */
.footer {
    background: #323232;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px;
}

.footer-contenu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contenu p {
    margin: 0;
    font-size: 0.9rem;
}

.liens-footer {
    display: flex;
    padding: 0;
    margin: 0;
    gap: 15px;
    list-style: none;
    flex-wrap: wrap;
}

.liens-footer a {
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.liens-footer a:hover {
    color: #9dd6ff;
}

.footer-icons {
    display: flex;
    gap: 20px;
    font-size: 1.7rem;
    margin-top: 5px;
}

.footer-icons a {
    color: #fff;
    transition: 0.3s;
}

.footer-icons a:hover {
    color: #9dd6ff;
}

/* Les "!important" sont nécessaires car sans eux, les styles ne s'appliquaient pas */
.champ-recherche-vide {
    border: 0.5px solid red !important;
    background-color: rgba(255, 0, 0, 0.1) !important;
    transition: 0.1s !important;
    box-sizing: border-box !important;
}

/* Classe pour masquer le contenu visuellement, mais le rendre accessible aux lecteurs d'écran */
.sr-only {
	border: 0 !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	-webkit-clip-path: inset(50%) !important;
			clip-path: inset(50%) !important;
	height: 1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
	white-space: nowrap !important;
}

/* -- RESPONSIVE -- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 20px;
    }

    .logo {
        margin-bottom: 5px;
        margin-right: 56px;
    }

    .searchBar {
        justify-content: center;
        width: 100%;
        margin: 10px 0px 10px 15px;
    }

    .searchBar input {
        width: 65%;
    }

    .menu-burger {
        display: block;
        position: absolute;
        left: 20px;
        z-index: 1101;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        display: flex;
        opacity: 0;
        visibility: hidden; /* Masque le menu par défaut */
        transition: 0.3s;
        z-index: 999;
    }

    .navbar.cache {
        opacity: 1;
        visibility: visible; /* Affiche le menu */
    }

    .navigation {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .navigation li {
        margin: 15px 0;
    }

    .navigation a {
        font-size: 1.4rem;
    }

    .footer {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        text-align: center;
    }

    .footer-contenu p {
        margin-bottom: 5px;
    }

    .liens-footer {
        justify-content: center;
    }

    .footer-contenu p {
        font-size: 0.8rem;
    }

    .navigation a::after {
        height: 3px; /* Ajuste la hauteur de l'effet de soulignement pour mobile */
    }

    .navigation a:hover::after {
        width: 0; /* Supprime l'effet de soulignement sur mobile */
    }
}