/* ===== CSS VARIABLES ===== */
:root {
    --navbar-height: 80px;
    --nav-bg-color: #fff;
    --nav-text-color: #333;
    --nav-hover-color: #000;
    --nav-active-border: 1px solid #000;
    --nav-padding: 1rem 2rem;
    --nav-gap: 2rem;
    --nav-font-size: 1rem;
    --nav-transition: all 0.3s ease;
    --max-content-width: 1200px;
}

/* ===== BASE NAVBAR STYLES ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding: var(--nav-padding);
    z-index: 1000;
    background-color: var(--nav-bg-color);
    transition: var(--nav-transition);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #000;
}

/* ===== NAVIGATION LIST ===== */
.nav-list {
    display: flex;
    gap: var(--nav-gap);
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    width: 100%;
    max-width: var(--max-content-width);
}

/* Élément fantôme à gauche pour contrebalancer le Ko-fi à droite */
.nav-list::before {
    content: "";
    flex: 1;
}

/* Ko-fi poussé à droite */
.nav-list li:last-child {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* ===== NAVIGATION LINKS ===== */
.nav-list a {
    text-decoration: none;
    color: var(--nav-text-color);
    font-family: "Inconsolata", monospace;
    text-transform: uppercase;
    font-optical-sizing: auto;
    font-size: var(--nav-font-size);
    letter-spacing: 0.5px;
    transition: var(--nav-transition);
    padding: 0.5rem 1rem;
    position: relative;
    white-space: nowrap;
}

/* ===== INTERACTIVE STATES ===== */
.nav-list a:hover {
    color: var(--nav-hover-color);
}

.nav-list .active {
    border-bottom: var(--nav-active-border);
}

/* ===== HOVER ANIMATION ===== */
.nav-list a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--nav-hover-color);
    transition: var(--nav-transition);
}

.nav-list a:hover::after {
    width: calc(100% - 2rem);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    :root {
        --nav-gap: 1.5rem;
        --nav-font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-gap: 1rem;
        --nav-font-size: 0.8rem;
        --nav-padding: 0.8rem 1rem;
    }
}

@media (max-width: 600px) {
    .nav-list {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    :root {
        --nav-font-size: 0.65rem;
        --nav-gap: 0.3rem;
        --nav-padding: 0.5rem 0.5rem;
    }

    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
    }

    .nav-list::before {
        display: none;
    }

    .nav-list li:last-child {
        flex: unset;
        justify-content: center;
    }

    .nav-list a {
        padding: 0.25rem 0.4rem;
        white-space: nowrap;
    }
}

/* Protection navbar */
.nav-list a {
    font-size: var(--nav-font-size) !important;
}
