.actu-cartes {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

#fond-bleu {
    background: #F5F9FD;
}

.actu-cartes__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.actu-cartes__titre {
    font-family: var(--lidfsg-font-title) !important;
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--lidfsg-blue-dark) !important;
    text-transform: uppercase;
    margin: 0;
}

.actu-cartes__titre span {
    color: var(--lidfsg-blue);
}

.actu-cartes__nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

button.actu-cartes__fleche {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--lidfsg-blue-dark) !important;
    color: white !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

button.actu-cartes__fleche:hover {
    background: white !important;
    color: #1A1A1D !important;
}

.actu-cartes__piste {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 14px 4px 24px;
    margin: -14px -4px -24px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, black 94%, transparent 100%);
    mask-image: linear-gradient(to right, black 94%, transparent 100%);
}

.actu-cartes__piste::-webkit-scrollbar {
    display: none;
}

.actu-carte {
    flex: 0 0 auto;
    width: 260px;
    scroll-snap-align: start;
    background: var(--lidfsg-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.actu-carte:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(27, 58, 75, 0.12);
}

.actu-carte__visuel {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 85%; /* même ratio que les cartes de l'archive actualités,
                          en % plutôt qu'en aspect-ratio pour la même raison
                          de compatibilité Safari sur un enfant flex. */
    background: var(--lidfsg-light);
    border-radius: 14px;
    overflow: hidden;
    flex: 0 0 auto;
}

.actu-carte__visuel .actu-carte__img {
    /* Sélecteur composé : la règle globale .elementor img{height:auto}
       d'Elementor (spécificité 0-1-1) passe sinon devant .actu-carte__img
       seul (0-1-0) et impose sa hauteur intrinsèque, ce qui fait déborder
       l'image sur le texte de la carte. */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.actu-carte__placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--lidfsg-blue) 0%, var(--lidfsg-blue-dark) 100%);
}

.actu-carte__corps {
    padding: 18px 6px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.actu-carte__titre {
    font-family: var(--lidfsg-font-title);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actu-carte__titre a {
    color: var(--lidfsg-dark);
    text-decoration: none;
}

.actu-carte__titre a:hover {
    color: var(--lidfsg-blue);
}

.actu-carte__date {
    font-family: var(--lidfsg-font-body);
    font-size: 0.78rem;
    color: var(--lidfsg-muted);
    margin: 0;
}

.actu-carte__extrait {
    font-family: var(--lidfsg-font-body);
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--lidfsg-text);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actu-carte__lien {
    align-self: flex-start;
    margin-top: auto;
    font-family: var(--lidfsg-font-body);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--lidfsg-blue);
    border: 1.5px solid var(--lidfsg-blue);
    border-radius: 999px;
    padding: 6px 16px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.actu-carte__lien:hover {
    background: var(--lidfsg-blue);
    color: #fff;
}

@media (max-width: 640px) {
    .actu-cartes { padding: 0 16px; }

    .actu-cartes__header {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .actu-cartes__titre {
        font-size: 1.5rem;
        text-align: center;
    }

    .actu-cartes__titre span {
        display: block;
    }

    .actu-carte { width: 220px; }
}
