/* ===== Réunions Élus – Agenda CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

/* ---------- Conteneur agenda ---------- */
.re-agenda-wrap {
    font-family: 'Source Sans 3', sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* ---------- Filtres ---------- */
.re-agenda-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e8edf5;
    padding-bottom: 0;
}
.re-filter-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 22px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #7a8ba0;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
    letter-spacing: .02em;
}
.re-filter-btn:hover {
    color: #1a3a6b;
}
.re-filter-btn.active {
    color: #1a3a6b;
    border-bottom-color: #1a3a6b;
}

/* ---------- Grille ---------- */
.re-agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
@media (max-width: 680px) {
    .re-agenda-grid { grid-template-columns: 1fr; }
}

/* ---------- Carte ---------- */
.re-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,58,107,.08);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(26,58,107,.07);
}
.re-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(26,58,107,.14);
}
.re-card--past {
    opacity: .72;
    filter: grayscale(30%);
}
.re-card--past:hover {
    opacity: 1;
    filter: none;
}

/* ---------- Image ---------- */
.re-card__image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #1a3a6b;
}
.re-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}
.re-card:hover .re-card__image img {
    transform: scale(1.04);
}

/* Badge statut */
.re-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}
.re-card__badge--upcoming { background: #1a3a6b; color: #fff; }
.re-card__badge--past     { background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(4px); }
.re-card__badge--full     { background: #c62828; color: #fff; }

/* Pill date */
.re-card__date-pill {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(255,255,255,.96);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
    min-width: 52px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.re-day {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a3a6b;
    line-height: 1;
}
.re-month {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: #7a8ba0;
    margin-top: 2px;
}

/* ---------- Corps de la carte ---------- */
.re-card__body {
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.re-card__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2a45;
    margin: 0 0 14px;
    line-height: 1.3;
}

/* Méta-infos */
.re-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.re-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.875rem;
    color: #5a6a80;
    line-height: 1.4;
}
.re-meta-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #1a3a6b;
    opacity: .7;
}
.re-meta-item--alert {
    color: #c62828;
    font-weight: 600;
}
.re-meta-item--alert svg { color: #c62828; opacity: 1; }

/* Extrait */
.re-card__excerpt {
    font-size: 0.88rem;
    color: #7a8ba0;
    line-height: 1.6;
    margin: 0 0 18px;
}

/* ---------- Actions ---------- */
.re-card__actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Boutons */
.re-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 6px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background .18s, color .18s, box-shadow .18s;
    white-space: nowrap;
}
.re-btn--primary {
    background: #1a3a6b;
    color: #fff;
}
.re-btn--primary:hover {
    background: #122d57;
    box-shadow: 0 4px 14px rgba(26,58,107,.25);
    color: #fff;
}
.re-btn--calendar {
    background: #f0f4fb;
    color: #1a3a6b;
    border: 1px solid #d0daea;
}
.re-btn--calendar:hover {
    background: #e2eaf7;
    color: #1a3a6b;
}

/* ---------- Dropdown agenda ---------- */
.re-add-calendar-wrap {
    position: relative;
}
.re-calendar-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid #e0e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    min-width: 210px;
    z-index: 100;
    overflow: hidden;
    animation: re-dropdown-in .15s ease;
}
@keyframes re-dropdown-in {
    from { opacity:0; transform:translateY(6px); }
    to   { opacity:1; transform:translateY(0); }
}
.re-add-calendar-wrap.open .re-calendar-dropdown { display: block; }
.re-cal-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 0.9rem;
    color: #2a3a55;
    text-decoration: none;
    transition: background .15s;
    border-bottom: 1px solid #f0f4f8;
}
.re-cal-option:last-child { border-bottom: none; }
.re-cal-option:hover {
    background: #f4f7fc;
    color: #1a3a6b;
}

/* ---------- État vide ---------- */
.re-agenda-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    color: #9aa8bc;
}
.re-agenda-empty svg {
    display: block;
    margin: 0 auto 16px;
    opacity: .4;
}
.re-agenda-empty p {
    font-size: 1rem;
    margin: 0;
}

/* ---------- Carte cachée (filtre) ---------- */
.re-card.re-hidden {
    display: none;
}

/* ===== Nouvelles fonctionnalités v1.2 ===== */

/* Lien overlay couvrant toute la carte */
.re-card {
    position: relative;
}
.re-card__overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
}
/* Les éléments cliquables doivent passer au-dessus */
.re-btn--raised,
.re-raised,
.re-calendar-dropdown {
    position: relative;
    z-index: 2;
}

/* ---------- Étiquettes thématiques sur la carte ---------- */
.re-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.re-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--tag-color, #1a4a8a) 12%, white);
    color: var(--tag-color, #1a4a8a);
    border: 1px solid color-mix(in srgb, var(--tag-color, #1a4a8a) 25%, white);
    /* Fallback pour navigateurs sans color-mix */
    background: rgba(26, 74, 138, .1);
    color: var(--tag-color, #1a4a8a);
}

/* ---------- Filtres thématiques ---------- */
.re-agenda-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e8edf5;
    padding-bottom: 16px;
}
.re-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.re-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9aa8bc;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-right: 4px;
    white-space: nowrap;
}
.re-filter-tags-row {
    padding-top: 4px;
}

/* Boutons filtre thématique */
.re-tag-filter {
    background: none;
    border: 1.5px solid #d0daea;
    border-radius: 20px;
    padding: 5px 14px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5a6a80;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.re-tag-filter:hover {
    border-color: var(--tag-color, #1a3a6b);
    color: var(--tag-color, #1a3a6b);
    background: color-mix(in srgb, var(--tag-color, #1a3a6b) 6%, white);
}
.re-tag-filter.active {
    background: var(--tag-color, #1a3a6b);
    border-color: var(--tag-color, #1a3a6b);
    color: #fff;
}
