:root {
    --pantone-rouge: rgb(244, 0, 52);
    --gris-neutre: rgb(127, 127, 127);
    --fond-clair: rgb(242, 242, 242);
    --texte: var(--gris-neutre);
    --blanc: #FFFFFF;
}

.topbar {
    background: #2d2d2d;
    color: white;
    font-size: 13px;
    padding: 0 60px 0 0px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    height: 28px;
    font-family: 'Urbanist', sans-serif;
    line-height: 1;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1010;
    overflow: hidden;
    white-space: nowrap;
}
.topbar > * {
    display: flex;
    align-items: center;
}

header {
    background-color: var(--gris-neutre);
    color: var(--blanc);
    height: 120px;
    padding: 8px 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: fixed;
    top: 28px;
    width: 100%;
    z-index: 999;
    border-bottom: 3px solid var(--pantone-rouge);
    transition: height 0.4s ease, background-color 0.3s ease, box-shadow 0.3s ease, border-bottom-color 0.3s ease;
}
header.scrolled {
    height: 80px;
    background-color: rgba(45, 45, 45, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-content-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}
.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.logoheader {
    height: 80px;
    object-fit: contain;
    transition: height 0.4s ease, transform 0.3s ease;
}
.logoheader:hover {
    transform: scale(1.05);
}
header.scrolled .logoheader {
    height: 55px;
}

nav.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}
.desktop-nav a {
    font-family: 'Urbanist', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--blanc);
    text-decoration: none;
    padding: 6px 12px;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}
.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--pantone-rouge);
}
.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--pantone-rouge);
    transition: width 0.3s ease;
}
.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

.btn-header {
    background-color: var(--pantone-rouge);
    border: 2px solid var(--pantone-rouge);
    color: var(--blanc);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-header:hover {
    background-color: #c9362f;
    border-color: #c9362f;
    transform: translateY(-2px);
}
.btn-header::after { display: none; }

.btn-admin {
    font-family: 'Urbanist', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--blanc);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--blanc);
    border-radius: 8px;
    transition: all 0.3s ease;
}
.btn-admin:hover {
    background-color: var(--blanc);
    color: var(--pantone-rouge);
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 40px;
}
.header-socials img {
    height: 24px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.header-socials a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.page-with-hero header {
    background-color: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}
.page-with-hero header.scrolled {
    background-color: rgba(45, 45, 45, 0.9);
    border-bottom-color: var(--pantone-rouge);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.mobile-nav-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 1024px) {
    .header-content-desktop {
        display: none;
    }

    header.menu-is-open {
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 40px;
        right: 20px;
        z-index: 2002;
    }

    .hamburger-btn { background: transparent; border: none; cursor: pointer; padding: 10px; }
    .hamburger-icon { width: 28px; height: 22px; position: relative; }
    .hamburger-icon span {
        display: block; position: absolute; height: 3px; width: 100%;
        background: var(--blanc); border-radius: 3px;
        transition: all 0.25s ease-in-out;
    }
    .hamburger-icon span:nth-child(1) { top: 0px; }
    .hamburger-icon span:nth-child(2) { top: 9px; }
    .hamburger-icon span:nth-child(3) { top: 18px; }
    .hamburger-icon.open span:nth-child(1) { top: 9px; transform: rotate(135deg); }
    .hamburger-icon.open span:nth-child(2) { opacity: 0; left: -60px; }
    .hamburger-icon.open span:nth-child(3) { top: 9px; transform: rotate(-135deg); }

    .mobile-menu {
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background-color: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(10px);
        z-index: 2000;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        height: 100vh;
        min-height: -webkit-fill-available;
        overflow-y: auto;
    }

    .mobile-menu-nav {
        display: flex; flex-direction: column; align-items: stretch;
        gap: 0.5rem; width: 100%; max-width: 320px;
    }

    .mobile-menu-nav a {
        color: var(--blanc); text-decoration: none; font-size: 1.2rem;
        font-weight: 600; padding: 1rem; display: flex;
        align-items: center; gap: 1rem; border-radius: 8px;
        transition: background-color 0.2s ease-in-out;
    }
    .mobile-menu-nav a:hover, .mobile-menu-nav a.active {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--pantone-rouge);
    }
    .menu-icon {
        width: 24px; height: 24px;
        flex-shrink: 0;
        fill: currentColor;
    }

    .mobile-menu-divider {
        width: 80%; max-width: 250px; height: 1px;
        background-color: rgba(255, 255, 255, 0.2);
        margin: 2rem 0;
    }

    .mobile-menu-contact {
        display: flex; flex-direction: column;
        align-items: center; gap: 1.2rem;
    }
    .mobile-menu-contact .btn-header { display: block; width: 100%; max-width: 320px; text-align: center; }
    .mobile-menu-contact a { font-size: 1rem; color: var(--blanc); text-decoration: none; }

    .mobile-menu-socials {
        display: flex; flex-direction: row;
        margin-top: 2.5rem; gap: 1.5rem;
    }
    .mobile-menu-socials img { height: 28px; opacity: 0.8; }

    header.menu-is-open {
        z-index: 2001;
    }
}
