/* Center card styles */
.card-org {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1) !important;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.card-top {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.card-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-right: 16px;
}

.card-info {
    flex: 1;
}

.card-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #5e3b9f;
}

.card-location {
    font-size: 1rem;
    padding-top: 7px;
    color: #666;
}

.location-logo {
    margin-right: 6px;
    color: #888;
    font-size: 1.2rem;
}

@media (max-width: 767.98px) {
    .card-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .card-logo {
        margin: 0 0 10px 0;
    }
    .card-info {
        width: 100%;
    }
    .card-title,
    .card-location {
        text-align: center;
    }
}

.card-description {
    font-size: .9rem;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qualiopi-logo {
    position: absolute;
    border-radius: 8px;
    top: 0;
    right: 3px;
    height: 50px;
    width: 100px;
}

@media (max-width: 768px) {
    .qualiopi-logo {
        height: 30px;
        width: 60px;
    }
}

/* Filter sidebar styles - matching formations.css */
.filter-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.filter-sidebar.open {
    right: 0;
}

.filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    display: none;
    pointer-events: none;
}

.filter-backdrop.show {
    display: block;
    pointer-events: auto;
}

/* Wider layout on annuaire */
.directory-page .directory-wide {
    padding: 0;
}

.directory-page .directory-wide.container {
    width: 100%;
}

@media (min-width: 1536px) {
    .directory-page .directory-wide.container {
        max-width: 1536px;
    }
}

@media (min-width: 1280px) {
    .directory-page .directory-wide.container {
        max-width: 1280px;
    }
}

@media (min-width: 1024px) {
    .directory-page .directory-wide.container {
        max-width: 1024px;
    }
}

@media (min-width: 768px) {
    .directory-page .directory-wide.container {
        max-width: 768px;
    }
}

@media (min-width: 640px) {
    .directory-page .directory-wide.container {
        max-width: 640px;
    }
}
.tous-les-filtres {
    font-size: 1.2rem;
}

.filter-toggle-btn {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
    gap: 8px;
    display: flex;
    align-items: center;
    color: #333;
}

.filter-toggle-btn i {
    font-size: 1.2rem;
    margin-right: 8px;
}

.filter-body .form-check-label {
    font-size: 0.95rem;
    padding-left: 4px;
}

.filter-body .form-check {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.filter-body .collapse {
    padding-left: 2px;
}

#map {
    height: 200px;
    width: 100%;
    border-radius: 6px;
}

#mapPopup {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 2;
    display: none;
    width: 95%;
    max-width: 600px;
    color: black;
}

#villeSearchWrapper {
    position: relative;
}

/* Map popup is hidden by default - controlled by JavaScript */
#mapPopup {
    display: none;
}

/* Ensure header dropdown is above filter backdrop */
header.page-header .dropdown-menu {
    z-index: 1051 !important;
}

/* Fix visibility issue - ensure dropdown menu is visible when shown */
header.page-header .dropdown-menu.show {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Search & filter buttons height alignment (directory only) */
.directory-page .search-submit-btn,
.directory-page .directory-filter-btn {
    height: 3.25rem;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    white-space: normal;
    text-align: center;
    box-sizing: border-box !important;
    max-width: 100%;
}

/* Layout: allow full width on smaller screens, reduce centering */
.directory-page .w-lg-75,
.directory-page .w-lg-65 {
    width: 100% !important;
    max-width: 100%;
}

.directory-page .container {
    max-width: 1200px;
}

.directory-view-toggle .btn + .btn {
    margin-left: 6px;
}

@media (max-width: 991.98px) {
    .directory-page .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }
    .directory-page .directory-title {
        text-align: left !important;
    }
}

@media (max-width: 1199.98px) {
    .directory-page .search-submit-btn,
    .directory-page .directory-filter-btn {
        height: auto;
        min-height: 3rem;
        padding: 0.65rem 0.75rem;
        font-size: 1rem;
        line-height: 1.2;
    }
}

@media (max-width: 991.98px) {
    .directory-page .search-submit-btn,
    .directory-page .directory-filter-btn {
        padding: 0.55rem 0.75rem;
        font-size: 0.95rem;
    }
}

#cityList {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#cityList li {
    padding: 10px;
    cursor: pointer;
    color: black;
}

#cityList li:hover {
    background-color: #f1f1f1;
}

/* Map popup close button */
.close-map-popup-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    z-index: 10;
    padding: 5px 10px;
}

.close-map-popup-btn:hover {
    color: #000;
}

/* Directory specific styles */
.directory-results-count {
    font-size: 1rem;
}

.directory-empty-image {
    max-width: 220px;
}

.directory-empty-title {
    font-size: 1.75rem;
}

.directory-empty-text {
    font-size: 1.125rem;
    max-width: 500px;
}

/* Filter header background */
.filter-header.bg-light-purple {
    background-color: #e0d5f7 !important;
}

/* Map view specific styles */
#map2 {
    height: 600px;
    width: 100%;
    z-index: 1;
    border: 12px solid rgb(255, 255, 255);
    box-shadow: 0 2px 8px rgba(80,60,120,0.07);
}

/* Container padding */
.container.content-space-t-lg-1 {
    padding: 0;
}