/* DLE Filter — category and SEO filter pages */
.voirdrama-dle-filter {
    position: relative;
    z-index: 20;
    margin: 14px 0 24px;
}

.voirdrama-dle-filter__details {
    background: transparent;
}

.voirdrama-dle-filter__toggle {
    display: inline-flex;
    width: auto;
    min-height: 42px;
    box-sizing: border-box;
    align-items: center;
    gap: 9px;
    padding: 7px 12px 7px 9px;
    color: #34353a;
    background: #fff;
    border: 1px solid #dfe0e4;
    border-left: 3px solid #c41f32;
    border-radius: 8px;
    box-shadow: 0 4px 13px rgba(17, 18, 22, .06);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    list-style: none;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.voirdrama-dle-filter__toggle::-webkit-details-marker {
    display: none;
}

.voirdrama-dle-filter__toggle:hover,
.voirdrama-dle-filter__toggle:focus-visible {
    color: #c41f32;
    background: #fff;
    border-color: #c41f32;
    box-shadow: 0 6px 17px rgba(17, 18, 22, .09);
}

.voirdrama-dle-filter__toggle:focus-visible {
    outline: 3px solid rgba(196, 31, 50, .2);
    outline-offset: 2px;
}

.voirdrama-dle-filter__toggle-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    color: #c41f32;
    background: rgba(196, 31, 50, .08);
    border-radius: 50%;
}

.voirdrama-dle-filter__chevron {
    width: 8px;
    height: 8px;
    margin-left: 3px;
    border-right: 2px solid #85878e;
    border-bottom: 2px solid #85878e;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

.voirdrama-dle-filter__details[open] .voirdrama-dle-filter__toggle {
    color: #c41f32;
    border-color: #c41f32;
}

.voirdrama-dle-filter__details[open] .voirdrama-dle-filter__chevron {
    transform: rotate(225deg) translate(-2px, -2px);
}

.voirdrama-dle-filter__panel {
    margin-top: 10px;
    padding: 18px;
    background: #f7f7f9;
    border: 1px solid #e1e2e6;
    border-radius: 8px;
    box-shadow: 0 7px 22px rgba(20, 22, 28, .06);
}

.voirdrama-dle-filter__form {
    display: grid;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

/* Category heading: title, language tabs and the lazy filter trigger share one line. */
.voirdrama-category-toolbar .c-blog__heading.style-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: flex-end;
    column-gap: 4px;
}

.voirdrama-category-toolbar .c-blog__heading.style-2 > h2 {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

/* Raw filter-result pages keep their existing H1; SEO filter pages use the H2. */
.voirdrama-filter-results-toolbar .voirdrama-seo-filter-heading {
    display: none;
}

.voirdrama-category-toolbar .c-nav-tabs {
    grid-column: 2;
    grid-row: 1;
    float: none;
    margin-left: 0;
}

.voirdrama-category-toolbar .voirdrama-dle-filter__toggle {
    grid-column: 3;
    grid-row: 1;
    width: 34px;
    height: 34px;
    min-height: 34px;
    justify-content: center;
    margin: 0 0 1px 3px;
    padding: 0;
    color: #c41f32;
    background: transparent;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
}

.voirdrama-category-toolbar .voirdrama-dle-filter__toggle-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    color: inherit;
    background: transparent;
}

.voirdrama-category-toolbar .voirdrama-dle-filter__toggle-icon svg {
    width: 18px;
    height: 18px;
}

.voirdrama-category-toolbar .voirdrama-dle-filter__chevron {
    display: none;
}

.voirdrama-category-toolbar .voirdrama-dle-filter__toggle:hover,
.voirdrama-category-toolbar .voirdrama-dle-filter__toggle:focus-visible,
.voirdrama-category-toolbar .voirdrama-dle-filter__toggle[aria-expanded="true"] {
    color: #c41f32;
    background: rgba(196, 31, 50, .08);
    border: 0;
    box-shadow: none;
}

.voirdrama-dle-filter--category .voirdrama-dle-filter__panel,
.voirdrama-dle-filter--results .voirdrama-dle-filter__panel {
    margin-top: 0;
}

.voirdrama-dle-filter__field {
    width: 100%;
    min-width: 0;
}

.voirdrama-dle-filter__field--search {
    grid-column: auto;
}

.voirdrama-dle-filter__field > input,
.voirdrama-dle-filter__field > select {
    display: block;
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 11px;
    color: #34363d;
    background: #fff;
    border: 1px solid #d7d9df;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    line-height: 24px;
    outline: none;
}

.voirdrama-dle-filter__field > input::placeholder {
    color: #747780;
    opacity: 1;
}

.voirdrama-dle-filter__field > input:focus {
    border-color: #c41f32;
    box-shadow: 0 0 0 3px rgba(196, 31, 50, .1);
}

.voirdrama-dle-filter__field .tail-select {
    display: block;
    width: 100% !important;
    margin: 0;
    font-family: inherit;
    font-size: 13px;
    line-height: 24px;
}

.voirdrama-dle-filter__field .tail-select .select-label {
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 30px 10px 11px;
    color: #34363d;
    background: #fff;
    border: 1px solid #d7d9df;
    border-radius: 6px;
    box-shadow: none;
}

.voirdrama-dle-filter__field .tail-select .select-label::after {
    top: 19px;
    right: 12px;
}

.voirdrama-dle-filter__field .tail-select:hover .select-label,
.voirdrama-dle-filter__field .tail-select.active .select-label,
.voirdrama-dle-filter__field .tail-select:focus .select-label {
    border-color: #c41f32;
    box-shadow: 0 0 0 3px rgba(196, 31, 50, .1);
}

.voirdrama-dle-filter__field .tail-select .select-label .label-count {
    color: #c41f32;
    border-color: #dddfe4;
}

.voirdrama-dle-filter__field .tail-select .select-dropdown {
    width: max(100%, 210px);
    margin-top: 5px;
    color: #34363d;
    background: #fff;
    border: 1px solid #d7d9df;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(20, 22, 28, .16);
}

.voirdrama-dle-filter__field .tail-select .select-dropdown .dropdown-search {
    border-color: #e1e2e6;
}

.voirdrama-dle-filter__field .tail-select .select-dropdown input[type="text"] {
    color: #34363d;
}

.voirdrama-dle-filter__field .tail-select .select-dropdown ul li.dropdown-option {
    color: #4c4f57;
    font-size: 13px;
}

.voirdrama-dle-filter__field .tail-select .select-dropdown ul li.dropdown-option:hover,
.voirdrama-dle-filter__field .tail-select .select-dropdown ul li.dropdown-option.hover {
    color: #202126;
    background: #f3f3f5;
}

.voirdrama-dle-filter__field .tail-select .select-dropdown ul li.dropdown-option.selected {
    color: #c41f32;
    background: rgba(196, 31, 50, .07);
}

#voirdrama-filter-rating + .tail-select .select-dropdown li.dropdown-option:not([data-key=""])::after,
#voirdrama-filter-rating:has(option:not([value=""]):checked) + .tail-select .select-label .label-inner::after {
    display: inline-block;
    min-width: 72px;
    height: 16px;
    margin-left: 4px;
    padding-left: 19px;
    background: 0 center / 15px 15px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f0b429' d='m12 2.4 2.9 5.88 6.49.94-4.7 4.58 1.11 6.46L12 17.21l-5.8 3.05 1.11-6.46-4.7-4.58 6.49-.94L12 2.4Z'/%3E%3C/svg%3E");
    color: #6c6f77;
    content: "et plus";
    font-size: 12px;
    line-height: 16px;
    vertical-align: middle;
}

.voirdrama-dle-filter__actions {
    min-width: 0;
}

.voirdrama-dle-filter__submit {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    color: #fff;
    background: #c41f32;
    border: 1px solid #c41f32;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: background-color .2s ease, border-color .2s ease;
}

.voirdrama-dle-filter__submit:hover,
.voirdrama-dle-filter__submit:focus-visible {
    background: #a7192a;
    border-color: #a7192a;
}

.voirdrama-dle-filter__submit:focus-visible {
    outline: 3px solid rgba(196, 31, 50, .2);
    outline-offset: 2px;
}

#dle-content > .col-12 > .wp-pagenavi {
    display: flex;
    float: none;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991px) {
    .voirdrama-dle-filter__form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .voirdrama-dle-filter__field--search {
        grid-column: span 2;
    }

    .voirdrama-dle-filter__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .voirdrama-dle-filter__toggle {
        width: 100%;
        min-height: 44px;
        padding: 8px 11px 8px 9px;
    }

    .voirdrama-dle-filter__chevron {
        margin-left: auto;
    }

    .voirdrama-category-toolbar .c-blog__heading.style-2 {
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: end;
        column-gap: 6px;
        row-gap: 0;
    }

    .voirdrama-category-toolbar .c-blog__heading.style-2 > h2 {
        grid-column: 1;
        grid-row: 1;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .voirdrama-category-toolbar .c-nav-tabs {
        display: none;
    }

    .voirdrama-category-toolbar .voirdrama-dle-filter__toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        margin-left: auto;
        visibility: visible;
        opacity: 1;
        position: relative;
        z-index: 2;
    }

    .voirdrama-category-toolbar .voirdrama-dle-filter__toggle {
        width: 44px;
        height: 44px;
        min-height: 44px;
        margin-bottom: 0;
        padding: 0;
    }

    .voirdrama-category-toolbar .voirdrama-dle-filter__toggle-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

}

@media (max-width: 575px) {
    .voirdrama-dle-filter {
        margin-bottom: 19px;
    }

    .voirdrama-dle-filter__panel {
        padding: 14px;
    }

    .voirdrama-dle-filter__form {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .voirdrama-dle-filter__field--search {
        grid-column: auto;
    }

    .voirdrama-dle-filter__field .tail-select .select-dropdown {
        width: 100%;
    }
}
