@font-face {
    font-family: "Space Grotesk";
    src: url("fonts/SpaceGrotesk-VariableFont_wght.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

.cfi-wrapper,
.cfi-wrapper * {
    box-sizing: border-box;
}

.cfi-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    width: 100%;
    max-width: 1500px;
    height: 900px;
    margin: 0 auto;
    padding: 0;
    font-family: "Space Grotesk", system-ui, sans-serif;
    color: #fff;
}

.cfi-sidebar {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 22px;
    padding: 28px 26px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-shadow: none;
    z-index: 10;
}

.cfi-sidebar h3 {
    margin: 0 0 36px;
    color: #fff;
    font-size: 36px;
    line-height: 1.15;
    font-weight: 400;
}

.cfi-sidebar input[type="text"],
.cfi-sidebar textarea,
.cfi-sidebar select {
    width: 100%;
    margin-bottom: 24px;
    padding: 15px 16px;
    border: 1px solid #fff;
    border-radius: 15px;
    background: #000;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.cfi-sidebar input::placeholder,
#cfi-form input::placeholder,
#cfi-form textarea::placeholder {
    color: #d0d0d0;
}

.cfi-filters {
    margin: 22px 0 28px;
}

.cfi-sidebar label {
    display: block;
    margin: 14px 0;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
}

.cfi-sidebar input[type="checkbox"] {
    transform: scale(1.15);
    margin-right: 9px;
    accent-color: #fff;
}

#cfi-map {
    width: 100%;
    height: 100%;
    min-height: 900px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #fff;
    background: #000;
    box-shadow: none;
}

#cfi-open-form,
#cfi-form button {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #fff;
    border-radius: 16px;
    background: #000;
    color: #fff;
    cursor: pointer;
    margin-top: 12px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    font-family: "Space Grotesk", system-ui, sans-serif;
}

#cfi-open-form:hover,
#cfi-form button:hover,
#cfi-geocode-button:hover {
    background: #fff;
    color: #000;
}

.cfi-help {
    margin-top: 22px;
    color: #d6d6d6;
    font-size: 14px;
    line-height: 1.4;
}

.cfi-marker div {
    width: 38px;
    height: 38px;
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.cfi-marker div:hover {
    transform: scale(1.15);
}

.cfi-temp-marker div {
    width: 42px;
    height: 42px;
    font-size: 26px;
    font-weight: 700;
}

.cfi-popup {
    min-width: 210px;
    color: #000;
    font-family: "Space Grotesk", system-ui, sans-serif;
}

.cfi-popup h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.cfi-popup p {
    margin: 0 0 10px;
}

.cfi-popup-address {
    font-size: 13px;
    opacity: 0.75;
}

.cfi-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 12px;
}

#cfi-form-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#cfi-form {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    padding: 28px;
    border-radius: 22px;
    width: 520px;
    max-width: calc(100% - 30px);
    font-family: "Space Grotesk", system-ui, sans-serif;
}

#cfi-form h3 {
    margin-top: 0;
    color: #fff;
    font-size: 28px;
    font-weight: 400;
}

#cfi-form input,
#cfi-form textarea,
#cfi-form select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 14px;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid #fff;
    background: #000;
    color: #fff;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    font-family: "Space Grotesk", system-ui, sans-serif;
}

#cfi-form textarea {
    display: block;
    min-height: 110px;
    resize: vertical;
}

.cfi-address-row {
    width: 100%;
    display: block;
    margin-bottom: 14px;
}

.cfi-address-row input {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 14px !important;
}

#cfi-geocode-button {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    padding: 15px 18px;
    border: 1px solid #fff;
    border-radius: 16px;
    background: #000;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
}

#cfi-selected-location {
    margin: 4px 0 14px;
    color: #d6d6d6;
    font-size: 14px;
}

.cfi-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

.leaflet-control-zoom {
    border: 1px solid #fff !important;
}

.leaflet-control-zoom a {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(255,255,255,0.25);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
}

@media (max-width: 1100px) {
    .cfi-wrapper {
        grid-template-columns: 260px 1fr;
        max-width: calc(100% - 30px);
        height: 760px;
    }

    #cfi-map {
        min-height: 760px;
    }
}

@media (max-width: 800px) {
    .cfi-wrapper {
        grid-template-columns: 1fr;
        max-width: calc(100% - 24px);
        height: auto;
        gap: 20px;
    }

    .cfi-sidebar {
        height: auto;
    }

    #cfi-map {
        height: 620px;
        min-height: 620px;
    }
}

@media (max-width: 600px) {
    .cfi-sidebar {
        padding: 24px 20px;
    }

    .cfi-sidebar h3 {
        font-size: 30px;
    }

    .cfi-sidebar label {
        font-size: 19px;
    }
}

/* Empêche la carte Leaflet de passer devant l’en-tête Blocksy */
.cfi-wrapper {
    position: relative;
    z-index: 1;
}

#cfi-map {
    position: relative;
    z-index: 1;
}

/* Les couches Leaflet restent à l’intérieur de la carte */
#cfi-map .leaflet-pane {
    z-index: 1;
}

#cfi-map .leaflet-top,
#cfi-map .leaflet-bottom {
    z-index: 2;
}

/* Le formulaire reste au-dessus de la carte et de l’en-tête */
#cfi-form-modal {
    z-index: 100000;
}

/* En-tête Blocksy au-dessus du plugin de carte */
header[data-id="type-1"],
[data-header*="sticky"] header {
    z-index: 9999;
}