@media(max-width:1199px){#main-nav{display:none!important}}

/* Header fixé au défilement : style.css du thème remet un padding de 34px (!important)
   sur les liens du menu, ce qui faisait passer la barre de 61px à 94px. On garde le
   même espacement qu'en haut de page (9px, réglé dans le CSS personnalisé). */
#header_main.header.is-fixed.is-custom #main-nav .menu > li > a {
    padding: 9px 0 !important;
}

/* Sans la barre noire du haut, le header garde la hauteur de la barre blanche
   (61px ordinateur, 64px mobile) au lieu du min-height de 94px du thème.
   « body » : main-nav.css est chargé avant style.css, à sélecteur égal il perdrait. */
body .header-wrapper,
#header_main.header {
    min-height: 0;
}

/* ================================================================
   Header mobile / tablette (< 1200px) : barre compacte de 64px,
   logo lisible, icônes alignées dans des zones tactiles de 40px
   ================================================================ */
@media (max-width: 1199px) {
    #header_main.header {
        min-height: 0;
        border-bottom: 1px solid #eef0ef;
    }

    #header_main.header.is-fixed {
        border-bottom-color: transparent;
    }

    #header_main .header-container-fluid {
        padding: 0 16px;
    }

    #header_main #site-header-inner {
        min-height: 64px;
        padding: 0;
        gap: 12px;
    }

    #header_main .logo a {
        display: flex;
        align-items: center;
    }

    #header_main .logo img {
        width: auto;
        height: 34px;
        max-height: none;
    }

    #header_main .header-right {
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 2px;
    }

    /* Marge de 50px du thème prévue pour l'ancien hamburger en position absolue */
    #header_main .header-actions {
        gap: 2px;
        margin-left: 0;
        margin-right: 0;
    }

    #header_main .header-action-btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 10px;
        color: #1c1c1c;
    }

    #header_main .header-action-btn:active {
        background: #f2f4f3;
    }

    #header_main .header-action-btn svg {
        width: 22px;
        height: 22px;
    }

    /* Pastille : petite, lisible, et masquée quand il n'y a rien */
    #header_main .header-action-btn.header-action-icon::after {
        top: 3px;
        right: 1px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border: 2px solid #fff;
        background: var(--primary-color, #98bc2a);
        color: #0b0b1c;
        font-size: 10px;
        font-weight: 700;
    }

    #header_main .header-action-btn.header-action-icon[data-badge="0"]::after,
    #header_main .header-action-btn.header-action-icon[data-badge=""]::after {
        display: none;
    }

    /* Menu hamburger : traits fins et noirs, comme les autres icônes */
    #header_main .mobile-button {
        position: relative;
        top: auto;
        right: auto;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        transform: none;
    }

    #header_main .mobile-button span,
    #header_main .mobile-button::before,
    #header_main .mobile-button::after {
        left: 10px;
        width: 20px;
        height: 2px;
        margin-top: -1px;
        border-radius: 2px;
        background-color: #1c1c1c;
    }

    #header_main .mobile-button::before {
        transform: translate3d(0, -6px, 0);
    }

    #header_main .mobile-button::after {
        transform: translate3d(0, 6px, 0);
    }

    /* Menu ouvert : croix verte, visible sur le fond sombre du panneau */
    #header_main .mobile-button.active::before,
    #header_main .mobile-button.active::after {
        background-color: var(--primary-color, #98bc2a);
    }

    #header_main .mobile-button.active::before {
        transform: rotate(45deg);
    }

    #header_main .mobile-button.active::after {
        transform: rotate(-45deg);
    }
}

/* Petits téléphones (≤ 374px) : logo un peu réduit pour garder les 4 icônes */
@media (max-width: 374px) {
    #header_main .logo img {
        height: 28px;
    }
}
