
/* Annuaire de professionnels */

:root {
    --light-green-color: #CBE7E5;
    --green-title-color: #6CC2B9;
    --blue-green-color: #00A19C;
    --light-blue-color: #A8EEF3;
    --orange-color: #F08013;
    --yellow-color: #FFEE8D;
    --light-red-color: #F3A8A8;
    --custom-black-color: #0B1D2C;
    --font-family-body: "Poppins", sans-serif;
    --font-family-title: "Montserrat", sans-serif;
}

body.page-template-page-annuaire {
    font-family: var(--font-family-body);
}

.page-template-page-annuaire .annuaire-container {
    min-height: 100vh;
}

.page-template-page-annuaire .annuaire-header {
    background: var(--light-green-color);
    padding: 20px 0 10px 0;
}

.page-template-page-annuaire .annuaire-header .container,
.page-template-page-annuaire .results-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-template-page-annuaire .breadcrumb-nav {
    margin-bottom: 2rem;
    font-size: 12px;
}

.page-template-page-annuaire .breadcrumb-nav a {
    color: var(--custom-black-color);
    text-decoration: none;
}

.page-template-page-annuaire .breadcrumb-nav a:hover {
    color: var(--custom-black-color);
    text-decoration: underline;
}

.page-template-page-annuaire .breadcrumb-nav .separator {
    margin: 0 0.5rem;
    color: var(--custom-black-color);
}

.page-template-page-annuaire .breadcrumb-nav .current {
    color: var(--custom-black-color);
    font-weight: 500;
}

.page-template-page-annuaire .annuaire-title {
    font-family: var(--font-family-title);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blue-green-color);
    margin: 0;
    text-align: center;
}

.page-template-page-annuaire .search-filter-section {
    background: var(--light-green-color);
    padding: 0 0 20px;
}

.page-template-page-annuaire .search-filter-section .container {
    max-width: 1080px;
    margin: 0 auto;
}

.page-template-page-annuaire .search-form-wrapper {
    padding: 20px;
}

.page-template-page-annuaire .filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    margin-bottom: 20px;
    position: relative;
}

.page-template-page-annuaire .hidden-filters {
    transition: all 0.3s ease;
}

.page-template-page-annuaire .filter-group {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.page-template-page-annuaire .filter-select-wrapper {
    width: 100%;
    position: relative;
    z-index: 10;
}

.page-template-page-annuaire .filter-select-wrapper::after {
    content: '';
    display: block;
    position: absolute;
    top: calc(50% - 3px);
    right: 16px;
    width: 12px;
    height: 12px;
    border-left: 2px solid var(--custom-black-color);
    border-bottom: 2px solid var(--custom-black-color);
    transform: translateY(-50%) rotate(-45deg);
    z-index: 12;
}

.page-template-page-annuaire .filter-select {
    padding: 16px 12px;
    font-size: 16px;
    color: var(--custom-black-color);
    background: white;
    border-radius: 10px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 11;
}

/* Custom dropdown styling */
.page-template-page-annuaire .custom-dropdown {
    position: relative;
    width: 100%;
}

.page-template-page-annuaire .custom-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--light-green-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.page-template-page-annuaire .custom-dropdown-options.show {
    display: block;
}

.page-template-page-annuaire .custom-dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.page-template-page-annuaire .custom-dropdown-option:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.page-template-page-annuaire .custom-dropdown-option:hover {
    background-color: var(--light-green-color);
    color: var(--custom-black-color);
}

.page-template-page-annuaire .custom-dropdown-option.selected {
    background-color: var(--green-title-color);
    color: white;
}

/* Custom dropdown trigger positioning */
.page-template-page-annuaire .custom-dropdown-trigger {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 12;
}

/* Ensure proper stacking context */
.page-template-page-annuaire .filter-select-wrapper {
    position: relative;
}

.page-template-page-annuaire .search-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-template-page-annuaire .toggle-filters {
    padding-left: 28px;
    color: var(--custom-black-color);
    font-size: 16px;
    font-weight: 600;
    text-decoration: underline;
    position: relative;
    cursor: pointer;
}

.page-template-page-annuaire .toggle-filters:hover {
    color: var(--custom-black-color);
    text-decoration: none;
}

.page-template-page-annuaire .toggle-filters::before,
.page-template-page-annuaire .toggle-filters::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-size: contain;
    transition: transform 0.3s ease;
}

.page-template-page-annuaire .toggle-filters::before {
    display: inline-block;
    background: url('../img/icons/search-plus-icon.svg') no-repeat center center;
}

.page-template-page-annuaire .toggle-filters::after {
    display: none;
    background: url('../img/icons/search-minus-icon.svg') no-repeat center center;
}

.page-template-page-annuaire .toggle-filters.active::before {
    display: none;
}

.page-template-page-annuaire .toggle-filters.active::after {
    display: inline-block;
}

.page-template-page-annuaire .reset-filters {
    margin-left: auto;
    padding-left: 28px;
    color: var(--custom-black-color);
    font-size: 16px;
    font-weight: 400;
    text-decoration: underline;
    position: relative;
    cursor: pointer;
}

.page-template-page-annuaire .reset-filters:hover {
    color: var(--custom-black-color);
    text-decoration: none;
}

.page-template-page-annuaire .reset-filters::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 18px;
    height: 18px;
    display: inline-block;
    background: url('../img/icons/reset-icon.svg') no-repeat center center;
    background-size: contain;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}


.page-template-page-annuaire .search-actions .search-button {
    width: 220px;
    max-width: 100%;
    font-family: var(--font-family-title);
    background: var(--orange-color);
    color: white;
    padding: 14px 30px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 30px;
    border: none;
    transition: background-color 0.3s ease;
}

.page-template-page-annuaire .search-actions .search-button:hover,
.page-template-page-annuaire .search-actions .search-button:focus {
    background: var(--custom-black-color);
    color: white;
    outline: none;
}

.page-template-page-annuaire .results-section {
    padding: 40px 0;
    background: white;
}

.page-template-page-annuaire .annuaire-results {
    min-height: 400px;
}

.page-template-page-annuaire .loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.page-template-page-annuaire .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--green-title-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Professional Cards */
.page-template-page-annuaire .professional-section {
    margin-bottom: 50px;
}

.page-template-page-annuaire .section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.page-template-page-annuaire .section-icon {
    margin-right: 5px;
    width: 110px;
    height: 110px;
}

.page-template-page-annuaire .section-title {
    font-family: var(--font-family-title);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--green-title-color);
    margin: 0;
}

.page-template-page-annuaire .professionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px 30px;
}

.page-template-page-annuaire .professional-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--light-green-color);
}

.page-template-page-annuaire .professional-name {
    font-family: var(--font-family-title);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--blue-green-color);
    margin: 0 0 8px 0;
}

.page-template-page-annuaire .professional-profession {
    color: var(--orange-color);
    font-size: 1.1rem;
    margin: 0 0 8px 0;
}

.page-template-page-annuaire .professional-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.page-template-page-annuaire .detail-item,
.page-template-page-annuaire .detail-item a {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--custom-black-color);
}

.page-template-page-annuaire .detail-icon {
    display: inline-block;
    margin-right: 8px;
    width: 24px;
}

.page-template-page-annuaire .professional-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-template-page-annuaire .tag {
    padding: 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 400;
    color: var(--custom-black-color);
}

.page-template-page-annuaire .tag.yellow {
    background: var(--yellow-color);
}

.page-template-page-annuaire .tag.blue {
    background: #CBE7E5;
}

.page-template-page-annuaire .tag.pink {
    background: #FBBFDC;
}

.page-template-page-annuaire .tag.green {
    background: #E3EFDE;
}

.page-template-page-annuaire .tag.orange {
    background: #fed196;
}

.page-template-page-annuaire .tag.grey {
    background: #e5d8d0;
}

.page-template-page-annuaire .tag.red {
    background: #fcb2a5;
}

.page-template-page-annuaire .tag.light-green {
    background: #edf3ca;
}

/* Structure Cards */
.page-template-page-annuaire .structure-card {
    display: flex;
    background: white;
    border: 1px solid var(--light-green-color);
    border-radius: 20px;
    padding: 20px;
}

.page-template-page-annuaire .structure-card-photo {
    flex: 0 0 100px;
    width: 100px;
    height: auto;
    margin-right: 40px;
}

.page-template-page-annuaire .structure-card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.page-template-page-annuaire .structure-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-green-color);
    margin: 0 0 8px 0;
}

.page-template-page-annuaire .structure-card .structure-modal-button-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.page-template-page-annuaire .structure-modal-button.open-button,
.page-template-page-annuaire .structure-modal-button.close-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: var(--orange-color);
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.page-template-page-annuaire .structure-modal-button.open-button:hover,
.page-template-page-annuaire .structure-modal-button.open-button:focus,
.page-template-page-annuaire .structure-modal-button.close-button:hover,
.page-template-page-annuaire .structure-modal-button.close-button:focus {
    background: var(--custom-black-color);
}

/* Modal */
.page-template-page-annuaire .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    opacity: 0;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.page-template-page-annuaire .modal-overlay.is-visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.page-template-page-annuaire .modal-card {
    width: 100%;
    max-width: 1040px;
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    padding: 70px 50px 40px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.page-template-page-annuaire .modal-card .modal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
}

.page-template-page-annuaire .modal-card .modal-photo {
    width: 100px;
    height: auto;
    margin-right: 40px;
    object-fit: contain;
    object-position: center;
}

.page-template-page-annuaire .modal-card .modal-content {
    width: 100%;
    margin: 15px 0;
}

.page-template-page-annuaire .modal-card .modal-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 15px;
}

.page-template-page-annuaire .no-results {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--custom-black-color);
    margin-top: 40px;
}


/* Responsive Design */

@media (max-width: 992px) {

    .page-template-page-annuaire .annuaire-title {
        font-size: 2rem;
    }
    
    .page-template-page-annuaire .filter-row {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px;
    }

    .page-template-page-annuaire .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {

    .page-template-page-annuaire .annuaire-title {
        font-size: 1.6rem;
    }
    
    .page-template-page-annuaire .search-actions {
        flex-direction: column;
        align-items: center;
    }

    .page-template-page-annuaire .section-title {
        font-size: 1.4rem;
    }
    
    .page-template-page-annuaire .professionals-grid {
        grid-template-columns: 1fr;
    }

    .page-template-page-annuaire .structure-card-photo {
        flex: 0 0 60px;
        width: 60px;
        height: auto;
        margin-right: 20px;
    }

    .page-template-page-annuaire .modal-card {
        padding: 50px 30px 20px;
    }

    .page-template-page-annuaire .reset-filters {
        margin-left: auto;
        margin-right: auto;
    }
}


@media (max-width: 576px) {

    .page-template-page-annuaire .structure-card,
    .page-template-page-annuaire .modal-card {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .page-template-page-annuaire .structure-card-photo,
    .page-template-page-annuaire .modal-card .modal-photo {
        flex: 0 0 100px;
        width: 100px;
        height: auto;
        margin: 0 auto 20px;
    }

    .page-template-page-annuaire .modal-card {
        padding: 30px 20px 15px;
    }
}