:root {
    --ann-primary: #2f78b6;
    --ann-primary-light: #EFF5FB;
    --ann-primary-hover: #1b8bbd;
    --ann-text: #1a2332;
    --ann-text-muted: #6b7a8d;
    --ann-border: #ccc;
    --ann-bg-card: #ffffff;
    --ann-bg-page: #f7f9fb;
    --ann-radius: 10px;
    --ann-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    --ann-shadow-hover: 0 6px 24px rgba(0, 0, 0, .12);
    --ann-font: inherit;
    --ann-transition: 200ms ease;
}

body.page-template-template-directory {
    overflow-x: unset;
}

.section-annuaire-filters {
    background: #FCFCFC;
    border-bottom: 1px solid var(--ann-border);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

/* --- Filtres --- */
@media (min-width: 1201px) {
    .section-annuaire-filters {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
    }
}

.section-annuaire-filters .section_wrapper {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.annuaire-filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}

@media (max-width: 1200px) {
    .annuaire-filters-bar {
        flex-wrap: wrap;
        gap: 24px;
    }

    .annuaire-filters-bar>div {
        flex: 0 0 100%;
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .annuaire-filters-sep {
        display: none;
    }
}

/* -- Recherche -- */
.annuaire-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 280px;
    min-width: 200px;
}

.annuaire-search-icon {
    position: absolute;
    left: 12px;
    color: var(--ann-text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

input[type="search"].annuaire-search-input {
    width: 100%;
    height: 42px;
    padding: 0 36px 0 38px;
    border: 1.5px solid var(--ann-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--ann-font);
    color: var(--ann-text);
    background: var(--ann-bg-page);
    transition: border-color var(--ann-transition), box-shadow var(--ann-transition);
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
}

input[type="search"].annuaire-search-input:focus {
    border-color: var(--ann-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--ann-primary-light);
}

input[type="search"].annuaire-search-input::-webkit-search-cancel-button {
    display: none;
}

.annuaire-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--ann-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--ann-transition);
}

.annuaire-search-clear:hover {
    background: var(--ann-border);
    color: var(--ann-text);
}

/* -- Séparateur -- */
.annuaire-filters-sep {
    width: 1px;
    height: 30px;
    background: var(--ann-border);
    flex-shrink: 0;
}

@media (max-width: 680px) {
    .annuaire-filters-sep {
        display: none;
    }
}

/* -- Boutons catégories -- */
.annuaire-cats-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

.annuaire-cat-btn {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid var(--ann-border);
    background: transparent;
    color: var(--ann-text);
    font-size: 13.5px;
    font-weight: 500;
    font-family: var(--ann-font);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--ann-transition);
    line-height: 1;
}

.annuaire-cat-btn:hover {
    border-color: var(--ann-primary);
    color: var(--ann-primary);
    background: var(--ann-primary-light);
}

.annuaire-cat-btn.active {
    background: var(--ann-primary);
    border-color: var(--ann-primary);
    color: #fff;
}

/* -- Compteur -- */
.annuaire-count-wrap {
    margin-left: auto;
    flex-shrink: 0;
}

.annuaire-count {
    font-size: 13px;
    color: var(--ann-text-muted);
    white-space: nowrap;
}

body.page-template-template-directory #annuaire-grid {
    display: grid;
    list-style: none;
    padding: 0;
    margin: 0;
    transition: opacity var(--ann-transition);
}

body.page-template-template-directory #annuaire-grid>li {
    padding: 20px;
    position: relative;
    /* border-top: 1px solid var(--ann-border); */
}

body.page-template-template-directory #annuaire-grid>li::before {
    content: "" !important;
    position: absolute !important;
    top: -20px !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    width: 100% !important;
    background-color: var(--ann-border) !important;
}

@media (max-width: 575.98px) {
    body.page-template-template-directory #annuaire-grid {
        grid-template-columns: 1fr;
    }

    body.page-template-template-directory #annuaire-grid>li:first-child {
        border-top: none;
    }
}

@media (min-width: 576px) and (max-width: 991.99px) {
    body.page-template-template-directory #annuaire-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body.page-template-template-directory #annuaire-grid>li:nth-of-type(-n+2) {
        border-top: none;
    }

    body.page-template-template-directory #annuaire-grid>li:not(:nth-of-type(2n)) {
        border-right: 1px solid var(--ann-border);
    }
}

@media (min-width: 992px) and (max-width: 1199.99px) {
    body.page-template-template-directory #annuaire-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    body.page-template-template-directory #annuaire-grid>li:nth-of-type(-n+3) {
        border-top: none;
    }

    body.page-template-template-directory #annuaire-grid>li:not(:nth-of-type(3n)) {
        border-right: 1px solid var(--ann-border);
    }
}

@media (min-width: 1200px) {
    body.page-template-template-directory #annuaire-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    body.page-template-template-directory #annuaire-grid>li:nth-of-type(-n+4) {
        border-top: none;
    }

    body.page-template-template-directory #annuaire-grid>li:not(:nth-of-type(4n)) {
        border-right: 1px solid var(--ann-border);
    }
}

body.page-template-template-directory #annuaire-grid>li {
    width: 100% !important;
}

body.page-template-template-directory #annuaire-grid.annuaire-grid--loading {
    pointer-events: none;
    opacity: 0.5;
}

body.page-template-template-directory #annuaire-grid .separator {
    display: none;
}

.page-template-template-directory #annuaire-grid>li::after {
    content: none;
}

.annuaire-no-results {
    list-style: none !important;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

.annuaire-no-results-inner {
    text-align: center;
    padding: 60px 20px;
    color: var(--ann-text-muted);
}

.annuaire-no-results-inner svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.annuaire-no-results-inner p {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ann-text);
}

.annuaire-no-results-inner small {
    font-size: 13px;
}

.annuaire-loader {
    text-align: center;
    padding: 20px 0;
    color: var(--ann-text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.annuaire-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--ann-border);
    border-top-color: var(--ann-primary);
    border-radius: 50%;
    animation: annuaire-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes annuaire-spin {
    to {
        transform: rotate(360deg);
    }
}

.annuaire-pagination {
    margin-top: 30px;
}

.annuaire-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 20px 0;
}

.annuaire-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border: 1.5px solid var(--ann-border);
    border-radius: 6px;
    background: #fff;
    color: var(--ann-text);
    font-size: 14px;
    font-family: var(--ann-font);
    cursor: pointer;
    transition: all var(--ann-transition);
}

.annuaire-page-btn:hover {
    border-color: var(--ann-primary);
    color: var(--ann-primary);
    background: var(--ann-primary-light);
}

.annuaire-page-btn.active {
    background: var(--ann-primary);
    border-color: var(--ann-primary);
    color: #fff;
    cursor: default;
    font-weight: 700;
}

.annuaire-page-ellipsis {
    color: var(--ann-text-muted);
    padding: 0 4px;
    line-height: 38px;
    font-size: 14px;
}

.direc_wrapper {
    position: relative;
}

.direc-item .image_wrapper img.scale-with-grid {
    height: 175px !important;
    object-fit: cover;
}