﻿/* ==========================================================
   NAVBAR & MEGA-MENU NASWeb – VERSION FINALE PRO
   ========================================================== */

.nw-navbar {
    background: #111827;
    color: #e5e7eb;
    padding: 0.45rem 0.9rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
    position: sticky;
    top: 0;
    z-index: 3000;
}

.nw-nav-inner {
    max-width: 1450px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nw-brand {
    color: #fff;
    display: flex;
    align-items: center;
    gap: .45rem;
    text-decoration: none;
    font-weight: 600;
}

.nw-brand img { height: 28px; }

.nw-nav-links {
    list-style: none;
    display: flex;
    gap: .75rem;
    flex: 1;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nw-link {
    color: #e5e7eb !important;
    padding: .35rem .65rem;
    border-radius: 6px;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none !important;
}

.nw-link:hover {
    background: rgba(255,255,255,.12);
}

/* ===================================================================
   MEGA-MENU FORMATIONS (PLEINE LARGEUR)
   =================================================================== */

.nw-mega {
    position: static;
}

.nw-mega-panel {
    position: absolute;
    left: 0 !important;
    right: 0 !important;
    top: 100%;
    margin-top: .35rem;

    background: #0f172a;
    color: #e5e7eb;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 18px 40px rgba(0,0,0,.45);

    width: 100%;
    max-width: 100%;
    min-width: 720px;

    max-height: calc(100vh - 115px);
    overflow: hidden;
    display: none;
    z-index: 3500;
}

.nw-mega:hover .nw-mega-panel,
.nw-mega:focus-within .nw-mega-panel {
    display: block;
}

.nw-mega-body {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: calc(100vh - 115px);
    max-width: 1450px;
    margin: 0 auto;
    overflow: hidden;
}

.nw-mega-cats {
    background: #111827;
    border-right: 1px solid #1f2937;
    overflow-y: auto;
    max-height: calc(100vh - 115px);
}

.nw-mega-cat {
    width: 100%;
    background: transparent;
    border: none;
    padding: .55rem .9rem;
    text-align: left;
    color: #e5e7eb;
    cursor: pointer;
    font-size: .92rem;
}

.nw-mega-cat:hover {
    background: #1f2937;
}

.nw-mega-cat.active {
    background: #2563eb;
    color: #fff;
}

.nw-mega-content {
    padding: .55rem .9rem;
    overflow-y: auto;
    max-height: calc(100vh - 115px);
}

.nw-mega-panel-right {
    display: none;
}
.nw-mega-panel-right.active {
    display: block;
}

.nw-mega-section-title {
    font-size: .8rem;
    text-transform: uppercase;
    font-weight: 900;
    color: #4AAAFF;
    margin: .4rem 0 .2rem;
}

.nw-mega-links {
    list-style: none;
    margin: 0 0 .4rem;
    padding: 0;
}

.nw-mega-links li a {
    color: #e5e7eb;
    padding: .25rem .35rem;
    display: block;
    border-radius: 4px;
    text-decoration: none;
}

.nw-mega-links li a:hover {
    background: rgba(59,130,246,.25);
}

/* ===================================================================
   DROPDOWN SIMPLE
   =================================================================== */

.nw-dropdown {
    position: relative;
}

.nw-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: .3rem;

    background: #0f172a;
    min-width: 210px;
    padding: .35rem 0;

    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(0,0,0,.4);

    display: none;
    z-index: 3300;
}

.nw-dropdown:hover .nw-dropdown-menu,
.nw-dropdown:focus-within .nw-dropdown-menu {
    display: block;
}

.nw-dropdown-menu a {
    padding: .35rem .8rem;
    display: block;
    color: #e5e7eb;
}

.nw-dropdown-menu a:hover {
    background: rgba(255,255,255,.12);
}

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

@media (max-width: 900px) {
    .nw-mega-panel {
        position: static !important;
        max-width: 100% !important;
        border-radius: 0;
    }
    .nw-mega-body {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }
    .nw-mega-cats {
        border-bottom: 1px solid #1f2937;
        border-right: none !important;
        max-height: unset !important;
    }
    .nw-mega-content {
        max-height: unset !important;
    }
}
