/* ========================================================
   Kimmo — Extensions v0.3 :
   filtres, pagination, carte biens vendus, équipe,
   save-search, modal visite, PEB badge, prix sur demande
   ======================================================== */

/* ========== PRIX SUR DEMANDE & ADRESSE MASQUÉE ========== */

.kp-bien__price-onreq,
.kp-fiche__price-onreq {
    color: var(--kp-muted);
    font-weight: 500;
    font-size: 0.85em;
    font-style: italic;
}

.kp-fiche__address-mask {
    color: var(--kp-muted);
    font-style: italic;
    font-size: 0.85em;
    margin-left: 0.4rem;
}

/* ========== PRICE DROP + CHIPS ========== */

.kp-fiche__price-drop {
    display: inline-block;
    margin-left: 0.5rem;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.55rem;
    border-radius: var(--kp-radius-sm);
    vertical-align: middle;
}

.kp-fiche__chips {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.kp-fiche__chips li {
    background: var(--kp-bg-soft);
    padding: 0.4rem 0.75rem;
    border-radius: var(--kp-radius-sm);
    font-size: 0.85rem;
    color: var(--kp-text);
}
.kp-fiche__chips strong { color: var(--kp-muted); font-weight: 500; }

/* ========== VIDEO EMBED ========== */

.kp-fiche__video {
    position: relative;
    padding-bottom: 56.25%; /* 16/9 */
    height: 0;
    background: var(--kp-bg-soft);
    border-radius: var(--kp-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}
.kp-fiche__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.kp-fiche__video > a {
    display: block;
    padding: 1rem;
    text-align: center;
    color: var(--kp-primary);
    font-weight: 600;
}

/* ========== BANDEAU PROJET (parentId) ========== */

.kp-fiche__projectbar {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 0.85rem 1.25rem;
    max-width: 1200px;
    margin: 1rem auto;
    border-radius: var(--kp-radius-sm);
    font-size: 0.95rem;
}
.kp-fiche__projectbar a {
    color: #2563eb;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* ========== BADGE PEB (image officielle) ========== */

.kp-bien__photo > img.kp-bien__peb,
img.kp-bien__peb {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    bottom: auto;
    left: auto;
    height: 30px;
    width: auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
    object-fit: contain;
    transform: none;
    transition: none;
}

.kp-fiche__pebbadge {
    display: inline-block;
    height: 30px;
    width: auto;
    vertical-align: middle;
}

.kp-fiche__facts-peb { gap: 0.4rem; }

/* ========== CTAs AGENT (2 boutons empilés) ========== */

.kp-fiche__agent-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
    align-self: center;
}
.kp-fiche__agent-ctas .kp-fiche__cta {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    white-space: nowrap;
}

/* ========================================================
   ARCHIVE BIENS — barre filtres sticky style Immoweb (DA Kimmo)
   ======================================================== */

.kp-archive { display: block; }

/* Mode "archive complète" (/a-vendre/, /a-louer/, /pepites/) :
   espace de respiration géré par le composant lui-même. */
.kp-archive--filtered {
    padding-bottom: 5rem;
}
@media (max-width: 768px) {
    .kp-archive--filtered {
        padding-bottom: 3rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Mode "embed" (homepage, fiches biens) : pas de padding, le parent gère. */
.kp-archive--bare { padding: 0; }

/* ===== Barre filtres ===== */
.kp-fbar {
    position: relative;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--kp-border);
    margin: 0 0 1.5rem;
    /* déborde du wrapper page pour aller bord à bord */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0.85rem 1.25rem;
}
.kp-fbar__hidden-submit {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.kp-fbar__shell {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ===== Champ recherche ville ===== */
.kp-fbar__search {
    position: relative;
    flex: 1 1 280px;
    min-width: 220px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: 999px;
    padding: 0 0.85rem 0 2.25rem;
    height: 44px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.kp-fbar__search:focus-within {
    border-color: var(--kp-primary);
    box-shadow: 0 0 0 3px rgba(104, 190, 197, 0.18);
}
.kp-fbar__search-ico {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--kp-muted);
}
.kp-fbar__search-input {
    flex: 1;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.95rem;
    color: var(--kp-secondary);
    padding: 0;
    outline: none;
    min-width: 0;
}
.kp-fbar__search-input::placeholder { color: var(--kp-muted); }
.kp-fbar__search-clear {
    color: var(--kp-muted);
    text-decoration: none;
    padding: 0 0.4rem;
    line-height: 1;
    font-size: 1.2rem;
}
.kp-fbar__search-clear:hover { color: var(--kp-secondary); }

/* Dropdown custom de la recherche ville (remplace le <datalist>) */
.kp-fbar__search-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius);
    box-shadow: 0 12px 32px rgba(20, 24, 50, 0.12);
    padding: 0.4rem;
    margin: 0;
    list-style: none;
    z-index: 60;
    animation: kpFbarPop 0.14s ease-out;
}
.kp-fbar__search-list[hidden] { display: none; }
.kp-fbar__search-item {
    padding: 0.55rem 0.75rem;
    border-radius: var(--kp-radius-sm);
    cursor: pointer;
    color: var(--kp-secondary);
    font-size: 0.92rem;
    line-height: 1.3;
}
.kp-fbar__search-item:hover,
.kp-fbar__search-item.is-active {
    background: var(--kp-bg-soft);
}
.kp-fbar__search-empty {
    padding: 0.75rem;
    font-size: 0.88rem;
    color: var(--kp-muted);
    text-align: center;
}

/* ===== Dropdowns pills ===== */
.kp-fbar__drop {
    position: relative;
}
.kp-fbar__drop > summary {
    list-style: none;
    cursor: pointer;
}
.kp-fbar__drop > summary::-webkit-details-marker { display: none; }
.kp-fbar__drop > summary::marker { content: ""; }

.kp-fbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 44px;
    padding: 0 1rem;
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: 999px;
    color: var(--kp-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1;
    user-select: none;
    transition: background 0.12s, border-color 0.12s;
}
.kp-fbar__btn:hover {
    background: var(--kp-bg-soft);
    border-color: #d8dde6;
}
.kp-fbar__btn.is-active {
    border-color: var(--kp-primary);
    color: var(--kp-primary);
    background: rgba(104, 190, 197, 0.07);
}
.kp-fbar__drop[open] > .kp-fbar__btn {
    background: var(--kp-bg-soft);
    border-color: var(--kp-secondary);
}
.kp-fbar__btn-ico { width: 16px; height: 16px; }
.kp-fbar__caret {
    width: 14px; height: 14px;
    color: var(--kp-muted);
    transition: transform 0.18s;
}
.kp-fbar__drop[open] > .kp-fbar__btn .kp-fbar__caret { transform: rotate(180deg); }
.kp-fbar__badge {
    background: var(--kp-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    min-width: 22px;
    text-align: center;
    line-height: 1.2;
}

/* ===== Popovers (contenu dropdown) ===== */
.kp-fbar__pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius);
    box-shadow: 0 12px 32px rgba(20, 24, 50, 0.12);
    padding: 0.65rem;
    z-index: 50;
    animation: kpFbarPop 0.14s ease-out;
}
@keyframes kpFbarPop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.kp-fbar__pop--panel { min-width: 340px; padding: 1rem; }
.kp-fbar__pop--range { min-width: 320px; padding: 0.85rem; }
.kp-fbar__pop--chambres { min-width: 280px; padding: 0.65rem; }

/* Popover de droite (Plus de filtres) : aligne à droite */
.kp-fbar__drop--more .kp-fbar__pop { left: auto; right: 0; }

/* Options radio (Type) */
.kp-fbar__opt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--kp-radius-sm);
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--kp-secondary);
}
.kp-fbar__opt:hover { background: var(--kp-bg-soft); }
.kp-fbar__opt input[type="radio"] {
    appearance: none;
    width: 18px; height: 18px;
    border: 2px solid var(--kp-border);
    border-radius: 50%;
    margin: 0;
    flex-shrink: 0;
    transition: border-color 0.12s;
}
.kp-fbar__opt input[type="radio"]:checked {
    border-color: var(--kp-primary);
    background: radial-gradient(circle, var(--kp-primary) 45%, transparent 50%);
}

/* Pills chambres (1+, 2+, 3+, …) */
.kp-fbar__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.kp-fbar__pill {
    cursor: pointer;
    user-select: none;
}
.kp-fbar__pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.kp-fbar__pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--kp-border);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--kp-secondary);
    background: #fff;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.kp-fbar__pill:hover span { background: var(--kp-bg-soft); }
.kp-fbar__pill input:checked + span {
    background: var(--kp-secondary);
    border-color: var(--kp-secondary);
    color: #fff;
}

/* Range prix */
.kp-fbar__range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kp-fbar__range-lbl {
    flex: 1 1 0;
    min-width: 0; /* indispensable pour qu'un input dans un flex puisse rétrécir */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.kp-fbar__range-lbl > span {
    font-size: 0.75rem;
    color: var(--kp-muted);
    font-weight: 500;
}
.kp-fbar__range-lbl input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    padding: 0.55rem 0.7rem;
    font: inherit;
    font-size: 0.92rem;
    background: #fff;
    color: var(--kp-secondary);
}
.kp-fbar__range-lbl input:focus {
    outline: none;
    border-color: var(--kp-primary);
    box-shadow: 0 0 0 3px rgba(104, 190, 197, 0.18);
}
.kp-fbar__range-sep {
    color: var(--kp-muted);
    padding-top: 1.1rem;
}

/* Panel Plus de filtres */
.kp-fbar__panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.85rem;
}
.kp-fbar__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.kp-fbar__field > span {
    font-size: 0.78rem;
    color: var(--kp-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.kp-fbar__field input[type="number"] {
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    padding: 0.6rem 0.7rem;
    font: inherit;
    font-size: 0.92rem;
    background: #fff;
    color: var(--kp-secondary);
}
.kp-fbar__field input[type="number"]:focus {
    outline: none;
    border-color: var(--kp-primary);
    box-shadow: 0 0 0 3px rgba(104, 190, 197, 0.18);
}

/* Liste de radios stylée façon Kimmo (utilisée pour Région, Tri) */
.kp-fbar__radiolist {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    padding: 0.3rem;
    background: #fff;
}

/* Actions de popover (Effacer / Appliquer) */
.kp-fbar__pop-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--kp-border);
}
.kp-fbar__pop-clear {
    color: var(--kp-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}
.kp-fbar__pop-clear:hover { color: var(--kp-secondary); text-decoration: underline; }
.kp-fbar__pop-apply {
    background: var(--kp-secondary);
    color: #fff;
    border: 0;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.88rem;
}
.kp-fbar__pop-apply:hover { background: #353c56; }

/* CTA Activer l'alerte */
.kp-fbar__alert {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 44px;
    padding: 0 1.1rem;
    margin-left: auto;
    background: var(--kp-primary);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.12s;
}
.kp-fbar__alert:hover { background: var(--kp-primary-dark); }
.kp-fbar__alert svg { width: 17px; height: 17px; }

/* ========================================================
   ARCHIVE HEAD : toggle Liste/Carte + titre + chips rapides
   ======================================================== */

.kp-archive__head {
    margin: 0 0 1.25rem;
}
.kp-archive__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.kp-toggle {
    display: inline-flex;
    background: var(--kp-bg-soft);
    border: 1px solid var(--kp-border);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
}
.kp-toggle__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    color: var(--kp-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.12s, color 0.12s;
}
.kp-toggle__btn:hover { background: rgba(255,255,255,0.6); }
.kp-toggle__btn svg { width: 16px; height: 16px; }
.kp-toggle__btn.is-current {
    background: var(--kp-secondary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(20, 24, 50, 0.12);
}

.kp-archive__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--kp-secondary);
    line-height: 1.15;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.7rem;
}
.kp-archive__count {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--kp-muted);
}

.kp-quickchips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* La barre déborde un peu vers la droite pour signaler le scroll */
}
.kp-quickchips::-webkit-scrollbar { display: none; }
.kp-quickchip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--kp-border);
    border-radius: 999px;
    color: var(--kp-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    background: #fff;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}
.kp-quickchip:hover { background: var(--kp-bg-soft); border-color: #d8dde6; }
.kp-quickchip.is-active {
    background: var(--kp-secondary);
    border-color: var(--kp-secondary);
    color: #fff;
}

/* ========================================================
   ACTIVE FILTERS CHIPS
   ======================================================== */

.kp-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding: 0.65rem 0.85rem;
    background: var(--kp-bg-soft);
    border-radius: var(--kp-radius-sm);
}
.kp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.4rem 0.35rem 0.75rem;
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: 999px;
    color: var(--kp-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: border-color 0.12s, color 0.12s;
}
.kp-chip:hover { border-color: var(--kp-primary); color: var(--kp-primary); }
.kp-chip__x {
    width: 14px; height: 14px;
    background: var(--kp-bg-soft);
    border-radius: 50%;
    padding: 2px;
}
.kp-chip:hover .kp-chip__x { background: rgba(104, 190, 197, 0.15); }
.kp-chip--reset {
    background: transparent;
    border-color: transparent;
    color: var(--kp-muted);
    padding: 0.35rem 0.75rem;
    text-decoration: underline;
}
.kp-chip--reset:hover { color: var(--kp-secondary); border-color: transparent; }

/* ========================================================
   VUE CARTE ARCHIVE
   ======================================================== */

.kp-archive__mapwrap {
    margin: 0 0 2rem;
    /* Stacking context isolé : empêche Leaflet (panes jusqu'à z-index 800)
       de passer au-dessus du header sticky et de la barre filtres. */
    position: relative;
    z-index: 0;
    isolation: isolate;
}
.kp-archive__map {
    height: 600px;
    border-radius: var(--kp-radius);
    overflow: hidden;
    border: 1px solid var(--kp-border);
}

/* ========================================================
   DIALOG "ACTIVER L'ALERTE"
   ======================================================== */

.kp-alert-dialog {
    border: 0;
    border-radius: var(--kp-radius);
    padding: 0;
    width: min(520px, 92vw);
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(20, 24, 50, 0.25);
    background: #fff;
    color: var(--kp-text);
}
.kp-alert-dialog::backdrop {
    background: rgba(20, 24, 50, 0.45);
    backdrop-filter: blur(2px);
}
.kp-alert-dialog__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 32px; height: 32px;
    border: 0;
    background: var(--kp-bg-soft);
    color: var(--kp-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.kp-alert-dialog__close:hover { background: var(--kp-border); }
.kp-alert-dialog__close svg { width: 14px; height: 14px; }

.kp-alert-dialog__head {
    padding: 1.5rem 1.5rem 0.5rem;
}
.kp-alert-dialog__head h3 {
    margin: 0 0 0.4rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--kp-secondary);
    padding-right: 2rem;
}
.kp-alert-dialog__head p {
    margin: 0;
    color: var(--kp-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.kp-alert-dialog .kp-savesearch {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    /* Reset des styles de base .kp-savesearch (carte autonome) qui fuitaient dans la modale */
    margin: 0;
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.kp-alert-dialog__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}
.kp-alert-dialog__row label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.kp-alert-dialog__row label span {
    font-size: 0.8rem;
    color: var(--kp-muted);
    font-weight: 500;
}
.kp-alert-dialog__row input {
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    padding: 0.6rem 0.7rem;
    font: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--kp-secondary);
}
.kp-alert-dialog__row input:focus {
    outline: none;
    border-color: var(--kp-primary);
    box-shadow: 0 0 0 3px rgba(104, 190, 197, 0.18);
}
.kp-alert-dialog .kp-savesearch__consent {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--kp-text);
    line-height: 1.4;
}
.kp-alert-dialog .kp-savesearch__consent input { margin-top: 0.15rem; flex-shrink: 0; }
.kp-alert-dialog .kp-savesearch__status {
    font-size: 0.88rem;
    min-height: 1.2em;
}
.kp-alert-dialog .kp-savesearch__status.is-success { color: #16a34a; }
.kp-alert-dialog .kp-savesearch__status.is-error   { color: #dc2626; }

.kp-alert-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.kp-alert-dialog__cancel {
    background: transparent;
    border: 1px solid var(--kp-border);
    color: var(--kp-secondary);
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}
.kp-alert-dialog__cancel:hover { background: var(--kp-bg-soft); }
.kp-alert-dialog__submit {
    background: var(--kp-primary);
    color: #fff;
    border: 0;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}
.kp-alert-dialog__submit:hover { background: var(--kp-primary-dark); }

/* ========== PAGINATION ========== */

.kp-pagination {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.kp-pagination__page {
    min-width: 38px;
    height: 38px;
    border-radius: var(--kp-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--kp-secondary);
    border: 1px solid var(--kp-border);
    font-weight: 600;
    padding: 0 0.6rem;
    transition: background 0.15s;
}
.kp-pagination__page:hover { background: var(--kp-bg-soft); }
.kp-pagination__page.is-current {
    background: var(--kp-primary);
    color: #fff;
    border-color: var(--kp-primary);
}

/* ========== CARTE BIENS VENDUS ========== */

.kp-biensmap {
    max-width: 1200px;
    margin: 0 auto;
}

.kp-biensmap__head {
    text-align: center;
    margin-bottom: 1.5rem;
}
.kp-biensmap__head h2 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    color: var(--kp-secondary);
}
.kp-biensmap__head p { color: var(--kp-muted); margin: 0; }

.kp-biensmap__container {
    width: 100%;
    height: 600px;
    background: var(--kp-bg-soft);
    border-radius: var(--kp-radius);
    overflow: hidden;
    position: relative;
    /* Isole le stacking context : sans ça, les panes Leaflet (z-index jusqu'à 800)
       passent au-dessus du header (z-index 100), du menu burger et de la barre filtres. */
    z-index: 0;
    isolation: isolate;
}
.kp-biensmap__placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--kp-muted);
}
.kp-biensmap__container .leaflet-container { height: 100%; width: 100%; }

.kp-biensmap__popup {
    text-align: center;
    min-width: 180px;
    display: block;
    color: inherit;
    text-decoration: none;
}
.kp-biensmap__popup.is-clickable {
    cursor: pointer;
    transition: opacity 0.15s;
}
.kp-biensmap__popup.is-clickable:hover { opacity: 0.85; }
.kp-biensmap__popup.is-clickable:hover .kp-biensmap__popup-title { color: var(--kp-primary); }
.kp-biensmap__popup img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--kp-radius-sm);
    margin-bottom: 0.4rem;
}
.kp-biensmap__popup-status {
    display: inline-block;
    background: var(--kp-status-sold);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}
.kp-biensmap__popup-title {
    font-weight: 700;
    color: var(--kp-secondary);
    font-size: 0.95rem;
    margin: 0.35rem 0 0;
    transition: color 0.15s;
}
.kp-biensmap__popup-sub {
    font-size: 0.8rem;
    color: var(--kp-muted);
    margin: 0.2rem 0 0;
}

@media (max-width: 768px) {
    .kp-biensmap__container { height: 450px; }
    .kp-biensmap__head h2 { font-size: 1.5rem; }
}

/* ========== ÉQUIPE (Notre agence / équipe) ========== */

.kp-team {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.kp-team h2 {
    font-size: 1.75rem;
    color: var(--kp-secondary);
    margin: 2.5rem 0 1.5rem;
}

.kp-team__offices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.kp-team__office {
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius);
    padding: 1.5rem;
    box-shadow: var(--kp-shadow);
}
.kp-team__office h3 {
    margin: 0 0 0.5rem;
    color: var(--kp-secondary);
    font-size: 1.15rem;
}
.kp-team__office p {
    margin: 0.3rem 0;
    color: var(--kp-text);
    font-size: 0.9rem;
}
.kp-team__office-addr { line-height: 1.5; }
.kp-team__office a {
    color: var(--kp-primary);
    text-decoration: none;
}
.kp-team__office a:hover { text-decoration: underline; }

.kp-team__people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.kp-team__person {
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--kp-shadow);
}
.kp-team__person img,
.kp-team__person-pic-empty {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    display: block;
}
.kp-team__person-pic-empty {
    background: var(--kp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}
.kp-team__person h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    color: var(--kp-secondary);
}
.kp-team__person p {
    margin: 0.2rem 0;
    font-size: 0.85rem;
}
.kp-team__person a {
    color: var(--kp-text);
    text-decoration: none;
}
.kp-team__person a:hover { color: var(--kp-primary); }

/* ========== SAVE SEARCH (page /ma-recherche/) ========== */

.kp-savesearch {
    max-width: 720px;
    margin: 2rem auto;
    background: #fff;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius);
    padding: 2rem;
    box-shadow: var(--kp-shadow);
}

.kp-savesearch h2 {
    margin: 0 0 0.5rem;
    color: var(--kp-secondary);
    font-size: 1.5rem;
}
.kp-savesearch > p {
    margin: 0 0 1.5rem;
    color: var(--kp-muted);
}
.kp-savesearch hr {
    border: 0;
    border-top: 1px solid var(--kp-border);
    margin: 1.5rem 0;
}

.kp-savesearch__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.kp-savesearch__row label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
}
.kp-savesearch__row label span {
    color: var(--kp-muted);
}
.kp-savesearch__row input,
.kp-savesearch__row select {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

.kp-savesearch__consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
    font-size: 0.85rem;
    color: var(--kp-muted);
    cursor: pointer;
}
.kp-savesearch__consent input { margin-top: 3px; }

.kp-savesearch__status {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    text-align: center;
}
.kp-savesearch__status.is-success { color: #16a34a; }
.kp-savesearch__status.is-error   { color: #dc2626; }

/* ========== MODAL RÉSERVATION VISITE ========== */

.kp-fiche__visit-modal {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 560px;
    width: calc(100% - 2rem);
    border-radius: var(--kp-radius);
    box-shadow: var(--kp-shadow-lg);
    margin: auto;
}
.kp-fiche__visit-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}
.kp-fiche__visit-modal[open] { display: block; }

.kp-fiche__visit-form {
    background: #fff;
    padding: 1.75rem;
    border-radius: var(--kp-radius);
    position: relative;
}
.kp-fiche__visit-form h3 {
    margin: 0 0 0.4rem;
    color: var(--kp-secondary);
    font-size: 1.25rem;
}
.kp-fiche__visit-form > p {
    margin: 0 0 1.25rem;
    color: var(--kp-muted);
    font-size: 0.9rem;
}
.kp-fiche__visit-form label {
    display: block;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
    color: var(--kp-muted);
}
.kp-fiche__visit-form label span {
    display: block;
    margin-bottom: 0.3rem;
}
.kp-fiche__visit-form input,
.kp-fiche__visit-form select,
.kp-fiche__visit-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--kp-text);
}

.kp-fiche__visit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.kp-fiche__visit-modal .kp-fiche__lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--kp-bg-soft);
    color: var(--kp-secondary);
}
.kp-fiche__visit-modal .kp-fiche__lightbox-close:hover {
    background: var(--kp-border);
}

.kp-fiche__visit-status {
    margin-top: 0.85rem;
    font-size: 0.9rem;
    text-align: center;
}
.kp-fiche__visit-status.is-success { color: #16a34a; }
.kp-fiche__visit-status.is-error   { color: #dc2626; }

@media (max-width: 600px) {
    .kp-fiche__visit-row { grid-template-columns: 1fr; }
    .kp-fiche__visit-form { padding: 1.25rem; }
}

/* ============================================================
   RESPONSIVE — filtres, carte biens vendus, équipe, prix drop, chips
   ============================================================ */

/* ===== Barre filtres archive : responsive ===== */
@media (max-width: 1024px) {
    .kp-fbar { padding: 0.75rem 1rem; }
    .kp-fbar__shell { gap: 0.5rem; }
    .kp-fbar__alert { margin-left: 0; }
    .kp-fbar__search { flex-basis: 100%; order: -1; }
}

@media (max-width: 768px) {
    .kp-fbar {
        /* Plus de full-bleed sur mobile : la barre vit dans le padding archive */
        margin-left: 0;
        margin-right: 0;
        padding: 0.85rem 0;
        background: transparent;
        border-bottom: 0;
    }
    .kp-fbar__shell { gap: 0.4rem; }
    .kp-fbar__btn {
        height: 42px;
        padding: 0 0.6rem;
        font-size: 0.86rem;
    }
    .kp-fbar__search { height: 42px; flex-basis: 100%; }
    /* Cloche compacte (icône seule) sur la MÊME ligne que les 3 filtres */
    .kp-fbar__alert {
        height: 42px;
        width: 42px;
        padding: 0;
        justify-content: center;
        margin-left: auto;
        flex-shrink: 0;
    }
    .kp-fbar__alert span { display: none; }

    /* Popover : dropdown pleine largeur ancré à la barre (reste dans l'écran, ne déborde plus) */
    .kp-fbar__drop { position: static; }
    .kp-fbar__pop {
        position: absolute;
        top: calc(100% + 6px);
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        min-width: 0;
        max-width: 100%;
        max-height: none;
        border-radius: var(--kp-radius);
        box-shadow: 0 12px 32px rgba(20, 24, 50, 0.16);
        animation: kpFbarPop 0.14s ease-out;
    }
    .kp-fbar__drop--more .kp-fbar__pop { left: 0; right: 0; }

    .kp-archive__title { font-size: 1.4rem; gap: 0.5rem; }
    .kp-archive__count { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    /* Label tronqué seulement pour Type / Prix / Chambres (pas Plus de filtres) */
    .kp-fbar__drop:not(.kp-fbar__drop--more) .kp-fbar__btn-lbl {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* L'alerte garde l'icône seule sur très petit écran */
    .kp-fbar__alert span { display: none; }
    .kp-fbar__alert { padding: 0; width: 42px; }
    .kp-alert-dialog__row { grid-template-columns: 1fr; }
}

/* ===== Pagination archives ===== */
@media (max-width: 600px) {
    .kp-pagination__page { min-width: 36px; height: 36px; font-size: 0.9rem; }
}

/* ===== Carte biens vendus ===== */
@media (max-width: 600px) {
    .kp-biensmap__container { height: 380px; border-radius: 10px; }
    .kp-biensmap__head h2 { font-size: 1.4rem; }
    .kp-biensmap__head p { font-size: 0.9rem; }
}

/* ===== Équipe (Notre agence) ===== */
@media (max-width: 768px) {
    .kp-team { padding: 0 1rem; }
    .kp-team h2 { font-size: 1.5rem; margin: 2rem 0 1.25rem; }
    .kp-team__offices-grid { grid-template-columns: 1fr; gap: 1rem; }
    .kp-team__office { padding: 1.25rem; }
    .kp-team__people-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .kp-team__person { padding: 1rem; }
    .kp-team__person img,
    .kp-team__person-pic-empty { width: 80px; height: 80px; }
}

@media (max-width: 480px) {
    .kp-team__people-grid { grid-template-columns: 1fr; }
}

/* ===== Save Search form ===== */
@media (max-width: 600px) {
    .kpg-savesearch,
    .kp-savesearch { padding: 1.5rem 1.25rem; margin: 1.5rem auto; }
    .kp-savesearch h2 { font-size: 1.3rem; }
    .kp-savesearch__row { grid-template-columns: 1fr; gap: 0.75rem; }
    .kp-savesearch__row input,
    .kp-savesearch__row select { font-size: 16px; min-height: 44px; }
}

/* ===== Chips + Price drop sur fiche bien ===== */
@media (max-width: 480px) {
    .kp-fiche__chips { gap: 0.4rem; margin-top: 0.65rem; }
    .kp-fiche__chips li { font-size: 0.78rem; padding: 0.3rem 0.6rem; }
    .kp-fiche__price-drop { font-size: 0.6em; padding: 0.15rem 0.45rem; }
}

/* ===== Bandeau projet ===== */
@media (max-width: 600px) {
    .kp-fiche__projectbar { padding: 0.7rem 1rem; font-size: 0.88rem; margin: 0.75rem 0.5rem; }
    .kp-fiche__projectbar a { display: block; margin: 0.3rem 0 0; }
}

/* ===== Vidéo embed dans la fiche ===== */
@media (max-width: 600px) {
    .kp-fiche__video { border-radius: 10px; }
}
