/* Related articles newsletter */
.articles-relies {
    margin: 5%;
}

.articles-relies h3 {
    font-size: 1.6rem;
    margin-bottom: 24px;
}


.cartes-reliees {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 5px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;

    scrollbar-width: none;
}

.cartes-reliees::-webkit-scrollbar {
    display: none;
}

.carte-unique {
    text-decoration: none;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}


.carte-unique {
    flex: 0 0 260px;
    scroll-snap-align: start;

    border-radius: 12px;
    overflow: hidden;

    transition: transform .3s ease,
                box-shadow .3s ease;

    transform-origin: center;
}


.carte-unique:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.carte-unique img {
    width: 100%;
    display: block;
    transition: transform .3s ease;
}

.carte-unique:hover img {
    transform: scale(1.05);
}

.cartes-reliees:hover .carte-unique {
    opacity: .7;
}

.cartes-reliees .carte-unique:hover {
    opacity: 1;
}

/* .carte-unique:hover {
    transform: translateY(-5px);
}

.carte-unique img {
    width: 100%;
    height: 140px;
    object-fit: cover;
} */

.titre-carte {
    padding: 12px;
    font-weight: 500;
    color: #1d3557 !important;
}

.redacteur {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 5%;
}

.duree-lecture {
    padding: 0 12px 12px;
    font-size: 0.85rem;
    color: #6c757d;
}


/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .cartes-reliees {
        gap: 16px;
        padding: 15px;
        scroll-padding-left: 15px;
    }

    .carte-unique {
        flex: 0 0 240px; /* adapte la largeur */
        box-shadow: 0 15px 35px rgba(0,0,0,.18);
    }

    .carte-unique img {
        transform: scale(1.03);
    }

    /* Désactive les effets hover inutiles sur mobile */
    .cartes-reliees:hover .carte-unique {
        opacity: 1;
    }

    .carte-unique:hover {
        transform: none;
        box-shadow: 0 15px 35px rgba(0,0,0,.18);
    }

    .carte-unique:hover img {
        transform: scale(1.03);
    }

}