.h3p-events-archive {
    min-height: 60vh;
    background: #f7efe7;
    color: #0f3443;
}

.h3p-events-archive__container {
    width:min(1280px, calc(100% - 2rem));
    margin-inline: auto;
}

/* Introduction */

.h3p-events-archive__intro {
    padding-top: clamp(3.5rem, 7vw, 6.5rem);
    text-align: center;
}

.h3p-events-archive__title {
    max-width: 1100px;
    margin: 0 auto;
    color: #0f3443;
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    font-size:clamp(2.5rem,4vw,4rem);
    line-height:1.02;
    letter-spacing:-0.045em;
}

.h3p-events-archive__title-accent {
    color: #10b7c1;
}

.h3p-events-archive__description {
    max-width: 880px;
    margin: 1rem auto 0;
    color: #65747b;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.5;
}

.h3p-events-archive__description > :first-child {
    margin-top: 0;
}

.h3p-events-archive__description > :last-child {
    margin-bottom: 0;
}

/* Onglets */

.h3p-events-archive__types {
    width: min(calc(100% - 2rem), 760px);
    margin: clamp(2.5rem, 5vw, 4.5rem) auto 0;
    padding: 0.75rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 18px 40px rgb(15 52 67 / 8%);
}

.h3p-events-archive__types-list {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.5rem;
}

.h3p-events-archive__type {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    color: #65747b;
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        color 180ms ease;
}

.h3p-events-archive__type:hover,
.h3p-events-archive__type:focus-visible {
    background: #edf3f4;
    color: #0f3443;
}

.h3p-events-archive__type--active {
    background: #0f5775;
    color: #fff;
}

.h3p-events-archive__type--active:hover,
.h3p-events-archive__type--active:focus-visible {
    background: #0f3443;
    color: #fff;
}

/* Résultats */

.h3p-events-archive__results {
    padding-block: clamp(3rem, 6vw, 7rem);
}

.h3p-events-archive__layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    align-items: start;
    gap: 1.75rem;
}

.h3p-events-archive__content {
    min-width: 0;
}

/* Bouton mobile des filtres */

.h3p-events-archive__filters-toggle {
    display: none;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 999px;
    background: #0f5775;
    color: #fff;
    font: inherit;
    font-weight: 700;
}

/* Sidebar */

.h3p-events-filters {
    position: sticky;
    top: 2rem;
}

.admin-bar .h3p-events-filters {
    top: calc(2rem + 32px);
}

.h3p-events-filters__form {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
}

.h3p-events-filters__header {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;

    padding: 1.5rem 1.35rem;

    border-bottom: 1px solid rgba(15, 52, 67, 0.12);
}

.h3p-events-filters__body {
    padding: 1.5rem 1.35rem;
}


.h3p-events-filters__header-icon {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f4f6f7;
    color: #0f3443;
}

.h3p-events-filters__header-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.h3p-events-filters__header strong {
    display: block;
    color: #0f3443;
    font-size: 0.9rem;
    line-height: 1.15;
}

.h3p-events-filters__header small {
    display: block;
    margin-top: 0.15rem;
    color: #65747b;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
}

.h3p-events-filters__group {
    margin: 0;
    padding: 0;
    border: 0;
}

.h3p-events-filters__group + .h3p-events-filters__group {
    margin-top: 1.75rem;
}

.h3p-events-filters__group legend {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    padding: 0;
    color: #0f3443;
    font-weight: 700;
    line-height: 1;
}

.h3p-events-filters__choice {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding-left: 1.45rem;
    color: #43515a;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
}


/* Checkboxes carrées */

.h3p-events-filters__choice + .h3p-events-filters__choice {
    margin-top: .75rem;
}

.h3p-events-filters__submit {
    display: inline-flex;
    width: 100%;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid #0f5775;
    border-radius: 999px;
    background: #0f5775;
    color: #fff;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease;
}

.h3p-events-filters__submit:hover,
.h3p-events-filters__submit:focus-visible {
    border-color: #0f3443;
    background: #0f3443;
}

.h3p-events-filters__reset {
    display: block;
    margin-top: 0.75rem;
    color: #43515a;
    font-size: 0.7rem;
    text-align: center;
    text-decoration: none;
}

.h3p-events-filters__reset:hover,
.h3p-events-filters__reset:focus-visible {
    color: #0f5775;
    text-decoration: underline;
}

/* Grille */

.h3p-events-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem 1.5rem;
}

/* Carte */

.h3p-event-card {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 12px 34px rgb(15 52 67 / 7%);
}

.h3p-event-card__link {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.h3p-event-card__visual {
    display: flex;
    height: 180px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0f3443;
}

.h3p-event-card__image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: contain;
    transition: transform 220ms ease;
}

.h3p-event-card__image-placeholder {
    width: 100%;
    height: 180px;
    background: #0f3443;
}

.h3p-event-card__link:hover .h3p-event-card__image,
.h3p-event-card__link:focus-visible .h3p-event-card__image {
    transform: scale(1.025);
}

.h3p-event-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1rem;
}

.h3p-event-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
}

.h3p-event-card__badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.1rem;
    background: #f0f4f5;
    color: #65747b;
    font-size: 0.625rem;
    line-height: 1;
}

.h3p-event-card__title {
    margin: 0;
    color: #0f3443;
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    font-weight: 700;
    line-height: 1.08;
}

.h3p-event-card__excerpt {
    display: -webkit-box;
    margin: 0.55rem 0 0.85rem;
    overflow: hidden;
    color: #738087;
    font-size: 0.75rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.h3p-event-card__meta {
    display: grid;
    gap: 0.35rem;
    margin-top: auto;
    color: #65747b;
    font-size: 0.875rem;
}

.h3p-event-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.h3p-event-card__meta-icon {
    display: inline-flex;
    width: 0.85rem;
    height: 0.9375rem;
    flex: 0 0 auto;
    color: #819197;
}

.h3p-event-card__meta-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.h3p-event-card__link:hover .h3p-event-card__title,
.h3p-event-card__link:focus-visible .h3p-event-card__title {
    color: #0f5775;
}

/* État vide */

.h3p-events-archive__empty {
    padding: clamp(2.5rem, 6vw, 5rem);
    border: 1px dashed rgb(15 52 67 / 20%);
    border-radius: 1rem;
    color: #65747b;
    text-align: center;
}

.h3p-events-archive__empty-title {
    margin: 0 0 0.75rem;
    color: #0f3443;
    font-size: 1.5rem;
}

.h3p-events-archive__empty p {
    margin: 0;
}

/* Pagination */

.h3p-events-archive__pagination {
    margin-top: 3.5rem;
}

.h3p-events-archive__pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.h3p-events-archive__pagination a,
.h3p-events-archive__pagination span {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgb(15 87 117 / 20%);
    border-radius: 999px;
    background: #fff;
    color: #0f5775;
    text-decoration: none;
}

.h3p-events-archive__pagination a:hover,
.h3p-events-archive__pagination a:focus-visible,
.h3p-events-archive__pagination .current {
    border-color: #0f5775;
    background: #0f5775;
    color: #fff;
}

/* Responsive */

@media (max-width: 1050px) {
    .h3p-events-archive__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .h3p-events-archive__filters-toggle {
        display: flex;
    }

    .h3p-events-archive__layout {
        display: block;
    }

    .h3p-events-filters {
        position: static;
        display: none;
        margin-bottom: 1.5rem;
    }

    .h3p-events-filters.is-open {
        display: block;
    }

    .h3p-events-filters__form {
        max-width: 480px;
        margin-inline: auto;
    }

    .h3p-events-archive__types {
        border-radius: 1.5rem;
    }

    .h3p-events-archive__types-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .h3p-events-archive__grid {
        grid-template-columns: 1fr;
    }

    .h3p-event-card {
        width: min(100%, 420px);
        margin-inline: auto;
    }
}

@media (max-width: 480px) {
    .h3p-events-archive__types-list {
        grid-template-columns: 1fr;
    }
}

.h3p-events-filters__legend-icon {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: #0f3443;
}

.h3p-events-filters__legend-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* ==========================================================
   Contrôles (radio + checkbox)
   ========================================================== */

.h3p-events-filters__choice input[type="radio"],
.h3p-events-filters__choice input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;

    position: relative;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 1.125rem;
    height: 1.125rem;
    aspect-ratio: 1;

    margin: 0;

    box-sizing: border-box;

    border: 1px solid #d6dee2;
    border-radius: 50%;
    background: #fff;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background-color .2s ease;
}

.h3p-events-filters__choice input[type="radio"]:checked,
.h3p-events-filters__choice input[type="checkbox"]:checked {
    border-color: #0f5775;
}

.h3p-events-filters__choice input[type="radio"]:checked::after,
.h3p-events-filters__choice input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 0.45rem;
    height: 0.45rem;

    border-radius: 50%;
    background: #0f5775;

    transform: translate(-50%, -50%);
}

.h3p-events-filters__choice input:focus-visible {
    outline: 2px solid #10b7c1;
    outline-offset: 2px;
}