/* NC Mega Menu — Front CSS v2.5 */

/* ------------------------------------------------------------------ */
/* Nav wrapper                                                         */
/* ------------------------------------------------------------------ */
.ncmm-nav {
    position: relative;
    display: flex;
    align-items: center;
}

/* ------------------------------------------------------------------ */
/* Visibilité par breakpoint                                           */
/* ------------------------------------------------------------------ */
@media (min-width: 769px) {
    .ncmm-hide-desktop { display: none !important; }
}
.ncmm-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.ncmm-nav__item {
    position: relative;
    list-style: none;
}
.ncmm-nav__item.is-mega {
    position: static; /* relatif au nav pour le panel full-width */
}

/* ------------------------------------------------------------------ */
/* Lien principal                                                      */
/* ------------------------------------------------------------------ */
.ncmm-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.15s;
}
.ncmm-nav__link:hover { background: rgba(0,0,0,0.06); }

.ncmm-arrow {
    width: 10px; height: 6px;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.ncmm-nav__item.is-open > .ncmm-nav__link .ncmm-arrow {
    transform: rotate(180deg);
}

/* ------------------------------------------------------------------ */
/* Dropdown simple                                                     */
/* ------------------------------------------------------------------ */
.ncmm-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 6px;
    min-width: 200px;
    list-style: none;
    margin: 0;
    z-index: 9999;
}
.ncmm-nav__item.is-open > .ncmm-dropdown { display: block; }

.ncmm-dropdown__item { position: relative; list-style: none; }
.ncmm-dropdown__item > a {
    display: block; padding: 9px 12px;
    font-size: 13px; color: #374151;
    text-decoration: none; border-radius: 5px;
    transition: background 0.12s;
}
.ncmm-dropdown__item > a:hover { background: #f3f4f6; color: #111827; }

/* Sous-dropdown */
.ncmm-dropdown__sub {
    display: none;
    position: absolute;
    top: 0; left: calc(100% + 4px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 6px;
    min-width: 180px;
    list-style: none;
    margin: 0;
    z-index: 9999;
}
.ncmm-dropdown__item.has-sub:hover > .ncmm-dropdown__sub { display: block; }
.ncmm-dropdown__sub li { list-style: none; }
.ncmm-dropdown__sub a {
    display: block; padding: 8px 12px;
    font-size: 13px; color: #374151;
    text-decoration: none; border-radius: 5px;
}
.ncmm-dropdown__sub a:hover { background: #f3f4f6; }

/* ------------------------------------------------------------------ */
/* Mega menu                                                           */
/* ------------------------------------------------------------------ */
.ncmm-mega {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid #2c2c2c;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.10);
    z-index: 9999;
}
.ncmm-nav__item.is-open > .ncmm-mega { display: block; }

.ncmm-mega__inner {
    display: grid;
    grid-template-columns: repeat(var(--ncmm-cols, 4), 1fr);
    padding: 28px 32px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
}

/* ---- Colonne ---- */
.ncmm-mega__col {
    padding: 0 24px;
    border-right: 1px solid #f0f0f0;
}
.ncmm-mega__col:first-child { padding-left: 0; }
.ncmm-mega__col:last-child  { border-right: none; padding-right: 0; }

.ncmm-mega__col-title {
    display: block;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #9ca3af; text-decoration: none;
    margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.ncmm-mega__col-title:hover { color: #6b7280; }

/* ---- Groupe dans la colonne ---- */
.ncmm-mega__group {
    margin-bottom: 20px;
}
.ncmm-mega__group:last-child { margin-bottom: 0; }

.ncmm-mega__group-title {
    display: block;
    font-size: 13px; font-weight: 700;
    color: #111827; text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.12s;
}
.ncmm-mega__group-title:hover { color: #374151; }

/* ---- Liens dans le groupe ---- */
.ncmm-mega__links {
    list-style: none; padding: 0; margin: 0;
}
.ncmm-mega__links li { list-style: none; margin-bottom: 2px; }
.ncmm-mega__links a {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: #6b7280;
    text-decoration: none; padding: 4px 0;
    transition: color 0.12s;
}
.ncmm-mega__links a::before {
    content: '';
    display: inline-block; width: 4px; height: 4px;
    border-radius: 50%; background: #d1d5db;
    flex-shrink: 0; transition: background 0.12s;
}
.ncmm-mega__links a:hover { color: #111827; }
.ncmm-mega__links a:hover::before { background: #2c2c2c; }

/* ------------------------------------------------------------------ */
/* Burger — caché par défaut (visible via responsive.css)             */
/* ------------------------------------------------------------------ */
.ncmm-burger {
    display: none;
    background: none; border: none;
    cursor: pointer; padding: 8px;
    flex-direction: column; gap: 5px;
    align-items: center; justify-content: center;
    z-index: 10000;
}
.ncmm-burger span {
    display: block; width: 24px; height: 2px;
    background: currentColor; border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.ncmm-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ncmm-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ncmm-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay — invisible par défaut */
.ncmm-overlay {
    display: none;
}
