/* ==========================================================
   ACTUALITÉS & PREUVES D'IMPACT — reprend la charte du site
========================================================== */

.news-page,
.news-article {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

/* ---------- Filtres ---------- */
.news-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }

.news-filter {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.news-filter:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.news-filter.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- Étiquettes ---------- */
.news-badge {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}
.news-badge--field { background: var(--secondary); }
.news-badge--announcement { background: #1F2933; }
.news-badge--static { position: static; display: inline-block; box-shadow: none; }

.news-media-count {
    position: absolute;
    right: 0.9rem;
    bottom: 0.9rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
}

.news-eyebrow {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
}

.news-meta { font-size: 0.82rem; color: var(--text-light); }

.news-figure {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    background: var(--surface-accent);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.05rem;
}
.news-figure span { color: var(--hope-yellow); }
.news-figure--small { font-size: 0.88rem; padding: 0.3rem 0.7rem; }
.news-figure--callout { font-size: 1.25rem; padding: 0.8rem 1.2rem; margin-bottom: 1.25rem; }

.news-activity {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-activity::before { content: '↳'; color: var(--primary); }
.news-activity:hover { background: var(--surface-accent); color: var(--primary); }

/* ---------- À la une ---------- */
.news-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    margin-bottom: 2.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 40px -26px rgba(15, 59, 55, 0.45);
}

.news-featured__media { position: relative; display: block; min-height: 340px; overflow: hidden; background: var(--surface-muted); }
.news-featured__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-featured:hover .news-featured__media img { transform: scale(1.04); }

.news-featured__body { display: flex; flex-direction: column; gap: 0.9rem; padding: 2.2rem 2rem; }
.news-featured__body h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; }
.news-featured__body h2 a:hover { color: var(--primary); }
.news-featured__body > p:not(.news-figure) { color: var(--text-light); font-size: 1.02rem; line-height: 1.6; }
.news-featured__body .news-figure { align-self: flex-start; }
.news-featured__footer { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }

/* ---------- Grille ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1.5rem; }

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -22px rgba(15, 59, 55, 0.5); }

.news-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-muted); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s ease; }
.news-card:hover .news-card__media img { transform: scale(1.05); }

.news-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.news-card__body h3 { font-size: 1.12rem; line-height: 1.3; }
.news-card__body h3 a:hover { color: var(--primary); }
.news-card__body > p:not(.news-figure) { color: var(--text-light); font-size: 0.94rem; line-height: 1.55; }
.news-card__body .news-activity { margin-top: auto; }

.news-empty { padding: 3rem 1rem; text-align: center; color: var(--text-light); }
.news-empty h2 { color: var(--text); margin-bottom: 0.5rem; }
.news-empty .btn { margin-top: 1rem; }

/* ---------- Appel à l'action ---------- */
.news-cta {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 2rem 2.2rem;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.news-cta h2 { font-size: 1.45rem; margin-bottom: 0.3rem; }
.news-cta p { opacity: 0.9; }
.news-cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.news-cta .btn-outline { border-color: #fff; color: #fff; }
:root[data-theme="dark"] .news-cta { background: linear-gradient(135deg, var(--brand-deep), var(--primary-dark)); }

/* ---------- Article ---------- */
.news-article__header { max-width: 820px; display: grid; gap: 0.75rem; justify-items: start; margin-bottom: 1.75rem; }
.news-back { color: var(--primary); font-weight: 600; font-size: 0.92rem; }
.news-article__header h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; }
.news-article__lead { font-size: 1.15rem; color: var(--text-light); line-height: 1.6; }

.news-article__cover { margin: 0 0 2.25rem; border-radius: 22px; overflow: hidden; aspect-ratio: 21 / 9; background: var(--surface-muted); }
.news-article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.news-article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.news-article__text p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1rem; }
.news-article__section { margin-top: 2rem; }
.news-article__section h2 { font-size: 1.3rem; margin-bottom: 1rem; }

.news-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0.75rem; }
.news-gallery figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface-muted); }
.news-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform 0.4s ease; }
.news-gallery a:hover img { transform: scale(1.05); }
.news-gallery figcaption { padding: 0.5rem 0.75rem; font-size: 0.85rem; color: var(--text-light); }
.news-video { width: 100%; border-radius: 14px; background: #000; }

.news-article__aside { position: sticky; top: 90px; display: grid; gap: 1rem; }
.news-related { display: grid; gap: 0.6rem; justify-items: start; padding: 1.4rem; border-radius: 18px; background: var(--card); border: 1px solid var(--border); }
.news-related h2 { font-size: 1.1rem; line-height: 1.3; }
.news-related p { color: var(--text-light); font-size: 0.93rem; }
.news-related--muted { background: var(--surface-muted); border-color: transparent; }

.news-others { margin-top: 3.5rem; }
.news-others > h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .news-featured { grid-template-columns: minmax(0, 1fr); }
    .news-featured__media { min-height: 0; aspect-ratio: 16 / 9; }
    .news-featured__body { padding: 1.5rem 1.4rem; }
    .news-article__layout { grid-template-columns: minmax(0, 1fr); }
    .news-article__aside { position: static; }
    .news-article__cover { aspect-ratio: 16 / 9; }
}

@media (max-width: 600px) {
    .news-page, .news-article { padding: 1.75rem 1rem 3rem; }
    .news-cta { padding: 1.5rem; }
}

/* Les longs mots ou liens d'un article ne débordent jamais de l'écran */
.news-article__text, .news-article__content { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .news-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
