/* Header : menu en haut, bandeau noir avec le logo rond qui déborde sur la photo.
   Le menu reste collé en haut au défilement (géré par js/bandeau-sticky.js). */

/* Menu au-dessus de tout (slider, photos, etc.) */
.cy_menu_wrapper,
.cy_menu_wrapper.cy_fixed,
.cy_menu_wrapper.open_menu {
    z-index: 100001 !important;
}
/* La barre de menu (et ses sous-menus déroulants) passe au-dessus du bandeau logo */
.cy_menu_wrapper > .container {
    position: relative;
    z-index: 10;
}
.cy_menu_wrapper.is-compact > .container {
    z-index: 100002 !important;
}

/* ===================== Ordinateur (992px et plus) ===================== */
@media (min-width: 992px) {
    .cy_menu_wrapper,
    .cy_menu_wrapper.cy_fixed,
    .cy_menu_wrapper.open_menu {
        position: relative !important;
        top: auto !important;
        height: auto !important;
        display: flex;
        flex-direction: column;
        transition: none !important;
    }

    /* menu en premier (en haut) */
    .cy_menu_wrapper > .container {
        order: 0;
        width: 100%;
    }

    /* bandeau noir court ; le logo dépasse vers le bas sur la photo */
    .cy_logo_box,
    .cy_menu_wrapper.cy_fixed .cy_logo_box,
    .cy_menu_wrapper.open_menu .cy_logo_box {
        order: 1;
        position: relative !important;
        top: 0 !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        height: 150px !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 0 !important;
        overflow: visible !important;
        background-color: #000 !important;
        text-align: center !important;
        float: none !important;
        z-index: 5;
    }
    .cy_logo_box:after {
        display: none !important;
    }
    .cy_logo_box img {
        position: absolute !important;
        left: 50%;
        top: 10px;
        transform: translateX(-50%);
        width: 240px !important;
        max-width: none !important;
        height: auto !important;
    }

    /* Menu centré */
    .cy_menu {
        float: none !important;
        width: 100% !important;
        text-align: center;
    }
    .cy_menu nav {
        width: 100%;
    }
    .cy_menu ul {
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100% !important;
    }
    .cy_menu ul > li {
        float: none;
        margin: 0 15px;
    }

    /* Menu collé en haut une fois défilé (classe ajoutée par bandeau-sticky.js) */
    .cy_menu_wrapper.is-compact > .container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        max-width: none !important;
        z-index: 300;
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* ===================== Mobile / tablette (991px et moins) ===================== */
@media (max-width: 991px) {
    .cy_menu_wrapper,
    .cy_menu_wrapper.cy_fixed,
    .cy_menu_wrapper.open_menu {
        position: relative !important;
        top: auto !important;
        height: auto !important;
        display: flex;
        flex-direction: column;
        transition: none !important;
    }

    /* barre avec le bouton menu en premier */
    .cy_menu_wrapper > .container {
        order: 0;
        width: 100%;
    }

    /* bandeau noir plus bas sur mobile ; le logo dépasse dessous */
    .cy_logo_box,
    .cy_menu_wrapper.cy_fixed .cy_logo_box,
    .cy_menu_wrapper.open_menu .cy_logo_box {
        order: 1;
        position: relative !important;
        top: 0 !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        height: 100px !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 0 !important;
        overflow: visible !important;
        background-color: #000 !important;
        text-align: center !important;
        float: none !important;
        z-index: 5;
    }
    .cy_logo_box:after {
        display: none !important;
    }
    .cy_logo_box img {
        position: absolute !important;
        left: 50%;
        top: 8px;
        transform: translateX(-50%);
        width: 150px !important;
        max-width: none !important;
        height: auto !important;
    }

    /* bouton menu sur la barre */
    .cy_menu_wrapper button.cy_menu_btn {
        margin: 8px 15px !important;
    }

    /* barre collée en haut une fois défilé */
    .cy_menu_wrapper.is-compact > .container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 300;
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Mobile : rien ne doit dépasser la largeur de l'écran (sinon la barre de menu est décalée) */
@media (max-width: 991px) {
    iframe {
        max-width: 100% !important;
    }
}
