/*
 * CSS du module évènements (CPT cre_evenement).
 * Réutilise les couleurs du thème (vert principal #819954, hover #4B631B,
 * lien #0071c0). Les valeurs sont exposées en CSS custom properties pour
 * permettre un override facile depuis custom.css.
 *
 * Phase 7A (2026-05-05) : refonte alignée sur le visuel PROD avec
 * lignes denses, encart date à gauche, toggle expand via <details>.
 */

/* Custom properties globales (HTML root font-size = 10px → 1rem = 10px côté thème).
   Définies sur :root pour être accessibles de partout (incl. shortcodes
   `#events-posts` / `#events-posts-list` qui ne sont pas dans .cre-events-*). */
:root {
    --cre-color-primary: #819954;
    --cre-color-primary-dark: #4B631B;
    --cre-color-link: #0071c0;
    --cre-color-text: #222;
    --cre-color-muted: #666;
    --cre-color-border: #e3e3e3;
    --cre-color-bg-card: #fff;
    --cre-color-bg-day: #f5f5f0;
    --cre-color-date-bg: #f0f0e8;
    --cre-color-date-month-bg: #819954;

    --cre-radius: 4px;
    --cre-spacing-xs: 4px;
    --cre-spacing-sm: 8px;
    --cre-spacing-md: 16px;
    --cre-spacing-lg: 24px;
}

.cre-events-archive,
.cre-event-single,
.cre-event-related {
    color: var(--cre-color-text);
}

/* ============================================================
   Archive header : titre + sous-titre + filtres + nav mois
   ============================================================ */

.cre-events-archive__header {
    margin-bottom: var(--cre-spacing-md);
    padding-bottom: var(--cre-spacing-md);
    border-bottom: 1px solid var(--cre-color-border);
}

.cre-events-archive__header h1 {
    margin: 0 0 var(--cre-spacing-xs);
    font-size: 28px;
    line-height: 1.2;
}

.cre-events-archive__subtitle {
    margin: 0 0 var(--cre-spacing-md);
    color: var(--cre-color-muted);
    font-style: italic;
}

.cre-events-archive__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--cre-spacing-md);
    margin-bottom: var(--cre-spacing-md);
}

.cre-events-archive__nav {
    display: flex;
    gap: var(--cre-spacing-xs);
}

.cre-events-archive__nav a {
    color: var(--cre-color-link);
    text-decoration: none;
    padding: var(--cre-spacing-xs) var(--cre-spacing-sm);
    border-radius: var(--cre-radius);
    transition: background 0.15s ease;
}

.cre-events-archive__nav a:hover,
.cre-events-archive__nav a:focus {
    background: var(--cre-color-bg-day);
}

.cre-events-archive__nav a.is-active {
    background: var(--cre-color-primary);
    color: #fff;
}

/* ============================================================
   Filtres dropdowns multi-select avec swatches
   ============================================================ */

.cre-events-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cre-spacing-sm);
    align-items: center;
}

.cre-events-filters__group {
    position: relative;
}

.cre-events-filters__group > summary {
    list-style: none;
    cursor: pointer;
    padding: var(--cre-spacing-xs) var(--cre-spacing-sm);
    background: var(--cre-color-bg-day);
    border: 1px solid var(--cre-color-border);
    border-radius: var(--cre-radius);
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cre-events-filters__group > summary::-webkit-details-marker {
    display: none;
}

.cre-events-filters__group > summary::after {
    content: ' ▾';
    color: var(--cre-color-muted);
    font-size: 0.85em;
}

.cre-events-filters__group[open] > summary {
    background: var(--cre-color-primary);
    color: #fff;
    border-color: var(--cre-color-primary);
}

.cre-events-filters__count {
    color: var(--cre-color-primary-dark);
    font-weight: 600;
}

.cre-events-filters__group[open] .cre-events-filters__count {
    color: #fff;
}

.cre-events-filters__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 10;
    min-width: 280px;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--cre-color-border);
    border-radius: var(--cre-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: var(--cre-spacing-xs) 0;
}

.cre-events-filters__list li {
    padding: 0;
    margin: 0;
}

.cre-events-filters__list label {
    display: flex;
    align-items: center;
    gap: var(--cre-spacing-xs);
    padding: var(--cre-spacing-xs) var(--cre-spacing-sm);
    cursor: pointer;
    transition: background 0.1s ease;
}

.cre-events-filters__list label:hover {
    background: var(--cre-color-bg-day);
}

.cre-events-filters__swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.cre-events-filters__submit,
.cre-events-filters__reset {
    padding: var(--cre-spacing-xs) var(--cre-spacing-md);
    border-radius: var(--cre-radius);
    border: 1px solid var(--cre-color-primary);
    background: var(--cre-color-primary);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.cre-events-filters__submit:hover {
    background: var(--cre-color-primary-dark);
    border-color: var(--cre-color-primary-dark);
}

.cre-events-filters__reset {
    background: transparent;
    color: var(--cre-color-primary);
}

.cre-events-filters__reset:hover {
    background: var(--cre-color-primary);
    color: #fff;
}

/* ============================================================
   Navigation par mois
   ============================================================ */

.cre-events-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cre-spacing-md);
    padding: var(--cre-spacing-sm) var(--cre-spacing-md);
    background: var(--cre-color-bg-day);
    border-radius: var(--cre-radius);
    flex-wrap: wrap;
}

.cre-events-month-nav a {
    color: var(--cre-color-link);
    text-decoration: none;
    padding: var(--cre-spacing-xs) var(--cre-spacing-sm);
    border-radius: var(--cre-radius);
}

.cre-events-month-nav a:hover {
    background: #fff;
}

.cre-events-month-nav__current {
    font-size: 16px;
    text-transform: capitalize;
    color: var(--cre-color-primary-dark);
}

/* ============================================================
   Liste d'évènements (event-row)
   ============================================================ */

.cre-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cre-event-row {
    border-bottom: 1px solid var(--cre-color-border);
}

.cre-event-row:first-child {
    border-top: 1px solid var(--cre-color-border);
}

.cre-event-row__details {
    margin: 0;
}

.cre-event-row__summary,
.cre-event-row__summary--static {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: var(--cre-spacing-md);
    align-items: center;
    padding: var(--cre-spacing-sm) var(--cre-spacing-xs);
    cursor: pointer;
    list-style: none;
    transition: background 0.15s ease;
}

.cre-event-row__summary--static {
    cursor: default;
}

.cre-event-row__details > summary::-webkit-details-marker {
    display: none;
}

.cre-event-row__summary:hover {
    background: var(--cre-color-bg-day);
}

/* Encart date à gauche */
.cre-event-row__date {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 96px;
    border-radius: var(--cre-radius);
    overflow: hidden;
    border: 1px solid var(--cre-color-border);
    background: #fff;
    text-align: center;
    line-height: 1;
}

.cre-event-row__month {
    background: var(--cre-color-date-month-bg);
    color: #fff;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 0;
    letter-spacing: 0.04em;
}

.cre-event-row__day {
    font-size: 28px;
    font-weight: 700;
    color: var(--cre-color-text);
    padding: 6px 0 2px;
}

.cre-event-row__weekday {
    font-size: 12px;
    color: var(--cre-color-muted);
    text-transform: lowercase;
    padding-bottom: 2px;
}

.cre-event-row__year {
    font-size: 12px;
    color: var(--cre-color-muted);
    padding-bottom: 6px;
}

/* Bloc head : titre + heure + cats */
.cre-event-row__head {
    min-width: 0;
}

.cre-event-row__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.cre-event-row__title a {
    font-size: inherit;
}

.cre-event-row__title a {
    color: var(--cre-color-text);
    text-decoration: none;
}

.cre-event-row__title a:hover,
.cre-event-row__title a:focus {
    color: var(--cre-color-primary-dark);
}

.cre-event-row__location {
    color: var(--cre-color-muted);
    font-weight: 400;
}

.cre-event-row__time {
    margin: 0;
    color: var(--cre-color-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cre-event-row__badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--cre-color-link);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.cre-event-row__cats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cre-spacing-xs);
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.cre-event-row__cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: var(--cre-color-bg-day);
    border-radius: 999px;
    color: var(--cre-color-primary-dark);
    text-decoration: none;
    font-size: 13px;
}

.cre-event-row__cat:hover {
    background: var(--cre-color-primary);
    color: #fff;
}

.cre-event-row__cat-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Toggle (chevron) à droite */
.cre-event-row__toggle {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 1px solid var(--cre-color-border);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.15s ease;
}

.cre-event-row__toggle::before,
.cre-event-row__toggle::after {
    content: '';
    position: absolute;
    background: var(--cre-color-primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cre-event-row__toggle::before { width: 12px; height: 2px; }
.cre-event-row__toggle::after  { width: 2px; height: 12px; transition: opacity 0.2s ease; }

.cre-event-row__details[open] .cre-event-row__toggle::after {
    opacity: 0;
}

/* Body collapsible */
.cre-event-row__body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--cre-spacing-md);
    padding: 0 var(--cre-spacing-xs) var(--cre-spacing-md) calc(96px + var(--cre-spacing-md));
}

/* Si pas d'image vedette → le body passe en 1 colonne pour éviter
   l'espace blanc à gauche du texte. */
.cre-event-row__body:not(:has(.cre-event-row__thumb)) {
    grid-template-columns: 1fr;
}

.cre-event-row__thumb {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--cre-radius);
}

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

.cre-event-row__excerpt {
    line-height: 1.5;
    color: var(--cre-color-text);
}

.cre-event-row__excerpt p {
    margin: 0 0 var(--cre-spacing-sm);
}

.cre-event-row__excerpt h1,
.cre-event-row__excerpt h2,
.cre-event-row__excerpt h3,
.cre-event-row__excerpt h4 {
    margin: var(--cre-spacing-md) 0 var(--cre-spacing-xs);
    font-weight: 600;
}

.cre-event-row__excerpt ul,
.cre-event-row__excerpt ol {
    margin: 0 0 var(--cre-spacing-sm) 1.5em;
    padding: 0;
}

.cre-event-row__excerpt li {
    margin-bottom: 4px;
}

.cre-event-row__excerpt img {
    max-width: 100%;
    height: auto;
}

.cre-event-row__more {
    display: inline-block;
    margin-top: var(--cre-spacing-sm);
    color: var(--cre-color-link);
    text-decoration: none;
    font-weight: 600;
}

.cre-event-row__more:hover {
    text-decoration: underline;
}

/* ============================================================
   Empty state
   ============================================================ */

.cre-events-empty {
    padding: var(--cre-spacing-lg);
    text-align: center;
    color: var(--cre-color-muted);
    font-style: italic;
    background: var(--cre-color-bg-day);
    border-radius: var(--cre-radius);
}

/* ============================================================
   Single event — refonte phase 7B-bis (fidélité PROD)
   ============================================================ */

.cre-event-single__breadcrumb {
    margin-bottom: var(--cre-spacing-md);
    color: var(--cre-color-muted);
}

.cre-event-single__breadcrumb a {
    color: var(--cre-color-link);
    text-decoration: none;
}

.cre-event-single__breadcrumb a:hover {
    text-decoration: underline;
}

.cre-event-single__breadcrumb span[aria-hidden] {
    margin: 0 var(--cre-spacing-xs);
    color: var(--cre-color-border);
}

/* Hero : image ronde à gauche + titre/actions à droite */
.cre-event-single__hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--cre-spacing-lg);
    align-items: start;
    margin-bottom: var(--cre-spacing-md);
}

.cre-event-single__thumb {
    margin: 0;
    width: 280px;
    height: 280px;
    overflow: hidden;
    border-radius: 50%; /* image RONDE comme PROD */
    background: var(--cre-color-bg-day);
}

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

/* Hero sans image : 1 colonne */
.cre-event-single__hero:not(:has(.cre-event-single__thumb)) {
    grid-template-columns: 1fr;
}

.cre-event-single__hero-main {
    display: flex;
    flex-direction: column;
    gap: var(--cre-spacing-md);
    min-width: 0;
}

.cre-event-single__title {
    font-size: 36px;
    line-height: 1.15;
    margin: 0;
    font-weight: 700;
}

/* Actions alignées à droite sous le titre */
.cre-event-single__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cre-spacing-xs);
    justify-content: flex-end;
    align-items: center;
}

.cre-event-single__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--cre-color-border);
    border-radius: var(--cre-radius);
    color: var(--cre-color-text);
    text-decoration: none;
    line-height: 1.3;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cre-event-single__btn:hover,
.cre-event-single__btn:focus {
    background: var(--cre-color-bg-day);
    border-color: var(--cre-color-primary);
}

.cre-event-single__btn .dashicons {
    color: var(--cre-color-primary);
    flex-shrink: 0;
}

/* ============================================================
   Bloc info : « QUAND : / OÙ : / cat / chercheurs »
   ============================================================ */

.cre-event-single__info {
    margin: 0 0 var(--cre-spacing-lg);
    padding: 0;
    border-top: 1px solid var(--cre-color-border);
    border-bottom: 1px solid var(--cre-color-border);
}

.cre-event-single__info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: var(--cre-spacing-md);
    padding: 14px var(--cre-spacing-md);
    border-bottom: 1px solid var(--cre-color-border);
    align-items: baseline;
}

.cre-event-single__info-row:last-child {
    border-bottom: none;
}

.cre-event-single__info-row:nth-child(odd) {
    background: var(--cre-color-bg-day);
}

.cre-event-single__info dt {
    margin: 0;
    font-weight: 700;
    color: var(--cre-color-muted);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.cre-event-single__info dt .dashicons {
    color: var(--cre-color-muted);
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.cre-event-single__info dd {
    margin: 0;
    color: var(--cre-color-text);
    line-height: 1.5;
}

.cre-event-single__info dd a {
    color: var(--cre-color-link);
    text-decoration: none;
}

.cre-event-single__info dd a:hover {
    text-decoration: underline;
}

/* Badge "Jour entier" bleu (à côté de la date) */
.cre-event-single__badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    background: var(--cre-color-link);
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.cre-event-single__time {
    margin-left: 8px;
    color: var(--cre-color-muted);
    font-weight: 400;
}

/* Catégories en majuscules type PROD */
.cre-event-single__info-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cre-event-single__info-cats a {
    color: var(--cre-color-link);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cre-event-single__info-cats a:hover {
    text-decoration: underline;
}

.cre-event-single__content {
    margin: 0 0 var(--cre-spacing-lg);
    line-height: 1.6;
}

.cre-event-single__chercheurs {
    margin: var(--cre-spacing-md) 0;
    padding: var(--cre-spacing-sm) var(--cre-spacing-md);
    background: var(--cre-color-bg-day);
    border-left: 4px solid var(--cre-color-primary);
    border-radius: var(--cre-radius);
}

.cre-event-single__chercheurs-list {
    margin: var(--cre-spacing-xs) 0 0;
}

.cre-event-single__chercheurs-list a {
    color: var(--cre-color-link);
    text-decoration: underline;
}

.cre-event-single__footer {
    border-top: 1px solid var(--cre-color-border);
    padding-top: var(--cre-spacing-md);
    margin-top: var(--cre-spacing-lg);
}

.cre-event-single__tags {
    list-style: none;
    padding: 0;
    margin: var(--cre-spacing-xs) 0 var(--cre-spacing-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--cre-spacing-xs);
}

.cre-event-single__tags li a {
    display: inline-block;
    padding: 3px 12px;
    background: var(--cre-color-bg-day);
    border-radius: 999px;
    color: var(--cre-color-primary-dark);
    text-decoration: none;
    font-size: 13px;
}

.cre-event-single__tags li a:hover {
    background: var(--cre-color-primary);
    color: #fff;
}

.cre-event-single__tags-label,
.cre-event-single__chercheurs-label {
    margin: 0;
    font-weight: 600;
    color: var(--cre-color-text);
}

/* ICS — dropdown unique « Ajouter au calendrier ▼ » */

.cre-event-ics {
    position: relative;
    display: inline-block;
}

.cre-event-ics__toggle {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--cre-color-primary);
    color: #fff;
    border-radius: var(--cre-radius);
    line-height: 1.3;
    user-select: none;
    transition: background 0.15s ease;
}

.cre-event-ics__toggle::-webkit-details-marker {
    display: none;
}

.cre-event-ics__toggle::after {
    content: ' ▾';
}

.cre-event-ics:hover .cre-event-ics__toggle,
.cre-event-ics[open] .cre-event-ics__toggle {
    background: var(--cre-color-primary-dark);
}

.cre-event-ics__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 10;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    background: #fff;
    border: 1px solid var(--cre-color-border);
    border-radius: var(--cre-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cre-event-ics__menu li {
    margin: 0;
    padding: 0;
}

.cre-event-ics__menu a {
    display: block;
    padding: 8px 16px;
    color: var(--cre-color-text);
    text-decoration: none;
    line-height: 1.3;
}

.cre-event-ics__menu a:hover,
.cre-event-ics__menu a:focus {
    background: var(--cre-color-bg-day);
    color: var(--cre-color-primary-dark);
}

/* Related events */

.cre-event-related {
    margin-top: var(--cre-spacing-lg);
    padding-top: var(--cre-spacing-md);
    border-top: 1px solid var(--cre-color-border);
}

.cre-event-related h2 {
    margin: 0 0 var(--cre-spacing-md);
    font-size: 22px;
}

/* ============================================================
   Pagination (vue passés)
   ============================================================ */

.cre-events-pagination {
    margin-top: var(--cre-spacing-lg);
}

.cre-events-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cre-spacing-xs);
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.cre-events-pagination a,
.cre-events-pagination span {
    display: inline-block;
    padding: var(--cre-spacing-xs) var(--cre-spacing-sm);
    border: 1px solid var(--cre-color-border);
    border-radius: var(--cre-radius);
    color: var(--cre-color-link);
    text-decoration: none;
    min-width: 2.25rem;
    text-align: center;
}

.cre-events-pagination a:hover {
    background: var(--cre-color-bg-day);
}

.cre-events-pagination .current {
    background: var(--cre-color-primary);
    border-color: var(--cre-color-primary);
    color: #fff;
}

.cre-events-pagination .dots {
    border: none;
    color: var(--cre-color-muted);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
    .cre-events-archive__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .cre-events-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .cre-events-filters__group {
        width: 100%;
    }

    .cre-events-filters__list {
        position: static;
        box-shadow: none;
        max-height: 240px;
        margin-top: 4px;
    }
}

@media (max-width: 600px) {
    .cre-event-row__summary,
    .cre-event-row__summary--static {
        grid-template-columns: 80px 1fr 24px;
        gap: var(--cre-spacing-sm);
    }

    .cre-event-row__date {
        width: 80px;
    }

    .cre-event-row__day {
        font-size: 24px;
    }

    .cre-event-row__title {
        font-size: 15px;
    }

    .cre-event-row__body {
        grid-template-columns: 1fr;
        padding-left: var(--cre-spacing-xs);
    }

    .cre-event-row__thumb {
        max-width: 240px;
    }

    .cre-events-archive__header h1,
    .cre-event-single__title {
        font-size: 26px;
    }

    .cre-event-single__hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cre-event-single__thumb {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }

    .cre-event-single__hero-main {
        align-items: center;
    }

    .cre-event-single__actions {
        justify-content: center;
    }

    .cre-event-single__info-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .cre-event-single__info dt {
        text-align: left;
    }
}

/* ============================================================
   Shortcodes [cre_events] et [cre_events_passe]
   Utilisés sur les pages d'axes (/ethique-*/evenements-N/)
   ============================================================ */

#events-posts-list {
    margin: 0 0 var(--cre-spacing-lg);
}

#events-posts-list ul,
#events-posts-list ul li {
    list-style: none !important;
}

#events-posts-list ul {
    margin: 0;
    padding: 0;
}

#events-posts-list ul li {
    margin: 0 !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--cre-color-border);
    line-height: 1.5;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    min-height: 60px;
}

#events-posts-list ul li:last-child {
    border-bottom: none;
}

#events-posts-list .event-thumb {
    flex-shrink: 0;
    display: block;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--cre-color-bg-day);
}

#events-posts-list .event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#events-posts-list .event-titre {
    flex: 1;
    display: inline-block;
    color: var(--cre-color-link);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
}

#events-posts-list .event-titre:hover,
#events-posts-list .event-titre:focus {
    text-decoration: underline;
    color: var(--cre-color-primary-dark);
}

/* Cards futurs events (page d'axes) — layout vertical avec image ronde.
   Override custom.css legacy (floats à 3 cols width:31.3%) avec !important. */

#events-posts.home-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--cre-spacing-lg);
}

#events-posts.home-section ul li.blog-post {
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}

#events-posts.home-section li.blog-post {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    line-height: 1.5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#events-posts.home-section .blog-post__thumb {
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto var(--cre-spacing-sm);
    overflow: hidden;
    border-radius: 50%;
    background: var(--cre-color-bg-day);
}

#events-posts.home-section .blog-post__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#events-posts.home-section li.blog-post h3 {
    margin: var(--cre-spacing-xs) 0;
    font-size: 18px;
    line-height: 1.3;
}

#events-posts.home-section li.blog-post h3 a {
    color: var(--cre-color-text);
    text-decoration: none;
    font-weight: 700;
}

#events-posts.home-section li.blog-post h3 a:hover {
    color: var(--cre-color-primary-dark);
}

#events-posts.home-section .blog-post__info {
    width: 100%;
    margin: var(--cre-spacing-xs) 0;
    text-align: center;
}

#events-posts.home-section .blog-post__info p {
    margin: 4px 0;
    line-height: 1.5;
}

#events-posts.home-section .blog-post__info strong {
    color: var(--cre-color-muted);
    font-weight: 600;
}

#events-posts.home-section .blog-post__badge {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    background: var(--cre-color-link);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

#events-posts.home-section .blog-post__excerpt {
    margin: var(--cre-spacing-xs) 0;
    color: var(--cre-color-text);
}

#events-posts.home-section .blog-post__more {
    margin-top: var(--cre-spacing-sm);
}

#events-posts.home-section .blog-post__more .button {
    display: inline-block;
    padding: 6px 18px;
    background: var(--cre-color-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--cre-radius);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.04em;
}

#events-posts.home-section .blog-post__more .button:hover,
#events-posts.home-section .blog-post__more .button:focus {
    background: var(--cre-color-primary-dark);
    color: #fff !important;
}

/* ============================================================
   Admin (colonne legacy_id en lecture seule)
   ============================================================ */

.cre-readonly input[type="number"] {
    background-color: #f5f5f5 !important;
    pointer-events: none;
}
