/* =============================================================================
   1) NIVEAUX / Z-INDEX & ITEMS DE BASE
   ========================================================================== */
.nav { z-index: 15000 !important; }
.navbar-expand-lg { z-index: 15000 !important; }
.nav-item { padding: 0.5rem 0; }
.dropdown-hover > .dropdown-toggle:active { pointer-events: none; }

/* =============================================================================
   2) BARRE DE MENU (navbar)
   ========================================================================== */
.menu-div nav.navbar {
    background-color: #000 !important;
    border-bottom: #000000 1px solid;
    height: 2rem;
}
.menu-div,
.menu-div .navbar,
.menu-div .navbar .container-fluid {
    overflow: visible;
}
.menu-div .navbar { position: relative; }

/* =============================================================================
   3) PANNEAU MÉGA — FRAMEWORK GÉNÉRAL
   ========================================================================== */
.menu-div .dropdown.position-static > .dropdown-menu.mega-panel {
    left: 0 !important;
    right: 0 !important;
    max-width: none !important;
    width: auto !important;
    transform: none !important;
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    box-shadow: var(--bs-box-shadow);
    padding: 0;
}

/* Mobile fixes */
@media (max-width: 991.98px){
    .menu-div {
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .menu-div::after { display: none !important; }
}

/* Desktop hover open */
@media (min-width: 992px) {
    .dropdown-hover:hover > .dropdown-menu.mega-panel { display: block; }
}

/* =============================================================================
   4) WRAPPERS INTERNES
   ========================================================================== */
.mega-wrap { padding: 24px 0; }
.mega-wrap .container,
.mega-wrap .container-fluid {
    padding-left: 24px;
    padding-right: 24px;
}

/* =============================================================================
   5) TYPOGRAPHIE / TITRES / LIENS
   ========================================================================== */
.mega-title {
    font-size: .92rem;
    letter-spacing: .03em;
    color: #000000;
    margin: 0 0 .5rem;
    font-weight: 600;
}

.mega-list { list-style: none; margin: 0; padding: 0; }

.mega-link {
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem 0;
    color: #898b91;
    text-decoration: none;
}
.mega-link:hover { color: var(--bs-primary); }

.mega-link .chev {
    font-size: .75rem;
    opacity: .6;
    transition: transform .15s ease;
}
.mega-link:hover .chev { transform: translateX(2px); }

.mega-all {
    margin-top: .25rem;
    font-weight: 600;
}

/* =============================================================================
   6) BLOCS VISUELS : Cards produit / Spotlight / Hero
   ========================================================================== */

/* --- Carte produit (mega-thumb) --- */
.mega-thumb {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .7rem .8rem;                /* patch */
    border-radius: .5rem;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%); /* patch */
    border: 1px solid rgba(0,0,0,.05);   /* patch */
    transition: all .25s ease;           /* patch */
}

.mega-thumb img {
    height: 100px;
    object-fit: cover;
    border-radius: .35rem;
}

/* --- Texte vignette --- */
.mega-thumb strong {
    font-size: .9rem;     /* patch */
    font-weight: 600;
}
.mega-thumb .small {
    font-size: .78rem;    /* patch */
    color: #777;          /* patch */
}

/* --- Bouton En savoir plus --- */
.mega-thumb .mega-all {
    font-size: .78rem;                     /* patch harmonisé */
    display: inline-flex;                  /* patch */
    align-items: center;                   /* patch */
    gap: .35rem;                            /* patch */
    padding: .25rem .6rem;                 /* patch */
    border-radius: .45rem;                 /* patch */
    background: rgba(255,255,255,.6);      /* patch */
    border: 1px solid rgba(0,0,0,.06);     /* patch */
    transition: all .2s ease;              /* patch */
}

/* --- Hover Highlight premium --- */
.mega-thumb:hover {
    background: #ffffff;                   /* patch */
    border-color: rgba(0,0,0,.12);         /* patch */
    box-shadow: 0 4px 12px rgba(0,0,0,.10);/* patch */
    transform: translateY(-2px);           /* patch */
}
.mega-thumb:hover .mega-all {
    background: #ffffff;                   /* patch */
    border-color: rgba(0,0,0,.15);         /* patch */
}

/* --- Spotlight (colonne droite) --- */
.mega-spotlight {
    background: #f3f3f3;                  /* patch */
    border: 1px solid rgba(0,0,0,.08);    /* patch */
    border-radius: .85rem;                /* patch */
    padding: 1.2rem;                      /* patch */
    height: 100%;
}
.mega-spotlight .badge { font-size: .65rem; }
.mega-spotlight p.text-muted {
    font-size: .78rem;                    /* patch */
    margin-bottom: .6rem !important;      /* patch */
    letter-spacing: .05em;                /* patch */
}

.mega-panel .mega-spotlight { height: auto !important; }

/* --- Hero bloc --- */
.mega-hero {
    position: relative;
    overflow: hidden;
    border-radius: .75rem;
    aspect-ratio: 4/3;
    min-height: 180px;
}
.mega-hero .mega-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: contrast(1) saturate(1);
}
.mega-hero .mega-hero-content {
    position: relative;
    z-index: 1;
    padding: 1rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

/* =============================================================================
   7) SÉPARATEURS & MARQUES
   ========================================================================== */
.mega-divider { height: 1px; background: rgba(0,0,0,.06); margin: 1rem 0; }
.mega-brands { display: flex; gap: 8px; flex-wrap: wrap; }
.mega-brands img {
    height: 24px;
    filter: grayscale(1) opacity(.8);
    transition: filter .2s;
}
.mega-brands img:hover { filter: none; }

/* =============================================================================
   8) BADGES & ADJUSTEMENTS BOOTSTRAP
   ========================================================================== */
.mega-badge { font-size: .7rem; background: var(--bs-danger); }
.mega-panel .dropdown-item {
    padding-left: 0;
    padding-right: 0;
    white-space: normal;
}

/* =============================================================================
   9) POSITIONNEMENT : Desktop vs Mobile
   ========================================================================== */

/* Desktop */
@media (min-width: 992px) {
    .menu-div { position: relative; }
    .menu-div .dropdown.position-static > .dropdown-menu.mega-panel {
        position: absolute;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        max-width: none !important;
        width: auto !important;
        transform: none !important;
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        z-index: 1000;
    }
}

/* Mobile */
@media (max-width: 991.98px) {
    .menu-div .dropdown.position-static > .dropdown-menu.mega-panel {
        position: static !important;
        max-width: none !important;
        width: 100% !important;
        transform: none !important;
    }
}

/* MDB compatibility */
.menu-div .dropdown-menu.mega-panel[data-mdb-popper] {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
}

/* =============================================================================
   10) COLONNE DROITE — Ligne verticale décorative
   ========================================================================== */
@media (min-width: 992px) {
    .mega-col-right { position: relative; }
    .mega-col-right::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
        width: 1px;
        background: rgba(0, 0, 0, .08);
    }
}

/* 1. Rendre le LI flexible et centrer le contenu verticalement */
.menu-item-with-separator {
    display: flex;             /* Active Flexbox */
    align-items: center;       /* Centre les éléments enfants (le lien A et le pseudo-élément ::after) verticalement */
    padding-top: 0;            /* Assurez-vous qu'il n'y a pas de padding qui perturbe l'alignement */
    padding-bottom: 0;
}

/* 2. Ajustement du pseudo-élément ::after */
.menu-item-with-separator:not(:last-child)::after {
    content: "|";
    color: #ffffff;
    margin-left: 0.5rem;    /* Espace entre le lien et le séparateur */
    margin-right: 0.5rem;   /* Espace entre le séparateur et le lien suivant */
}

/* Optionnel mais recommandé : Assurer que le lien remplit l'espace */
.menu-item-with-separator .nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
}
