/**
 * JH Events — grille des événements ([jh_events])
 */

.jh-events-grid {
    display: grid;
    grid-template-columns: repeat(var(--jh-events-cols, 4), 1fr);
    gap: 28px;
    width: 100%;
    margin: 0;
    padding: 0;
}

@media (max-width: 999px) {
    .jh-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .jh-events-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Carte (non cliquable : simple affichage) --- */
.jh-event-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    color: inherit;
}

/* --- Média (image à la une) --- */
.jh-event-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
}

.jh-event-card__media .jh-event-card__img {
    width: 100%;
    height: 100% !important; /* force face au "img { height: auto }" du thème Salient */
    object-fit: cover !important;
    display: block;
}

.jh-event-card__media-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d6d6d6 100%);
}

/* Fallback aspect-ratio (navigateurs anciens) */
@supports not (aspect-ratio: 4 / 3) {
    .jh-event-card__media {
        height: 0;
        padding-bottom: 75%;
    }
    .jh-event-card__img,
    .jh-event-card__media-placeholder {
        position: absolute;
        top: 0;
        left: 0;
    }
}

/* --- Corps de carte --- */
.jh-event-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px 22px;
}

.jh-event-card__date {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #d44300; /* orange charte (cf. palette TinyMCE du thème) */
}

.jh-event-card__title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    color: #253c30; /* vert charte */
}

.jh-event-card__lieu {
    margin: 0;
    font-size: 0.9rem;
    color: #687f77;
}

.jh-events-empty {
    font-style: italic;
    color: #687f77;
}
