:root {
    --navbar-color: #181b42;
    --navbar-light-color: #343870;
    --border-width:         2px;
    --border-radius:        6px;
    --inactive-color:     #adadad;
    --active-color:       #c160fc;
    --active-light-color: #c160fc21;
}

nav {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    background-color: var(--navbar-color);
    color: whitesmoke;
    font-weight: 600;
    z-index: 1000;
}

.nav-logo {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 15px;
}









/* Hamburger animation */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    box-sizing: border-box;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: whitesmoke;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 0;
}


.hamburger.is-active span:nth-child(1) {
    transform: translate(0px, 8.5px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
    transform: translate(0px, -8.5px) rotate(-45deg);
}











/* LINKS DESKTOP */
.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 15px;
    list-style: none;
}
.nav-links a {
    color: whitesmoke;
    text-decoration: none;
}

.nav-links .navbar-item {
    color: var(--inactive-color);
    border-bottom: var(--border-width) solid var(--inactive-color);
    border-radius: var(--border-radius);
    padding: 6px 4px;
    transition: all 0.15s ease;
}

.nav-links .is-active {
    color: var(--active-color);
    border-bottom: var(--border-width) solid var(--active-color);
    border-radius: var(--border-radius);
    background: var(--active-light-color);
}

.nav-links .navbar-item:hover {
    color: var(--active-color);
    border-bottom: 3px solid var(--active-color);
    border-radius: var(--border-radius);
    background: var(--active-light-color);
}


/* As navbar is anchored, we need to inform the responsive the scroll-top margin */
h1, h2, h3, h4 {
    scroll-margin-top: 90px;
}



/* --- MOBILE VERSION --- */
@media (max-width: 850px) {

    .hamburger {
        display: flex;
    }

    .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    flex-direction: column;
    gap: 15px;

    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    overflow: hidden;
    padding: 0;

    transition: transform 0.3s ease, opacity 0.3s ease;

    background: #1a1b41c4;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 10px rgba(0,0,0,0.15);
    border-radius: 0 0 16px 16px;
}

/* --- état ouvert --- */
.nav-links.active {
    opacity: 1;
    transform: scaleY(1);
    padding: 20px 0; 
}


    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        width: 100%;
        display: block;
        padding: 12px 0;
        color: white;
    }
}
