@charset "utf-8";

/* ===============================
 *  LISTING VILLES — Badges
 * =============================== */
.ville-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: auto;
}

.ville-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: var(--fw-bold);
    padding: .2rem .6rem;
    border-radius: var(--radius-lg);
    line-height: 1.4;
}

.ville-badge--vente {
    background: var(--primary-x-light);
    color: var(--primary-x-dark);
}

.ville-badge--location {
    background: var(--focus-x-light);
    color: var(--focus-2x-dark);
}

/* ===============================
 *  PAGE VILLE — ROW 1 — Hero (Image + Carte)
 * =============================== */
.ville-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.ville-hero-photo {
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 220px;
}

.ville-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ville-hero-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 220px;
}

.ville-map-iframe {
    border: 0;
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: block;
}

/* ===============================
 *  PAGE VILLE — ROW 3 — Description
 * =============================== */
.ville-description {
    margin-bottom: 0;
}

/* Troncature mobile */
@media screen and (max-width: 991.98px) {
    .ville-description--collapsed {
        position: relative;
        max-height: 120dvh;
        overflow: hidden;
    }

    .ville-description--collapsed::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: linear-gradient(to top, var(--bg-body) 10%, transparent);
        pointer-events: none;
    }
}

.ville-description-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .813rem;
    font-weight: var(--fw-bold);
    color: var(--primary-dark);
    background: none;
    border: 0;
    padding: .25rem 0;
    margin-top: -2.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: color .2s ease;
}

.ville-description-toggle:hover {
    color: var(--primary-x-dark);
}

/* ===============================
 *  PAGE VILLE — ROW 3 — Sidebar
 * =============================== */
.ville-sidebar {
    background: var(--primary-x-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.ville-sidebar-title {
    margin-bottom: 1.25rem;
}

.ville-sidebar-stats {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.ville-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem .75rem;
    background: #FFF;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease;
}

.ville-stat:hover {
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
    color: inherit;
}

.ville-stat-count {
    font-size: 1.75rem;
    font-weight: var(--fw-bold);
    color: var(--primary-dark);
    line-height: 1;
}

.ville-stat-label {
    font-size: .75rem;
    color: var(--neutral-dark);
    margin-top: .35rem;
    text-align: center;
}

.ville-sidebar-links {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}


/* ===============================
 *  PAGE VILLE — Contenu SEO
 * =============================== */
.ville-seo {
    background: var(--neutral-x-light);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    border: 1px solid var(--neutral-light);
}

.ville-seo h2 {
    font-size: clamp(16px, 1.4vw, 20px);
    text-transform: none;
    color: var(--primary-dark);
    margin-bottom: .5rem;
    margin-top: 1.5rem;
    display: block;
    width: auto;
}

.ville-seo h2:first-child {
    margin-top: 0;
}

.ville-seo p {
    font-size: .875rem;
    line-height: 1.75;
    color: var(--neutral-dark);
    margin-bottom: .75rem;
}

.ville-seo strong {
    color: var(--neutral-black);
}

/* ===============================
 *  RESPONSIVE — Tablette (768px)
 * =============================== */
@media screen and (min-width: 768px) {

    .ville-sidebar-stats {
        gap: 1rem;
    }

}

/* ===============================
 *  RESPONSIVE — Desktop (992px)
 * =============================== */
@media screen and (min-width: 992px) {

    .ville-hero {
        grid-template-columns: 55fr 45fr;
    }

    .ville-hero-photo,
    .ville-hero-map {
        min-height: 380px;
    }

    .ville-hero--photo-only,
    .ville-hero--map-only {
        grid-template-columns: 1fr;
    }

    .ville-hero--photo-only .ville-hero-photo,
    .ville-hero--map-only .ville-hero-map {
        max-height: 420px;
    }

    .ville-map-iframe {
        min-height: 380px;
    }

    .ville-sidebar {
        position: sticky;
        top: 140px;
    }

    .ville-seo {
        padding: 2.5rem 2rem;
        columns: 2;
        column-gap: 2.5rem;
    }

    .ville-seo h2 {
        column-span: all;
    }

    .ville-seo p {
        break-inside: avoid;
    }

}
