/** Widget Sélecteur langue **/
.ast-footer-language-switcher {
    position: relative;
    display: inline-block;
    width: 220px;
    max-width: 220px;
    background: #000;
}

.ast-footer-language-switcher .ast-builder-language-switcher-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    position: relative;
}

.ast-footer-language-switcher .ast-builder-language-switcher-menu-item-footer {
    margin: 0;
    background: #000;
}

/* item actif */
.ast-footer-language-switcher .ast-builder-language-switcher-menu-item-footer:has(.ast-builder-language-switcher-item__active) {
    display: block;
}

/* options cachées */
.ast-footer-language-switcher .ast-builder-language-switcher-menu-item-footer:not(:has(.ast-builder-language-switcher-item__active)) {
    display: none;
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 9999;
    border: 1px solid rgba(255,255,255,0.22);
    background: #000;
    text-decoration: none;
    white-space: nowrap;
}

/* panneau ouvert */
.ast-footer-language-switcher.is-open .ast-builder-language-switcher-menu-item-footer:not(:has(.ast-builder-language-switcher-item__active)) {
    display: block;
    bottom: 100%;
}

.ast-footer-language-switcher .ast-builder-language-switcher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    text-decoration: none;
    color: #fff;
    background: #000;
    line-height: 1.2;
    white-space: nowrap;
    font-size: 15px;
}

.ast-footer-language-switcher .ast-builder-language-switcher-item:hover,
.ast-footer-language-switcher .ast-builder-language-switcher-item:focus {
    color: #fff !important;
    background: #383838;
}

.ast-footer-language-switcher .ast-builder-language-switcher-item__active::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 12px;
    flex: 0 0 14px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 7l5 5 5-5" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center;
    background-size: contain;
    transition: transform 0.2s ease;
}

.ast-footer-language-switcher.is-open .ast-builder-language-switcher-item__active::after {
    transform: rotate(180deg);
}
.ast-footer-language-switcher .ast-builder-language-switcher-menu {
    border: 3px solid rgba(255,255,255,0.22);
}
/** Fin **/
.site-footer .footer-bar-navigation a {
    color: rgba(255,255,255,0.8);
    transition: color 0.2s ease;
}

.site-footer .footer-bar-navigation a:hover {
    color: #fff;
}

/* Séparateur entre les items du menu footer */
/* Menu footer Astra */
#footer-site-navigation #astra-footer-menu {
    display: flex;
    align-items: center;
}

/* Ajoute un | avant chaque item sauf le premier */
#footer-site-navigation #astra-footer-menu > li + li::before {
    content: "|";
    color: rgba(255,255,255,0.6);
    display: inline-block;
}

/* Colonne gauche du footer */
.site-footer .site-footer-section-1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Espacement entre les éléments de la colonne gauche */
.site-footer .site-footer-section-1 .ast-builder-layout-element {
    margin-bottom: 10px;
}

.site-footer .site-footer-section-1 .ast-builder-layout-element:last-child {
    margin-bottom: 0;
}

/* Permet au séparateur et au lien d'être bien sur la même ligne */
#footer-site-navigation #astra-footer-menu > li {
    display: flex;
    align-items: center;
}
/* Réduit l'espace sous le logo */
.site-footer .ast-footer-copyright p{
    margin-bottom: 0.75em;
}
.ast-footer-copyright.site-footer-focus-item {
    margin-top: 0px;
}
.footer-social-inner-wrap {
    margin-bottom: 10px;
}
/*bordure pied de page*/
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
    padding-top: 45px;
    padding-bottom: 45px;
}

/* Mobile */
@media (max-width: 768px) {

    /* Conteneur général du footer */
    .site-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Rangée principale du footer */
    .site-footer .ast-builder-grid-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Les 3 sections du footer centrées */
    .site-footer .site-footer-section-1,
    .site-footer .site-footer-section-2,
    .site-footer .site-footer-section-3 {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Espacement vertical entre les sections */
    .site-footer .site-footer-section-1,
    .site-footer .site-footer-section-2 {
        margin-bottom: 18px;
    }

    /* Éléments internes de la colonne gauche */
    .site-footer .site-footer-section-1 .ast-builder-layout-element {
        margin-bottom: 12px;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .site-footer .site-footer-section-1 .ast-builder-layout-element:last-child {
        margin-bottom: 0;
    }

    /* Logo */
    .site-footer .site-footer-section-1 img {
        display: block;
        max-width: 100%;
        width: min(320px, 80vw);
        height: auto;
        margin: 0 auto;
    }

    /* Copyright */
    .site-footer .ast-footer-copyright.site-footer-focus-item {
        margin-top: 6px !important;
        margin-bottom: 10px !important;
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    /* Réseaux sociaux */
    .site-footer .ast-footer-social-wrap,
    .site-footer .footer-social-inner-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-bottom: 6px;
    }

    .site-footer .ast-builder-social-element {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Sélecteur de langue */
    .ast-footer-language-switcher {
        display: block;
        width: min(300px, 100%);
        max-width: 100%;
        margin: 0 auto;
    }

    .ast-footer-language-switcher .ast-builder-language-switcher-menu {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .ast-footer-language-switcher .ast-builder-language-switcher-item {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 15px;
    }

    /* Menu footer */
    #footer-site-navigation,
    #footer-site-navigation .menu-footer-container,
    #footer-site-navigation #astra-footer-menu {
        width: 100%;
    }

    #footer-site-navigation #astra-footer-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin: 0;
        padding: 0;
    }

    #footer-site-navigation #astra-footer-menu > li {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0;
    }

    /* Retire le séparateur | sur mobile */
    #footer-site-navigation #astra-footer-menu > li + li::before {
        content: none;
        display: none;
    }

    #footer-site-navigation #astra-footer-menu a {
        display: inline-block;
        text-align: center;
        white-space: normal;
    }

    /* Colonne de droite */
    .site-footer .site-footer-section-3,
    .site-footer .footer-bar-navigation {
        text-align: center;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    /* Bouton consentement */
    .cmplz-btn,
    .cmplz-manage-consent,
    .cmplz-manage-options {
        max-width: calc(100vw - 40px);
    }
}