:root {
    --main-font-color: #024d5a;
    --second-text-color: #4b5b63;
    --main-bg-color: #024d5a; /* Bleu principal */
    --title-color: #024d5a; /* Bleu pour le titre principal */
    --level-title-color: hsl(14, 73%, 94%); /* Beige pour les titres des niveaux */
    --advanced-bg: hsla(284, 61%, 74%, 1); /* Bleu pastel foncé */
    --intermediate-bg: hsl(212, 63%, 75%); /* Vert pastel foncé */
    --basic-bg: hsla(22, 62%, 76%, 1); /* Jaune pastel foncé */
    --card-border-color: rgba(0, 0, 0, 0.15); /* Ombre pour les cadres */
}


.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.3rem 0;
    height: 45px;
    max-width: 650px;
    margin-top: 1em;
    border-radius: 50px;
    backdrop-filter: blur(50px);
    transition: background-color 0.3s ease;
}


.navbar.transparent {
    background-color: rgba(255, 255, 255, 0);
}


.navbar.scrolled {
    background-color: rgba(241, 241, 241, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.fa-lg {
    color: var(--second-text-color);
}

/* header */
header {
    display: flex;
    justify-content: center; /* Centre le contenu dans le header */
    width: 100%;
}

nav {
    width: 100%;
    height: 5em;
    position: fixed;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center; /* Centrer le menu */
    align-items: center;
    border-radius: 50px;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline-block;
    line-height: 80px;
    margin: 0 5px;
}

nav ul li a.menu-link {
    color: #4b5b63;
    font-size: 17px;
    padding: 7px 13px;
    border-radius: 3px;
    transition: 0.5s;
    font-weight: bolder;
    text-decoration: none;
}

a.menu-link.active {
    background-color: var(--intermediate-bg);
    border-radius: 50px;
    padding: 10px 20px;
    transition: 0.5s;
}
a.menu-link:hover {
    background-color: var(--basic-bg);
    border-radius: 50px;
    padding: 10px 20px;
    transition: 0.5s;
}

/* Par défaut, le menu est visible */
nav ul {
    display: flex;
    flex-direction: row; /* Affiche les éléments horizontalement */
}

/* Cache la case à cocher */
input[type="checkbox"] {
    display: none;
}

/* Icône du menu burger */
.checkbtn {
    display: none;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}


@media (max-width: 768px) {


    .navbar {
        width: 100%;
        justify-content: space-between;
        box-shadow: none;
        backdrop-filter: blur(0px);
        transition: background-color 0.3s ease;
    }

    input[type="checkbox"]:checked ~ ul {
        background-color: #024d5a; /* Couleur de fond */
    }

    /* Icône du menu burger visible */
    .checkbtn {
        display: block;
        z-index: 2;
    }

    /* Cache le menu par défaut */
    nav ul {
        position: fixed;
        top: -20px;
        right: -100%; /* Le menu est hors de l'écran */
        width: 100%;
        height: 110vh; /* Prend toute la hauteur */
        flex-direction: column; /* Affiche les éléments verticalement */
        justify-content: center;
        align-items: center;
        color: white;
        transition: right 0.3s ease;
    }

    nav ul li {
    line-height: 20px;
    }
    .navbar.transparent {
        background-color: rgba(255, 255, 255, 0); /* Transparent */
    }

    /* Fond avec opacité lors du défilement */
    .navbar.scrolled {
        background-color: rgba(222, 222, 222, 0); /* Fond translucide */
        box-shadow: none; /* Optionnel : ombre pour un effet de profondeur */
        transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    }


    input[type="checkbox"]:checked ~ ul {
        right: 0;
    }


    nav ul li {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }

    nav ul li a.menu-link {
        font-size: 18px;
        padding: 12px 0;
        width: 100%;
        display: inline-block;
        color: white;
        transition: 0.3s;
    }

    /* Lien actif et au survol */
    a.menu-link.active, a.menu-link:hover {
        background: none;
        color: var(--basic-bg);
        padding: 0;
        font-weight: bolder;
    }
}


/*footer*/
footer {
    border-top: 2px solid var(--main-font-color);
    text-align: center;
    padding-top: 1em;
    padding-bottom: 1em;
    margin: 3em 0;
}

.general {
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacement entre les icônes */
    align-items: center;
}

.icon {
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background: var(--basic-bg); /* Couleur pastel au départ */
    color: var(--main-font-color); /* Texte en couleur principale */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 20px;
    font-family: sans-serif;
    box-shadow: 5px 10px 20px rgba(150, 150, 150, 0.3);
    transition: all 0.4s ease-out; /* Transition fluide sur tout */
    position: relative; /* Ajouté pour gérer l'icône et le texte correctement */
    overflow: hidden; /* Empêche le texte de déborder de l'icône */
}

.icon a {
    color: var(--main-font-color); /* Couleur du texte dans les icônes */
    text-decoration: none; /* Enlever le soulignement */
    font-size: 18px;
    transition: color 0.4s ease-out; /* Transition fluide pour la couleur du texte */
}

.icon:hover {
    width: 175px; /* Agrandit l'icône lors du survol */
    background: var(--main-font-color); /* Fond devient la couleur principale */
    color: beige; /* Texte devient clair */
}

.icon:hover a {
    color: beige; /* Le texte devient clair au survol */
}

.icon span {
    position: absolute; /* Permet de superposer le texte sur l'icône */
    left: 50%; /* Centre le texte horizontalement */
    top: 50%; /* Centre le texte verticalement */
    transform: translate(-50%, -50%) translateX(-50px); /* Positionne et cache le texte à gauche au départ */
    opacity: 0; /* Texte invisible au départ */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out; /* Animation de l'opacité et du mouvement */
}

.icon:hover span {
    opacity: 1; /* Le texte devient visible */
    transform: translate(-50%, -50%) translateX(20px); /* Le texte glisse à droite au survol */
}

.icon i {
    transition: transform 0.4s ease-out; /* Transition fluide pour l'icône */
}

.icon:hover i {
    transform: translateX(-50px); /* L'icône se déplace à gauche lors du survol */
}