/**
 * Bandeau du CPT "bandeau" : cadre photo 1920×800 + overlay dégradé contenant
 * le heading (elements/pix-heading) et un bouton (.pix-bouton).
 *
 * Visuellement identique à elements/pix-slider (.pix-bandeau-swiper .swiper-slogan),
 * mais avec des classes et un CSS entièrement dédiés : ce bandeau n'est PAS un
 * carrousel et ne doit donc jamais partager de classe avec ".pix-bandeau-swiper",
 * ciblée par le JS Swiper de pix-slider.php (new Swiper('.pix-bandeau-swiper', ...)),
 * qui n'initialise que le premier élément trouvé sur la page.
 */
.pix-cpt-bandeau {
    position: relative;
    aspect-ratio: 1920 / 800;
    overflow: hidden;
    user-select: none;

    border-bottom: 6px solid #081119;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.pix-cpt-bandeau__image {
    position: absolute;
    inset: 0;
}

.pix-cpt-bandeau__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pix-cpt-bandeau__overlay {
    position: absolute;
    inset: 0;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 20px;

    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;

    background: linear-gradient(to right, var(--pix-color-secondary), color-mix(in srgb, var(--pix-color-secondary) 80%, transparent) 40%, color-mix(in srgb, var(--pix-color-secondary) 0%, transparent));
}

.pix-cpt-bandeau .pix-heading__title {color:#fff;}
.pix-cpt-bandeau__overlay--center {
    justify-content: center;
    text-align: center;
    background: color-mix(in srgb, var(--pix-color-secondary) 45%, transparent);
}

.pix-cpt-bandeau__content {
    max-width: 800px;
    padding: 2em;
    text-align:center;
}

.pix-cpt-bandeau__overlay .pix-heading {
    --heading-color-accent: var(--pix-color-primary);
    --overline-color: var(--pix-color-primary);
}

.pix-cpt-bandeau__overlay .pix-heading__overline {
    font-size: 0.48em;
}

.pix-cpt-bandeau__overlay .pix-bouton {
    margin-top: 1em;
    font-size: clamp(0.7em, 1.5vw, 1em);
}

@media (max-width: 1250px) {
    .pix-cpt-bandeau {
        height: 543px;
        aspect-ratio: initial;
    }
}

@media (max-width: 900px) {
    .pix-cpt-bandeau {
        height: 400px;
    }
}

@media (max-width: 640px) {
    .pix-cpt-bandeau {
        height: 350px;
    }
}
