/**
 * layout_as_grid5.css
 * Skin Vertaco — charte graphique Esprit-Vercors.fr
 *
 * @author Actupro Christian Loubechone / refonte Vertaco
 * @license http://www.gnu.org/copyleft/lesser.txt GNU Lesser General Public License
 */

:root {
    --g5-color-primary:     #1A5C80;
    --g5-color-primary-mid: #2B7FAA;
    --g5-color-accent:      #C4683A;
    --g5-color-focus:       #F5A623;
    --g5-color-border:      #D0D7DE;
    --g5-color-back:        #FFFFFF;
    --g5-color-back-alt:    #EEF4F8;
    --g5-color-text:        #1E1E1E;
    --g5-color-text-muted:  #595959;
    --g5-font-title:        "Source Serif 4", Georgia, serif;
    --g5-font-base:         "Source Sans 3", Arial, sans-serif;
    --g5-shadow-hover:      0 4px 16px rgba(43, 127, 170, .12);
}

/* ── Grille ─────────────────────────────────────────────────── */
.grille {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0;
    list-style: none;
}
@media (max-width: 992px) {
    .grille { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 576px) {
    .grille { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Carte ───────────────────────────────────────────────────── */
.act_une {
    position: relative;
    background: var(--g5-color-back);
    border: 0.5px solid var(--g5-color-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .18s ease, transform .18s ease;
}
.act_une:hover {
    box-shadow: var(--g5-shadow-hover);
    transform: translateY(-2px);
}

/* ── Image de couverture ─────────────────────────────────────── */
.act-thumb {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--g5-color-back-alt);
    flex-shrink: 0;
}
.act-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Méta overlay (date + catégorie) ─────────────────────────── */
.g5-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5em;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.g5-date {
    font-family: var(--g5-font-base);
    font-size: .8rem;
    font-weight: 600;
    color: var(--g5-color-primary);
    white-space: nowrap;
}

.g5-cat {
    font-family: var(--g5-font-base);
    font-size: .75rem;
    font-weight: 700;
    color: var(--g5-color-back);
    background: var(--g5-color-accent);
    border-radius: 3px;
    padding: .15em .5em;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Corps de la carte ───────────────────────────────────────── */
.act_article {
    padding: 14px 16px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
}

.act_article h3 {
    font-family: var(--g5-font-title);
    font-size: 1rem;
    font-weight: 600;
    color: var(--g5-color-primary);
    line-height: 1.3;
    margin: 0;
}

.act_article .intro {
    font-family: var(--g5-font-base);
    font-size: .875rem;
    color: var(--g5-color-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Pied de carte ───────────────────────────────────────────── */
.act_foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 16px 12px;
    border-top: 0.5px solid var(--g5-color-border);
    margin-top: auto;
}
.act_foot a.act_link {
    position: relative;
    z-index: 2;
    font-family: var(--g5-font-base);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--g5-color-primary-mid);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s ease;
}
.act_foot a.act_link::after {
    content: '→';
    font-size: .9em;
}
.act_foot a.act_link:hover,
.act_foot a.act_link:focus {
    color: var(--g5-color-accent);
    text-decoration: underline;
}

/* ── Lien englobant ──────────────────────────────────────────── */
.act_card_link {
    position: absolute;
    inset: 0;
    z-index: 1;
    font-size: 0;
    color: transparent;
    border-radius: 12px;
    outline-offset: 2px;
}
.act_card_link:focus-visible {
    outline: 3px solid var(--g5-color-focus);
}

/* ── Ancre nommée ────────────────────────────────────────────── */
.grid-anchor {
    display: block;
    height: 0;
    visibility: hidden;
}

/* ── Article expiré (visible éditeurs/associés seulement) ────── */
.act_une--expired {
    opacity: .6;
    border-color: var(--g5-color-text-muted);
}

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

/* ── Variante show_simple (1 colonne) ────────────────────────── */
.grid-1-small-1.grille {
    grid-template-columns: 1fr;
}
