/**
 * Agenda : page liste (includes/agenda-liste.php) et détail d'un
 * événement (evenement.php). Couleurs du thème : --color-rouge, --color-creme.
 */

/* ---------- Header / bannière de la page détail ---------- */
.ag-hero {
    background-size: cover;
    background-position: center;
    position: relative;
}

.ag-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
    margin: 0 auto 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ag-hero-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ag-hero-badge--venir {
    background-color: var(--color-rouge, #BD3223);
    border-color: var(--color-rouge, #BD3223);
}

.ag-hero.is-passe .ag-hero-badge {
    opacity: 0.75;
}

.ag-hero .title-page {
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* ---------- Prochain rendez-vous ---------- */
.ag-une {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 50px;
    border-radius: 22px;
    background-color: var(--color-creme, #FFF8E7);
}

.ag-une-img {
    display: block;
    background-color: #e9e3d6;
}

.ag-une-img img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
}

.ag-une-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 50px;
}

.ag-une-label {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: var(--color-rouge, #BD3223);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ag-une-body h2 {
    margin: 0 0 12px;
    font-size: 40px;
}

.ag-une-body h2 a,
.ag-body h3 a {
    color: #222;
    text-decoration: none;
}

.ag-une-body h2 a:hover,
.ag-body h3 a:hover {
    color: var(--color-rouge, #BD3223);
}

.ag-une-quand {
    margin-bottom: 16px !important;
    color: var(--color-rouge, #BD3223) !important;
    font-size: 18px !important;
    font-weight: 700;
}

.ag-une-body p {
    margin: 0 0 22px;
    color: #555;
    font-size: 16.5px;
    line-height: 1.65;
}

.ag-une-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}

.ag-compte {
    padding: 8px 16px;
    border-radius: 12px;
    background-color: #fff;
    color: var(--color-rouge, #BD3223);
    font-size: 15px;
    font-weight: 700;
}

/* ---------- Onglets et mois ---------- */
.ag-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 40px;
}

.ag-tabs a {
    padding: 10px 22px;
    border-radius: 30px;
    background-color: #f3f3f3;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.ag-tabs a:hover {
    color: #111;
    background-color: #e9e9e9;
}

.ag-tabs a.on {
    background-color: var(--color-rouge, #BD3223);
    color: #fff;
}

.ag-tabs a span {
    margin-left: 6px;
    opacity: 0.75;
}

.ag-mois {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 10px 0 22px;
    color: var(--color-rouge, #BD3223);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ag-mois::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.ag-vide {
    padding: 30px;
    border-radius: 16px;
    background-color: #f8f8f8;
    color: #666;
    text-align: center;
}

/* ---------- Carte d'un événement ---------- */
.ag-event {
    display: grid;
    grid-template-columns: 110px 150px minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    margin-bottom: 22px;
    padding: 22px;
    border-radius: 18px;
    background-color: #fff;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ag-event:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.ag-event.is-passe {
    opacity: 0.85;
}

.ag-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    padding: 0 6px;
    border-radius: 14px;
    background-color: var(--color-creme, #FFF8E7);
    color: var(--color-rouge, #BD3223);
    line-height: 1;
    text-align: center;
}

.ag-date small {
    color: #555;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ag-date strong {
    margin: 6px 0;
    font-size: 44px;
    font-weight: 800;
}

.ag-date.multi strong {
    font-size: 30px;
}

.ag-date span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.ag-affiche {
    display: block;
    overflow: hidden;
    width: 150px;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    background-color: #eee;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.ag-affiche img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ag-body h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.ag-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 12px;
    padding: 0;
    color: #555;
    font-size: 14.5px;
    list-style: none;
}

.ag-meta li {
    margin: 0;
    padding: 0;
}

.ag-meta li::before {
    display: none;
}

.ag-meta .fa {
    margin-right: 4px;
    color: var(--color-rouge, #BD3223);
}

.ag-body p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.ag-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ag-tag {
    padding: 4px 12px;
    border-radius: 20px;
    background-color: #f3f3f3;
    color: #444;
    font-size: 13px;
    font-weight: 600;
}

.ag-tag.gratuit {
    background-color: #E7F3EA;
    color: #2F6B45;
}

.ag-go {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 30px;
    background-color: var(--color-rouge, #BD3223);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
}

.ag-go:hover {
    background-color: var(--color-jaune);
}

/* ---------- Détail d'un événement ---------- */
.ag-retour {
    margin-bottom: 25px;
}

.ag-d-grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}

.ag-d-affiche {
    position: sticky;
    top: 100px;
}

.ag-d-zoom-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
}

.ag-d-zoom-btn img {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
}

.ag-d-zoom {
    margin-top: 12px;
    color: #777;
    font-size: 14px;
    text-align: center;
}

.ag-d-quand {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px !important;
    padding: 10px 18px;
    border-radius: 12px;
    background-color: var(--color-creme, #FFF8E7);
    color: var(--color-rouge, #BD3223) !important;
    font-size: 17px !important;
    font-weight: 700;
}

.ag-d-quand.is-passe {
    background-color: #f1f1f1;
    color: #666 !important;
}

.ag-d-quand span {
    font-weight: 500;
}

.ag-d-titre {
    margin: 0 0 14px;
    font-size: 44px;
}

.ag-d-intro {
    margin: 0 0 26px;
    color: #555;
    font-size: 18px;
    line-height: 1.6;
}

.ag-d-infos {
    margin: 0 0 26px;
    padding: 6px 24px;
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.07);
}

.ag-d-infos > div {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.12);
}

.ag-d-infos > div:last-child {
    border-bottom: none;
}

.ag-d-infos dt {
    flex-shrink: 0;
    width: 130px;
    margin: 0;
    color: var(--color-rouge, #BD3223);
    font-weight: 700;
}

.ag-d-infos dt .fa {
    width: 20px;
}

.ag-d-infos dd {
    margin: 0;
    color: #333;
}

.ag-d-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
}

.ag-d-btns a,
.ag-d-btns button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 30px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
}

.ag-d-btns .b1 {
    border: 1px solid var(--color-rouge, #BD3223);
    background-color: var(--color-rouge, #BD3223);
    color: #fff;
}

.ag-d-btns .b2 {
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
}

.ag-d-btns .b2:hover {
    border-color: var(--color-rouge, #BD3223);
    color: var(--color-rouge, #BD3223);
}

.ag-d-desc {
    color: #444;
    font-size: 16.5px;
    line-height: 1.8;
}

.ag-d-desc h1,
.ag-d-desc h2,
.ag-d-desc h3 {
    margin: 26px 0 10px;
    color: var(--color-rouge, #BD3223);
    font-size: 24px;
}

.ag-autres {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ag-autres .section-heading {
    font-size: 30px;
}

.ag-mini {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
    padding: 14px;
    border-radius: 14px;
    background-color: #f8f8f8;
    text-decoration: none !important;
}

.ag-mini:hover {
    background-color: var(--color-creme, #FFF8E7);
}

.ag-mini img {
    width: 64px;
    height: 84px;
    border-radius: 8px;
    object-fit: cover;
}

.ag-mini small {
    display: block;
    color: var(--color-rouge, #BD3223);
    font-size: 13px;
    font-weight: 700;
}

.ag-mini strong {
    color: #222;
    font-size: 16px;
}

/* Affiche agrandie */
.ag-zoom {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}

.ag-zoom[hidden] {
    display: none;
}

.ag-zoom img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.ag-zoom-fermer {
    position: absolute;
    top: 16px;
    right: 22px;
    border: none;
    background: none;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
}

/* ---------- Petits écrans ---------- */
@media (max-width: 991px) {
    .ag-une,
    .ag-d-grid {
        grid-template-columns: 1fr;
    }

    .ag-une-img img {
        max-height: 360px;
    }

    .ag-une-body {
        padding: 30px;
    }

    .ag-d-affiche {
        position: static;
        max-width: 420px;
        margin: 0 auto;
    }

    .ag-event {
        grid-template-columns: 90px 110px minmax(0, 1fr);
    }

    .ag-event .ag-go {
        grid-column: 3;
        justify-self: start;
    }

    .ag-affiche {
        width: 110px;
    }
}

@media (max-width: 575px) {
    .ag-une-body h2,
    .ag-d-titre {
        font-size: 32px;
    }

    .ag-event {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .ag-affiche {
        display: none;
    }

    .ag-date {
        height: 96px;
    }

    .ag-date strong {
        font-size: 34px;
    }

    .ag-date.multi strong {
        font-size: 22px;
    }

    .ag-event .ag-go {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .ag-d-infos > div {
        flex-direction: column;
        gap: 2px;
    }
}