/* Mega Menu horizontal */
.mega-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    font-family: Arial, sans-serif;
    font-weight: 500;
}

/* Items avec pipe via border-left */
.mega-menu > li.menu-item {
    position: relative;
    padding: 0 12px; /* espace autour du texte */
    border-left: 1px solid rgba(0,0,0,0.15); /* pipe subtil */
}

/* Supprimer la bordure du premier item */
.mega-menu > li.menu-item:first-child {
    border-left: none;
}

.mega-menu > li.menu-item > a {
    display: block;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    transition: color 0.25s ease, border-bottom 0.25s ease;
    border-bottom: 2px solid transparent;
}

.mega-menu > li.menu-item > a:hover {
    color: #0073e6;
    border-bottom: 2px solid #0073e6;
}

/* Dropdown */
.mega-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    background: #fff;
    padding: 10px 0;
    min-width: 200px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
}

.mega-menu li.menu-item:hover > .submenu {
    display: block;
}

.mega-menu .submenu li.submenu-item > a {
    display: block;
    padding: 6px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.mega-menu .submenu li.submenu-item > a:hover {
    background: rgba(0, 115, 230, 0.05);
}

/* Responsive mobile */
@media (max-width: 768px) {
    .mega-menu {
        flex-direction: column;
    }
    .mega-menu > li.menu-item {
        border-left: none; /* supprimer pipe sur mobile */
        padding: 0;
    }
    .mega-menu .submenu {
        position: relative;
        top: 0;
        left: 0;
        box-shadow: none;
    }
}