/* ------------------------------------------------------------------
   APB Blog CTA — bandeau de prise de contact
   Couleur de marque #18679B, texte blanc, police Roboto.
   Effet "carte" pour se demarquer du footer (meme couleur).
------------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

.apb-cta {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 55px auto 65px auto;
    padding: 62px 40px;
    background: #18679B;
    /* leger degrade + liseré accent pour trancher avec le footer plat */
    background-image: linear-gradient(135deg, #1b76b2 0%, #155b88 100%);
    border-radius: 18px;
    border-top: 6px solid #ffb43a; /* accent qui demarque du footer */
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
    color: #ffffff;
    text-align: center;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    overflow: hidden;
}

/* halo decoratif discret */
.apb-cta::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.apb-cta__inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
}

/* Titre : div (et pas hX) + blanc force pour ne pas heriter du theme */
.apb-cta__title {
    display: block;
    margin: 0 0 16px 0;
    padding: 0;
    color: #ffffff !important;
    font-family: 'Roboto', Arial, sans-serif !important;
    font-weight: 900;
    font-size: 40px;
    line-height: 1.16;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.apb-cta__subtitle {
    margin: 0 0 30px 0;
    color: #eaf3fa !important;
    font-family: 'Roboto', Arial, sans-serif !important;
    font-weight: 400;
    font-size: 19px;
    line-height: 1.55;
}

/* ---------------------- Bouton anime ---------------------- */

.apb-cta__btn {
    position: relative;
    display: inline-block;
    overflow: hidden;
    background: #ffffff;
    color: #155b88 !important;
    font-family: 'Roboto', Arial, sans-serif !important;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none !important;
    padding: 17px 46px;
    border-radius: 50px;
    border: 2px solid #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    animation: apbPulse 2.6s ease-in-out infinite;
}

/* libelle au-dessus de l'effet de reflet */
.apb-cta__btnlabel {
    position: relative;
    z-index: 2;
}

/* reflet "vague" qui balaie le bouton en continu */
.apb-cta__btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -140%;
    width: 60%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 180, 58, 0.55) 50%, transparent 100%);
    transform: skewX(-22deg);
    animation: apbShine 3.2s ease-in-out infinite;
}

.apb-cta__btn:hover,
.apb-cta__btn:focus {
    background: #ffb43a;
    color: #ffffff !important;
    border-color: #ffb43a;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
    text-decoration: none !important;
    animation-play-state: paused;
}

.apb-cta__btn:active {
    transform: translateY(0);
}

@keyframes apbShine {
    0% { left: -140%; }
    55% { left: 140%; }
    100% { left: 140%; }
}

@keyframes apbPulse {
    0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
    50% { box-shadow: 0 6px 24px rgba(255, 180, 58, 0.55); }
}

/* Accessibilite : on coupe les animations si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
    .apb-cta__btn,
    .apb-cta__btn::before {
        animation: none;
    }
}

/* ---------------------- Responsive ---------------------- */

@media (max-width: 768px) {
    .apb-cta {
        margin: 36px auto 46px auto;
        padding: 44px 22px;
        border-radius: 15px;
    }
    .apb-cta__title {
        font-size: 28px;
    }
    .apb-cta__subtitle {
        font-size: 16px;
        margin-bottom: 24px;
    }
    .apb-cta__btn {
        font-size: 16.5px;
        padding: 15px 32px;
        width: 100%;
        max-width: 360px;
    }
}

@media (max-width: 420px) {
    .apb-cta__title {
        font-size: 24px;
    }
}

/* ==================================================================
   v2.4 — Bandeau HAUT (compact, en largeur), au-dessus de la date.
   Meme style que le bandeau "Etude personnalisee" des fiches produit.
   Tailles en px : independantes de la taille de base du theme.
================================================================== */

.apb-ctatop,
.apb-ctatop *,
.apb-ctatop *::before,
.apb-ctatop *::after { box-sizing: border-box; }

.apb-ctatop {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    margin: 0 0 22px 0;
    padding: 14px 18px 14px 22px;
    border-radius: 12px;
    color: #fff;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(164, 198, 63, .22) 0%, rgba(164, 198, 63, 0) 55%),
        linear-gradient(135deg, #18679b 0%, #0f4a72 100%);
    box-shadow: 0 8px 22px -12px rgba(15, 74, 114, .6), 0 2px 6px rgba(15, 74, 114, .14);
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    line-height: 1.35;
    text-align: left;
}
/* Lisere vert a gauche */
.apb-ctatop::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 5px;
    background: #a4c63f;
}

.apb-ctatop__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: #0b2f47;
    background: #a4c63f;
    box-shadow: 0 0 0 5px rgba(164, 198, 63, .18);
}

.apb-ctatop__content { flex: 1 1 auto; min-width: 0; }

.apb-ctatop .apb-ctatop__title {
    margin: 0;
    padding: 0;
    color: #fff !important;
    font-family: 'Roboto', Arial, sans-serif !important;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}
.apb-ctatop .apb-ctatop__text {
    margin: 3px 0 0;
    color: rgba(255, 255, 255, .86) !important;
    font-size: 14px;
    line-height: 1.4;
}
.apb-ctatop .apb-ctatop__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}
.apb-ctatop .apb-ctatop__badges li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 600;
}
.apb-ctatop .apb-ctatop__badges li::before { content: none; }
.apb-ctatop .apb-ctatop__badges svg { flex: 0 0 auto; color: #a4c63f; }

/* Bouton vert, texte blanc force */
.apb-ctatop .apb-ctatop__btn {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 10px;
    border: 0;
    background: #a4c63f;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .28);
    font-family: 'Roboto', Arial, sans-serif !important;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45);
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.apb-ctatop .apb-ctatop__btn span,
.apb-ctatop .apb-ctatop__btn svg {
    position: relative;
    z-index: 2;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.apb-ctatop .apb-ctatop__btn svg { stroke: #fff !important; transition: transform .2s ease; }
.apb-ctatop .apb-ctatop__btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    transition: left .6s ease;
}
.apb-ctatop .apb-ctatop__btn:hover,
.apb-ctatop .apb-ctatop__btn:focus-visible {
    background: #b8d65a;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .5);
}
.apb-ctatop .apb-ctatop__btn:hover::after { left: 130%; }
.apb-ctatop .apb-ctatop__btn:hover svg { transform: translateX(4px); }
.apb-ctatop .apb-ctatop__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* v2.4.2 : espace blanc reduit au-dessus du bandeau haut (PC + mobile).
   Classes ajoutees par inject.js uniquement quand le bandeau est present. */
body.apb-has-ctatop #prestablog_menu_cat {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}
body.apb-has-ctatop #prestablog_menu_cat > nav,
body.apb-has-ctatop #prestablog_menu_cat #menu-mobile {
    margin-bottom: 0 !important;
}
#prestablogfront.apb-has-ctatop {
    margin-top: 16px !important;
    padding-top: 0 !important;
}

/* Colonne moyenne : on garde une seule ligne mais plus serree */
@media (max-width: 991.98px) {
    .apb-ctatop { gap: 14px; padding: 12px 14px 12px 20px; }
    .apb-ctatop .apb-ctatop__btn { padding: 11px 16px; font-size: 14px; }
}

/* Mobile : icone masquee, bouton pleine largeur sous le texte */
@media (max-width: 640px) {
    .apb-ctatop {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 14px 14px 19px;
        margin-bottom: 18px;
    }
    .apb-ctatop__icon { display: none; }
    .apb-ctatop__content { flex-basis: 100%; }
    .apb-ctatop .apb-ctatop__title { font-size: 20px; }
    .apb-ctatop .apb-ctatop__text { font-size: 15px; }
    .apb-ctatop .apb-ctatop__badges { gap: 4px 14px; }
    .apb-ctatop .apb-ctatop__badges li { font-size: 14px; }
    .apb-ctatop .apb-ctatop__btn { width: 100%; min-height: 50px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .apb-ctatop .apb-ctatop__btn,
    .apb-ctatop .apb-ctatop__btn::after,
    .apb-ctatop .apb-ctatop__btn svg { transition: none; }
}
