/* Bannière cards — texte 1/3 / image 2/3 arrondie avec petit padding (comme
   TexteImageLateral, l'éventuelle découpe est portée par l'image contribuée),
   1 à 3 cards de texte en ligne, centrées sur l'image (maquette EG-3026). */
/* Mêmes gouttières que .bc (bloc-content) : 0.75rem sous 1600px, rien au-delà */
.bcards-section {
    width: 100%;
    max-width: var(--page-max-width, 1600px);
    margin: 0 auto;
    padding: 0 0.75rem;
}

@media (min-width: 1600px) {
    .bcards-section {
        padding: 0;
    }
}

.bcards {
    display: flex;
    border-radius: 1.5rem;
    overflow: hidden;
    align-items: stretch;
    /* Défaut Rose : défaut du schéma, appliqué aussi sans classe modificatrice */
    background-color: var(--color-primary-50);
}

.bcards--image-left {
    flex-direction: row-reverse;
}

.bcards--pink {
    background-color: var(--color-primary-50);
}

.bcards--white {
    background-color: var(--color-neutral-white);
}

.bcards--grey {
    background-color: var(--color-neutral-100);
}

.bcards__text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    padding: 3rem 2rem;
}

.bcards__title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.3;
}

/* Hauteur fixe (comme TexteImageLateral), les cards se centrent dedans */
.bcards__media {
    position: relative;
    flex: 2;
    display: flex;
    align-items: center;
    height: 420px;
    padding: 1rem;
}

.bcards__img {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: calc(100% - 2rem);
    height: calc(100% - 2rem);
    object-fit: cover;
    border-radius: 1.5rem;
}

.bcards__cards {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    padding: 1.5rem 2.5rem;
}

.bcards__card {
    /* base 0 + min-width 0 : trois colonnes strictement égales, quel que soit le texte */
    flex: 1 1 0;
    min-width: 0;
    max-width: 250px;
    background-color: var(--color-neutral-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bcards__card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    /* Écrase le 38px hérité du h3 (typography.css), démesuré pour du 1rem */
    line-height: 1.3;
}

.bcards__card-text {
    margin: 0;
    font-size: 0.875rem;
}

@media (max-width: 800px) {
    .bcards,
    .bcards--image-left {
        flex-direction: column;
    }

    .bcards__text-container {
        flex: none;
        padding: 1.5rem 1.5rem 0;
    }

    /* Même conteneur qu'en desktop : 420px de haut (image 388 avec le padding).
       flex: none obligatoire — le flex-basis 0% du flex: 2 desktop écraserait
       height sur l'axe colonne et effondrerait le bloc. */
    .bcards__media {
        flex: none;
        width: 100%;
        height: 420px;
    }

    /* Cards en overlay : hauteur de la rangée = la carte au contenu le plus haut
       (stretch), centrée verticalement sur l'image ; défilement horizontal
       (scroll-snap, sans JS), scrollbar masquée. safe center : centré quand ça
       tient, aligné à gauche quand ça déborde (sinon début de scroll inatteignable). */
    .bcards__cards {
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        justify-content: flex-start;
        justify-content: safe center;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem;
        scrollbar-width: none;
    }

    .bcards__cards::-webkit-scrollbar {
        display: none;
    }

    .bcards__card {
        flex: 0 0 260px;
        scroll-snap-align: center;
    }
}
