/* ============================================
   MEGA MENU VOYAGE - CSS COMPLET
   ============================================ */

/* --- Cacher le sous-menu natif Divi sur les items mm --- */
.mm-nav-item > ul.sub-menu {
    display: none !important;
}

/* --- Positionnement du li parent --- */
.mm-nav-item {
    position: static !important;
}

/* --- Le panneau mega menu --- */
.mm-panel {
    display: none;
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 99999;
    border-top: 3px solid #e74c3c;
    margin-top: 0 !important;
    padding-top: 0;
    flex-direction: row;
    min-height: 400px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Ouverture du panneau --- */
.mm-nav-item.mm-open > .mm-panel {
    display: flex !important;
}


/* --- Colonne catégories (gauche) --- */
.mm-categories-col {
    width: 240px;
    min-width: 240px;
    border-right: 1px solid #eeeeee;
    padding: 20px 0;
    overflow-y: auto;
    max-height: 600px;
}

.mm-categories-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mm-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    margin: 0 !important;
}

.mm-cat-item:hover,
.mm-cat-item.is-active {
    background: #f8f8f8;
    border-left-color: #e74c3c;
}

.mm-cat-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #333333;
    flex: 1;
}

.mm-cat-item:hover .mm-cat-name,
.mm-cat-item.is-active .mm-cat-name {
    color: #e74c3c;
}

.mm-cat-see-all {
    color: #999;
    font-size: 14px;
    text-decoration: none;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.mm-cat-item:hover .mm-cat-see-all,
.mm-cat-item.is-active .mm-cat-see-all {
    opacity: 1;
}

/* --- Colonne articles (droite) --- */
.mm-posts-col {
    flex: 1;
    padding: 25px 30px;
    position: relative;
}

/* --- Grille articles --- */
.mm-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* --- Carte article --- */
.mm-post-card {
    text-decoration: none !important;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.mm-post-card:hover {
    transform: translateY(-3px);
}

.mm-post-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
}

.mm-post-thumb-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #ccc;
    font-size: 30px;
}

.mm-post-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

.mm-post-card:hover .mm-post-title {
    color: #e74c3c;
}

/* --- Loading spinner --- */
.mm-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #e74c3c;
    border-radius: 50%;
    animation: mm-spin 0.8s linear infinite;
}

@keyframes mm-spin {
    to { transform: rotate(360deg); }
}

/* --- Flèche du trigger --- */
.mm-arrow {
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.2s;
}

.mm-nav-item.mm-open > a .mm-arrow {
    transform: rotate(180deg);
}

/* --- Responsive : cacher sur mobile --- */
@media (max-width: 980px) {
    .mm-panel {
        display: none !important;
    }
    .mm-nav-item > ul.sub-menu {
        display: block !important;
    }
}
