/* ============================================================================
   FRANCK LEGAL NOTICE BAR — CSS front
   Préfixe : flnb-
   Utilisé par : maurin.carsens.net
   ============================================================================ */

/* -------------------------------------------------- */
/* Wrapper principal                                   */
/* -------------------------------------------------- */
.flnb-wrapper {
    position: relative;
    box-sizing: border-box;
    background: var(--flnb-bg, #f5f5f5);
    padding-top:    var(--flnb-padding-top, 12px);
    padding-bottom: var(--flnb-padding-bottom, 12px);
    padding-left:  42px;
    padding-right: 42px;
}

/* Full width : étend aux bords de la fenêtre */
.flnb-wrapper--full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Sticky : bandeau collé en bas de l'écran */
.flnb-wrapper--sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 990;
    width: 100%;
    /* Annule le margin-left du full width dans un contexte sticky */
    margin-left: 0;
    will-change: bottom, opacity;
    transition: opacity 0.15s ease;
}

/* -------------------------------------------------- */
/* Inner : max-width piloté par la density            */
/* -------------------------------------------------- */
.flnb-inner {
    max-width: var(--flnb-inner-max, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* -------------------------------------------------- */
/* Texte légal                                        */
/* -------------------------------------------------- */
.flnb-text {
    flex: 1;
    color: var(--flnb-color, #333333);
    font-size: var(--flnb-font-size, 13px);
    text-align: var(--flnb-text-align, left);
    line-height: 1.5;
    font-family: var(--maurin-font-secondary, 'Work Sans', sans-serif);
    padding-right: 8px;
}

.flnb-text a {
    color: inherit;
    text-decoration: underline;
}

.flnb-text b,
.flnb-text strong {
    font-weight: 700;
}

.flnb-text i,
.flnb-text em {
    font-style: italic;
}

.flnb-text sup {
    font-size: 0.7em;
    vertical-align: super;
    line-height: 0;
}

/* -------------------------------------------------- */
/* Bouton de fermeture                                */
/* -------------------------------------------------- */
.flnb-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--flnb-color, #333333);
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    font-family: inherit;
}

.flnb-close:hover {
    opacity: 1;
}

.flnb-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 4px;
}

/* -------------------------------------------------- */
/* Padding latéral responsive                         */
/* -------------------------------------------------- */
@media (max-width: 1024px) {
    .flnb-wrapper {
        padding-left:  22px;
        padding-right: 22px;
    }
}

@media (max-width: 600px) {
    .flnb-wrapper {
        padding-left:  18px;
        padding-right: 18px;
    }
}

/* -------------------------------------------------- */
/* Neutralisation du 100vw dans le preview builder    */
/* (la sortie en full width ne doit pas déborder      */
/*  de la zone de preview)                            */
/* -------------------------------------------------- */
.is-builder-preview .flnb-wrapper--full {
    width: 100%;
    margin-left: 0;
}

/* Reste strictement sous le tiroir de filtres (+ de critères) */
body.fucs-modal-open .flnb-wrapper--sticky,
body:has(.filter-modal.open) .flnb-wrapper--sticky {
    z-index: 10 !important;
}
