/* Carte des réalisations v2 */
.project-map-v2 #project-map-v2 {
    height: 60vh;
    width: 100%;
    z-index: 1;
    margin-bottom: 2rem;
}

.project-map-v2.project-map-v2--embed #project-map-v2 {
    margin-bottom: 0;
}

.project-map-v2 .map-legend {
    font-size: 0.75rem;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.project-map-v2 .map-legend-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.project-map-v2 .map-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.project-map-v2 .map-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Barre unifiée : par expertise | par carte | par liste */
.project-map-v2 .display-type {
    position: relative;
    z-index: 25;
    overflow: visible;
}

.project-map-v2 .display-type .types {
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    position: relative;
    overflow: visible;
}

.project-map-v2 .display-type .types .option {
    border: none;
    background: #fff;
    text-transform: uppercase;
    font-size: 0.625em;
    font-weight: 700;
    cursor: pointer;
    outline: 0;
    color: #ccc;
    transition: color 0.3s ease;
    padding: 0;
}

.project-map-v2 .display-type .types .option .option-content {
    border-right: 1px solid #10131a;
    padding: 0.55rem 1rem;
    min-height: 48px;
    box-sizing: border-box;
}

.project-map-v2 .display-type .types .option:last-child .option-content,
.project-map-v2 .display-type .by-expertise-wrapper:last-child .option-content {
    border-right: none;
}

.project-map-v2 .display-type .types .by-expertise-wrapper + .option .option-content {
    border-right: 1px solid #10131a;
}

.project-map-v2 .display-type .types .option .option-icon {
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0.65em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-map-v2 .display-type .types .option .option-icon--cog svg {
    width: 28px;
    height: 28px;
    display: block;
}

.project-map-v2 .display-type .types .option.toggled,
.project-map-v2 .display-type .types .option.by-expertise.is-open {
    color: #10131a;
}

.project-map-v2 .display-type .types .option.by-expertise.is-open {
    color: #00a7b7;
}

.project-map-v2 .display-type .types .option.show-list .option-icon {
    background-image: url(../images/list-gray.svg);
}

.project-map-v2 .display-type .types .option.show-list.toggled .option-icon {
    background-image: url(../images/list.svg);
}

.project-map-v2 .display-type .types .option.show-map .option-icon {
    background-image: url(../images/map-gray.svg);
}

.project-map-v2 .display-type .types .option.show-map.toggled .option-icon {
    background-image: url(../images/map.svg);
}

.project-map-v2 .by-expertise-wrapper {
    position: relative;
    display: flex;
    z-index: 30;
}

.project-map-v2 .by-expertise-wrapper > .option .option-content {
    border-right: 1px solid #10131a;
}

.project-map-v2 #expertise-tab {
    position: absolute;
    left: 0;
    top: calc(100% + 2px);
    z-index: 40;
    min-width: 320px;
    max-width: 420px;
    display: none !important;
}

.project-map-v2 #expertise-tab:not(.closed) {
    display: block !important;
}

.project-map-v2 #expertise-tab .sort-by-expertise {
    background: #fff;
    width: 100%;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    margin: 0;
    max-height: 70vh;
    overflow-y: auto;
}

.project-map-v2 .expertise-checkbox {
    position: relative;
    font-size: 0.8125rem;
    font-weight: 400;
    margin: 0;
}

.project-map-v2 .expertise-checkbox input {
    position: absolute;
    opacity: 0;
    height: 1px;
    width: 1px;
}

.project-map-v2 .expertise-checkbox input + label {
    display: block;
    cursor: pointer;
    margin: 0;
    padding: 0.55rem 0.25rem;
    color: #b0b0b0;
    font-weight: 400;
    line-height: 1.35;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.project-map-v2 .expertise-checkbox input:checked + label {
    color: #10131a;
    font-weight: 700;
}

.project-map-v2 .expertise-checkbox input + label:hover {
    color: #10131a;
}

.project-map-v2 .filter-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 0.75rem 0;
}

.project-map-v2 .filter-section-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #00a7b7;
    margin-bottom: 0.35rem;
    letter-spacing: 0.03em;
}

@media (max-width: 767px) {
    .project-map-v2 .display-type {
        justify-content: stretch !important;
    }

    .project-map-v2 .display-type .types {
        width: 100%;
        flex-wrap: wrap;
    }

    .project-map-v2 .by-expertise-wrapper,
    .project-map-v2 .display-type .types .option {
        flex: 1 1 auto;
    }

    .project-map-v2 #expertise-tab {
        min-width: 100%;
        max-width: 100%;
    }
}

.project-map-v2 .view-mode {
    display: none;
}

.project-map-v2 .view-mode.show {
    display: block;
}

.project-map-v2 .project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-map-v2 .project-list .project-detail {
    position: relative;
    background-color: #fff;
    width: 100%;
    margin-bottom: 2em;
}

.project-map-v2 .project-list .project-image {
    position: relative;
    border-right: 3px solid var(--type-color, #00a7b7);
    display: flex;
    align-items: center;
    background-color: #ddd;
}

.project-map-v2 .project-list .project-image:after {
    content: "";
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(100%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px 16px;
    border-color: transparent transparent transparent var(--type-color, #00a7b7);
}

.project-map-v2 .project-list .project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-map-v2 .project-list .project-info .project-title {
    font-size: 1.5em;
    text-transform: uppercase;
    color: #00a7b7;
    font-weight: 600;
}

.project-map-v2 .project-list .project-info .main-expertise {
    color: #00a7b7;
    font-size: 0.75em;
    text-transform: uppercase;
    font-weight: 600;
}

.project-map-v2 .project-list .project-info .project-city {
    font-size: 1.125em;
    color: #666;
}

.project-map-v2 .project-list .project-description {
    padding-bottom: 60px;
    position: relative;
}

.project-map-v2 .project-list .project-description .btn {
    position: absolute;
    right: 24px;
    bottom: 24px;
    font-size: 0.9375em;
    padding: 0.4em 0.86667em;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .project-map-v2 .project-list .project-detail {
        height: 300px;
    }

    .project-map-v2 .project-list .project-image {
        width: 30%;
        height: 300px;
    }

    .project-map-v2 .project-list .project-description {
        width: 70%;
    }
}

.project-map-v2 .no-projects {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.project-map-v2 .page-nav {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

.project-map-v2 .page-nav .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #00a7b7;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.project-map-v2 .page-nav .page-numbers:hover,
.project-map-v2 .page-nav .page-numbers:focus,
.project-map-v2 .page-nav .page-numbers.current {
    background-color: #00a7b7;
    color: white;
    border-color: #00a7b7;
}

.project-map-v2 .custom-location-icon {
    background: transparent;
    border: none;
}

.project-map-v2 .custom-location-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.project-map-v2 .location-icon-wrapper {
    position: relative;
    display: inline-block;
}

.project-map-v2 .location-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.project-map-popup-multi {
    margin: 0;
    padding: 0;
}

.popup-multi-header {
    padding: 0.65rem 0.75rem 0.55rem;
    border-bottom: 1px solid #e0e0e0;
}

.popup-multi-header h3 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #00a7b7;
}

.popup-multi-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.popup-multi-card {
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
}

.popup-multi-card:last-child {
    margin-bottom: 0;
}

.project-map-popup-content {
    margin: 0;
    padding: 0;
    width: 100%;
}

.project-map-popup .leaflet-popup-content {
    margin: 0;
    min-width: 0;
}

.project-map-popup .leaflet-popup-content-wrapper {
    border-bottom: 3px solid var(--popup-color, #00a7b7);
    padding: 0;
    overflow: hidden;
}

.project-map-popup--multi .leaflet-popup-content-wrapper {
    border-bottom-width: 2px;
}

.project-map-popup .leaflet-popup-tip {
    background: var(--popup-color, #00a7b7);
    border: 1px solid var(--popup-color, #00a7b7);
}

.project-map-popup-main {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 250px;
}

.project-map-popup-image {
    width: 34%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f0f0f0;
}

.project-map-popup-image--empty {
    background: linear-gradient(135deg, #e8f6f8 0%, #d5eef2 100%);
}

.project-map-popup-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.project-map-popup-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem 2.5rem 1rem 1rem;
    height: 100%;
    box-sizing: border-box;
}

.project-map-popup-category {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #00a7b7;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.project-map-popup-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    color: #00a7b7;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
}

.project-map-popup-location {
    font-size: 0.8125rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.project-map-popup-excerpt {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-map-popup-excerpt p {
    margin: 0;
}

.project-map-popup-cta {
    display: inline-block;
    padding: 0.45rem 1rem;
    background-color: #00a7b7;
    color: white !important;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    align-self: flex-end;
    margin-top: auto;
    box-sizing: border-box;
    border: 2px solid #00a7b7;
    text-transform: uppercase;
    border-radius: 7.2em;
}

.project-map-popup-cta:hover {
    background-color: white;
    color: #00a7b7 !important;
    text-decoration: none;
}

/* Variante compacte : même structure, plus petite (cards cumulées) */
.project-map-popup-content--compact .project-map-popup-main {
    height: 148px;
}

.project-map-popup-content--compact .project-map-popup-image {
    width: 32%;
}

.project-map-popup-content--compact .project-map-popup-body {
    padding: 0.65rem 0.85rem 0.65rem 0.75rem;
}

.project-map-popup-content--compact .project-map-popup-category {
    font-size: 0.5625rem;
    margin-bottom: 0.25rem;
}

.project-map-popup-content--compact .project-map-popup-title {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    -webkit-line-clamp: 2;
}

.project-map-popup-content--compact .project-map-popup-location {
    font-size: 0.6875rem;
    margin-bottom: 0.25rem;
}

.project-map-popup-content--compact .project-map-popup-excerpt {
    font-size: 0.6875rem;
    margin-bottom: 0.35rem;
    -webkit-line-clamp: 2;
}

.project-map-popup-content--compact .project-map-popup-cta {
    padding: 0.3rem 0.75rem;
    font-size: 0.625rem;
    border-width: 1.5px;
}
