:root {
    --lsa-color-date-back:  #1E4D0F; /* $color-primaire — vert forêt (blanc dessus : 14:1 AAA) */
    --lsa-color-date-text:  #ffffff;
    --lsa-color-title:      #1F1D17; /* $color-text — encre */
    --lsa-color-card-back:  #F2EFE8; /* $color-back-alt — calcaire */
    --lsa-color-card-hover: #1E4D0F; /* $color-primaire */
    --lsa-color-title-hover:#ffffff;
    --lsa-color-cta:        #1E4D0F; /* $color-primaire */
    --lsa-color-cta-hover:  #123008; /* $color-primaire-dark */
    --lsa-font-base:        "Public Sans", "Helvetica Neue", Arial, sans-serif; /* $font-family-base */
}

/* ── Conteneur ─────────────────────────────────────────────── */
.lsa-wrapper {
    display: block;
}

.lsa-event-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* ── Carte ──────────────────────────────────────────────────── */
.lsa-event {
    display: flex;
}

.lsa-event a {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    transition: box-shadow .2s ease, transform .2s ease;
}

.lsa-event a:hover,
.lsa-event a:focus {
    box-shadow: 0 6px 18px rgba(26,92,128,.25);
    transform: translateY(-3px);
}

.lsa-event a:focus {
    outline: 3px solid var(--lsa-color-cta);
    outline-offset: 2px;
}

/* ── Vignette (image ou placeholder commune) ────────────────── */
.lsa-event-media {
    width: 100%;
    aspect-ratio: 16 / 9;          /* taille uniforme, quelle que soit l'image */
    overflow: hidden;
    background-color: var(--lsa-color-card-back);
}

.lsa-event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;             /* remplit sans déformer, recadre le surplus */
    object-position: top;          /* garde le HAUT de l'image */
    display: block;
}

/* Placeholder : aplat couleur commune + léger dégradé + picto calendrier */
.lsa-event-media--ph {
    --lsa-ph-color: #1E4D0F;
    background-image:
        linear-gradient(135deg, rgba(255,255,255,.18), rgba(0,0,0,.18)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;
    background-size: cover, 30px 30px;
    background-color: var(--lsa-ph-color);
}

/* ── Badge date ─────────────────────────────────────────────── */
.lsa-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .6em .5em;
    background-color: var(--lsa-color-date-back);
    color: var(--lsa-color-date-text);
    font-family: var(--lsa-font-base);
    text-align: center;
    line-height: 1.1;
}

.lsa-event-day {
    display: block;
    font-size: .75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .85;
}

.lsa-event-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.lsa-event-month {
    display: block;
    font-size: .75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .85;
}

/* ── Corps de la carte ──────────────────────────────────────── */
.lsa-desc {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--lsa-color-card-back);
    padding: .7em .8em;
    text-align: center;
}

.lsa-desc h4,
.lsa-event-title {
    margin: 0;
    font-family: var(--lsa-font-base);
    font-size: .95em;
    font-weight: 600;
    color: var(--lsa-color-title);
    line-height: 1.3;
}

/* ── CTA ────────────────────────────────────────────────────── */
.lsa-cta-wrapper {
    text-align: right;
    margin: .75rem 0 0;
}

.lsa-cta {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    padding: .5em 1.2em;
    border: 2px solid var(--lsa-color-cta);
    border-radius: 4px;
    color: var(--lsa-color-cta);
    font-family: var(--lsa-font-base);
    font-weight: 700;
    font-size: .9em;
    text-decoration: none;
    letter-spacing: .03em;
    transition: background-color .2s ease, color .2s ease;
}

.lsa-cta:hover,
.lsa-cta:focus {
    background-color: var(--lsa-color-cta);
    color: #fff;
    outline: none;
}

.lsa-cta:focus-visible {
    outline: 3px solid var(--lsa-color-cta-hover);
    outline-offset: 2px;
}

/* ── Badge plage de dates (expositions multi-semaines) ─────── */
.lsa-event-date--range {
    gap: .15em;
    padding: .55em .6em;
}

.lsa-range-from,
.lsa-range-sep,
.lsa-range-to {
    display: block;
    font-family: var(--lsa-font-base);
    color: var(--lsa-color-date-text);
    text-align: center;
    line-height: 1.15;
}

.lsa-range-from,
.lsa-range-to {
    font-size: .8em;
    font-weight: 700;
    letter-spacing: .02em;
}

.lsa-range-sep {
    font-size: .7em;
    font-weight: 400;
    opacity: .8;
}

/* ── Badge commune ───────────────────────────────────────────── */
.lsa-badge {
    display: inline-block;
    margin-top: .45em;
    padding: .15em .55em;
    border-radius: 3px;
    font-size: .72em;
    font-weight: 600;
    letter-spacing: .03em;
    line-height: 1.4;
    white-space: nowrap;
}

/* ── Couleurs par type d'événement ──────────────────────────── */
/* Définir .lsa-{nick} pour chaque catégorie enfant de "evenement" */
/* Exemple : .lsa-concert { background-color: #C4683A; } */

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .lsa-event-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .lsa-event-list {
        grid-template-columns: 1fr;
    }
    .lsa-event a {
        flex-direction: row;
    }
    .lsa-event-media {
        display: none;             /* liste compacte sur mobile : pas de vignette */
    }
    .lsa-event-date {
        min-width: 5rem;
        flex-shrink: 0;
    }
    .lsa-cta-wrapper {
        text-align: center;
    }
}


/* ══ Visibilité — page non publiée ═══════════════════════════════════════════
   Événement privé ou réservé aux membres. N'apparaît jamais sur la page
   d'accueil (home_agenda.php filtre active='Y') : seulement quand ce layout est
   appelé depuis une section ou un autre code. La pastille .chapelle-flag est
   stylée dans chapelle.scss (Skin::visibility_flag). */

.lsa-desc .chapelle-flag {
    margin-top: .45em;
}

.lsa-event-unpublished .lsa-desc {
    background: repeating-linear-gradient(
        135deg,
        var(--lsa-color-card-back), var(--lsa-color-card-back) 8px,
        rgba(139, 58, 16, .06) 8px, rgba(139, 58, 16, .06) 16px
    );
}
