/**
 * Disposeo Header Menu Widget Styles
 * Desktop Only
 */

/* ==========================================
   BASE STYLES
   ========================================== */

.disposeo-header-menu {
    display: flex;
    align-items: center;
    gap: 40px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ==========================================
   MENU ITEM BASE
   ========================================== */

.disposeo-header-menu .menu-item {
    position: relative;
}

.disposeo-header-menu .menu-item-link,
.disposeo-header-menu .menu-item-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.disposeo-header-menu .menu-item-label {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
}

/* ==========================================
   CHEVRON ICON
   ========================================== */

.disposeo-header-menu .menu-chevron {
    width: 12px;
    height: 6px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.disposeo-header-menu .menu-chevron path {
    stroke: #E75A0D;
    transition: stroke 0.2s ease;
}

.disposeo-header-menu .menu-item.is-open .menu-chevron {
    transform: rotate(180deg);
}

/* ==========================================
   HOVER STATES
   ========================================== */

.disposeo-header-menu .menu-item:hover .menu-item-label,
.disposeo-header-menu .menu-item.is-open .menu-item-label {
    color: #E75A0D;
}

.disposeo-header-menu .menu-item:hover .menu-chevron path,
.disposeo-header-menu .menu-item.is-open .menu-chevron path {
    stroke: #E75A0D;
}

/* ==========================================
   DROPDOWN CONTENT (Classic Dropdown)
   ========================================== */

.disposeo-header-menu .disposeo-dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 35px;
    padding: 16px;
    background-color: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);

    /* Smooth transition */
    transition: opacity var(--menu-animation-duration, 200ms) ease,
                transform var(--menu-animation-duration, 200ms) ease;

    z-index: 1000;
    pointer-events: none;
}

/* Show dropdown when open */
.disposeo-header-menu .menu-item.is-open .disposeo-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Dropdown List */
.disposeo-header-menu .dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

/* Dropdown Link Item */
.disposeo-header-menu .dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 16px 24px;
    border-radius: 8px;
    color: #140003;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.disposeo-header-menu .dropdown-link:hover {
    background-color: #F9F5F1;
    color: #E75A0D;
}

.disposeo-header-menu .dropdown-link-label {
    flex-shrink: 0;
}

/* Dropdown Link Arrow */
.disposeo-header-menu .dropdown-link-arrow {
    width: 26px;
    height: 15px;
    color: #E75A0D;
    flex-shrink: 0;
    opacity: 0;
    transition: all 0.2s ease;
}

.disposeo-header-menu .dropdown-link:hover .dropdown-link-arrow {
    transform: translateX(6px);
    opacity: 1;
}

/* ==========================================
   MEGA MENU CONTENT
   ========================================== */

.disposeo-header-menu .disposeo-mega-menu-content {
    position: absolute;
    top: 100%;
    left: 50%;
    min-width: 400px;
    margin-top: 35px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);

    /* Smooth transition */
    transition: opacity var(--menu-animation-duration, 200ms) ease,
                transform var(--menu-animation-duration, 200ms) ease;

    z-index: 1000;
    pointer-events: none;
}

/* Show mega menu when open */
.disposeo-header-menu .menu-item.is-open .disposeo-mega-menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Mega Menu Placeholder */
.disposeo-header-menu .mega-menu-placeholder {
    color: #6C6C6C;
    font-style: italic;
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* ==========================================
   ELEMENTOR TEMPLATE CONTENT RESET
   ========================================== */

.disposeo-header-menu .disposeo-mega-menu-content > .elementor {
    width: 100%;
}

.disposeo-header-menu .disposeo-mega-menu-content .elementor-section-wrap > .elementor-section,
.disposeo-header-menu .disposeo-mega-menu-content > .elementor > .elementor-section,
.disposeo-header-menu .disposeo-mega-menu-content .e-con {
    padding: 0;
    margin: 0;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.disposeo-header-menu .menu-item-trigger:focus,
.disposeo-header-menu .menu-item-link:focus {
    outline: 2px solid #E75A0D;
    outline-offset: 2px;
}

.disposeo-header-menu .menu-item-trigger:focus:not(:focus-visible),
.disposeo-header-menu .menu-item-link:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================
   ELEMENTOR EDITOR STYLES
   ========================================== */

.elementor-editor-active .disposeo-header-menu .disposeo-dropdown-content,
.elementor-editor-active .disposeo-header-menu .disposeo-mega-menu-content {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 10px;
    display: none;
    pointer-events: auto;
}

.elementor-editor-active .disposeo-header-menu .menu-item.has-submenu:first-child .disposeo-dropdown-content,
.elementor-editor-active .disposeo-header-menu .menu-item.has-submenu:first-child .disposeo-mega-menu-content {
    display: block;
}

/* ==========================================
   MOBILE STYLES
   ========================================== */

/* ==========================================
   WRAPPER
   ========================================== */

.disposeo-header-menu-wrapper {
    display: flex;
    align-items: center;
}

/* ==========================================
   MOBILE BURGER BUTTON
   ========================================== */

.mobile-menu-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #66000E !important;
    background: rgba(249, 245, 241, 0.75) !important;
}

.mobile-menu-burger:hover {
    color: #66000E;
    background: rgba(249, 245, 241, 0.75);
}

.mobile-menu-burger-icon {
    width: 24px;
    height: 18px;
}

.mobile-menu-burger .mobile-menu-close-icon {
    display: none;
    width: 20px;
    height: 20px;
}

.mobile-menu-burger.is-active .mobile-menu-burger-icon {
    display: none;
}

.mobile-menu-burger.is-active .mobile-menu-close-icon {
    display: block;
}

/* ==========================================
   MOBILE OVERLAY
   ========================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #F9F5F1;
    z-index: 99999;
    overflow: hidden;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   MOBILE PANELS CONTAINER
   ========================================== */

.mobile-menu-panels {
    position: relative;
    width: 100%;
    height: calc(100% - 160px); /* Espace pour le CTA fixe en bas */
    overflow: hidden;
}

/* ==========================================
   MOBILE PANEL
   ========================================== */

.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: inherit;
    display: flex;
    flex-direction: column;

    /* Hidden to the right by default */
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-panel.is-main {
    transform: translateX(0);
}

.mobile-menu-panel.is-active {
    transform: translateX(0);
}

.mobile-menu-panel.is-hidden-left {
    transform: translateX(-100%);
}

/* ==========================================
   MOBILE PANEL HEADER
   ========================================== */

.mobile-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 24px 32px;
    border-bottom: 1px solid #F9F5F1;
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #66000E;
}

.mobile-menu-close-icon {
    width: 20px;
    height: 20px;
}

.mobile-panel-back {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #E75A0D;
}

.mobile-panel-back:hover {
    background: inherit;
}

.mobile-panel-back-icon {
    width: 13px;
    height: 16px;
}

.mobile-panel-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #140003;
    line-height: normal;
}

/* ==========================================
   MOBILE MENU ITEMS
   ========================================== */

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 24px;
    list-style: none;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #140003;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    width: 100%;
    transition: color 0.2s ease;
}

.mobile-menu-item:hover {
    color: #E75A0D;
    background: inherit;
}

.mobile-menu-item-label {
    flex-grow: 1;
}

.mobile-menu-country-flags {
    display: inline-flex;
    gap: 6px;
    vertical-align: sub;
    margin-left: 8px;
}
.mobile-menu-country-flags svg {
    width: 18px;
    height: 18px;
}

.mobile-menu-item-arrow {
    width: 13px;
    height: 16px;
    color: #E75A0D;
    flex-shrink: 0;
}

/* Sub-items don't have arrows */
.mobile-menu-subitem .mobile-menu-item-arrow {
    display: none;
}

/* ==========================================
   MOBILE CTA CARD
   ========================================== */

.mobile-menu-cta {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: #FFFFFF;
    border-radius: 20px;
    border: 1px solid rgba(231, 90, 13, 0.20);
    overflow: hidden;
    z-index: 10;
}

.mobile-menu-cta-image-wrapper {
    z-index: 1;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mobile-menu-cta-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-menu-cta-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    flex-grow: 1;
    max-width: 223px;
}

.mobile-menu-cta-title {
    color: #66000E;
    font-family: "all-round-gothic", Sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.mobile-menu-cta-description {
    color: #140003;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px; /* 138.462% */

    margin-bottom: 8px;
}

.mobile-menu-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    background-color: #E75A0D;
    border-radius: 8px;
    color: #FFFFFF !important;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
    width: fit-content;
}

.mobile-menu-cta-button:hover {
    background-color: #D14D06;
}

.mobile-menu-cta-arrow {
    width: 10px;
    height: 10px;
}

/* ==========================================
   RESPONSIVE BREAKPOINT
   ========================================== */

@media (max-width: 1024px) {
    .disposeo-header-menu {
        display: none;
    }

    .mobile-menu-burger {
        display: flex;
    }
}

/* Hide mobile elements on desktop */
@media (min-width: 1025px) {
    .mobile-menu-overlay {
        display: none !important;
    }

    .mobile-menu-burger {
        display: none !important;
    }
}

/* ==========================================
   ELEMENTOR EDITOR - MOBILE
   ========================================== */

.elementor-editor-active .mobile-menu-overlay {
    display: none;
}

.elementor-editor-active .mobile-menu-burger {
    display: none;
}
