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

header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: var(--z-header);

    width: 100%;
    height: 0;
    min-height: 0;
    max-height: 0;
    margin: 0;
    padding: 0;

    background: transparent;
    pointer-events: none;
    overflow: visible;
}

/* Barre principale */
#navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 2200;

    width: calc(100% - 32px);
    max-width: 1440px;
    height: 88px;
    padding: 10px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--color-surface);
    border: 1px solid color-mix(in srgb, var(--color-white) 72%, transparent);
    border-radius: 24px;

    box-shadow: 0 18px 44px rgba(31, 31, 31, 0.12);

    backdrop-filter: blur(22px) saturate(1.18);
    -webkit-backdrop-filter: blur(22px) saturate(1.18);

    transform: translateX(-50%);
    pointer-events: auto;

    isolation: isolate;
    overflow: hidden;
}

#navbar::before,
#navbar::after {
    display: none;
    content: none;
}

/* ==============================
   LOGO
================================= */

#div_logo {
    height: 100%;
    z-index: 2202;

    display: flex;
    align-items: center;
}

#div_logo a {
    height: 100%;

    display: flex;
    align-items: center;
}

#logo {
    width: auto;
    height: 100%;

    display: block;
    object-fit: contain;
}

#nav_bar_bg {
    flex: 1;
    height: 100%;
    background: transparent;
}

/* ==============================
   NAVIGATION DESKTOP
================================= */

#dropdown {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 2201;

    width: calc(100% - 32px);
    max-width: 1440px;
    height: 88px;
    padding: 0 24px 0 220px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    background: transparent;
    box-shadow: none;

    pointer-events: none;
    transform: translateX(-50%);
}

#dropdown ul {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(28px, 4vw, 72px);

    list-style: none;
    pointer-events: auto;
}

#dropdown li {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

#dropdown a {
    position: relative;

    min-height: 46px;
    padding: 0 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: var(--color-text);
    white-space: nowrap;

    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

#dropdown a svg {
    width: 17px;
    height: 17px;

    display: block;

    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;

    opacity: 0.82;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

#dropdown a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;

    width: 0;
    height: 2px;

    background: var(--color-primary);
    border-radius: var(--radius-pill);

    transform: translateX(-50%);
    transition: width 0.2s ease;
}

#dropdown a:hover {
    color: var(--color-primary-dark);
    transform: translateY(-1px);
}

#dropdown a:hover svg {
    opacity: 1;
    transform: translateY(-1px);
}

#dropdown a:hover::after {
    width: 100%;
}

/* CTA Contact */
#dropdown a[href="#Contact"] {
    min-height: 46px;
    padding: 0 22px;

    color: var(--color-white);
    background: var(--color-primary);
    border-radius: var(--radius-pill);

    box-shadow: 0 12px 28px rgba(59, 167, 166, 0.28);
}

#dropdown a[href="#Contact"] svg {
    width: 17px;
    height: 17px;
    opacity: 1;
}

#dropdown a[href="#Contact"]::after {
    display: none;
}

#dropdown a[href="#Contact"]:hover {
    color: var(--color-white);
    background: var(--color-primary-dark);
}

/* Admin */
#dropdown a[href*="connected.php"] {
    color: var(--color-text-soft);
    font-size: 0.9rem;
}

#dropdown a[href*="connected.php"]::after {
    background: var(--color-text-soft);
}

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

#menu_burger {
    display: none;
    align-items: center;
    justify-content: center;

    z-index: 2203;
}

#burger-button {
    position: relative;

    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: none;
    background: transparent;
    cursor: pointer;
}

#burger-button span {
    position: absolute;
    left: 9px;

    width: 24px;
    height: 2px;

    background: var(--color-text);
    border-radius: var(--radius-pill);

    transition:
        top 0.25s ease,
        transform 0.25s ease,
        opacity 0.2s ease;
}

#burger-button span:nth-child(1) {
    top: 13px;
}

#burger-button span:nth-child(2) {
    top: 20px;
}

#burger-button span:nth-child(3) {
    top: 27px;
}

#burger-button.rotation span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
}

#burger-button.rotation span:nth-child(2) {
    opacity: 0;
}

#burger-button.rotation span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
}

/* ==============================
   TABLETTE
================================= */

@media screen and (max-width: 1024px) {
    #dropdown {
        padding-left: 180px;
    }

    #dropdown ul {
        gap: 26px;
    }

    #dropdown a {
        font-size: 0.9rem;
        gap: 7px;
    }

    #dropdown a svg {
        width: 16px;
        height: 16px;
    }

    #dropdown a[href="#Contact"] {
        padding: 0 18px;
    }
}

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

@media screen and (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }

    header {
        height: 0;
        min-height: 0;
        max-height: 0;
        margin: 0;
        padding: 0;
        background: transparent;
    }

    #navbar {
        top: 12px;

        width: calc(100% - 24px);
        height: 64px;
        padding: 0 18px;

        border-radius: 20px;

        background: var(--color-surface);
        border: 1px solid color-mix(in srgb, var(--color-white) 72%, transparent);

        box-shadow: 0 14px 34px rgba(31, 31, 31, 0.12);

        backdrop-filter: blur(20px) saturate(1.16);
        -webkit-backdrop-filter: blur(20px) saturate(1.16);
    }

    #navbar::before,
    #navbar::after {
        display: none;
        content: none;
    }

    #logo {
        height: 50px;
    }

    #menu_burger {
        display: flex;
    }

    #dropdown {
        position: fixed;
        top: 88px;
        right: 12px;

        z-index: var(--z-dropdown);

        width: min(340px, calc(100% - 24px));
        max-width: none;
        height: calc(100dvh - 104px);
        padding: 18px;

        display: flex;
        align-items: flex-start;
        justify-content: flex-start;

        background: rgba(255, 255, 255, 0.58);
        border: 1px solid color-mix(
            in srgb,
            var(--color-white) 72%,
            transparent
        );
        border-radius: 24px;

        box-shadow:
            -18px 18px 44px rgba(31, 31, 31, 0.16),
            inset 1px 0 0 rgba(255, 255, 255, 0.62);

        backdrop-filter: blur(24px) saturate(1.18);
        -webkit-backdrop-filter: blur(24px) saturate(1.18);

        pointer-events: none;
        opacity: 0;
        visibility: hidden;

        transform: translateX(calc(100% + 24px));

        transition:
            transform 0.35s ease,
            opacity 0.25s ease,
            visibility 0.25s ease;
    }

    #dropdown.show {
        pointer-events: auto;
        opacity: 1;
        visibility: visible;

        transform: translateX(0);
    }

    #dropdown ul {
        width: 100%;
        height: auto;
        padding: 0;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;

        list-style: none;
        pointer-events: auto;
    }

    #dropdown li {
        width: 100%;
        height: auto;

        display: flex;
    }

    #dropdown a {
        width: 100%;
        min-height: 52px;
        padding: 0 16px;

        justify-content: flex-start;
        gap: 12px;

        color: var(--color-text);
        border-radius: 16px;

        font-size: 1rem;
        font-weight: 700;

        background: transparent;

        transform: none;
    }

    #dropdown a svg {
        width: 19px;
        height: 19px;
    }

    #dropdown a::after {
        display: none;
    }

    #dropdown a:hover {
        color: var(--color-primary-dark);
        background: color-mix(in srgb, var(--color-primary-light) 18%, transparent);

        transform: none;
    }

    #dropdown a[href="#Contact"] {
        justify-content: center;

        margin-top: 10px;
        padding: 0 16px;

        color: var(--color-white);
        background: var(--color-primary);
        border-radius: var(--radius-pill);
    }

    #dropdown a[href="#Contact"]:hover {
        color: var(--color-white);
        background: var(--color-primary-dark);
    }

    #dropdown a[href*="connected.php"] {
        color: var(--color-text-soft);
    }
}