/**
 * evenements.css — socle commun des événements (WP Event Manager), réseau Prado
 * Version 1.0.0 — chargé par le mu-plugin prado-evenements.php sur tous les sites,
 * après les CSS des thèmes enfants.
 *
 * Couleur des titres : variable --prado-evt-titre, définie par le mu-plugin
 * selon le site (bleu Prêtres/Sœurs, rouge France, vert Limonest).
 */

:root {
    --prado-evt-titre: #263875;
    --prado-evt-texte: #575756;
    --prado-evt-horaire: #C98F00; /* jaune Prado foncé, lisible sur fond blanc */
    --prado-evt-bord: #e3e6ef;
    --prado-evt-fond-infos: #F7F8FC;
}

/* =====================================================================
   1. AGENDA : grille de cartes
   ===================================================================== */

/* En-tête de l'extension (titre + boutons de vue) : inutile ici */
.event_listings .wpem-event-listing-header-title,
.event_listings .wpem-event-listing-header-title .wpem-heading-text {
    display: none;
}

/* La grille : autant de colonnes que la place le permet (min. 220 px),
   cartes alignées à gauche, du plus proche au plus lointain selon le tri. */
.event_listings_main .event_listings,
.event_listings_main #event-listing-view.prado-event-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
}

.prado-event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--prado-evt-bord);
    border-radius: 6px;
    overflow: hidden;
    font-family: "National Book", "National", sans-serif;
    font-weight: 700;
    transition: box-shadow .2s ease, transform .2s ease;
}

.prado-event-card:hover {
    box-shadow: 0 4px 14px rgba(38, 56, 117, .14);
    transform: translateY(-2px);
}

.prado-event-card__link,
.prado-event-card__link:hover,
.prado-event-card__link:focus {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding-bottom: 18px;
    color: inherit;
    text-decoration: none;
}

.prado-event-card__link:focus-visible {
    outline: 3px solid var(--prado-evt-titre);
    outline-offset: 2px;
}

.prado-event-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 6px;
}

.prado-event-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prado-event-card__dates,
.prado-event-card__annule,
.prado-event-card__title,
.prado-event-card__time,
.prado-event-card__location {
    padding: 0 18px;
}

.prado-event-card > a > :first-child:not(.prado-event-card__image) {
    padding-top: 18px;
}

.prado-event-card__dates {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prado-event-card__date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.prado-event-card__day,
.prado-event-card__month,
.prado-event-card__date-sep,
.prado-event-card__single-date {
    font-size: 1.2rem;
    color: var(--prado-evt-texte);
}

.prado-event-card__dates--single {
    display: block;
}

.prado-event-card__single-date {
    text-transform: capitalize;
}

.prado-event-card__title {
    font-size: 1.2rem;
    line-height: 1.25;
    color: var(--prado-evt-titre);
}

.prado-event-card__time {
    font-size: 1.05rem;
    color: var(--prado-evt-horaire);
}

.prado-event-card__location {
    margin-top: auto; /* lieu calé en bas de la carte */
    font-size: 1.05rem;
    color: var(--prado-evt-texte);
}

.prado-event-card__time::before,
.prado-event-card__location::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 6px;
}

.prado-event-card__time::before { content: "\f017"; }      /* horloge */
.prado-event-card__location::before { content: "\f3c5"; }  /* repère */

.prado-event-card__annule {
    align-self: flex-start;
    margin-left: 18px;
    padding: 2px 8px;
    font-size: .8rem;
    text-transform: uppercase;
    color: #fff;
    background: #E8443B;
    border-radius: 3px;
}

.prado-event-card--annule .prado-event-card__title {
    text-decoration: line-through;
}

/* Message « aucun événement » de l'extension */
.event_listings .no_event_listings_found {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--prado-evt-texte);
}

/* =====================================================================
   2. FICHE ÉVÉNEMENT (gabarit content-single-event_listing.php du thème)
   ===================================================================== */

.prado-evt {
    max-width: 1140px;
    margin: 0 auto 60px;
}

.prado-evt__alerte {
    margin: 0 0 24px;
    padding: 12px 18px;
    font-weight: 700;
    color: #fff;
    background: #E8443B;
    border-radius: 4px;
}

.prado-evt__alerte--passe {
    color: var(--prado-evt-texte);
    background: #ECECEC;
}

.prado-evt__grille {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 40px;
    align-items: start;
}

.prado-evt__image {
    margin: 0 0 24px;
}

.prado-evt__image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.prado-evt__description img {
    max-width: 100%;
    height: auto;
}

.prado-evt__infos {
    padding: 24px;
    background: var(--prado-evt-fond-infos);
    border-top: 4px solid var(--prado-evt-titre);
    border-radius: 4px;
}

@media (min-width: 1025px) {
    .prado-evt__infos {
        position: sticky;
        top: 90px;
    }
}

.prado-evt__infos-titre {
    margin: 0 0 16px;
    font-size: 1.3rem;
    color: var(--prado-evt-titre);
}

.prado-evt__infos dl {
    margin: 0;
}

.prado-evt__infos dt {
    margin-top: 14px;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--prado-evt-titre);
}

.prado-evt__infos dt:first-child {
    margin-top: 0;
}

.prado-evt__infos dd {
    margin: 2px 0 0;
    color: var(--prado-evt-texte);
}

.prado-evt__infos a {
    color: var(--prado-evt-titre);
    text-decoration: underline;
}

.prado-evt__bouton,
.prado-evt__infos a.prado-evt__bouton {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 18px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: var(--prado-evt-titre);
    border-radius: 4px;
}

.prado-evt__bouton:hover,
.prado-evt__bouton:focus {
    color: #fff;
    opacity: .9;
}

.prado-evt__retour {
    margin-top: 32px;
}

.prado-evt__retour a {
    font-weight: 700;
    color: var(--prado-evt-titre);
}

@media (max-width: 900px) {
    .prado-evt__grille {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Fiche d'événement : la page du thème Hello affiche le titre ; on lui donne
   la marge latérale habituelle sur mobile. */
.single-event_listing .site-main {
    padding-left: 16px;
    padding-right: 16px;
}
