/* ═══════════════════════════════════════════════════════════
   MSP Actualités — Carrousel
   ═══════════════════════════════════════════════════════════ */

.mspa-wrapper {
    --mspa-primary:  #0596DE;
    --mspa-accent:   #A9C63F;
    --mspa-surface:  #ffffff;
    --mspa-border:   #e2e8f0;
    --mspa-text-1:   #0f172a;
    --mspa-text-2:   #475569;
    --mspa-text-3:   #6B7280;
    --mspa-bg:       #f4f7fb;
    --mspa-radius:   14px;
    --mspa-shadow:   0 2px 12px rgba(0,0,0,.07);
    font-family: inherit;
    padding: 40px 0 48px;
    background: var(--mspa-bg);
}

/* ── Header ─────────────────────────────────────────────── */
.mspa-header { margin-bottom: 28px; }

.mspa-section-title {
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 800;
    color: var(--mspa-text-1);
    margin: 0 0 6px;
    padding-bottom: 12px;
    position: relative;
}
.mspa-section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 44px; height: 3px;
    background: var(--mspa-primary);
    border-radius: 2px;
}

/* ── Filtres ─────────────────────────────────────────────── */
.mspa-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.mspa-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1.5px solid var(--mspa-border);
    background: var(--mspa-surface);
    color: var(--mspa-text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.mspa-filter-btn:hover {
    border-color: var(--mspa-primary);
    color: var(--mspa-primary);
}
.mspa-filter-btn--active {
    background: var(--mspa-accent);
    border-color: var(--mspa-accent);
    color: #1a1a1a;
}
.mspa-filter-btn:focus-visible {
    outline: 3px solid var(--mspa-primary);
    outline-offset: 2px;
}
.mspa-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 50px;
    background: rgba(0,0,0,.08);
    font-size: 11px;
    font-weight: 700;
}
.mspa-filter-btn--active .mspa-filter-count {
    background: rgba(0,0,0,.15);
}

/* ── Carrousel ───────────────────────────────────────────── */
.mspa-carousel-outer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mspa-carousel-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.mspa-carousel-track {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform .4s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
}

.mspa-slide {
    flex-shrink: 0;
    box-sizing: border-box;
}

.mspa-slide--hidden {
    visibility: hidden;
    pointer-events: none;
}

/* ── Fleches ─────────────────────────────────────────────── */
.mspa-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--mspa-border);
    background: var(--mspa-surface);
    color: var(--mspa-text-2);
    cursor: pointer;
    transition: all .2s;
    box-shadow: var(--mspa-shadow);
    font-family: inherit;
}
.mspa-arrow:hover {
    background: var(--mspa-primary);
    border-color: var(--mspa-primary);
    color: #fff;
    transform: scale(1.08);
}
.mspa-arrow:focus-visible {
    outline: 3px solid var(--mspa-primary);
    outline-offset: 2px;
}
.mspa-arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

/* ── Dots ────────────────────────────────────────────────── */
.mspa-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.mspa-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--mspa-border);
    cursor: pointer;
    padding: 0;
    transition: all .2s;
    font-family: inherit;
}
.mspa-dot--active {
    background: var(--mspa-primary);
    width: 24px;
    border-radius: 4px;
}
.mspa-dot:focus-visible {
    outline: 3px solid var(--mspa-primary);
    outline-offset: 3px;
}

/* ── Carte ───────────────────────────────────────────────── */
.mspa-card {
    background: var(--mspa-surface);
    border-radius: var(--mspa-radius);
    border: 1px solid var(--mspa-border);
    box-shadow: var(--mspa-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .22s, box-shadow .22s;
}
.mspa-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.1);
}

/* Image ── */
.mspa-card__img-link { display: block; overflow: hidden; }
.mspa-card__img {
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
}
.mspa-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.mspa-card:hover .mspa-card__img img { transform: scale(1.04); }
.mspa-card__img--empty { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }

/* Corps ── */
.mspa-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Badges catégorie ── */
.mspa-card__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.mspa-cat-badge {
    display: inline-block;
    background: var(--mspa-accent);
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 50px;
}

/* Titre ── */
.mspa-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--mspa-text-1);
    margin: 0;
    line-height: 1.35;
    flex: 1;
}
.mspa-card__title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size .25s;
}
.mspa-card__title a:hover { background-size: 100% 1px; }
.mspa-card__title a:focus-visible {
    outline: 3px solid var(--mspa-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Date ── */
.mspa-card__date {
    font-size: 12px;
    color: var(--mspa-text-3);
    font-weight: 500;
}

/* Extrait ── */
.mspa-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--mspa-text-2);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lire la suite ── */
.mspa-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mspa-primary);
    text-decoration: none;
    margin-top: auto;
    transition: gap .2s;
}
.mspa-card__read-more:hover { gap: 8px; }
.mspa-card__read-more:focus-visible {
    outline: 3px solid var(--mspa-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Vide ────────────────────────────────────────────────── */
.mspa-no-results {
    text-align: center;
    color: var(--mspa-text-3);
    font-style: italic;
    padding: 32px;
}

/* ── Reduced motion ──────────────────────────────────────── */
@media ( prefers-reduced-motion: reduce ) {
    .mspa-carousel-track { transition: none; }
    .mspa-card,
    .mspa-arrow,
    .mspa-dot,
    .mspa-filter-btn { transition: none; }
    .mspa-card:hover { transform: none; }
    .mspa-card:hover .mspa-card__img img { transform: none; }
    .mspa-arrow:hover { transform: none; }
}

/* ── Forced colors ───────────────────────────────────────── */
@media ( forced-colors: active ) {
    .mspa-card { border: 2px solid ButtonText; }
    .mspa-arrow { border: 2px solid ButtonText; }
    .mspa-filter-btn--active {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
        border-color: Highlight;
    }
    .mspa-cat-badge {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
    }
}
