/* Variables globales */
:root {
    --cta-padding: 15px;
    --cta-mobile-padding: 10px;
    --cta-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    --cta-shadow-top: 0 2px 10px rgba(0, 0, 0, 0.1);
    --cta-content-max-width: 1200px;
    --cta-button-min-width: 150px;
    --cta-z-index: 999999;
    --cta-transition: 0.3s ease;
}

/* Reset et base */
.cta-fab-wrapper {
    margin: 0;
    padding: 0;
    width: 100%;
    position: static;
}

/* Classes d'espacement pour le body */
body.has-top-banner {
    padding-top: var(--banner-height, 0);
}

body.has-bottom-banner {
    padding-bottom: var(--banner-height, 0);
}

/* Bannière principale */
.sticky-cta-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    max-width: none;
    padding: var(--cta-padding) 0;
    margin: 0;
    z-index: var(--cta-z-index);
    background-color: var(--bg-color, #000000);
    color: var(--text-color, #ffffff);
    box-sizing: border-box;
    transform: translateZ(0);
    box-shadow: var(--cta-shadow);
    transition: transform var(--cta-transition);
}

/* Position */
.sticky-cta-banner.position-top {
    top: 0;
    bottom: auto;
    box-shadow: var(--cta-shadow-top);
}

.admin-bar .sticky-cta-banner.position-top {
    top: 32px;
}

/* Conteneur du contenu */
.sticky-cta-banner .sticky-cta-content {
    width: 90%;
    max-width: var(--cta-content-max-width);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Position du bouton */
.sticky-cta-banner .sticky-cta-content.button-center {
    justify-content: center;
    gap: 40px;
    text-align: center;
}

.sticky-cta-banner .sticky-cta-content.button-right {
    justify-content: space-between;
}

/* Zone de texte */
.sticky-cta-banner .sticky-cta-text {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.4;
    text-align: left;
}

/* Force le style du texte */
.sticky-cta-banner .sticky-cta-text *:not(a),
.sticky-cta-banner .sticky-cta-text p,
.sticky-cta-banner .sticky-cta-text div,
.sticky-cta-banner .sticky-cta-text span,
.sticky-cta-banner .sticky-cta-text strong,
.sticky-cta-banner .sticky-cta-text em,
.sticky-cta-banner .sticky-cta-text h1,
.sticky-cta-banner .sticky-cta-text h2,
.sticky-cta-banner .sticky-cta-text h3,
.sticky-cta-banner .sticky-cta-text h4,
.sticky-cta-banner .sticky-cta-text h5,
.sticky-cta-banner .sticky-cta-text h6,
.sticky-cta-banner .sticky-cta-text li,
.sticky-cta-banner .sticky-cta-text ul,
.sticky-cta-banner .sticky-cta-text ol {
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Liens dans le texte */
.sticky-cta-banner .sticky-cta-text a {
    color: var(--text-color);
    text-decoration: underline;
    transition: opacity var(--cta-transition);
}

.sticky-cta-banner .sticky-cta-text a:hover,
.sticky-cta-banner .sticky-cta-text a:focus {
    opacity: 0.8;
    color: var(--text-color);
    text-decoration: underline;
}

/* Bouton d'action */
.sticky-cta-banner .sticky-cta-button {
    display: inline-block;
    min-width: var(--cta-button-min-width);
    padding: 10px 20px;
    border-radius: 4px;
    background-color: var(--button-color, #0073aa);
    color: var(--button-text-color, #ffffff);
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
    transition: opacity var(--cta-transition);
    cursor: pointer;
    border: none;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: none;
    font-weight: normal;
}

.sticky-cta-banner .sticky-cta-button:hover,
.sticky-cta-banner .sticky-cta-button:focus {
    opacity: 0.9;
    color: var(--button-text-color);
    text-decoration: none;
    background-color: var(--button-color);
}

/* Animation d'entrée/sortie */
.sticky-cta-banner.is-hidden {
    transform: translateY(100%);
}

.sticky-cta-banner.position-top.is-hidden {
    transform: translateY(-100%);
}

/* Responsive */
@media screen and (max-width: 782px) {
    :root {
        --cta-padding: var(--cta-mobile-padding);
    }

    .admin-bar .sticky-cta-banner.position-top {
        top: 46px;
    }

    .sticky-cta-banner .sticky-cta-text {
        font-size: 15px;
    }
}

@media screen and (max-width: 600px) {
    .sticky-cta-banner .sticky-cta-content {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
        width: 100%;
    }

    .sticky-cta-banner .sticky-cta-text {
        text-align: center;
        font-size: 14px;
    }

    .sticky-cta-banner .sticky-cta-button {
        width: 100%;
        min-width: 0;
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* Support iOS Safari */
@supports (-webkit-touch-callout: none) {
    .sticky-cta-banner.position-bottom {
        padding-bottom: calc(var(--cta-padding) + env(safe-area-inset-bottom));
    }
}