/* ================================================
   HEADER & NAV
   ================================================ */

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--structure);
}

/* ----- Étoiles (mode nuit) ----- */
.nav-stars {
    position: absolute;
    overflow: hidden;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 600ms ease;
}

body[data-theme="night"] .nav-stars,
body.is-night-mode .nav-stars {
    opacity: 1;
}

/* ----- Conteneur nav ----- */
.container-nav {
    position: relative;
    z-index: 1;
    height: 90px;
    display: flex;
    align-items: center;
    padding-right: 32px;
}

/* ----- Logo ----- */
.nav-logo {
    position: absolute;
    left: 24px;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    z-index: 10;
}

.nav-logo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.82);
    box-shadow: 0 10px 22px rgba(0,0,0,.25);
    z-index: 0;
}

.nav-logo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
}

/* ----- Menu ----- */
.nav-menu {
    margin-left: auto;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 50px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ----- Liens ----- */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: var(--font-title);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    padding: 10px 8px;
    background: transparent;
    transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    height: 2px;
    width: 100%;
    background: var(--accent2);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms ease;
}

.nav-link:hover {
    color: rgba(255,255,255,.96);
    text-shadow: 0 0 8px color-mix(in srgb, var(--accent2) 70%, transparent),
                 0 0 18px color-mix(in srgb, var(--accent2) 40%, transparent);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.nav-link.is-active {
    color: rgba(255,255,255,.96);
}

/* ----- Bouton burger ----- */
.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ----- Icône burger ----- */
.nav-burger,
.nav-burger::before,
.nav-burger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,.92);
    border-radius: 999px;
    transition: top 200ms 200ms ease, transform 200ms ease, background 200ms ease;
}

.nav-burger {
    position: relative;
}

.nav-burger::before,
.nav-burger::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-burger::before { top: -6px; }
.nav-burger::after  { top:  6px; }

/* ----- Burger → Croix ----- */
.nav-toggle[aria-expanded="true"] .nav-burger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-burger::before {
    top: 0;
    transform: rotate(45deg);
    transition: top 200ms ease, transform 200ms 200ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-burger::after {
    top: 0;
    transform: rotate(-45deg);
    transition: top 200ms ease, transform 200ms 200ms ease;
}

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

