@font-face {
    font-family: "Nohemi";
    src: url("../fonts/Nohemi-VF.ttf") format("truetype-variations");
    font-weight: 100 900;
}

body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    font-family: "Nohemi", Arial, sans-serif;
    margin: 0;
}

/* ================= HEADER ================= */

.entete-principal {
    width: 100%;
    padding: 15px 25px;
    background-color: black;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.barre-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.marque-navigation a {
    font-family: "Nohemi", Arial, sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.marque-navigation a:hover {
    color: #bb86fc;
}

/* ================= DESKTOP NAV ================= */

.liens-navigation {
    display: flex;
    align-items: center;
}

.liens-navigation ul {
    display: flex;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.liens-navigation ul li a {
    font-family: "Nohemi", Arial, sans-serif;
    color: #e0e0e0;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
}

.liens-navigation ul li a:hover {
    color: #bb86fc;
}

.liens-navigation ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background-color: #bb86fc;
    transition: width 0.3s ease;
}

.liens-navigation ul li a:hover::after {
    width: 100%;
}

/* ================= DESKTOP SOUS-MENU ================= */

.menu-deroulant-projets {
    position: relative;
}

.sous-menu-projets {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    background-color: #121212;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.menu-deroulant-projets:hover .sous-menu-projets {
    display: block;
    opacity: 1;
    visibility: visible;
}

.sous-menu-projets li a {
    display: block;
    padding: 8px 14px;
    text-align: center;
    font-family: "Nohemi", Arial, sans-serif;
    color: #e0e0e0;
    text-decoration: none;
    position: relative;
}

.sous-menu-projets li a:hover {
    color: #bb86fc;
}

.sous-menu-projets li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 14px;
    width: 0;
    height: 2px;
    background-color: #bb86fc;
    transition: width 0.3s ease;
}

.sous-menu-projets li a:hover::after {
    width: calc(100% - 28px);
}

/* ================= BURGER ================= */

.menu-burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-burger .barre {
    width: 30px;
    height: 3px;
    background-color: #bb86fc;
    border-radius: 2px;
    transition: all 0.4s ease;
}

/* Animation burger -> croix */
.menu-burger.active .barre:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-burger.active .barre:nth-child(2) {
    opacity: 0;
}

.menu-burger.active .barre:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ================= MENU MOBILE ================= */

.menu-mobil {
    display: flex; /* IMPORTANT : display flex pour le transition */
    flex-direction: column;
    padding: 15px 0;
    position: fixed;
    top: 60px; /* juste sous le header sticky */
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    transform: translateY(-100%); /* cache le menu en haut */
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
    z-index: 999;
}

.menu-mobil.active {
    transform: translateY(0); /* fait descendre le menu */
    opacity: 1;
    pointer-events: all;
}

.menu-mobil ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.menu-mobil ul li {
    margin-bottom: 20px;
    width: 100%;
}

.menu-mobil ul li a {
    font-size: 1.2em;
    color: #e0e0e0;
    text-decoration: none;
}

.menu-mobil ul li a:hover {
    color: #bb86fc;
}

/* ===== SOUS-MENU MOBILE PROJETS ===== */

.menu-deroulant-projets-mobile {
    padding: 0;
}

.menu-deroulant-projets-mobile > a {
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.menu-deroulant-projets-mobile > a::after {
    content: "▾";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(35px) translateY(-50%);
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.menu-deroulant-projets-mobile.open > a::after {
    transform: translateX(35px) translateY(-50%) rotate(180deg);
}

.menu-deroulant-projets-mobile ul {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

.menu-deroulant-projets-mobile.open ul {
    height: auto;
}

.menu-deroulant-projets-mobile ul li a {
    font-size: 1em;
    opacity: 0.85;
    padding: 8px 0;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
    .liens-navigation {
        display: none;
    }

    .menu-burger {
        display: flex;
    }

    .sous-menu-projets {
        display: none !important;
    }
}
