li.mmfw-nav__item:hover > .mmfw-nav__link { color: var(--e-global-color-primary) !important; }

/* Mega Menu for WordPress — Front CSS v2.5 */

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

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

li.mmfw-nav__item {
    position: relative;
    list-style: none;
}
li.mmfw-nav__item.is-mega {
    position: static;
}

/* ------------------------------------------------------------------ */
/* Lien principal                                                      */
/* ------------------------------------------------------------------ */
.mmfw-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;
}
li.mmfw-nav__item:hover > .mmfw-nav__link { color: var(--e-global-color-primary) !important; cursor: pointer; }

.mmfw-arrow {
    width: 10px; height: 6px;
    transition: transform 0.2s;
    flex-shrink: 0;
    cursor: pointer;
}
.mmfw-nav__item.is-open > .mmfw-nav__link .mmfw-arrow,
.mmfw-nav__item.has-children:hover > .mmfw-nav__link .mmfw-arrow {
    transform: rotate(180deg);
}

/* ------------------------------------------------------------------ */
/* Dropdown simple                                                     */
/* ------------------------------------------------------------------ */
div.mmfw-dropdown {
    display: none;
    position: absolute;
    top: 100%;           /* ← était calc(100% + 4px) */
    left: 0;
    padding-top: 4px;    /* ← le gap devient du padding (toujours hoverable) */
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 4px 6px 6px;
    min-width: 200px;
    list-style: none;
    margin: 0;
    z-index: 9999;
}

li.mmfw-nav__item.is-open > div.mmfw-dropdown { display: block; }
ul.mmfw-dropdown__wrap {
    list-style: none;
    margin: 0;
    padding: 0;
}

li.mmfw-dropdown__item { position: relative; list-style: none; padding-left: 0; margin-left: 0; }
li.mmfw-dropdown__item > a {
    display: block; padding: 9px 12px;
    font-size: 13px; color: #374151;
    text-decoration: none; border-radius: 5px;
    transition: background 0.12s;
}
li.mmfw-dropdown__item > a:hover { color: var(--e-global-color-primary) !important; }

/* Sous-dropdown */
ul.mmfw-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;
}
li.mmfw-dropdown__item.has-sub:hover > ul.mmfw-dropdown__sub { display: block; }
ul.mmfw-dropdown__sub li { list-style: none; padding-left: 0; margin-left: 0; }
ul.mmfw-dropdown__sub a {
    display: block; padding: 8px 12px;
    font-size: 13px; color: #374151;
    text-decoration: none; border-radius: 5px;
}
.mmfw-dropdown__sub a:hover { color: var(--e-global-color-primary) !important; }

/* ------------------------------------------------------------------ */
/* Mega menu                                                           */
/* ------------------------------------------------------------------ */
.mmfw-mega {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;           /* ← était calc(100% + 4px) */
    padding-top: 4px;    /* ← idem */
    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;
}
.mmfw-nav__item.is-open > .mmfw-mega { display: block; }

.mmfw-nav__item.has-children:hover > .mmfw-dropdown,
.mmfw-nav__item.has-children:hover > .mmfw-mega {
    display: block;
}

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

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

.mmfw-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;
}
.mmfw-mega__col-title:hover { color: #6b7280; }

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

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

/* ---- Liens dans le groupe ---- */
.mmfw-mega__links {
    list-style: none; padding: 0; margin: 0;
}
.mmfw-mega__links li { list-style: none; margin-bottom: 2px; }
.mmfw-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;
}
.mmfw-mega__links a::before {
    content: '';
    display: inline-block; width: 4px; height: 4px;
    border-radius: 50%; background: #d1d5db;
    flex-shrink: 0; transition: background 0.12s;
}
.mmfw-mega__links a:hover { color: #111827; }
.mmfw-mega__links a:hover::before { background: #2c2c2c; }

/* ------------------------------------------------------------------ */
/* Barre de recherche                                                  */
/* ------------------------------------------------------------------ */
li.mmfw-nav__search-item {
    display: none; /* masqué au-delà de 1200px */
}

.mmfw-search__form {
    display: flex;
    align-items: stretch;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.mmfw-search__input {
    border: 1px solid #cdcdcd;
    border-right: none;
    border-radius: 30px 0 0 30px;
    background: #fff;
    padding: 9px 16px;
    font-size: 14px;
    color: #515962;
    outline: none;
    width: 200px;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s;
}
.mmfw-search__input::placeholder { color: #9ca3af; }
.mmfw-search__input:focus { border-color: #aaa; }
.mmfw-search__input::-webkit-search-cancel-button { display: none; }

.mmfw-search__submit {
    background: #2f8d3a;
    border-radius: 0 30px 30px 0;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    line-height: 0;
    transition: background 0.15s;
    user-select: none;
    flex-shrink: 0;
}
.mmfw-search__submit:hover { background: #267a2f; }
.mmfw-search__submit svg { width: 14px; height: 14px; fill: currentColor; }

/* ------------------------------------------------------------------ */
/* Burger — caché par défaut (visible via responsive.css)             */
/* ------------------------------------------------------------------ */
.mmfw-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;
}
.mmfw-burger span {
    display: block; width: 24px; height: 2px;
    background: currentColor; border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.mmfw-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mmfw-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mmfw-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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