/* ================================================================
   ARCHIVE ÉVÉNEMENTS — Bio et Local
   Design Figma : Android - Les évènements (node 2024:51)
   Rose FRAB #D2097A | Vert FRAB #009C50
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Boogaloo&display=swap');

/* ── Variables ───────────────────────────────────────────────── */
:root {
    --rose:   #D2097A;
    --vert:   #009C50;
    --evf-pink:      #D2097A;
	--evf-yellow:    #FFDB16;
    --pad:    11px;
    --r:      10px;
    --ft:     'Boogaloo', 'Arial Rounded MT Bold', sans-serif;
    --fb:     system-ui, -apple-system, 'Segoe UI', sans-serif;
    --evf-border:    rgba(255,255,255,0.12);
    --evf-radius:    10px;
}

/* ── Couleurs thème pour l'UI de filtre (agenda.css) ────────── */
.ev-container {
    --ev-primary:    var(--rose, #D2097A);
    --ev-primary-dk: #a5076a;
}

/* Boutons toolbar (Filtrer / Afficher la carte) ──────────────── */
.ev-filter-container .ev-btn-filtres,
.ev-filter-container .ev-btn-carte {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--vert, #009C50);
    border-radius: 0;
    padding: 0 0 2px;
    color: var(--vert, #009C50);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.ev-filter-container .ev-btn-filtres:hover {
    background: transparent;
    opacity: 0.75;
}
.ev-filter-container .ev-btn-carte[aria-disabled="true"] {
    cursor: default;
    opacity: 1;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
.ev-arc-page {
    background: #fff;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════════
   BARRE OUTILS (Filtrer | Tous | Carte)
   ══════════════════════════════════════════════════════════════ */

/* Ligne 1 : "Tous les évènements" centré */
.ev-arc-toolbar-row1 {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

/* Ligne 2 : Filtrer | Afficher la carte */
.ev-arc-toolbar-row2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ev-arc-toolbar-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--fb);
    font-size: 14px;
    font-weight: 600;
    color: var(--vert);
    text-decoration: none;
    line-height: 1;
    padding-bottom: 2px;
    border-bottom: 1.5px solid var(--vert);
}

.ev-arc-toolbar-link:hover { opacity: .75; }

.ev-arc-toolbar-link svg {
    flex-shrink: 0;
    display: block;
}

/* Lien neutre (sans soulignement) */
.ev-arc-toolbar-link--plain {
    border-bottom: none;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   LISTE D'ÉVÉNEMENTS
   ══════════════════════════════════════════════════════════════ */
.ev-arc-events-list {
    padding: 0 !important;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
}

/* ── Carte événement ─────────────────────────────────────────── */
.ev-arc-card {
    display: flex;
    align-items: stretch;
    height: 90px;
    text-decoration: none;
    color: inherit;
    position: relative;
    /* Débordement gauche léger comme dans le design */
    margin-left: 0;
    border-radius: 0 var(--r) var(--r) 0;
    box-shadow: 0 0 18px rgba(0,0,0,.28);
    overflow: hidden; /* clip l'image à droite */
    background: #fff;
}

/* Bloc date rose */
.ev-arc-card-date {
    width: 88px;
    flex-shrink: 0;
    background: var(--rose);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.ev-arc-date-day {
    font-family: var(--fb);
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
}

.ev-arc-date-month,
.ev-arc-date-year {
    font-family: var(--fb);
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

/* Corps texte de la carte */
.ev-arc-card-body {
    flex: 1;
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
}

/* Tags */
.ev-arc-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 3px;
}

.ev-arc-tag {
    font-family: var(--fb);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 2px;
    line-height: 1.4;
    white-space: nowrap;
}

.ev-arc-tag--filled {
    background: var(--vert);
    color: #fff;
}

.ev-arc-tag--outline {
    background: #fff;
    border: 1px solid var(--vert);
    color: var(--vert);
}

/* Extrait */
.ev-arc-card-excerpt {
    font-family: var(--fb);
    font-size: 12px;
    color: #000;
    margin: 0 0 3px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 500;
}

/* Localisation */
.ev-arc-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--fb);
    font-size: 11px;
    color: var(--vert);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-arc-card-location svg {
    flex-shrink: 0;
    display: block;
}

/* Vignette droite avec gradient */
.ev-arc-card-image {
    width: 100px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.ev-arc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ev-arc-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(10,9,9,.62));
    pointer-events: none;
}

/* Carte sans vignette */
.ev-arc-card--no-img .ev-arc-card-body {
    flex: 1;
}

/* ══════════════════════════════════════════════════════════════
   "AUCUN ÉVÉNEMENT"
   ══════════════════════════════════════════════════════════════ */
.ev-arc-empty {
    padding: 32px var(--pad);
    text-align: center;
    font-family: var(--fb);
    color: #888;
    font-size: 15px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════════
   MOBILE < 500px — Disposition en colonne
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 499px) {

    /* Carte : direction verticale, hauteur libre */
    .ev-arc-card {
        flex-direction: column;
        height: auto;
        border-radius: var(--r);
    }

    /* Image : remonte en tête de carte, pleine largeur */
    .ev-arc-card-image {
        order: -1;
        width: 100%;
        height: 150px;
        flex-shrink: 0;
    }

    /* Badge date : superposé en haut à gauche de la zone image */
    .ev-arc-card-date {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        width: auto;
        height: auto;
        padding: 8px 12px;
        /* coin bas-droit arrondi, le coin haut-gauche est clippé par la carte */
        border-top-right-radius: 0;
        border-bottom-right-radius: var(--r);
        border-bottom-left-radius: 0;
    }

    /* Corps : pleine largeur, padding standard */
    .ev-arc-card-body {
        padding: 10px 12px;
        width: 100%;
    }

    /* Carte sans image : zone vert en tête pour accueillir le badge date */
    .ev-arc-card--no-img::before {
        content: '';
        display: block;
        order: -1;
        width: 100%;
        height: 90px;
        background: var(--vert);
        flex-shrink: 0;
    }
}

@media (min-width: 540px) {

    .ev-arc-card-image { width: 100px; }
}

@media (min-width: 900px) {

    .ev-arc-events-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 16px var(--pad);
    }

    .ev-arc-card { height: 110px; }
    .ev-arc-card-image { width: 160px; }
    .ev-arc-tag {
        font-size: 14px;
        padding: 2px 6px;
    }
    .ev-arc-card-excerpt {
        font-size: 16px;
    }
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION NUMÉROTÉE
   ══════════════════════════════════════════════════════════════ */
.ev-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0 8px;
}

.ev-pag-pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ev-pag-arrow,
.ev-pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 20%;
    border: 1.5px solid var(--rose);
    background: #fff;
    color: #333;
    font-family: var(--fb);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    padding: 0;
    line-height: 1;
}

.ev-pag-arrow:hover:not(:disabled),
.ev-pag-btn:hover:not(.ev-pag-btn--active) {
    border-color: var(--rose);
    color: var(--rose);
}

.ev-pag-btn--active {
    background: var(--rose);
    border-color: var(--rose);
    color: #fff;
    cursor: default;
}

.ev-pag-arrow:disabled {
    opacity: .35;
    cursor: default;
}

/* ── Autour de moi standalone (centré sous la pagination) ───── */
.ev-autour-standalone-wrapper {
    display: flex;
    justify-content: center;
    padding: 4px 0 24px;
}

/* ══════════════════════════════════════════════════════════════
   INTRODUCTION PAGE ÉVÉNEMENTS (ACF Options)
   ══════════════════════════════════════════════════════════════ */
.ev-introduction {
    text-align: center;
}

.ev-introduction__titre {
    color: #D2007A;
    text-align: center;
    font-family: 'Boogaloo', sans-serif;
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: uppercase;
}

.ev-introduction__texte {
    text-align: center;
}

@media (min-width: 768px) {
    .ev-introduction__titre {
        font-size: 42px;
    }
}
