/* ============================================================
   ACTUALITÉS — rubrique d'accueil + pages /actualites
   ============================================================ */
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.nw-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface-1); border: 1px solid var(--line-1); border-radius: var(--radius-lg, 20px);
    color: var(--tx-1); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nw-card:hover { transform: translateY(-4px); border-color: var(--tx-1); box-shadow: 0 22px 44px -32px rgba(0,0,0,.45); }
.nw-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-inset); overflow: hidden; }
.nw-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.nw-card:hover .nw-media img { transform: scale(1.04); }
/* Sans image : visuel de marque (fond noir, icône + « CWS News ») */
.nw-media-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; height: 100%; min-height: 140px;
    background: radial-gradient(120% 120% at 100% 0%, #2e2e2e 0%, #0d0d0d 60%);
    color: #fff;
}
.nw-media-empty svg, .nw-media-empty i { width: 38px; height: 38px; opacity: .9; }
.nw-media-empty::after { content: 'CWS · NEWS'; font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .28em; opacity: .75; }
:root[data-theme="dark"] .nw-media-empty { background: radial-gradient(120% 120% at 100% 0%, #3a3a3a 0%, #1a1a1a 60%); }
.nw-body { display: flex; flex-direction: column; gap: .55rem; padding: 1.15rem 1.25rem 1.3rem; flex: 1; }
.nw-date { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tx-1); }
.nw-date svg, .nw-date i { width: 14px; height: 14px; }
.nw-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--tx-1); }
.nw-excerpt { font-size: .92rem; line-height: 1.6; color: var(--tx-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-more { margin-top: auto; padding-top: .4rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 700; color: var(--tx-1); }
.nw-more svg, .nw-more i { width: 16px; height: 16px; transition: transform .2s ease; }
.nw-card:hover .nw-more svg { transform: translateX(3px); }
.nw-all { display: flex; justify-content: center; margin-top: 2rem; }

/* Mise en avant : la 1re actualité en grand sur les écrans larges */
@media (min-width: 900px) {
    .nw-grid.is-featured { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
    .nw-grid.is-featured .nw-card:first-child { grid-row: span 2; }
    .nw-grid.is-featured .nw-card:first-child .nw-media { aspect-ratio: 16 / 10; }
    .nw-grid.is-featured .nw-card:first-child .nw-title { font-size: 1.5rem; }
    .nw-grid.is-featured .nw-card:not(:first-child) { flex-direction: row; }
    .nw-grid.is-featured .nw-card:not(:first-child) .nw-media { aspect-ratio: auto; width: 40%; flex-shrink: 0; }
    .nw-grid.is-featured .nw-card:not(:first-child) .nw-excerpt { -webkit-line-clamp: 2; }
}

/* ── Pages /actualites ─────────────────────────────── */
.nw-page { padding: 8.5rem 1.5rem 5rem; }
.nw-page .hm-container { max-width: 1100px; }
.nw-back { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 700; color: var(--tx-1); margin-bottom: 1.5rem; }
.nw-back svg, .nw-back i { width: 17px; height: 17px; }
.nw-article { max-width: 760px; margin: 0 auto; }
.nw-article h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--tx-1); margin: .75rem 0 1rem; }
.nw-article .nw-lead { font-size: 1.12rem; line-height: 1.65; color: var(--tx-1); font-weight: 500; margin-bottom: 1.75rem; }
.nw-article-media { border-radius: var(--radius-lg, 20px); overflow: hidden; margin-bottom: 2rem; border: 1px solid var(--line-1); }
.nw-article-media img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.nw-article-body { font-size: 1.03rem; line-height: 1.85; color: var(--tx-1); }
.nw-article-body p { margin-bottom: 1.1rem; }
.nw-other { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line-1); }
.nw-other h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1.25rem; color: var(--tx-1); }
.nw-empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line-1); border-radius: 18px; color: var(--tx-1); }
.nw-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; color: var(--tx-1); }

@media (max-width: 640px) {
    .nw-page { padding: 7rem 1rem 3.5rem; }
    .nw-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ACCUEIL — rubrique « Actualités » (titre à gauche, une à droite)
   ============================================================ */
.nwf { padding: 5rem 2rem; position: relative; }
.nwf-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.3fr); gap: 3rem; align-items: stretch; }
.nwf-side { display: flex; flex-direction: column; gap: 1.75rem; }
.nwf-title { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; color: var(--tx-1); }
.nwf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nwf-list li { border-top: 1px solid var(--line-1); }
.nwf-list li:last-child { border-bottom: 1px solid var(--line-1); }
.nwf-list a { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 0; color: var(--tx-1); }
.nwf-list-date { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nwf-list-title { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.nwf-list a:hover .nwf-list-title { text-decoration: underline; text-underline-offset: 3px; }
.nwf-all { margin-top: auto; display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tx-1); }
.nwf-all svg, .nwf-all i { width: 17px; height: 17px; transition: transform .2s ease; }
.nwf-all:hover svg { transform: translateX(4px); }

.nwf-feature {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 500px; overflow: hidden; color: #fff; isolation: isolate;
    background: #111;
}
.nwf-feature.no-image { background: radial-gradient(120% 120% at 100% 0%, #3a3a3a 0%, #0d0d0d 65%); }
.nwf-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s ease; }
.nwf-feature:hover .nwf-bg { transform: scale(1.04); }
.nwf-feature::before {   /* voile sombre : lisibilité du texte blanc */
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.05) 30%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.85) 100%);
}
.nwf-label { position: absolute; top: 1.25rem; left: 1.9rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.nwf-content { padding: 2rem 1.9rem 2.1rem; max-width: 980px; }
.nwf-content h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 2.8vw, 2.45rem); font-weight: 500; line-height: 1.2; letter-spacing: -.01em; color: #fff; margin-bottom: .9rem; }
.nwf-content p { font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,.95); max-width: 820px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nwf-more { display: inline-flex; align-items: center; gap: 1.5rem; margin-top: 2.25rem; font-size: 1rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.nwf-arrow { width: 130px; height: 16px; overflow: visible; fill: none; stroke: #3d9bff; stroke-width: 2; transition: transform .25s ease; }
.nwf-feature:hover .nwf-arrow { transform: translateX(8px); }

@media (max-width: 980px) {
    .nwf-inner { display: flex; flex-direction: column; gap: 1.5rem; }
    .nwf-side { display: contents; }          /* titre · une · liste · lien */
    .nwf-title { order: 0; }
    .nwf-feature { order: 1; min-height: 420px; }
    .nwf-list { order: 2; }
    .nwf-all { order: 3; margin-top: 0; }
}
@media (max-width: 640px) {
    .nwf { padding: 3.5rem 1rem; }
    .nwf-feature { min-height: 380px; }
    .nwf-label { left: 1.2rem; }
    .nwf-content { padding: 1.5rem 1.2rem 1.6rem; }
    .nwf-content p { font-size: .95rem; }
    .nwf-more { margin-top: 1.5rem; gap: 1rem; }
    .nwf-arrow { width: 90px; }
}

/* ============================================================
   PAGE /actualites — tuiles (gris clair, image estompée ;
   au survol : image pleine + voile sombre + texte blanc)
   ============================================================ */
.nw-page .hm-container { max-width: 1320px; }
.nwt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 3rem; flex-wrap: wrap; margin-bottom: 2.25rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line-1); }
.nwt-head p { max-width: 460px; font-size: 1rem; line-height: 1.6; color: var(--tx-1); }
.nwt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.nwt {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 460px; padding: 2rem 1.9rem 2rem;
    background: #f2f2f2; color: #111;
    transition: color .35s ease;
}
.nwt-bg {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
    filter: grayscale(1); opacity: .16;
    transition: opacity .45s ease, filter .45s ease, transform 1s ease;
}
.nwt::before {   /* voile sombre, visible au survol */
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.85) 100%);
    opacity: 0; transition: opacity .45s ease;
}
.nwt.no-image::before { background: radial-gradient(120% 120% at 100% 0%, #3a3a3a 0%, #0d0d0d 65%); }
.nwt-label { font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.nwt-content { display: flex; flex-direction: column; }
.nwt h3 { font-family: var(--font-display); font-size: clamp(1.45rem, 2.2vw, 2rem); font-weight: 400; line-height: 1.22; letter-spacing: -.005em; margin-bottom: .9rem; overflow-wrap: anywhere; }
.nwt p { font-size: 1rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nwt-more { display: inline-flex; align-items: center; gap: .9rem; margin-top: 2.5rem; font-size: 1rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.nwt-more svg { width: 11px; height: 19px; fill: none; stroke: #0468b1; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease, stroke .25s ease; }

/* Survol / focus : passage en sombre */
.nwt:hover, .nwt:focus-visible { color: #fff; }
.nwt:hover .nwt-bg, .nwt:focus-visible .nwt-bg { opacity: 1; filter: grayscale(0); transform: scale(1.04); }
.nwt:hover::before, .nwt:focus-visible::before { opacity: 1; }
.nwt:hover .nwt-more svg, .nwt:focus-visible .nwt-more svg { stroke: #3d9bff; transform: translateX(4px); }
.nwt:focus-visible { outline: 3px solid #3d9bff; outline-offset: 3px; }

:root[data-theme="dark"] .nwt { background: #1b1b1b; color: #fff; }
:root[data-theme="dark"] .nwt-bg { opacity: .22; }
:root[data-theme="dark"] .nwt-more svg { stroke: #3d9bff; }

/* Écrans tactiles : pas de survol → on montre la photo en couleur, texte blanc */
@media (hover: none) {
    .nwt:not(.no-image) { color: #fff; }
    .nwt:not(.no-image) .nwt-bg { opacity: 1; filter: none; }
    .nwt:not(.no-image)::before { opacity: 1; }
    .nwt:not(.no-image) .nwt-more svg { stroke: #3d9bff; }
}

@media (max-width: 1080px) { .nwt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
@media (max-width: 680px) {
    .nwt-grid { grid-template-columns: 1fr; gap: 16px; }
    .nwt { min-height: 380px; padding: 1.5rem 1.35rem; }
    .nwt-more { margin-top: 1.75rem; }
}

/* ============================================================
   PAGE ARTICLE /actualites/{id} — style éditorial
   ============================================================ */
.nwa-hero {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: min(78vh, 680px); display: flex; align-items: flex-end;
    padding: 9rem 2rem 3.5rem; color: #fff; background: #111;
}
.nwa-hero.no-image { background: radial-gradient(120% 140% at 85% 0%, #3a3a3a 0%, #0d0d0d 60%); min-height: 460px; }
.nwa-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.nwa-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.1) 35%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.88) 100%); }
.nwa-hero-inner { width: 100%; max-width: 1180px; margin: 0 auto; }
.nwa-crumbs { display: flex; flex-wrap: wrap; gap: .55rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.25rem; }
.nwa-crumbs a { color: #fff; opacity: .9; }
.nwa-crumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.nwa-crumbs span { opacity: .6; }
.nwa-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; max-width: 920px; color: #fff; }
.nwa-standfirst { margin-top: 1.25rem; max-width: 760px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; color: rgba(255,255,255,.93); }

.nwa-layout { max-width: 1180px; margin: 0 auto; padding: 3.5rem 2rem 4rem; display: grid; grid-template-columns: 230px minmax(0, 720px); gap: 4rem; justify-content: center; }
.nwa-meta { position: sticky; top: 6.5rem; align-self: start; display: flex; flex-direction: column; gap: 1.4rem; }
.nwa-meta-row { display: flex; flex-direction: column; gap: .4rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line-1); }
.nwa-meta-label { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tx-1); }
.nwa-meta-value { font-size: 1rem; font-weight: 600; color: var(--tx-1); }
.nwa-share { display: flex; gap: .5rem; flex-wrap: wrap; }
.nwa-share-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-1); background: var(--surface-1); color: var(--tx-1); cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.nwa-share-btn svg, .nwa-share-btn i { width: 17px; height: 17px; }
.nwa-share-btn:hover, .nwa-share-btn.is-done { background: #000; color: #fff; border-color: #000; }
:root[data-theme="dark"] .nwa-share-btn:hover, :root[data-theme="dark"] .nwa-share-btn.is-done { background: #fff; color: #000; border-color: #fff; }
.nwa-copied { font-size: .8rem; font-weight: 600; color: #15803d; min-height: 1em; }
.nwa-back { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tx-1); }
.nwa-back svg, .nwa-back i { width: 17px; height: 17px; transition: transform .2s ease; }
.nwa-back:hover svg { transform: translateX(-4px); }

.nwa-body { font-size: 1.12rem; line-height: 1.85; color: var(--tx-1); }
.nwa-body p { margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.nwa-body p.nwa-first { font-size: 1.32rem; line-height: 1.7; font-weight: 500; }
.nwa-end { display: flex; align-items: center; gap: 1rem; margin-top: 3rem; }
.nwa-end span { flex: 1; height: 1px; background: var(--line-1); }
.nwa-end-logo { width: 38px; height: auto; opacity: .85; filter: brightness(0); }
:root[data-theme="dark"] .nwa-end-logo { filter: brightness(0) invert(1); }

.nwa-more { background: var(--section-alt-bg); border-top: 1px solid var(--line-1); padding: 4rem 2rem 5rem; }
.nwa-more-inner { max-width: 1320px; margin: 0 auto; }
.nwa-more-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.nwa-more-head h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -.02em; color: var(--tx-1); }
.nwa-more .nwf-all { margin-top: 0; }

@media (max-width: 900px) {
    .nwa-layout { grid-template-columns: 1fr; gap: 2rem; padding: 2.25rem 1.25rem 3rem; }
    .nwa-meta { position: static; flex-direction: row; flex-wrap: wrap; gap: 1rem 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line-1); }
    .nwa-meta-row { border-bottom: 0; padding-bottom: 0; }
    .nwa-back { width: 100%; }
}
@media (max-width: 640px) {
    .nwa-hero { padding: 7.5rem 1.1rem 2.25rem; min-height: 520px; }
    .nwa-hero.no-image { min-height: 380px; }
    .nwa-body { font-size: 1.02rem; }
    .nwa-body p.nwa-first { font-size: 1.15rem; }
    .nwa-more { padding: 3rem 1rem 3.5rem; }
}

/* Page article : l'en-tête du site est masqué → moins d'espace en haut du visuel */
.nwa-hero { padding-top: 4.5rem; }
@media (max-width: 640px) { .nwa-hero { padding-top: 3.5rem; } }
