/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
    border-bottom: 1px solid rgba(255, 253, 244, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-header.sticky {
    background-color: var(--background-color);
    border-bottom: 1px solid rgba(255, 253, 244, 0.3);
}

.site-header.hidden {
    transform: translateY(-100%);
}

/* ============================================================
   LOGO
   ============================================================ */
.site-branding a.logo {
    background-image: url('../img/sdip-logo-blanc-gris.webp');
    background-repeat: no-repeat;
    background-size: contain;

    width: 11.875rem;
    /* 190px */
    height: 3.125rem;
    /* 50px */
    display: block;
}

.site-header.sticky .site-branding a.logo {
    background-image: url('../img/sdip-logo-couleur.webp');
}

@media (max-width: 1200px) {
    .site-branding a.logo {
        width: 9.375rem;
        /* 150px */
        height: 2.5rem;
        /* 40px */
    }

}

/* ============================================================
   NAVBAR
   ============================================================ */
#main-navbar {
    background-color: transparent;
}

#main-navbar .container-fluid {
    position: relative;
    display: flex;
    align-items: center;
}

.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* ============================================================
   LIENS DESKTOP — glow vertical au hover
   ============================================================ */
#main-navbar .navbar-nav .nav-link {
    font-size: 1rem;
    /* 1rem =16px */
    font-family: var(--font-family1);
    font-weight: 500;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    /* 1px */
    padding: 0.5rem 1rem;
    /* 8px 16px */
    text-decoration: none;
    white-space: nowrap;
    transition: text-shadow 300ms ease-in;
}

#main-navbar .navbar-nav .nav-link::after {
    display: none;
}

#main-navbar .navbar-nav .nav-link:hover,
#main-navbar .navbar-nav .nav-link.active {
    outline: none;
    text-shadow:
        0 2ex rgb(var(--primary-rgb) / 0.35),
        0 -2ex rgb(var(--primary-rgb) / 0.35),
        0 4ex rgb(var(--primary-rgb) / 0.15),
        0 -4ex rgb(var(--primary-rgb) / 0.15),
        0 6ex rgb(var(--primary-rgb) / 0.075),
        0 -6ex rgb(var(--primary-rgb) / 0.075);
}

.fade-menu:hover .nav-link {
    opacity: 0.3;
    transition: opacity 0.25s ease, text-shadow 300ms ease-in;
}

.fade-menu:hover .nav-link:hover {
    opacity: 1;
}

/* ============================================================
   BURGER
   ============================================================ */
.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.burger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 25px;

}

.burger-line {
    display: block;
    width: 1.5625rem;
    /* 25px */
    height: 2px;
    /* px — trait graphique fixe */
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.site-header.sticky .burger-line {
    background-color: var(--primary-color);
}

/* Hover burger */
.navbar-toggler:hover .burger-line:nth-child(1) {
    width: 1.5625rem;
    /* 25px */
}

.navbar-toggler:hover .burger-line:nth-child(2) {
    width: 1.125rem;
    /* 18px */
}


.navbar-toggler:hover .burger-line:nth-child(3) {
    width: 0.75rem;
    /* 12px */
}


/* ============================================================
   BTN-CLOSE — offcanvas - Bouton de fermeture
   ============================================================ */
#navOffcanvas .btn-close {
    width: 2rem;
    /* 32px */
    height: 2rem;
    /* 32px */
    background-size: 1.25rem;
    /* taille de la croix SVG */
    opacity: 0.8;
    padding: 0;
}

#navOffcanvas .btn-close:hover {
    opacity: 1;
}

.offcanvas-header .btn-close:focus {
    box-shadow: none;
}


/* ============================================================
   OFFCANVAS MOBILE
   ============================================================ */
#navOffcanvas {
    width: 100vw !important;
    max-width: 100vw !important;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: none;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1) !important;
}

#navOffcanvas .offcanvas-header {
    padding: 2.5rem;
    border-bottom: none;
}

#navOffcanvas .offcanvas-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: start;
}

/* Logo dans l'offcanvas */
.offcanvas-logo {
    display: block;
    margin-bottom: 2.5rem;
}

.offcanvas-logo img {
    max-width: clamp(12.5rem, 40vw, 18.75rem);
    /* 200px → 300px */
    height: auto;
}

/* ============================================================
   LIENS OFFCANVAS
   ============================================================ */

/* État initial */
#navOffcanvas .navbar-nav .nav-item {
    opacity: 0;
    transform: translateY(1.25rem);
    /* 20px */
}

#navOffcanvas .navbar-nav .nav-link {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 1);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    /* 1px — trait graphique */
    text-decoration: none;
    letter-spacing: 0.0625rem;
    /* 1px */
    transition: color 0.2s ease, letter-spacing 0.2s ease;
}

#navOffcanvas .navbar-nav>.nav-item:last-child .nav-link {
    border-bottom: none;
}

#navOffcanvas .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0;
}

/* ============================================================
   ANIMATION FADEUP — offcanvas
   ============================================================ */
#navOffcanvas.show .navbar-nav .nav-item {
    animation: offcanvasFadeUp 0.4s ease forwards;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(1) {
    animation-delay: 0.20s;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(2) {
    animation-delay: 0.27s;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(3) {
    animation-delay: 0.34s;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(4) {
    animation-delay: 0.41s;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(5) {
    animation-delay: 0.48s;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(6) {
    animation-delay: 0.55s;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(7) {
    animation-delay: 0.62s;
}

#navOffcanvas.show .navbar-nav .nav-item:nth-child(8) {
    animation-delay: 0.69s;
}

@keyframes offcanvasFadeUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}