
@charset "utf-8";

/* ==========================================================
   MEGA MENU MAFA ASSURANCES
   Identité : bleu #003388 / rouge #e84444
   Police : Poppins
========================================================== */


/* ==========================================================
   1. STRUCTURE GÉNÉRALE
========================================================== */

.mafa-mega-shell {
    position: relative;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    font-family: "Poppins", sans-serif;
    background: #ffffff;
    z-index: 1000;
}

.mafa-mega-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    min-height: 100px;
    margin: 0 auto;
    padding: 10px 35px;
    gap: 25px;
    position: relative;
    background: #ffffff;
}


/* ==========================================================
   2. LOGO MAFA
   Neutralisation des anciens styles du template
========================================================== */

.navigation .mafa-mega-navbar .navbar-brand {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    width: 130px;
    height: auto;
    min-width: 110px;
    flex: 0 0 130px;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    z-index: 2;
}

.navigation .mafa-mega-navbar .navbar-brand img {
    display: block;
    position: static;
    top: auto;
    transform: none;
    width: 100%;
    height: auto;
    max-height: 55px;
    object-fit: contain;
}


/* ==========================================================
   3. NAVIGATION PRINCIPALE
========================================================== */

.mafa-mega-navlinks {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.mafa-mega-navlinks > li {
    display: block;
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.mafa-mega-navlinks > li::before,
.mafa-mega-navlinks > li::marker {
    display: none !important;
    content: none !important;
}


/* ==========================================================
   4. BOUTONS DES TROIS PILIERS
========================================================== */

.mafa-mega-navlinks .mafa-mega-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 10px;

    border: 0;
    background: transparent;

    color: #003388 !important;
    font-family: "Poppins", sans-serif;
    font-size: 15px !important;
    font-weight: 600;
    line-height: 1.5;

    /* Respecte la casse du HTML */
    text-transform: none !important;

    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mafa-mega-navlinks .mafa-mega-trigger:hover,
.mafa-mega-navlinks .mafa-mega-trigger:focus,
.mafa-mega-navlinks .mafa-mega-trigger.is-open {
    color: #e84444 !important;
    outline: none;
}


/* Flèche des menus */

.mafa-mega-chevron {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;

    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;

    transform: rotate(45deg);
    margin-top: -4px;

    transition: transform 0.2s ease;
}

.mafa-mega-trigger.is-open .mafa-mega-chevron {
    transform: rotate(225deg);
    margin-top: 4px;
}


/* ==========================================================
   5. ACTIONS À DROITE : RECHERCHE, CONTACT, DEVIS
========================================================== */

.mafa-mega-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 18px;
    margin: 0;
    padding: 0;
}


/* Icônes */

.mafa-action-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 36px;

    color: #003388;
    font-size: 21px;
    text-decoration: none !important;

    transition: color 0.2s ease;
}

.mafa-action-icon:hover,
.mafa-action-icon:focus {
    color: #e84444;
    text-decoration: none !important;
}


/* Icône Contact : ti-layers ou ti-email */

.mafa-contact-icon {
    width: 36px;
    height: 36px;
    font-size: 23px;
    color: #003388;
}

.mafa-contact-icon:hover,
.mafa-contact-icon:focus {
    color: #e84444;
}


/* Bouton Demande de devis */

.mafa-mega-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 20px;

    border: 1px solid #003388;
    border-radius: 8px;

    background: transparent;
    color: #003388 !important;

    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;

    /* Respecte la casse du texte HTML */
    text-transform: none !important;

    text-decoration: none !important;
    white-space: nowrap;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.mafa-mega-cta:hover,
.mafa-mega-cta:focus {
    background: #003388;
    border-color: #003388;
    color: #ffffff !important;
    text-decoration: none !important;
}


/* ==========================================================
   6. PANNEAU DU MÉGA MENU
========================================================== */

.mafa-mega-panel {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;

    width: 100%;

    background: #f3f5f8;
    border-top: 1px solid #e1e5eb;

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);

    z-index: 1050;

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.mafa-mega-panel.is-open {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* Contenu intérieur */

.mafa-mega-panel-inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px 35px 36px;
    background: #f3f5f8;
}


/* ==========================================================
   7. COLONNES DES CATÉGORIES
========================================================== */

.mafa-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 35px;
    width: 100%;
}

.mafa-mega-column {
    min-width: 0;
    text-align: left;
    background: transparent;
}


/* ==========================================================
   8. TITRES DES CATÉGORIES
========================================================== */

.mafa-mega-heading {
    position: relative;
    display: block;

    margin: 0 0 17px;
    padding: 0 0 11px;

    color: #003388;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;

    text-transform: uppercase;
}

.mafa-mega-heading::after {
    content: "";
    display: block;

    position: absolute;
    bottom: 0;
    left: 0;

    width: 55px;
    height: 2px;

    background: #003388;
}


/* ==========================================================
   9. LISTES DES PRODUITS
========================================================== */

.mafa-mega-links,
.mafa-mega-links ul {
    display: block;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mafa-mega-links li {
    display: block;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mafa-mega-links li::before,
.mafa-mega-links li::marker {
    display: none !important;
    content: none !important;
}


/* Liens produits */

.mafa-mega-links .mafa-mega-link {
    display: block;

    padding: 6px 0;

    color: #466aa6;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;

    text-transform: none !important;
    text-decoration: none !important;

    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}

.mafa-mega-links .mafa-mega-link:hover,
.mafa-mega-links .mafa-mega-link:focus {
    color: #e84444;
    padding-left: 5px;
    text-decoration: none !important;
}


/* Liens sans URL */

.mafa-mega-link-disabled {
    cursor: default;
    opacity: 0.65;
}

.mafa-mega-link-disabled:hover {
    padding-left: 0 !important;
}


/* ==========================================================
   10. BOUTON HAMBURGER
========================================================== */

.mafa-mega-toggle {
    display: none;

    width: 42px;
    height: 42px;
    padding: 9px;

    border: 1px solid #003388;
    border-radius: 3px;

    background: #ffffff;
    cursor: pointer;
}

.mafa-mega-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;

    background: #003388;

    transition: all 0.2s ease;
}

.mafa-mega-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mafa-mega-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.mafa-mega-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================
   11. ÉCRANS MOYENS ET PETITES TABLETTES
========================================================== */

@media (min-width: 992px) and (max-width: 1199px) {

    .mafa-mega-navbar {
        padding-left: 20px;
        padding-right: 20px;
        gap: 12px;
    }

    .navigation .mafa-mega-navbar .navbar-brand {
        width: 140px;
        min-width: 125px;
        flex-basis: 140px;
    }

    .mafa-mega-navlinks {
        gap: 5px;
    }

    .mafa-mega-navlinks .mafa-mega-trigger {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 13px !important;
    }

    .mafa-mega-actions {
        gap: 10px;
    }

    .mafa-mega-cta {
        padding: 10px 12px;
        font-size: 12px;
    }

    .mafa-mega-grid {
        gap: 25px;
    }

}


/* ==========================================================
   12. TABLETTES ET MOBILES
========================================================== */

@media (max-width: 991px) {

    .mafa-mega-navbar {
        min-height: 85px;
        flex-wrap: wrap;
        padding: 10px 20px;
        gap: 10px;
    }

    .navigation .mafa-mega-navbar .navbar-brand {
        width: 145px;
        min-width: 130px;
        flex-basis: 145px;
    }

    .mafa-mega-toggle {
        display: block;
        margin-left: auto;
    }

    /* Navigation repliée */

    .mafa-mega-navlinks {
        display: none;
        flex-direction: column;
        align-items: stretch;

        width: 100%;
        flex: 0 0 100%;

        padding: 10px 0;
        margin: 5px 0 0;

        background: #ffffff;
        border-top: 1px solid #eeeeee;
        gap: 0;
    }

    .mafa-mega-navlinks.is-mobile-open {
        display: flex;
    }

    .mafa-mega-navlinks > li {
        width: 100%;
    }

    .mafa-mega-navlinks .mafa-mega-trigger {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 13px 15px;
        font-size: 14px !important;
        text-align: left;
    }

    /* Actions */

    .mafa-mega-actions {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        gap: 14px;
    }

    .mafa-mega-cta {
        padding: 9px 13px;
        font-size: 12px;
    }

    /* Panneau intégré dans le flux mobile */

    .mafa-mega-panel {
        position: static;
        width: 100%;

        border-top: 1px solid #e1e5eb;
        box-shadow: none;

        transform: none;
        background: #f3f5f8;
    }

    .mafa-mega-panel.is-open {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .mafa-mega-panel-inner {
        padding: 22px 20px 25px;
    }

    .mafa-mega-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mafa-mega-heading {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .mafa-mega-link {
        padding: 7px 0;
        font-size: 13px;
    }

}


/* ==========================================================
   13. PETITS MOBILES
========================================================== */

@media (max-width: 480px) {

    .mafa-mega-navbar {
        padding: 8px 15px;
    }

    .navigation .mafa-mega-navbar .navbar-brand {
        width: 130px;
        min-width: 115px;
        flex-basis: 130px;
    }

    .mafa-mega-actions {
        gap: 10px;
    }

    .mafa-action-icon {
        width: 27px;
        font-size: 19px;
    }

    .mafa-contact-icon {
        width: 30px;
        font-size: 21px;
    }

    .mafa-mega-cta {
        padding: 8px 10px;
        font-size: 11px;
    }

    .mafa-mega-panel-inner {
        padding: 18px 15px 22px;
    }

    .mafa-mega-grid {
        gap: 20px;
    }

    .mafa-mega-heading {
        font-size: 12px;
    }

    .mafa-mega-links .mafa-mega-link {
        font-size: 12px;
    }

}



/* ==========================================================
   HEADER MAFA TRANSPARENT SUR LA VIDÉO D'ACCUEIL
========================================================== */

header.mafa-home-video-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
}

/* Navigation transparente */

header.mafa-home-video-header .navigation,
header.mafa-home-video-header .mafa-mega-shell,
header.mafa-home-video-header .mafa-mega-navbar {
    background: transparent !important;
    box-shadow: none !important;
}

/* Rubriques en blanc */

header.mafa-home-video-header .mafa-mega-trigger {
    color: #ffffff !important;
}

/* Icône contact */

header.mafa-home-video-header .mafa-action-icon {
    color: #ffffff !important;
}

/* Bouton Demander un devis */

header.mafa-home-video-header .mafa-mega-cta {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background: transparent !important;
}

header.mafa-home-video-header .mafa-mega-cta:hover {
    color: #003388 !important;
    background: #ffffff !important;
}

/* Flèches */

header.mafa-home-video-header .mafa-mega-chevron {
    border-color: #ffffff;
}

/* Hamburger mobile */

header.mafa-home-video-header .mafa-mega-toggle {
    background: transparent !important;
    border-color: #ffffff !important;
}

header.mafa-home-video-header .mafa-mega-toggle span {
    background: #ffffff !important;
}

/* Le panneau du méga-menu conserve son fond clair */

header.mafa-home-video-header .mafa-mega-panel,
header.mafa-home-video-header .mafa-mega-panel-inner {
    background: #f3f5f8;
}

/* Navigation mobile */

@media (max-width: 991px) {

    header.mafa-home-video-header .mafa-mega-navlinks {
        background: #ffffff !important;
    }

    header.mafa-home-video-header .mafa-mega-trigger {
        color: #003388 !important;
    }

    header.mafa-home-video-header .mafa-mega-chevron {
        border-color: #003388;
    }
}



/* =====================================================
   MAFA - GESTION DES COULEURS DU MEGA MENU
===================================================== */

/* Bandeau blanc lorsqu'un pilier est ouvert */
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-shell {
    background: #ffffff !important;
    transition: background 0.25s ease;
}

header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-navbar {
    background: #ffffff !important;
}

/* Piliers : bleu par défaut */
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-trigger {
    color: #003388 !important;
}

/* Piliers : rouge au survol et à l'ouverture */
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-trigger:hover,
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-trigger:focus,
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-trigger.is-open {
    color: #e84444 !important;
}

/* Chevron : suit la couleur du pilier */
header.mafa-home-video-header .mafa-mega-chevron {
    border-color: currentColor !important;
}

/* Contact */
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-actions .mafa-action-icon {
    color: #003388 !important;
}

header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-actions .mafa-action-icon:hover {
    color: #e84444 !important;
}

/* Bouton devis */
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-actions .mafa-mega-cta {
    color: #003388 !important;
    border-color: #003388 !important;
    background: transparent !important;
}

header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-actions .mafa-mega-cta:hover {
    color: #ffffff !important;
    background: #003388 !important;
    border-color: #003388 !important;
}

/* Panneau déroulant */
header.mafa-home-video-header .mafa-mega-panel,
header.mafa-home-video-header .mafa-mega-panel-inner {
    background: #f3f5f8;
}


/* =====================================================
   MAFA - MOBILE ET TABLETTE VERTICALE
   LOGO + HAMBURGER
===================================================== */

@media (max-width: 991px) {

    /* Organisation de la barre */
    header.mafa-home-video-header .mafa-mega-navbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    /* Logo à gauche */
    header.mafa-home-video-header .navbar-brand {
        order: 1;
        margin-right: auto;
    }

    /* Hamburger à droite */
    header.mafa-home-video-header .mafa-mega-toggle {
        order: 2;
        display: block;
        margin-left: 0;
        flex: 0 0 42px;
    }

    /* Trois piliers sous la première ligne */
    header.mafa-home-video-header .mafa-mega-navlinks {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
    }

    /* Actions masquées lorsque le hamburger est fermé */
    header.mafa-home-video-header .mafa-mega-actions {
        display: none !important;
    }


    /* =================================================
       HAMBURGER OUVERT : BANDEAU BLANC
    ================================================= */

    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-shell,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-shell,

    header.mafa-home-video-header:has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-shell,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-navbar,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-navbar,

    header.mafa-home-video-header:has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-navbar,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open
    ) .navigation,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .navigation,

    header.mafa-home-video-header:has(
        .mafa-mega-navlinks.is-mobile-open
    ) .navigation {

        background: #ffffff !important;
    }

    /* Hamburger bleu sur fond blanc */
    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-toggle,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-toggle,

    header.mafa-home-video-header:has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-toggle {

        background: #ffffff !important;
        border-color: #003388 !important;
    }

    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-toggle span,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-toggle span,

    header.mafa-home-video-header:has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-toggle span {

        background: #003388 !important;
    }

    /* Piliers bleus dans le menu mobile */
    header.mafa-home-video-header .mafa-mega-navlinks .mafa-mega-trigger {
        color: #003388 !important;
    }

    /* Actions visibles sous les trois piliers
       dès que le hamburger est ouvert */
    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-actions,

    header.mafa-home-video-header:has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-actions,

    header.mafa-home-video-header:has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-actions {

        display: flex !important;
        order: 4;

        position: static !important;

        width: 100%;
        flex: 0 0 100%;

        align-items: center;
        justify-content: center;

        margin: 10px 0 15px !important;
        padding: 15px 0 5px;

        gap: 20px;

        background: #ffffff;
        border-top: 1px solid #eeeeee;
    }

    /* Contact et devis en bleu */
    header.mafa-home-video-header .mafa-mega-actions .mafa-action-icon {
        color: #003388 !important;
    }

    header.mafa-home-video-header .mafa-mega-actions .mafa-mega-cta {
        color: #003388 !important;
        border-color: #003388 !important;
        background: transparent !important;
    }
}


/* =====================================================
   MAFA - PETITS MOBILES
===================================================== */

@media (max-width: 480px) {

    header.mafa-home-video-header .mafa-mega-navbar {
        padding: 8px 15px;
    }

    header.mafa-home-video-header .navbar-brand {
        width: 130px;
        min-width: 115px;
        flex-basis: 130px;
    }

    header.mafa-home-video-header .mafa-mega-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
}




/* =====================================================
   MAFA - MEGA MENU SUPERPOSE A UNE IMAGE
   Uniquement pour la page portant .mafa-page-image-header
===================================================== */

/* Header superposé à l'image */
header:has(+ .mafa-page-image-header) {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
}

/* Suppression des fonds du header */
header:has(+ .mafa-page-image-header) .navigation,
header:has(+ .mafa-page-image-header) .navigation > .container,
header:has(+ .mafa-page-image-header) .mafa-mega-shell,
header:has(+ .mafa-page-image-header) .mafa-mega-navbar {
    background: transparent !important;
}

/* Image : léger film bleu nuit */
.mafa-page-image-header {
    
    background-color: transparent;
    position: relative;
}
/* Même film bleu nuit que la vidéo d'accueil */
.mafa-page-image-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 29, 46, 0.23);
    z-index: 0;
    pointer-events: none;
}

/* Le contenu de l'image reste au-dessus du film */
.mafa-page-image-header > .container {
    position: relative;
    z-index: 1;
}

/* Menu fermé : éléments blancs sur l'image */
header:has(+ .mafa-page-image-header) .mafa-mega-trigger {
    color: #fff !important;
}

header:has(+ .mafa-page-image-header) .mafa-mega-chevron {
    border-color: currentColor !important;
}

header:has(+ .mafa-page-image-header) .mafa-action-icon {
    color: #fff !important;
}

header:has(+ .mafa-page-image-header) .mafa-mega-cta {
    color: #fff !important;
    border-color: #fff !important;
}

/* Survol des piliers */
header:has(+ .mafa-page-image-header)
.mafa-mega-trigger:hover,
header:has(+ .mafa-page-image-header)
.mafa-mega-trigger:focus,
header:has(+ .mafa-page-image-header)
.mafa-mega-trigger.is-open {
    color: #e84444 !important;
}

/* Survol des actions */
header:has(+ .mafa-page-image-header) .mafa-action-icon:hover {
    color: #e84444 !important;
}

header:has(+ .mafa-page-image-header) .mafa-mega-cta:hover {
    color: #fff !important;
    background: #003388 !important;
    border-color: #003388 !important;
}

/* Panneau du méga-menu */
header:has(+ .mafa-page-image-header) .mafa-mega-panel {
    background: #f3f5f8;
}

/* =====================================================
   OUVERTURE DU MENU : RETOUR AU FOND BLANC
===================================================== */

header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-shell,
header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-navbar {
    background: #fff !important;
}

header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-trigger {
    color: #003388 !important;
}

header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-trigger:hover,
header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-trigger.is-open {
    color: #e84444 !important;
}

header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-action-icon {
    color: #003388 !important;
}

header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-mega-cta {
    color: #003388 !important;
    border-color: #003388 !important;
}

/* =====================================================
   MOBILE ET TABLETTE VERTICALE
===================================================== */

@media (max-width: 991px) {

    /* Fond blanc dès l'ouverture du hamburger */
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-shell,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-shell,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-shell,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-navbar,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-navbar,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-navbar {
        background: #fff !important;
    }

    /* Hamburger bleu lorsque le menu est ouvert */
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle.is-open
    ) .mafa-mega-toggle span,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-mega-toggle span {
        background: #003388 !important;
    }

    /* Piliers bleus sur fond blanc */
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-trigger {
        color: #003388 !important;
    }

    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-trigger:hover,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-trigger.is-open {
        color: #e84444 !important;
    }

    /* Actions sur fond blanc */
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-action-icon {
        color: #003388 !important;
    }

    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-mega-cta {
        color: #003388 !important;
        border-color: #003388 !important;
    }
}


/* Deux versions du logo */
header:has(+ .mafa-page-image-header) .mafa-logo-blue {
    display: none;
}

header:has(+ .mafa-page-image-header) .mafa-logo-white {
    display: block;
}

/* Lorsque le menu est ouvert : logo bleu */
header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-logo-white {
    display: none;
}

header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-logo-blue {
    display: block;
}

/* Sur mobile : logo bleu dès l'ouverture du hamburger */
@media (max-width: 991px) {

    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle.is-open
    ) .mafa-logo-white,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-logo-white,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-logo-white {
        display: none;
    }

    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle.is-open
    ) .mafa-logo-blue,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle[aria-expanded="true"]
    ) .mafa-logo-blue,
    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-logo-blue {
        display: block;
    }
}


/* =====================================================
   MAFA - GESTION DES DEUX LOGOS
===================================================== */

/* PAGE AVEC IMAGE : menu fermé */
header:has(+ .mafa-page-image-header) .mafa-logo-white {
    display: block !important;
}

header:has(+ .mafa-page-image-header) .mafa-logo-blue {
    display: none !important;
}

/* PAGE AVEC IMAGE : menu ouvert */
header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-logo-white {
    display: none !important;
}

header:has(+ .mafa-page-image-header):has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-logo-blue {
    display: block !important;
}

/* PAGE D'ACCUEIL : menu fermé */
header.mafa-home-video-header .mafa-logo-white {
    display: block !important;
}

header.mafa-home-video-header .mafa-logo-blue {
    display: none !important;
}

/* PAGE D'ACCUEIL : menu ouvert */
header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-logo-white {
    display: none !important;
}

header.mafa-home-video-header:has(
    .mafa-mega-trigger[aria-expanded="true"]
) .mafa-logo-blue {
    display: block !important;
}

/* MOBILE : logo bleu dès l'ouverture du hamburger */
@media (max-width: 991px) {

    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle.is-open,
        .mafa-mega-toggle[aria-expanded="true"],
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-logo-white,
    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open,
        .mafa-mega-toggle[aria-expanded="true"],
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-logo-white {
        display: none !important;
    }

    header:has(+ .mafa-page-image-header):has(
        .mafa-mega-toggle.is-open,
        .mafa-mega-toggle[aria-expanded="true"],
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-logo-blue,
    header.mafa-home-video-header:has(
        .mafa-mega-toggle.is-open,
        .mafa-mega-toggle[aria-expanded="true"],
        .mafa-mega-navlinks.is-mobile-open
    ) .mafa-logo-blue {
        display: block !important;
    }
}



/* ==========================================================
   MENU MAFA FIXE AU DÉFILEMENT
========================================================== */

.mafa-mega-shell.mafa-menu-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;

    z-index: 12000 !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(23, 59, 89, 0.15);
    box-shadow: none;
}

/* ==========================================================
   BANDE BLANCHE : 100 % DE LA LARGEUR DE L'ÉCRAN
========================================================== */

.mafa-mega-shell.mafa-menu-fixed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: #ffffff;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================
   NAVIGATION : CONTENU CENTRÉ
========================================================== */

.mafa-mega-shell.mafa-menu-fixed .mafa-mega-navbar {
    display: flex;
    align-items: center;
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    background: transparent !important;
}

/* ==========================================================
   PILIERS : VERSION COLORÉE
========================================================== */

.mafa-mega-shell.mafa-menu-fixed .mafa-mega-navlinks > li > button {
    color: #173b59 !important;
}

/* ==========================================================
   LOGO : VERSION COULEUR
========================================================== */

header:has(.mafa-mega-shell.mafa-menu-fixed) .mafa-logo-white {
    display: none !important;
}

header:has(.mafa-mega-shell.mafa-menu-fixed) .mafa-logo-blue {
    display: block !important;
}

/* ==========================================================
   ICÔNE EMAIL : VISIBLE
========================================================== */

.mafa-mega-shell.mafa-menu-fixed .mafa-contact-icon {
    color: #173b59 !important;
    opacity: 1 !important;
	
}

/* ==========================================================
   CTA : CONSERVATION DU STYLE D'ORIGINE
========================================================== */

.mafa-mega-shell.mafa-menu-fixed .mafa-mega-cta {
	cbackground-color: transparent !important;
    color: #173b59 !important;
    border: 1px solid #173b59 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mafa-mega-shell.mafa-menu-fixed .mafa-mega-cta:hover {
    background-color: #173b59 !important;
    color: #ffffff !important;
    border-color: #173b59 !important;
}

/* ==========================================================
   ESPACEUR : ÉVITE LE SAUT DE PAGE
========================================================== */

.mafa-menu-spacer {
    width: 100%;
    pointer-events: none;
}
