/* ══════════════════════════════════════════════════════════
   Actualités — Easycom Solutions
   Reprend le langage visuel de services.css : cartes à
   border-radius 18px, bordure 1.5px #e8edf3, survol -7px,
   bleu de marque #0d6efd. Rien d'inventé ici qui n'existe
   déjà ailleurs sur le site.
   ══════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────── */
.news-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a2540 0%, #0a4fcf 55%, #1d6ff2 100%);
    overflow: hidden;
}

/* Trame de points : même motif que les illustrations générées,
   pour que le haut de page et les cartes se répondent */
.news-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(147, 197, 253, .30) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
}

.news-hero::after {
    content: '';
    position: absolute;
    top: -180px;
    right: -140px;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    border: 1.5px solid rgba(147, 197, 253, .22);
    box-shadow: 0 0 0 60px rgba(147, 197, 253, .07),
                0 0 0 130px rgba(147, 197, 253, .05);
}

.news-hero .hero-content {
    position: relative;
    z-index: 2;
}

.news-hero h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
}

.news-hero .hero-accent {
    color: #93c5fd;
}

.news-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(147, 197, 253, .45);
    border-radius: 20px;
    background: rgba(13, 110, 253, .28);
    color: #dbeafe;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 8px 16px;
}

/* ── Barre de statistiques ─────────────────────────────── */
.news-stats {
    background: #0d6efd;
    padding: 26px 0;
}

.news-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.news-stat-label {
    font-size: .82rem;
    color: rgba(255, 255, 255, .78);
    letter-spacing: .4px;
}

/* ── Barre de filtres ──────────────────────────────────── */
.news-filters {
    background: #fff;
    border: 1.5px solid #e8edf3;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    padding: 20px 22px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 9px 20px;
    border-radius: 24px;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}

.filter-tab:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

.filter-tab.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 14px rgba(13, 110, 253, .25);
}

.filter-tab .filter-count {
    font-size: .74rem;
    opacity: .75;
}

.news-search {
    position: relative;
}

.news-search .bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.news-search input {
    min-height: 46px;
    padding-left: 40px;
    border: 1.5px solid #dee2e6;
    border-radius: 12px;
    font-size: .9rem;
    color: #0f172a;
}

.news-search input::placeholder {
    color: #64748b;
}

.news-select {
    min-height: 46px;
    border: 1.5px solid #dee2e6;
    border-radius: 12px;
    font-size: .87rem;
    color: #0f172a;
    cursor: pointer;
}

.news-search input:focus,
.news-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .18);
    outline: none;
}

/* ── Carte article ─────────────────────────────────────── */
.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1.5px solid #e8edf3;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    transition: transform .25s, box-shadow .25s, border-color .25s;
    /* Décalage d'apparition posé par la vue via --news-delay, pour que la
       grille se compose de proche en proche plutôt que d'un bloc */
    animation: newsFadeUp .35s ease both;
    animation-delay: var(--news-delay, 0s);
}

.news-card:hover,
.news-card:focus-within {
    transform: translateY(-7px);
    box-shadow: 0 16px 40px rgba(13, 110, 253, .13);
    border-color: #0d6efd;
}

.news-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #eef2f7;
    overflow: hidden;
}

.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 5px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    color: #0a4fcf;
    text-decoration: none;
}

.news-card-cat:hover {
    background: #fff;
    color: #0d6efd;
}

.news-card-body {
    padding: 18px 22px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-weight: 800;
    font-size: 1.02rem;
    line-height: 1.4;
    color: #1e2d3d;
    margin-bottom: 10px;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
}

/* La carte entière est cliquable via ce pseudo-élément, mais c'est
   bien le lien du titre qui porte le focus clavier : un seul élément
   focusable par carte, dans l'ordre de lecture. */
.news-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.news-card:hover .news-card-title a,
.news-card-title a:focus-visible {
    color: #0d6efd;
}

.news-card-excerpt {
    font-size: .87rem;
    color: #475569;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 14px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 12px 22px 18px;
    border-top: 1px solid #f0f3f8;
    font-size: .78rem;
    color: #64748b;
}

.news-card-meta .bi {
    margin-right: 4px;
}

/* ── Article mis en avant ──────────────────────────────── */
.news-featured {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #fff;
    border: 1.5px solid #e8edf3;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .07);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.news-featured:hover,
.news-featured:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 18px 46px rgba(13, 110, 253, .15);
    border-color: #0d6efd;
}

.news-featured-media {
    position: relative;
    min-height: 320px;
    background: #eef2f7;
}

.news-featured-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-featured-body {
    padding: 34px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-featured-body h2 {
    font-weight: 800;
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    line-height: 1.3;
    color: #1e2d3d;
    margin-bottom: 14px;
}

.news-featured-body h2 a {
    color: inherit;
    text-decoration: none;
}

.news-featured-body h2 a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.news-featured:hover .news-featured-body h2 a,
.news-featured-body h2 a:focus-visible {
    color: #0d6efd;
}

.news-featured-body p {
    font-size: .94rem;
    color: #475569;
    line-height: 1.7;
}

.news-featured-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 5px 12px;
    border-radius: 12px;
    background: #e8f0ff;
    color: #0a4fcf;
    margin-bottom: 14px;
}

/* ── État vide ─────────────────────────────────────────── */
.news-empty {
    background: #fff;
    border: 1.5px dashed #d7e0ea;
    border-radius: 18px;
    padding: 56px 28px;
    text-align: center;
    color: #475569;
}

.news-empty .bi {
    font-size: 2.4rem;
    color: #94a3b8;
}

/* ── Bandeau CTA ───────────────────────────────────────── */
.news-cta {
    background: linear-gradient(135deg, #0d6efd 0%, #0a4fcf 100%);
    border-radius: 20px;
    color: #fff;
    padding: 48px 40px;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════
   Page article
   ══════════════════════════════════════════════════════════ */

.news-article-hero {
    position: relative;
    background: linear-gradient(135deg, #0a2540 0%, #0a4fcf 60%, #1d6ff2 100%);
    padding: 56px 0 44px;
    overflow: hidden;
}

.news-article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(147, 197, 253, .26) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
}

.news-article-hero > .container {
    position: relative;
    z-index: 2;
}

.news-article-hero h1 {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.55rem, 3.2vw, 2.5rem);
    line-height: 1.25;
    /* La longueur de ligne d'un titre long reste lisible */
    max-width: 20ch;
    max-width: min(100%, 24ch);
}

.news-article-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 6px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    color: #0a4fcf;
    text-decoration: none;
}

.news-article-cat:hover {
    background: #fff;
    color: #0d6efd;
}

.news-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    color: rgba(255, 255, 255, .82);
    font-size: .86rem;
}

.news-article-meta .bi {
    margin-right: 5px;
}

/* Le thème pose un `padding-top` généreux sur `.content-wrap`, pensé pour des
   pages qui démarrent à froid. Ici le bandeau de titre joue déjà ce rôle :
   cumuler les deux laissait une bande vide sous l'en-tête, très visible en
   mobile. On neutralise donc le padding du thème et on garde le `my-5` de la
   grille, qui suffit à aérer. */
.news-article-hero + #content > .content-wrap {
    padding-top: 0;
}

/* ── Corps de l'article ────────────────────────────────── */
.news-article-figure {
    border-radius: 18px;
    overflow: hidden;
    border: 1.5px solid #e8edf3;
    aspect-ratio: 16 / 9;
    background: #eef2f7;
}

.news-article-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-article-lead {
    font-size: 1.12rem;
    line-height: 1.7;
    color: #1e2d3d;
    font-weight: 500;
    padding-left: 18px;
    border-left: 4px solid #0d6efd;
}

.news-article-content {
    font-size: 1.03rem;
    line-height: 1.8;
    color: #334155;
    /* 65-75 caractères par ligne : au-delà, l'œil perd la ligne suivante */
    max-width: 72ch;
}

.news-article-content p {
    margin-bottom: 1.15rem;
}

.news-article-content strong {
    color: #1e2d3d;
}

.news-article-content ul {
    padding-left: 1.3rem;
    margin-bottom: 1.15rem;
}

.news-article-content li {
    margin-bottom: .45rem;
}

/* Renvoi vers la source, pour les synthèses */
.news-source-note {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #f2f7ff;
    border: 1.5px solid #d6e6ff;
    border-radius: 16px;
    padding: 18px 22px;
    color: #1e3a5f;
    font-size: .92rem;
    line-height: 1.6;
}

.news-source-note .bi {
    font-size: 1.2rem;
    color: #0d6efd;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Barre latérale ────────────────────────────────────── */
.news-sidebar {
    position: sticky;
    /* Dégage la hauteur de l'en-tête fixe du thème */
    top: 100px;
}

.news-widget {
    background: #fff;
    border: 1.5px solid #e8edf3;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    padding: 22px;
}

.news-widget-title {
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #64748b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f3f8;
}

/* Liste des thématiques */
.news-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-cat-list li + li {
    margin-top: 6px;
}

.news-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #334155;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.news-cat-list a:hover {
    background: #f2f7ff;
    color: #0d6efd;
}

.news-cat-list a[aria-current="page"] {
    background: #0d6efd;
    color: #fff;
}

.news-cat-count {
    font-size: .78rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    background: #eef2f7;
    color: #475569;
}

.news-cat-list a:hover .news-cat-count {
    background: #dbeafe;
    color: #0a4fcf;
}

.news-cat-list a[aria-current="page"] .news-cat-count {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

/* Chiffres clés */
.news-figure-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f3f8;
    font-size: .88rem;
    color: #475569;
}

.news-figure-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.news-figure-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0d6efd;
    line-height: 1;
}

/* Encart d'appel dans la colonne */
.news-widget-cta {
    background: linear-gradient(135deg, #0d6efd 0%, #0a4fcf 100%);
    border: 0;
    color: #fff;
    text-align: center;
}

.news-widget-cta .news-widget-title {
    color: rgba(255, 255, 255, .78);
    border-bottom-color: rgba(255, 255, 255, .2);
}

/* ── Section « à lire aussi » ──────────────────────────── */
.news-related {
    background: #f7f9fc;
    border-top: 1px solid #e8edf3;
    padding: 56px 0;
}

.news-section-title {
    font-weight: 800;
    font-size: 1.4rem;
    color: #1e2d3d;
}

.news-section-kicker {
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #0d6efd;
}

/* ── Accessibilité et divers ───────────────────────────── */
.filter-tab:focus-visible,
.news-card-title a:focus-visible,
.news-featured-body h2 a:focus-visible,
.news-card-cat:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 3px;
    border-radius: 6px;
}

@keyframes newsFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 991px) {
    /* La colonne latérale passe sous l'article : plus rien à coller en haut */
    .news-sidebar {
        position: static;
        top: auto;
    }
    .news-article-hero {
        padding: 40px 0 32px;
    }
    .news-featured {
        grid-template-columns: 1fr;
    }
    .news-featured-media {
        min-height: 220px;
    }
    .news-featured-body {
        padding: 26px 24px;
    }
}

@media (max-width: 575px) {
    .news-hero {
        min-height: 320px;
    }
    .news-filters {
        padding: 16px;
    }
    .news-cta {
        padding: 32px 20px;
    }
    .news-card-body {
        padding: 16px 18px 4px;
    }
    .news-card-meta {
        padding: 12px 18px 16px;
    }
}

/* Respect de la préférence système : aucune animation ni
   déplacement au survol pour qui demande moins de mouvement */
@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-featured {
        animation: none;
        transition: box-shadow .2s, border-color .2s;
    }
    .news-card:hover,
    .news-card:focus-within,
    .news-featured:hover,
    .news-featured:focus-within {
        transform: none;
    }
}
