/* ---------------- MOSAÏQUE DE CARTES ---------------- */
.componentCartesIllustrees {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px 22px;
    max-width: 852px;
    margin-inline: auto;
}

@media (width > 1700px) {
    .componentCartesIllustrees {
        max-width: 980px;
    }
}

.carteIllustree {
    position: relative;
    isolation: isolate;
    grid-column: span 5;
    min-width: 0;
    min-height: 330px;
    overflow: hidden;
    border-radius: 30px;
    background-color: var(--color-footer);
    color: var(--color-white);
}

.carteIllustree:nth-child(4n + 1) {
    grid-column: span 4;
}

.carteIllustree:nth-child(4n + 2) {
    grid-column: span 8;
}

.carteIllustree:nth-child(4n + 3) {
    grid-column: span 7;
}

.carteIllustreeImage {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carteIllustree::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .5));
    transition: background-color .25s;
}

.carteIllustree summary {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    padding: 30px;
    list-style: none;
    cursor: pointer;
}

.carteIllustree summary::-webkit-details-marker {
    display: none;
}

.carteIllustree h3 {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-transform: uppercase;
    transition: opacity .25s;
}

.carteIllustree .carteIllustreeBouton {
    transition: opacity .25s;
}

.carteIllustreeTexte {
    padding: 30px;
    font-size: var(--b4);
    line-height: 17.5px;
    overflow-wrap: anywhere;
}

.carteIllustreeTexte p + p {
    margin-top: 16px;
}

.carteIllustree[open] {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.carteIllustree[open]::before {
    background-color: rgba(0, 0, 0, .55);
}

.carteIllustree[open] summary h3,
.carteIllustree[open] .carteIllustreeBouton {
    opacity: 0;
}

.carteIllustree summary:focus-visible,
.componentCartesIllustrees:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -5px;
}

@media (max-width: 992px) {
    .carteIllustree summary,
    .carteIllustreeTexte {
        padding: 24px;
    }
}

@media (max-width: 767px) {
    .componentCartesIllustrees {
        display: flex;
        gap: 20px;
        margin-inline: -30px;
        padding-inline: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 12px;
        scrollbar-width: none;
    }

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

    .carteIllustree {
        flex: 0 0 var(--largeur-carte-mobile);
        min-height: 508px;
        scroll-snap-align: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .carteIllustree::before,
    .carteIllustree h3,
    .carteIllustree .carteIllustreeBouton {
        transition: none;
    }
}
