/* ============================================================
   Prix immobilier Valais — Hero & page styles
   ============================================================ */

/* ---- Hero ---- */

.prix-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.prix-hero__bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.prix-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.38) 0%,
        rgba(0, 0, 0, 0.52) 50%,
        rgba(0, 0, 0, 0.68) 100%
    );
}

.prix-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 24px;
    text-align: center;
}

/* Tagline */
.prix-hero__tagline {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 16px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Titre */
.prix-hero__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 56px;
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
    max-width: 600px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Sous-titre */
.prix-hero__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.88);
    max-width: 520px;
    margin-top: 16px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ---- Search bar ---- */

.prix-hero__search {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 32px auto 0;
}

.prix-hero__search-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 64px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 300ms, box-shadow 300ms;
}

.prix-hero__search-bar:focus-within {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.prix-hero__search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 3;
    transition: color 300ms;
}

.prix-hero__search-bar:focus-within .prix-hero__search-icon {
    color: rgba(255, 255, 255, 0.75);
}

.prix-hero__search-input {
    flex: 1;
    height: 100%;
    padding: 0 0 0 52px;
    border: none;
    border-radius: 16px;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.01em;
}

.prix-hero__search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.prix-hero__search-input:focus {
    outline: none;
}

.prix-hero__search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    margin-right: 8px;
    padding: 0 22px;
    background: rgba(255, 255, 255, 0.95);
    color: #1f1f1f;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 200ms, transform 150ms;
    flex-shrink: 0;
}

.prix-hero__search-btn:hover {
    background: #fff;
    transform: translateY(-1px);
}

.prix-hero__search-btn:active {
    transform: translateY(0);
}

.prix-hero__search-btn svg {
    transition: transform 200ms;
}

.prix-hero__search-btn:hover svg {
    transform: translateX(2px);
}

/* Dropdown */
.prix-hero__search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.08);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    padding: 6px;
}

/* ---- Search results (shared hero + CTA) ---- */

.prix-search-result {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 10px 12px;
    text-align: left;
    background: none;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background-color 100ms;
}

.prix-search-result:hover {
    background: #f5f3ef;
}

.prix-search-result__pin {
    flex-shrink: 0;
    color: #c8a26b;
    opacity: 0.7;
    margin-top: 1px;
}

.prix-search-result:hover .prix-search-result__pin {
    opacity: 1;
}

.prix-search-result__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prix-search-result__street {
    font-size: 14px;
    font-weight: 500;
    color: #1f1f1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.prix-search-result__city {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.prix-search-result__tag {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 4px 8px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.04);
    color: #bbb;
}

.prix-search-result__tag--vs {
    background: rgba(200, 162, 107, 0.12);
    color: #b5895a;
}

.prix-search-separator {
    height: 1px;
    background: #f0ece7;
    margin: 4px 12px;
}

.prix-search-result[data-type="commune"] .prix-search-result__street,
.prix-search-result[data-type="npa"] .prix-search-result__street {
    font-weight: 600;
}

.prix-search-empty {
    padding: 24px 16px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #999;
}

/* Hint under search bar */
.prix-search-hint {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin-top: 10px;
    letter-spacing: 0.01em;
}

/* ---- Carousel ---- */

.prix-hero__carousel {
    width: 100%;
    max-width: 800px;
    margin: 24px auto 0;
    overflow: hidden;
}

.prix-hero__carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 20px;
}

.prix-hero__carousel-track::-webkit-scrollbar {
    display: none;
}

.prix-hero__carousel-track img {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    scroll-snap-align: start;
    opacity: 0.92;
    transition: opacity 200ms, transform 200ms;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.prix-hero__carousel-track img:hover {
    opacity: 1;
    transform: scale(1.03);
}

/* ---- Badges ---- */

.prix-hero__badges {
    margin-top: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.prix-hero__badges-dot {
    margin: 0 8px;
}

/* ---- Chevron scroll ---- */

.prix-hero__scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    animation: scrollBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    z-index: 2;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ---- 3 étapes ---- */

.prix-steps {
    background: #fff;
    padding: 64px 24px;
    border-bottom: 1px solid #eae7e2;
}

.prix-steps__grid {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
}

.prix-steps__item {
    padding: 0 40px;
    border-right: 1px solid #eae7e2;
}

.prix-steps__item:first-child {
    padding-left: 0;
}

.prix-steps__item:last-child {
    padding-right: 0;
    border-right: none;
}

.prix-steps__num {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    font-weight: 600;
    color: #c8a26b;
    line-height: 1;
    margin-bottom: 16px;
}

.prix-steps__title {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 8px;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.prix-steps__desc {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    color: #777;
    line-height: 1.55;
}

/* ---- Sections placeholder ---- */

.prix-section {
    min-height: 0;
}

/* ============================================================
   Section Trust / Crédibilité — 2×2 grid + SVG watermarks
   ============================================================ */

.prix-trust {
    padding: 80px 0 88px;
    background: #fff;
    border-top: 1px solid #eae7e2;
}

.prix-trust__wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.prix-trust__heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1.15;
    margin-bottom: 48px;
}

/* ---- 2×2 grid (desktop + mobile) ---- */

.prix-trust__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

/* Cross dividers via pseudo-elements */
.prix-trust__grid::before,
.prix-trust__grid::after {
    content: '';
    position: absolute;
    background: #eae7e2;
    z-index: 1;
    pointer-events: none;
}

/* Vertical */
.prix-trust__grid::before {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

/* Horizontal */
.prix-trust__grid::after {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
}

/* ---- Cell ---- */

.prix-trust__cell {
    position: relative;
    overflow: hidden;
    padding: 36px 40px;
}

/* Quadrant-aware padding */
.prix-trust__cell:nth-child(odd)  { padding-left: 0; }
.prix-trust__cell:nth-child(even) { padding-right: 0; }
.prix-trust__cell:nth-child(-n+2) { padding-top: 0; padding-bottom: 40px; }
.prix-trust__cell:nth-child(n+3)  { padding-bottom: 0; padding-top: 40px; }

/* ---- Logo watermark at cross intersection ---- */

.prix-trust__logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    object-fit: contain;
    opacity: 0.055;
    pointer-events: none;
    z-index: 2;
}

/* ---- Typography ---- */

.prix-trust__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1.2;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.prix-trust__desc {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    color: #888;
    line-height: 1.65;
    position: relative;
    z-index: 2;
}

/* ---- Mobile ---- */

@media (max-width: 767px) {
    .prix-trust {
        padding: 48px 0 56px;
    }

    .prix-trust__wrap {
        padding: 0 20px;
    }

    .prix-trust__heading {
        font-size: 26px;
        margin-bottom: 28px;
    }

    .prix-trust__cell {
        padding: 20px 18px;
    }

    .prix-trust__cell:nth-child(odd)  { padding-left: 0; padding-right: 18px; }
    .prix-trust__cell:nth-child(even) { padding-right: 0; padding-left: 18px; }
    .prix-trust__cell:nth-child(-n+2) { padding-top: 0; padding-bottom: 22px; }
    .prix-trust__cell:nth-child(n+3)  { padding-bottom: 0; padding-top: 22px; }

    .prix-trust__logo {
        width: 200px;
        height: 200px;
        opacity: 0.045;
    }

    .prix-trust__title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .prix-trust__desc {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* ============================================================
   CTA Final
   ============================================================ */

.prix-cta {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 96px 24px 140px;
    overflow: visible;
}

.prix-cta__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.prix-cta__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.prix-cta__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            165deg,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.55) 40%,
            rgba(0, 0, 0, 0.62) 100%
        );
}

.prix-cta__content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

/* ---- Typography ---- */

.prix-cta__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 40px;
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.prix-cta__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 14px;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ---- Search bar (mirrors hero) ---- */

.prix-cta__search {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 32px auto 0;
}

.prix-cta__search-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 300ms, box-shadow 300ms;
}

.prix-cta__search-bar:focus-within {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.prix-cta__search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 3;
    transition: color 300ms;
}

.prix-cta__search-bar:focus-within .prix-cta__search-icon {
    color: rgba(255, 255, 255, 0.75);
}

.prix-cta__search-input {
    flex: 1;
    height: 100%;
    padding: 0 0 0 48px;
    border: none;
    border-radius: 14px;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #fff;
    letter-spacing: 0.01em;
}

.prix-cta__search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.prix-cta__search-input:focus {
    outline: none;
}

.prix-cta__search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    margin-right: 8px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #1f1f1f;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 200ms, transform 150ms;
    flex-shrink: 0;
}

.prix-cta__search-btn:hover {
    background: #fff;
    transform: translateY(-1px);
}

.prix-cta__search-btn:active {
    transform: translateY(0);
}

.prix-cta__search-btn svg {
    transition: transform 200ms;
}

.prix-cta__search-btn:hover svg {
    transform: translateX(2px);
}

/* ---- Dropdown ---- */

.prix-cta__search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.08);
    max-height: 360px;
    overflow-y: auto;
    z-index: 100;
    padding: 6px;
}

/* ---- Mobile ---- */

@media (max-width: 767px) {
    .prix-cta {
        padding: 56px 20px 120px;
    }

    .prix-cta__title {
        font-size: 30px;
    }

    .prix-cta__subtitle {
        font-size: 14px;
        margin-top: 10px;
    }

    .prix-cta__search {
        margin-top: 24px;
    }

    .prix-cta__search-bar {
        height: 54px;
        border-radius: 12px;
    }

    .prix-cta__search-input {
        font-size: 16px; /* prevent iOS zoom */
    }

    .prix-cta__search-btn {
        height: 40px;
        padding: 0 16px;
        font-size: 13px;
        border-radius: 8px;
    }

    .prix-cta__search-btn span {
        display: none;
    }
}

/* ============================================================
   FAQ — Accordéon
   ============================================================ */

.prix-faq {
    padding: 80px 0 96px;
    background: #faf9f7;
    border-top: 1px solid #eae7e2;
}

.prix-faq__wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.prix-faq__heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1.15;
    margin-bottom: 40px;
}

/* ---- List ---- */

.prix-faq__list {
    border-top: 1px solid #e8e4de;
}

/* ---- Item ---- */

.prix-faq__item {
    border-bottom: 1px solid #e8e4de;
}

/* ---- Question button ---- */

.prix-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 22px 0;
    border: none;
    background: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1f1f1f;
    text-align: left;
    cursor: pointer;
    line-height: 1.45;
    transition: color 150ms;
}

.prix-faq__question:hover {
    color: #c8a26b;
}

.prix-faq__question span {
    flex: 1;
}

/* ---- Chevron ---- */

.prix-faq__chevron {
    flex-shrink: 0;
    color: #bbb;
    transition: transform 250ms ease, color 150ms;
}

.prix-faq__item.is-open .prix-faq__chevron {
    transform: rotate(180deg);
    color: #c8a26b;
}

/* ---- Answer ---- */

.prix-faq__answer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 300ms ease, opacity 200ms ease;
}

.prix-faq__item.is-open .prix-faq__answer {
    max-height: 300px;
    opacity: 1;
}

.prix-faq__answer p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #888;
    line-height: 1.65;
    padding: 0 0 24px;
}

/* ---- Mobile ---- */

@media (max-width: 767px) {
    .prix-faq {
        padding: 48px 0 60px;
    }

    .prix-faq__wrap {
        padding: 0 20px;
    }

    .prix-faq__heading {
        font-size: 26px;
        margin-bottom: 28px;
    }

    .prix-faq__question {
        font-size: 15px;
        padding: 18px 0;
    }

    .prix-faq__answer p {
        font-size: 14px;
        padding-bottom: 18px;
    }
}

/* ============================================================
   Carte interactive — Section 3
   ============================================================ */

/* ---- Section wrapper ---- */

.prix-map-section {
    padding: 72px 0 0;
    background: #fff;
}

/* ---- Header: titre + filtre ---- */

.prix-map-header {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.prix-map-header__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1.2;
}

/* ---- Filter pills ---- */

.prix-map-filter {
    display: flex;
    gap: 0;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

.prix-map-filter__btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: background 200ms, color 200ms;
}

.prix-map-filter__btn:hover {
    color: #1f1f1f;
}

.prix-map-filter__btn--active {
    background: #1f1f1f;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ---- Map wrapper (full-width breakout) ---- */

.prix-map-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #f8f7f5;
}

/* ---- Layout: map + panel ---- */

.prix-map-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    height: 650px;
}

.prix-map-layout__map {
    position: relative;
    overflow: hidden;
}

.prix-map-container {
    width: 100%;
    height: 100%;
}

/* ---- Map loader ---- */

.prix-map-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f7f5;
    z-index: 5;
}

.prix-map-loader__spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #e0dcd6;
    border-top-color: #c8a26b;
    border-radius: 50%;
    animation: mapSpin 0.8s linear infinite;
}

@keyframes mapSpin {
    to { transform: rotate(360deg); }
}

/* ---- Search commune (desktop overlay) ---- */

.prix-map-search--desktop {
    position: absolute;
    top: 12px;
    left: 60px;
    z-index: 10;
    width: 300px;
}

.prix-map-search--mobile {
    display: none;
}

.prix-map-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    border: none;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #1f1f1f;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 16px;
}

.prix-map-search input::placeholder {
    color: #aaa;
}

.prix-map-search input:focus {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.prix-map-search__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    max-height: 260px;
    overflow-y: auto;
    z-index: 20;
    padding: 4px;
}

.prix-map-search__result {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #1f1f1f;
    cursor: pointer;
    text-align: left;
    transition: background 120ms;
}

.prix-map-search__result:hover {
    background: #f5f3f0;
}

/* Color dot — reflects price level */
.prix-map-search__result-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 0 3px rgba(0,0,0,0.06);
}

/* Name + district */
.prix-map-search__result-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.prix-map-search__result-name {
    font-weight: 600;
    font-size: 13px;
    color: #1f1f1f;
    line-height: 1.2;
}

.prix-map-search__result-district {
    font-size: 11px;
    color: #aaa;
    line-height: 1.3;
}

/* Price + trend — right side */
.prix-map-search__result-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.prix-map-search__result-price {
    font-size: 12px;
    font-weight: 600;
    color: #1f1f1f;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.prix-map-search__result-trend {
    font-size: 10px;
    font-weight: 600;
    color: #888;
}

.prix-map-search__result-trend.trend-up {
    color: #16a34a;
}

.prix-map-search__result-trend.trend-down {
    color: #dc2626;
}

.prix-map-search__empty {
    padding: 16px 12px;
    text-align: center;
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

/* ---- Fullscreen button ---- */

.prix-map-fs-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: #555;
    cursor: pointer;
    transition: color 200ms, box-shadow 200ms;
}

.prix-map-fs-btn:hover {
    color: #1f1f1f;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

/* ---- Legend ---- */

.prix-map-legend {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
}

.prix-map-legend-mobile {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.prix-map-legend__title {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 8px;
}

.prix-map-legend__bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right,
        #e0dcd6 0%,
        #ede9e3 12%,
        #ddd5c8 25%,
        #d4c4a8 37%,
        #c8a26b 50%,
        #b5895a 65%,
        #8b6914 82%,
        #6b4f10 100%
    );
}

.prix-map-legend__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    color: #aaa;
}

.prix-map-legend__station {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #888;
}

.prix-map-legend__station-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c8a26b;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #c8a26b;
}

/* ---- Side panel ---- */

.prix-map-layout__panel {
    background: #fff;
    border-left: 1px solid #f0f0f0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Empty state */
.prix-map-panel__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 24px;
}

.prix-map-panel__empty p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #aaa;
    text-align: center;
    line-height: 1.5;
}

/* Photo */
.prix-map-panel__photo {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.prix-map-panel__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prix-map-panel__photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 16px 12px;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.55) 100%);
}

.prix-map-panel__photo-name {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.prix-map-panel__photo-district {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

/* Panel body */
.prix-map-panel__body {
    padding: 20px 24px;
}

.prix-map-panel__name {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0;
}

.prix-map-panel__district {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.prix-map-panel__sep {
    height: 1px;
    background: #f0f0f0;
    margin: 16px 0;
}

.prix-map-panel__price-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 4px;
}

.prix-map-panel__price {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 12px;
}

/* Stats grid */
.prix-map-panel__stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prix-map-panel__stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prix-map-panel__stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #888;
}

.prix-map-panel__stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;
}

/* Trend colors */
.trend-up {
    color: #16a34a !important;
}

.trend-down {
    color: #dc2626 !important;
}

/* District comparison */
.prix-map-panel__compare,
.prix-map-panel__district-compare {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    line-height: 1.4;
}

/* CTA button */
.prix-map-panel__cta {
    margin-top: 4px;
}

.prix-map-panel__cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #1f1f1f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 200ms, transform 150ms;
}

.prix-map-panel__cta-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.prix-map-panel__cta-btn svg {
    transition: transform 200ms;
}

.prix-map-panel__cta-btn:hover svg {
    transform: translateX(3px);
}

/* ---- Station markers ---- */

.prix-map-marker {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 5;
}

.prix-map-marker__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c8a26b;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 200ms;
}

.prix-map-marker__label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #1f1f1f;
    text-shadow:
        -1px -1px 0 #fff, 1px -1px 0 #fff,
        -1px 1px 0 #fff, 1px 1px 0 #fff,
        0 0 6px rgba(255,255,255,0.9);
    white-space: nowrap;
    pointer-events: none;
}

.prix-map-marker--hover .prix-map-marker__dot {
    transform: scale(1.3);
}

/* ---- Mobile bottom card ---- */

.prix-map-mobile-card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 15;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    padding: 16px 20px 20px;
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
    display: none;
}

.prix-map-mobile-card.is-visible {
    transform: translateY(0);
}

.prix-map-mobile-card__close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
}

.prix-map-mobile-card__name {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0;
}

.prix-map-mobile-card__district {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.prix-map-mobile-card__prices {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.prix-map-mobile-card__prices > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prix-map-mobile-card__label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}

.prix-map-mobile-card__prices span:not(.prix-map-mobile-card__label) {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;
}

.prix-map-mobile-card__stats {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
}

/* ---- Popup (mobile) ---- */

.prix-popup {
    padding: 4px;
}

.prix-popup__name {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0 0 4px;
}

.prix-popup__price {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;
    margin: 0 0 4px;
}

.prix-popup__meta {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #888;
    margin: 0 0 6px;
}

.prix-popup__action a {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #c8a26b;
    text-decoration: none;
}

.prix-popup__action a:hover {
    color: #b5895a;
}

/* ---- Mobile detail section (below map) ---- */

.prix-map-detail {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px 32px;
    background: #fff;
}

.prix-map-detail__photo {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 16px;
}

.prix-map-detail__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prix-map-detail__body {
    padding: 0;
}

.prix-map-detail__body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0;
}

.prix-map-detail__body > p {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ---- Fullscreen ---- */

.prix-map--fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    width: 100vw !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff;
}

.prix-map--fullscreen .prix-map-layout {
    height: 100vh;
    height: 100dvh;
}

.prix-map-body-lock {
    overflow: hidden !important;
}

/* Mapbox controls override */
.prix-map-container .mapboxgl-ctrl-group {
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    border: none !important;
}

.prix-map-container .mapboxgl-ctrl-group button {
    width: 36px !important;
    height: 36px !important;
}

/* Cooperative gesture overlay */
.prix-map-container .mapboxgl-cooperative-gesture-screen {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
}

/* ---- Mobile ---- */

@media (max-width: 767px) {
    .prix-hero__tagline {
        font-size: 10px;
    }

    .prix-hero__title {
        font-size: 36px;
    }

    .prix-hero__subtitle {
        font-size: 15px;
    }

    .prix-hero__search-bar {
        height: 56px;
        border-radius: 14px;
    }

    .prix-hero__search-input {
        padding-left: 48px;
        font-size: 14px;
    }

    .prix-hero__search-btn {
        display: none;
    }

    .prix-hero__search-dropdown {
        border-radius: 12px;
    }

    .prix-hero__carousel-track img {
        width: 140px;
        height: 95px;
    }

    .prix-hero__carousel {
        max-width: 100%;
    }

    .prix-hero__scroll-hint {
        bottom: 24px;
    }

    /* Steps mobile */
    .prix-steps {
        padding: 36px 20px;
    }

    .prix-steps__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .prix-steps__item {
        display: grid;
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto auto;
        column-gap: 0;
        row-gap: 2px;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid #eae7e2;
        padding-bottom: 24px;
    }

    .prix-steps__item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .prix-steps__num {
        font-size: 30px;
        margin-bottom: 0;
        grid-row: 1 / 3;
        align-self: center;
    }

    .prix-steps__title {
        font-size: 14px;
        margin-bottom: 2px;
        align-self: end;
    }

    .prix-steps__desc {
        font-size: 13px;
        align-self: start;
    }

    /* ---- Map mobile ---- */

    .prix-map-section {
        padding: 48px 0 0;
    }

    .prix-map-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 20px 16px;
    }

    .prix-map-header__title {
        font-size: 24px;
    }

    /* Search above map on mobile */
    .prix-map-search--desktop {
        display: none;
    }

    .prix-map-search--mobile {
        display: block;
        position: relative;
        padding: 0 20px 12px;
        max-width: 960px;
        margin: 0 auto;
    }

    .prix-map-search--mobile input {
        width: 100%;
        height: 44px;
        padding: 0 12px 0 40px;
        border: 1px solid #e8e5e0;
        border-radius: 10px;
        background: #fff;
        box-shadow: none;
        font-size: 14px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 12px center;
        background-size: 16px;
    }

    .prix-map-search--mobile input:focus {
        border-color: #c8a26b;
        box-shadow: 0 0 0 2px rgba(200, 162, 107, 0.15);
    }

    /* Layout: single column on mobile */
    .prix-map-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .prix-map-layout__map {
        height: 55vh;
        min-height: 350px;
        max-height: 500px;
    }

    /* Hide desktop panel on mobile */
    .prix-map-layout__panel {
        display: none;
    }

    /* Show mobile bottom card */
    .prix-map-mobile-card {
        display: block;
    }

    /* Show mobile legend */
    .prix-map-legend-mobile {
        display: block;
    }

    /* Fullscreen mobile */
    .prix-map--fullscreen .prix-map-layout__map {
        height: 100vh;
        height: 100dvh;
        max-height: none;
    }

    .prix-map--fullscreen .prix-map-layout__panel {
        display: none;
    }

    /* Map detail section mobile */
    .prix-map-detail {
        padding: 24px 20px 32px;
    }
}

/* ============================================================
   Section 4 — Tableau prix par commune
   ============================================================ */

.prix-table-section {
    padding: 80px 0;
    background: #f8f7f5;
}

.prix-table-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Header ---- */

.prix-table-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
}

.prix-table-header__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1.2;
}

.prix-table-header__count {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #888;
    flex-shrink: 0;
}

/* ---- Controls ---- */

.prix-table-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.prix-table-search {
    position: relative;
    width: 280px;
}

.prix-table-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.prix-table-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1f1f1f;
    outline: none;
    transition: border-color 200ms;
}

.prix-table-search input::placeholder {
    color: #aaa;
}

.prix-table-search input:focus {
    border-color: #c8a26b;
}

/* Native select — mobile only */
.prix-table-select {
    width: 200px;
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px; /* prevent iOS zoom */
    color: #1f1f1f;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 200ms;
}

.prix-table-select:focus {
    border-color: #c8a26b;
}

/* Hide native select on desktop, show custom dropdown */
@media (min-width: 768px) {
    .prix-table-select--mobile {
        display: none;
    }
}

/* Hide custom dropdown on mobile, show native select */
.prix-table-dropdown {
    display: none;
}

@media (min-width: 768px) {
    .prix-table-dropdown {
        display: block;
        position: relative;
    }
}

/* ---- Custom dropdown trigger ---- */

.prix-table-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 200px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #1f1f1f;
    cursor: pointer;
    transition: border-color 200ms, box-shadow 200ms;
    white-space: nowrap;
    text-align: left;
}

.prix-table-dropdown__trigger:hover {
    border-color: #d0cdc8;
}

.prix-table-dropdown__trigger.is-open {
    border-color: #c8a26b;
    box-shadow: 0 0 0 3px rgba(200, 162, 107, 0.1);
}

.prix-table-dropdown__trigger svg {
    flex-shrink: 0;
    color: #999;
    transition: transform 200ms;
}

.prix-table-dropdown__trigger.is-open svg {
    transform: rotate(180deg);
}

/* ---- Custom dropdown panel ---- */

.prix-table-dropdown__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 240px;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #eae7e2;
    border-radius: 10px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.10),
        0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 6px;
    z-index: 50;
}

.prix-table-dropdown__panel::-webkit-scrollbar {
    width: 4px;
}

.prix-table-dropdown__panel::-webkit-scrollbar-track {
    background: transparent;
}

.prix-table-dropdown__panel::-webkit-scrollbar-thumb {
    background: #ddd5c8;
    border-radius: 2px;
}

/* ---- Dropdown items ---- */

.prix-table-dropdown__item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #1f1f1f;
    cursor: pointer;
    text-align: left;
    transition: background 100ms;
}

.prix-table-dropdown__item:hover {
    background: #f5f3f0;
}

.prix-table-dropdown__item--active {
    background: #faf8f5;
    color: #c8a26b;
    font-weight: 600;
}

.prix-table-dropdown__item--active:hover {
    background: #f5f1eb;
}

/* ---- Table container ---- */

.prix-table-container {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eae7e2;
    overflow: hidden;
}

/* Desktop: scroll interne quand expanded */
@media (min-width: 768px) {
    .prix-table-container.is-expanded {
        max-height: 600px;
        overflow-y: auto;
    }

    .prix-table-container.is-expanded::-webkit-scrollbar {
        width: 5px;
    }

    .prix-table-container.is-expanded::-webkit-scrollbar-track {
        background: transparent;
    }

    .prix-table-container.is-expanded::-webkit-scrollbar-thumb {
        background: #ddd5c8;
        border-radius: 3px;
    }

    .prix-table-container.is-expanded::-webkit-scrollbar-thumb:hover {
        background: #c8a26b;
    }
}

/* ---- Mobile fullscreen overlay ---- */

.prix-table-fullscreen {
    display: none;
}

.prix-table-fullscreen.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #fff;
}

.prix-table-fullscreen__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eae7e2;
    background: #fff;
    flex-shrink: 0;
}

.prix-table-fullscreen__title {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
}

.prix-table-fullscreen__count {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
    margin-left: 8px;
    font-weight: 400;
}

.prix-table-fullscreen__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f3f0;
    border-radius: 50%;
    color: #1f1f1f;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 150ms;
}

.prix-table-fullscreen__close:hover {
    background: #eae7e2;
}

/* Search inside fullscreen */
.prix-table-fullscreen__search {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.prix-table-fullscreen__search-input {
    flex: 1;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1f1f1f;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 16px;
}

.prix-table-fullscreen__search-input::placeholder {
    color: #aaa;
}

.prix-table-fullscreen__search-input:focus {
    border-color: #c8a26b;
}

.prix-table-fullscreen__search-select {
    width: 140px;
    height: 40px;
    padding: 0 28px 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #1f1f1f;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    flex-shrink: 0;
}

.prix-table-fullscreen__search-select:focus {
    border-color: #c8a26b;
}

/* Scrollable body */
.prix-table-fullscreen__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.prix-table-fullscreen__body table {
    width: 100%;
    border-collapse: collapse;
}

.prix-table-fullscreen__body thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.prix-table-fullscreen__body th {
    padding: 10px 12px;
    background: #fafafa;
    border-bottom: 1px solid #eae7e2;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    text-align: left;
    white-space: nowrap;
}

.prix-table-fullscreen__body th:last-child {
    text-align: right;
}

.prix-table-fullscreen__body td {
    padding: 13px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #1f1f1f;
}

.prix-table-fullscreen__body .fs-commune {
    font-weight: 600;
}

.prix-table-fullscreen__body .fs-district {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
}

.prix-table-fullscreen__body .fs-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.prix-table-fullscreen__body .fs-trend {
    text-align: right;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

/* Empty inside fullscreen */
.prix-table-fullscreen__empty {
    padding: 48px 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #aaa;
    font-style: italic;
}

/* Fullscreen body lock */
.prix-table-body-lock {
    overflow: hidden !important;
}

/* ---- Table ---- */

.prix-table {
    width: 100%;
    border-collapse: collapse;
}

.prix-table__th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 16px;
    background: #fafafa;
    border-bottom: 1px solid #eae7e2;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 150ms;
}

.prix-table__th:hover {
    color: #1f1f1f;
}

.prix-table__th--price,
.prix-table__th--trend {
    text-align: right;
}

/* Sort icon */
.prix-table__sort-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 150ms;
    vertical-align: middle;
}

.prix-table__th--active .prix-table__sort-icon {
    opacity: 1;
}

.prix-table__th--active {
    color: #1f1f1f;
}

/* ---- Table rows ---- */

.prix-table__row {
    cursor: pointer;
    transition: background-color 100ms;
}

.prix-table__row:hover {
    background: #fafafa;
}

.prix-table__row td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1f1f1f;
    white-space: nowrap;
}

.prix-table__row:last-child td {
    border-bottom: none;
}

.prix-table__td-commune {
    font-weight: 600;
}

.prix-table__td-district {
    color: #888;
    font-size: 13px;
}

.prix-table__td-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.prix-table__td-trend {
    text-align: right;
    font-weight: 600;
    font-size: 13px;
}

/* ---- Mobile expand row ---- */

.prix-table__expand {
    display: none;
}

.prix-table__expand td {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.prix-table__expand-inner {
    padding: 16px;
    background: #fafafa;
    border-top: 1px solid #eae7e2;
}

.prix-table__expand-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.prix-table__expand-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}

.prix-table__expand-value {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;
    margin-top: 2px;
}

.prix-table__expand-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #1f1f1f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 200ms;
}

.prix-table__expand-cta:hover {
    background: #333;
}

/* ---- Empty state ---- */

.prix-table-empty {
    padding: 40px 20px;
    text-align: center;
}

.prix-table-empty p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #aaa;
    font-style: italic;
}

/* ---- Footer ---- */

.prix-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.prix-table-footer__counter {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #aaa;
}

.prix-table-footer__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #888;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 150ms;
}

.prix-table-footer__toggle:hover {
    color: #1f1f1f;
}

.prix-table-footer__toggle svg {
    transition: transform 200ms;
}

.prix-table-footer__toggle.is-expanded svg {
    transform: rotate(180deg);
}

/* ---- Mobile ---- */

@media (max-width: 767px) {
    .prix-table-section {
        padding: 48px 0;
    }

    .prix-table-wrap {
        padding: 0 20px;
    }

    .prix-table-header {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 20px;
    }

    .prix-table-header__title {
        font-size: 24px;
    }

    .prix-table-controls {
        flex-direction: column;
        gap: 8px;
    }

    .prix-table-search {
        width: 100%;
    }

    /* Force 16px on inputs to prevent iOS auto-zoom */
    .prix-table-search input,
    .prix-map-search--mobile input,
    .prix-hero__search-input,
    .prix-table-fullscreen__search-input {
        font-size: 16px !important;
    }

    .prix-table-select {
        width: 100%;
    }

    /* Hide district + maison columns on mobile */
    .prix-table__th--district,
    .prix-table__th--maison,
    .prix-table__td-district,
    .prix-table__td-maison {
        display: none;
    }

    .prix-table__row td {
        padding: 12px 12px;
        font-size: 13px;
    }

    .prix-table__th {
        padding: 10px 12px;
    }

    /* Show expand row on mobile */
    .prix-table__expand.is-open {
        display: table-row;
    }

    .prix-table__row.is-active {
        background: #fafafa;
    }

    .prix-table__row.is-active td {
        border-bottom-color: transparent;
    }

    .prix-table-footer {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}
