/* === Cartes (accueil, « Quel est votre projet ? ») ========================================== */
.x-cartes {
    padding: 5.625vw 0 2.778vw;
    text-align: center;
}
@media (max-width: 1349px) and (min-width: 981px) {
    /* 1280px : même bande fluide que page-404.css/partenaires.css (mesurée 8801, 6vw pas 5.625vw entre 981 et 1349), résorbe le décalage cumulé qui atteignait « Nos partenaires ». */
    .x-cartes {
        padding-top: 6vw;
    }
}
@media (max-width: 980px) {
    .x-cartes {
        padding: 80px 0 50px;
    }
}
@media (max-width: 767px) {
    .x-cartes {
        padding: 0;
    }
}
.x-cartes h2.wp-block-heading {
    margin: 0 auto 30px;
    max-width: 1080px;
    font-family: var(--wp--preset--font-family--poppins);
    font-size: var(--wp--preset--font-size--xxxl);
    font-weight: 300;
    line-height: 36px; /* localiser.py : boîte h=46 mesurée, pas 24 */
    padding-bottom: 10px;
    color: var(--wp--preset--color--encre);
}
@media (max-width: 980px) and (min-width: 768px) {
    .x-cartes h2.wp-block-heading {
        margin-bottom: 60px;
    }
}
@media (max-width: 767px) {
    .x-cartes h2.wp-block-heading {
        padding-top: 30px;
    }
}
.x-cartes__grille {
    max-width: 1100px;
    margin: 0 auto;
    gap: 20px 33px; /* localiser.py : dx +10/+20, pas de creux horizontal entre les cartes */
}
@media (max-width: 980px) and (min-width: 768px) {
    .x-cartes__grille {
        width: 100%;
        max-width: 1100px;
        gap: 30px 5.5%;
        align-items: stretch;
    }
}
@media (max-width: 767px) {
    .x-cartes__grille {
        width: 70%;
        max-width: 400px;
        gap: 30px 0;
    }
}
/* Finition A (28/09) : cartes étirées à la hauteur de la rangée, texte qui absorbe la place libre (boutons alignés en bas), arrondi 8 px, survol. */
.x-cartes .x-cartes__grille {
    align-items: stretch;
}
.x-cartes__carte {
    flex: 0 0 250px; /* mesuré 8801, pas 270 */
    max-width: 250px;
    display: flex;
    flex-direction: column;
    padding: 0 0 20px; /* pas de rembourrage haut/côtés (image bord à bord), mesuré 8801 */
    overflow: hidden;
    background-color: var(--wp--preset--color--blanc);
    border-radius: 8px;
    box-shadow: 0 0 34px -15px rgba(0, 0, 0, .3); /* mesuré 8801 */
    transition: transform .25s ease, box-shadow .25s ease;
}
.x-cartes__carte > p {
    flex-grow: 1;
}
.x-cartes__carte:hover {
    box-shadow: 0 18px 40px -18px rgba(15, 9, 19, .35);
}
.x-cartes__image {
    margin: 0;
    overflow: hidden;
}
.x-cartes__image img {
    max-width: 100%;
    height: auto;
    transition: transform .5s ease;
}
@media (prefers-reduced-motion: no-preference) {
    .x-cartes__carte:hover {
        transform: translateY(-4px);
    }
    .x-cartes__carte:hover img {
        transform: scale(1.03);
    }
}
.x-cartes__carte h3.wp-block-heading {
    margin: 10px 40px 0; /* localiser.py : rembourrage horizontal 40px, pas 15 */
    font-family: var(--wp--preset--font-family--poppins);
    font-size: var(--wp--preset--font-size--l);
    font-weight: 700;
    line-height: 24px;
    padding-bottom: 10px; /* localiser.py : boîte h=58 mesurée, pas 48 */
    color: var(--wp--preset--color--gris-fonce);
}
.x-cartes__carte p {
    margin: 0 40px; /* localiser.py : rembourrage horizontal 40px, pas 15 */
    font-family: var(--wp--preset--font-family--poppins);
    font-size: var(--wp--preset--font-size--s);
    font-weight: 300;
    line-height: 23.8px;
    padding-bottom: 24px; /* localiser.py : boîte h=95 mesurée, pas 71 */
    color: var(--wp--preset--color--gris-fonce);
}
.x-cartes__carte .wp-block-buttons {
    justify-content: center;
    margin-top: 10px;
}
/* .wp-block-heading dans :where() : ramène 0,3,1 à 0,2,1 (vérification R2). */
@media (max-width: 980px) {
    .x-cartes__carte:nth-child(2) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(2) p { margin-left: 20px; margin-right: 20px; }
    .x-cartes__carte:nth-child(3) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(3) p { margin-left: 20px; margin-right: 20px; }
    .x-cartes__carte:nth-child(4) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(4) p { margin-left: 35px; margin-right: 35px; }
    .x-cartes__carte:nth-child(5) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(5) p { margin-left: 30px; margin-right: 30px; }
    .x-cartes__carte:nth-child(6) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(6) p { margin-left: 35px; margin-right: 35px; }
    .x-cartes__carte:nth-child(7) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(7) p { margin-left: 35px; margin-right: 35px; }
    .x-cartes__carte:nth-child(8) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(8) p { margin-left: 15px; margin-right: 15px; }
}
@media (max-width: 980px) and (min-width: 768px) {
    .x-cartes__carte:nth-child(3) h3:where(.wp-block-heading), .x-cartes__carte:nth-child(3) p { margin-left: 22px; margin-right: 22px; }
}
@media (max-width: 980px) and (min-width: 768px) {
    .x-cartes__carte {
        padding-bottom: 25px;
    }
    .x-cartes__carte h3.wp-block-heading {
        margin-top: 30px;
    }
    .x-cartes__carte p {
        padding-bottom: 0;
        margin-bottom: 25px;
    }
    .x-cartes__carte .wp-block-buttons {
        margin-top: 0; /* carte en flex (finition A) : les 10px ne fusionnent plus avec les 25px du texte */
    }
}
@media (max-width: 767px) {
    .x-cartes__carte {
        padding-bottom: 25px;
    }
    .x-cartes__carte h3.wp-block-heading {
        margin-top: 30px;
    }
    .x-cartes__carte p {
        padding-bottom: 0;
        margin-bottom: 25px;
    }
    .x-cartes__carte .wp-block-buttons {
        margin-top: 0; /* carte en flex (finition A) : les 10px ne fusionnent plus avec les 25px du texte */
    }
}
/* .is-style-classique dans :where() : ramène 0,4,0 à 0,3,0 (vérification R2). */
.x-cartes__carte .wp-block-button:where(.is-style-classique) .wp-block-button__link {
    font-size: var(--wp--preset--font-size--xxs); /* 12px mesuré 8801, tient sur une ligne */
    white-space: nowrap;
}
@media (max-width: 980px) {
    .x-cartes__carte .wp-block-button:where(.is-style-classique) .wp-block-button__link {
        line-height: 20.4px;
    }
}
@media (max-width: 980px) and (min-width: 768px) {
    .x-cartes__carte {
        flex: 0 0 47.25%;
        max-width: 47.25%;
    }
}
@media (max-width: 767px) {
    .x-cartes__carte {
        flex: 1 1 100%;
        max-width: none;
    }
}
/* width:80% (≤980px) : source unique par sélecteur (vérification R2, cf. blocs/atouts.css). */
@media (max-width: 980px) {
    .x-cartes h2.wp-block-heading {
        width: 80%;
    }
}
