/* ===== Bandeau boutons filtres / carte ===== */
/* Réglages globaux */
.projets_toolbar {
    position: relative;
    z-index: 30;
    width: 100%;
    padding: 0 30px;
    background-color: transparent;
    transition: background-color 0.25s ease;
}

.projets_toolbar_inner {
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
}

/* Toolbar "collée" sous le header (géré en JS) */
.projets_toolbar.is_sticky {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background-color: #eecdb9;
    z-index: 999999;
}

/* Boutons */
.projets_toolbar_button {
    border: none;
    padding: 4px 0;
    font-size: 0.85em;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    cursor: pointer;
    color: #333333;
    background: none;
}

.projets_toolbar_button_label {
    border-bottom: 1px solid transparent;
}

.projets_toolbar_reset {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 0.8em;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    border: 1px solid #333333;
    background-color: transparent;
    color: #333333;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.projets_toolbar_reset:hover {
    background-color: #333333;
    color: #ffffff;
}

/* Overlay plein écran, simple */
.projets_filters_overlay {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 49;
}

.projets_filters_overlay.is_open {
    opacity: 1;
    pointer-events: auto;
}

/* Quand le volet filtres est ouvert, on bloque le scroll global */
/* html.projets_filters_open,
body.projets_filters_open {
    overflow: hidden !important;
    height: 100% !important;
    overscroll-behavior: contain;
} */

html.projets_filters_open,
body.projets_filters_open {
    overflow: hidden !important;
    overscroll-behavior: contain;
}

/* ===== Volet de filtres ===== */

/* Panneau latéral (fermé par défaut) */
.projets_filters_panel {
    position: fixed;
    left: 0;
    top: 0;
    /* sera ajusté en JS */
    width: 320px;
    background-color: #333333;
    color: #ffffff;
    z-index: 50;

    display: flex;
    flex-direction: column;
    overflow: hidden;

    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Panel visible */
.projets_filters_panel.is_open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.projets_filters_panel * {
    color: #edeae3 !important;
}

/* Header du panneau (titre, bouton fermer) */
.projets_filters_header {
    flex: 0 0 auto;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.projets_filters_header_title {
    font-size: 1rem;
    margin: 0;
    letter-spacing: 0.04em;
}

/* Zone scrollable des champs */
.projets_filters_body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 16px 24px 12px;
    overscroll-behavior: contain;
}

/* Formulaire de filtres */
.projets_filters_form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 13px;
}

/* Groupes */
.projets_filters_group {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.projets_filters_group:not(:first-of-type) {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 10px;
}

.projets_filters_group_title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.projets_filters_option {
    display: flex;
    align-items: start;
    gap: 6px;
    margin-bottom: 2px;
    cursor: pointer;
}

.projets_filters_option input[type="radio"],
.projets_filters_option input[type="checkbox"] {
    margin: 0;
    accent-color: #eecdb9;
}

.projets_filters_option span {
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1.3em;
    margin-top: -1.3%;
}

/* Barre d’actions en bas, toujours visible */
.projets_filters_actions {
    flex: 0 0 auto;
    padding: 22px 30px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333333;
}

.projets_filters_submit {
    text-transform: lowercase;
}

body[data-form-submit=regular] .container-wrap button[type=submit].projets_filters_submit {
    padding: 0 !important;
    padding-bottom: calc(var(--underline_gap) + var(--dot)) !important;
    font-weight: normal;
    font-family: 'degular', sans-serif;
}

body[data-button-style="slightly_rounded_shadow"] .container-wrap button[type="submit"].projets_filters_submit:hover,
body[data-button-style="slightly_rounded_shadow"] .container-wrap .projets_filters_actions .projets_filters_reset:hover {
    transform: none;
    opacity: 1;
}

.projets_filters_submit:hover::after,
.projets_filters_submit:focus-visible::after,
.projets_filters_reset:hover::after,
.projets_filters_reset:focus-visible::after {
    background-image: var(--u_svg_filled);
}

/* Les éléments à “souligner” */
.projets_filters_reset,
.projets_filters_submit {
    position: relative;
    display: inline-flex;
    /* permet de coller à la largeur du contenu */
    align-items: baseline;
    text-decoration: none;
    /* important pour le lien */
}

/* On réserve de la place pour la ligne de points */
.projets_filters_reset,
.projets_filters_submit {
    padding-bottom: calc(var(--underline_gap) + var(--dot)) !important;
    --underline_inset: 0px;
    /* pas de padding horizontal à retirer */
}

.projets_filters_reset,
.projets_filters_submit {
    font-size: 1rem !important;
}

/* Le soulignement en points */
/* .projets_filters_reset::after,
.projets_filters_submit::after {
    content: "";
    position: absolute;
    left: var(--underline_inset);
    right: var(--underline_inset);
    bottom: 0;
    height: var(--dot);
    pointer-events: none;
    background-image: radial-gradient(circle at 50% 50%, var(--nectar-page-text-color, #edeae3) calc((var(--dot) / 2) + var(--nudge)), transparent calc((var(--dot) / 2) + var(--nudge) + 0.04px));
    background-position: left bottom;
    background-size: var(--dot) var(--dot);
    background-repeat: round;
} */

.projets_active_filters {
    margin: 16px 30px;
    font-size: 1.1rem !important;
}

.projets_active_filters_header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.projets_active_filters_count {
    font-weight: 600;
}

.projets_active_filters_label {
    font-size: 1.1rem;
}

.projets_active_filters_chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.projets_active_filters_chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #333333;
    background-color: #333333;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    margin-left: 6px;
}

.projets_active_filters_chip:hover {
    background-color: transparent;
    color: #333333;
}

.projets_active_filters_chip_remove {
    font-size: 0.9em;
    line-height: 1;
    float: right;
}

/* Lien "tout effacer" */
.projets_active_filters_clear {
    margin-left: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #333333;
    background-color: transparent;
    color: #333333;
    text-decoration: none;
    cursor: pointer;
}

.projets_active_filters_clear:hover {
    background-color: #333333;
    color: #ffffff;
}

/* Accessibilité : texte pour lecteurs d’écran */
.screen_reader_text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Bouton fermer */
.projets_filters_close {
    border: none;
    background: none;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    color: rgb(237 234 227 / 50%) !important;
}

/* ================================
   PAGINATION PROJETS
   ================================ */

.projets_pagination {
    margin: 40px 0 60px;
    text-align: center;
    font-size: 0.9rem;
}

/* Liste générée par paginate_links(type = "list") */
.projets_pagination ul.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Chaque item de la liste */
.projets_pagination ul.page-numbers li {
    margin: 0;
    list-style: none;
}

/* Liens + span des numéros */
.projets_pagination a.page-numbers,
.projets_pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;

    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background-color: #ffffff;

    font-size: 0.85rem;
    line-height: 1;
    text-decoration: none;
    color: #333333;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

/* État "page actuelle" */
.projets_pagination span.page-numbers.current {
    background-color: #333333;
    color: #ffffff;
    border-color: #333333;
    cursor: default;
}

/* Survol des liens (sauf page actuelle) */
.projets_pagination a.page-numbers:hover {
    background-color: #333333;
    color: #ffffff;
    border-color: #333333;
    transform: translateY(-1px);
}

/* Liens précédent / suivant (préviennent la casse si texte long) */
.projets_pagination a.prev,
.projets_pagination a.next,
.projets_pagination span.prev,
.projets_pagination span.next {
    padding: 0 14px;
    min-width: auto;
    white-space: nowrap;
}

/* Variante "désactivé" si WP génère un span.prev/span.next */
.projets_pagination span.prev,
.projets_pagination span.next {
    opacity: 0.4;
    cursor: default;
}

.projets_empty_message {
    padding: 20px 30px 10vw;
    font-size: 1rem;
}

/* Mobile */
@media (max-width: 600px) {
    .projets_pagination ul.page-numbers {
        gap: 4px;
    }

    .projets_pagination a.page-numbers,
    .projets_pagination span.page-numbers {
        min-width: 30px;
        min-height: 30px;
        padding: 0 8px;
        font-size: 0.8rem;
    }

    .projets_pagination a.prev,
    .projets_pagination a.next,
    .projets_pagination span.prev,
    .projets_pagination span.next {
        padding: 0 10px;
    }

    .projets_filters_panel {
        width: 280px;
    }

    .projets_active_filters_label,
    .projets_active_filters_chip,
    .projets_active_filters_clear {
        display: block;
    }

    .projets_active_filters_chip,
    .projets_active_filters_clear {
        margin-top: 2%;
        margin-left: 0;
    }

    .projets_active_filters_label {
        margin-bottom: 4%;
    }

}

@media (max-width: 480px) {
    .projets_toolbar {
        padding: 0 20px;
    }
}