/**
 * layout_as_last_news.css — style éditorial
 * Skin Alban — Saint-Alban-du-Rhône
 *
 * KNACSS actif : html { font-size: 62.5% } → 1rem = 10px → valeur_px ÷ 10 = valeur_rem
 *
 * Différenciation volontaire vs simple_agenda :
 *   simple_agenda → calendrier compact, badge date, sans image, cards minimalistes
 *   last_news     → éditorial, images grandes, accent turquoise, titres champagne, hover tint vert
 */

:root {
    --ln-color-primary:      #436660; /* $color-c — vert kaki */
    --ln-color-primary-mid:  #12A187; /* $color-tabs */
    --ln-color-accent:       #17B096; /* $color-button — turquoise */
    --ln-color-accent-dark:  #297367; /* $color-d */
    --ln-color-focus:        #F5A623; /* ambre — contraste suffisant sur fond vert */
    --ln-color-border:       #E8E6E3; /* $color-grey */
    --ln-color-back:         #FFFFFF;
    --ln-color-back-alt:     #E8FFF9; /* $color-nav-cur-bckg — vert très clair */
    --ln-color-text:         #374643; /* $color-text */
    --ln-color-text-muted:   #637270;
    --ln-shadow-card:        0 2px 8px rgba(0,0,0,.07);
    --ln-shadow-hover:       0 8px 24px rgba(67,102,96,.18); /* $color-c tint */
    --ln-font-title:         "champagne", Georgia, serif;
    --ln-font-base:          Arial, sans-serif;
}

/* ── En-tête section ──────────────────────────────────────── */
.last-news-container {
    padding: 3.2rem 0;
}

.last-news-title {
    text-align: center;
    font-family: var(--ln-font-title);
    font-size: clamp(2.2rem, 3vw, 3rem);
    color: var(--ln-color-primary);
    margin: 0 0 2.4rem;
}

/* ── Grille 4 colonnes ────────────────────────────────────── */
.last-news-container .grid-4-small-2,
.last-news-container .grid-4-small-1 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 992px) {
    .last-news-container .grid-4-small-2,
    .last-news-container .grid-4-small-1 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.6rem;
    }
}

@media (max-width: 576px) {
    .last-news-container .grid-4-small-2,
    .last-news-container .grid-4-small-1 {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }
}

/* ── Carte ────────────────────────────────────────────────── */
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--ln-color-back);
    border: 2px solid var(--ln-color-accent);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: var(--ln-shadow-card);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
    height: 100%;
}

.news-card:hover {
    border-color: var(--ln-color-accent-dark);
    box-shadow: var(--ln-shadow-hover);
    transform: translateY(-4px);
}

/* ── Lien accessible (stretched-link) ────────────────────── */
.news-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    font-size: 0;
    color: transparent;
    border-radius: 1rem;
    outline-offset: 3px;
}

.news-card-link:focus-visible {
    outline: 3px solid var(--ln-color-focus);
}

/* ── Image ────────────────────────────────────────────────── */
.news-card-image {
    height: 20rem;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--ln-color-back-alt);
    position: relative;
    overflow: hidden;
    transition: filter .22s ease;
}

/* Tint vert au survol */
.news-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ln-color-accent);
    opacity: 0;
    transition: opacity .22s ease;
}

.news-card:hover .news-card-image::after {
    opacity: .12;
}

/* ── Contenu ──────────────────────────────────────────────── */
.news-card-content {
    padding: 1.4rem 1.6rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
    overflow: hidden;
}

/* Titre champagne, clampage 2 lignes */
.news-card-title {
    font-family: var(--ln-font-title);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--ln-color-primary);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s ease;
}

.news-card:hover .news-card-title {
    color: var(--ln-color-accent);
}

/* Introduction, clampage 3 lignes */
.news-card-intro {
    font-family: var(--ln-font-base);
    font-size: 1.4rem;
    color: var(--ln-color-text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Pied — bande turquoise ───────────────────────────────── */
.news-card-footer {
    background: var(--ln-color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.6rem 1.4rem;
    margin-top: auto;
    transition: background .18s ease;
    flex-shrink: 0;
}

.news-card:hover .news-card-footer {
    background: var(--ln-color-accent-dark);
}

.news-card-button {
    position: relative;
    z-index: 2;
    font-family: var(--ln-font-base);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.news-card-button::after {
    content: ' →';
}

/* ── Article expiré (visible éditeurs/associés seulement) ────── */
.news-card--expired {
    opacity: .6;
    border-color: var(--ln-color-text-muted, #637270);
}

.ln-expired-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    background: var(--ln-color-text-muted, #637270);
    color: #fff;
    font-family: var(--ln-font-base);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .2em .55em;
    border-radius: 3px;
}
