/**
 * Megamenu Styles - Design Figma
 * Le Sourceur
 */

/* ===========================================
   FONTS
   =========================================== */

@font-face {
    font-family: 'Hamurz', serif;
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===========================================
   CACHER LE SOUS-MENU NATIF D'ELEMENTOR
   =========================================== */

/* Cacher les sous-menus natifs pour les items avec megamenu */
.als-has-megamenu > .sub-menu,
.als-has-megamenu > .elementor-nav-menu__container,
.als-has-megamenu .sub-menu,
[data-megamenu-trigger] > .sub-menu,
[data-megamenu-trigger] .sub-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===========================================
   MEGAMENU CONTAINER
   =========================================== */

.als-megamenu {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    max-width: 95vw;
}

.als-megamenu.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===========================================
   RESET COULEUR HOVER SUR LES ITEMS DE MENU
   =========================================== */

/* Quand le megamenu est actif, garder la couleur verte */
.als-has-megamenu.megamenu-active > a,
.als-has-megamenu.megamenu-active > a span,
[data-megamenu-trigger].megamenu-active > a,
[data-megamenu-trigger].megamenu-active > a span {
    color: #91B49E !important;
}

/* Quand le megamenu n'est PAS actif, remettre la couleur normale */
.als-has-megamenu:not(.megamenu-active) > a,
.als-has-megamenu:not(.megamenu-active) > a span,
[data-megamenu-trigger]:not(.megamenu-active) > a,
[data-megamenu-trigger]:not(.megamenu-active) > a span {
    color: inherit !important;
    transition: color 0.2s ease !important;
}

.als-megamenu__inner {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    padding: 50px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   NAVIGATION COLUMNS
   =========================================== */

.als-megamenu__nav {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.als-megamenu__column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
    min-width: 174px;
}

/* ===========================================
   HEADINGS (Niveau 1.5)
   =========================================== */

.als-megamenu__heading {
    font-family: 'Hamurz', serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    color: #382A37;
    text-transform: lowercase;
    text-decoration: none;
    display: block;
}

.als-megamenu__heading--link:hover {
    color: #91B49E;
}

/* ===========================================
   LIST ITEMS (Niveau 3)
   =========================================== */

.als-megamenu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.als-megamenu__item a {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.17;
    color: #382A37;
    text-decoration: none;
    transition: color 0.2s ease;
}

.als-megamenu__item a:hover {
    color: #91B49E;
}

/* Highlight items (ex: "Voir tous les ateliers") */
.als-megamenu__item--highlight a {
    font-weight: 700;
}

/* ===========================================
   PROMOTIONAL CARDS (Image + Link only)
   =========================================== */

.als-megamenu__cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 307px;
    flex-shrink: 0;
}

/* Image cliquable */
.als-megamenu__card-link {
    display: block;
    width: 100%;
    height: 165px;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f5f5f5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.als-megamenu__card-link:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.als-megamenu__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===========================================
   RESPONSIVE - HIDDEN ON TABLET/MOBILE
   =========================================== */

@media (max-width: 1200px) {
    .als-megamenu__inner {
        padding: 40px;
        gap: 30px;
    }

    .als-megamenu__column {
        min-width: 150px;
        padding: 15px;
    }

    .als-megamenu__cards {
        width: 260px;
    }

    .als-megamenu__card-link {
        height: 140px;
    }
}

@media (max-width: 991px) {
    .als-megamenu {
        display: none !important;
    }
}
