/* ======================================================================
   ESTIMATEUR — Styles specifiques (question-by-question flow)
   ====================================================================== */

/* (old cascade fixes removed — no longer needed) */

/* ------------------------------------------------------------------
   Body
   ------------------------------------------------------------------ */
.estimateur-body {
    background: #ffffff;
    min-height: 100vh;
}

/* ------------------------------------------------------------------
   Progress bar (thin line under header)
   ------------------------------------------------------------------ */
.est-progress-bar {
    background: var(--neutral-200);
    height: 3px;
    width: 100%;
}

.est-progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-300), var(--gold-200));
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 6px rgba(200,162,107,0.3);
}

.est-progress-bar__labels {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.5rem 24px 0;
    display: none;
    justify-content: space-between;
    align-items: center;
}
@media (min-width: 640px) {
    .est-progress-bar__labels {
        display: flex;
    }
}

.est-progress-bar__step-label {
    font-size: 12px;
    color: #ccc;
    font-weight: 500;
    transition: color 0.3s;
}

.est-progress-bar__step-label.active {
    color: #c8a26b;
    font-weight: 600;
}

.est-progress-bar__step-label.done {
    color: #1f1f1f;
}

/* ------------------------------------------------------------------
   Main layout
   ------------------------------------------------------------------ */
.est-main {
    position: relative;
    z-index: 1;
}

.est-step-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 24px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}
@media (min-width: 640px) {
    .est-step-container {
        padding: 1.5rem 24px;
    }
}
@media (min-width: 1024px) {
    .est-step-container {
        padding: 2.5rem 24px 2rem;
    }
}

.est-step-container--result {
    max-width: 960px;
    padding-left: 12px;
    padding-right: 12px;
}
@media (min-width: 640px) {
    .est-step-container--result {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ------------------------------------------------------------------
   Split layout (steps 2 & 3) — editorial left / interactive right
   ------------------------------------------------------------------ */
.est-split {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 768px) {
    .est-split {
        display: grid;
        grid-template-columns: 35fr 65fr;
        gap: 0;
        align-items: start;
    }
}

.est-split__left {
    padding-top: 0.25rem;
}

@media (min-width: 768px) {
    .est-split__left {
        position: sticky;
        top: calc(var(--header-h, 100px) + 1rem);
        padding-right: 2rem;
    }
}

@media (min-width: 1280px) {
    .est-split__left {
        padding-right: 2.5rem;
    }
}

.est-split__right {
    min-width: 0;
}

@media (min-width: 768px) {
    .est-split__right {
        padding-left: 2rem;
        border-left: 1px solid #f0f0f0;
    }
}

@media (min-width: 1280px) {
    .est-split__right {
        padding-left: 2.5rem;
    }
}

/* Split editorial heading */
.est-split__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 0.375rem;
}

@media (min-width: 768px) {
    .est-split__title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 1024px) {
    .est-split__title {
        font-size: 2rem;
    }
}

.est-split__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    max-width: 22rem;
}

/* Mobile: compact title area */
@media (max-width: 767px) {
    .est-split__left {
        max-height: 60px;
        overflow: hidden;
    }
    .est-split__title {
        font-size: 1.25rem;
        margin-bottom: 0.125rem;
    }
    .est-split__subtitle {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ------------------------------------------------------------------
   Card
   ------------------------------------------------------------------ */
.est-card {
    width: 100%;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.est-card--no-border {
    border: none;
    box-shadow: none;
    background: transparent;
}

@media (min-width: 640px) {
    .est-card { padding: 2rem; border-radius: 1.25rem; }
}
@media (min-width: 1024px) {
    .est-card { padding: 2rem 2.5rem; border-radius: 1.25rem; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
}
@media (min-width: 1280px) {
    .est-card { padding: 2.5rem 3rem; }
}
@media (min-width: 1536px) {
    .est-card { padding: 2.5rem 3.5rem; }
}

/* ------------------------------------------------------------------
   Step 1 — Cartographic Luxury Layout
   No card boundary. Two-column editorial/form split on desktop.
   Gold vertical divider. Hero NPA input with bottom-border style.
   ------------------------------------------------------------------ */

/* Remove card for step 1 — content breathes on the page */
#step-1 .est-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* Layout: single column mobile, two-column grid desktop */
.est-step1__layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .est-step1__layout {
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .est-step1__layout {
        display: grid;
        grid-template-columns: 5fr 8fr;
        gap: 0;
        align-items: start;
    }
}

@media (min-width: 1280px) {
    .est-step1__layout {
        grid-template-columns: 1fr 2fr;
    }
}

/* ----- Editorial column ----- */

.est-step1__editorial {
    padding-top: 0.25rem;
}

@media (min-width: 1024px) {
    .est-step1__editorial {
        padding-right: 2rem;
        border-right: 1px solid rgba(200, 162, 107, 0.18);
        padding-top: 0.25rem;
    }
}

@media (min-width: 1280px) {
    .est-step1__editorial {
        padding-right: 2.5rem;
    }
}

.est-step1__accent {
    width: 24px;
    height: 2px;
    background: var(--gold-200);
    border-radius: 1px;
    margin-bottom: 0.5rem;
}

@media (min-width: 1024px) {
    .est-step1__accent {
        width: 36px;
        margin-bottom: 1.75rem;
    }
}

.est-step1__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-200);
    margin-bottom: 0.25rem;
}

@media (min-width: 1024px) {
    .est-step1__label {
        font-size: 11px;
        letter-spacing: 0.22em;
        margin-bottom: 0.875rem;
    }
}

.est-step1__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
    .est-step1__title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
}

@media (min-width: 1024px) {
    .est-step1__title {
        font-size: 2.25rem;
        margin-bottom: 1rem;
        line-height: 1.12;
    }
}

@media (min-width: 1280px) {
    .est-step1__title {
        font-size: 2.625rem;
    }
}

.est-step1__subtitle {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.38);
    line-height: 1.5;
}

@media (min-width: 640px) {
    .est-step1__subtitle {
        font-size: 13px;
        line-height: 1.65;
    }
}

@media (min-width: 1024px) {
    .est-step1__subtitle {
        font-size: 14px;
        line-height: 1.7;
        max-width: 22rem;
    }
}

/* ----- Form column ----- */

.est-step1__form {
    position: relative;
}

@media (min-width: 1024px) {
    .est-step1__form {
        padding-left: 2rem;
    }
}

@media (min-width: 1280px) {
    .est-step1__form {
        padding-left: 2.5rem;
    }
}

/* Field labels */
.est-step1__field-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
    .est-step1__field-label {
        font-size: 13px;
        margin-bottom: 0.375rem;
    }
}

/* NPA input — prominent but compact (4 digits) */
.est-input--npa {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.06em;
    max-width: 120px;
}

@media (min-width: 640px) {
    .est-input--npa {
        font-size: 18px;
        max-width: 140px;
    }
}

@media (min-width: 1024px) {
    .est-input--npa {
        font-size: 20px;
        max-width: 160px;
    }
}

/* Select input */
.est-input--select {
    appearance: auto;
    min-height: 44px;
    cursor: pointer;
}

/* Short number input (units, floors, area) */
.est-input--short {
    max-width: 160px;
}
@media (min-width: 640px) {
    .est-input--short { max-width: 180px; }
}

/* Location info line (after NPA validated) */
.est-step1__location-info {
    margin-top: 0.5rem;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.5;
}

/* Error message */
.est-step1__error {
    margin-top: 0.5rem;
    font-size: 13px;
    color: #c0392b;
    line-height: 1.5;
}

.est-step1__checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

.est-step1__checkbox:hover {
    color: #666;
}

.est-step1__checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--gold-200);
    cursor: pointer;
    flex-shrink: 0;
}

.est-input--disabled {
    opacity: 0.4;
    pointer-events: none;
    background: #f0f0f0;
}

/* Field group spacing */
.est-step1__field-group {
    margin-top: 0.75rem;
}

@media (min-width: 640px) {
    .est-step1__field-group {
        margin-top: 1rem;
    }
}

/* Address group */
.est-step1__address-group {
    margin-top: 0.75rem;
}

@media (min-width: 640px) {
    .est-step1__address-group {
        margin-top: 1rem;
    }
}

/* Divider before address */
.est-step1__divider {
    height: 1px;
    background: var(--neutral-200);
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .est-step1__divider {
        margin-bottom: 1rem;
    }
}

/* Address grid: always side by side — numéro is short */
.est-step1__address-grid {
    display: grid;
    grid-template-columns: 1fr 72px;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .est-step1__address-grid {
        grid-template-columns: 1fr 90px;
        gap: 0.75rem;
    }
}

@media (min-width: 1024px) {
    .est-step1__address-grid {
        grid-template-columns: 1fr 100px;
    }
}

/* ------------------------------------------------------------------
   Step 2 — Editorial Type Selection
   Same two-column split. Type cards as horizontal strips with
   editorial numbering (01–04). No bouncy animations. Gold accents.
   ------------------------------------------------------------------ */

/* Remove card for step 2 */
#step-2 .est-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* Step 2 — Remove card wrapper */
#step-2 .est-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* Step 2A — Heading (legacy, used in non-split contexts) */
.est-step2__section-label {
    display: none;
}

.est-step2__heading {
    display: none;
}

.est-step2__desc {
    display: none;
}

/* Step 2A — Type cards grid (2×2 max) */
.est-step2a__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 480px) {
    .est-step2a__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* Step 2B — Sub-options container */
.est-step2b {
    opacity: 0;
    transform: translateY(12px);
}
.est-step2b.est-step2b--visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out 0.15s, transform 0.3s ease-out 0.15s;
}

.est-step2b__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px solid #d8d2c8;
    background: #f5f5f5;
    color: #1f1f1f;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.75rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.est-step2b__back:hover {
    background: #ebebeb;
    border-color: #1f1f1f;
}
.est-step2b__back-x {
    opacity: 0.5;
    transition: opacity 0.15s;
}
.est-step2b__back:hover .est-step2b__back-x {
    opacity: 1;
}

/* Sub-options sections */
.est-step2b__bloc {
    display: flex;
    flex-direction: column;
}

.est-step2b__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.est-step2b__field--inline {
    margin-top: 12px;
}

.est-step2b__label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #888;
}

.est-step2b__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.est-step2b__pills--narrow {
    max-width: 200px;
}

.est-step2b__hint {
    font-size: 12px;
    color: #888;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 2px;
}

/* Step 2B — Checkboxes for missing utilities */
.est-step2b__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.est-step2b__check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--charcoal);
    cursor: pointer;
    min-height: 44px;
}
.est-step2b__check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--charcoal);
}

.est-step2b__check--inline {
    margin-top: 0.5rem;
    min-height: auto;
    color: #666;
}

/* ----- Step 2: Type cards in grid ----- */

#step-2 .type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

#step-2 .type-card__icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 4px;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

#step-2 .type-card:hover .type-card__icon,
#step-2 .type-card.active .type-card__icon {
    opacity: 1;
}

#step-2 .type-card:hover {
    border-color: #1f1f1f;
    transform: none;
    box-shadow: none;
}

#step-2 .type-card.active {
    border-color: #1f1f1f;
    background: #fafafa;
    box-shadow: none;
    border-width: 1px;
}

#step-2 .type-card:focus-visible {
    outline: 2px solid #1f1f1f;
    outline-offset: 2px;
}

#step-2 .type-card__icon span {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

#step-2 .type-card.active .type-card__icon {
    color: #1f1f1f;
}

@media (min-width: 640px) {
    #step-2 .type-card__icon span {
        font-size: 14px;
    }
}

/* Body wrapper (name + description) */
#step-2 .type-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1f1f1f;
}

#step-2 .type-card__desc {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

/* 2A fade-out transition */
.est-step2a--hiding .type-card {
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: scale(0.97);
}

/* 2A fade-in transition */
.est-step2a--entering .type-card {
    animation: step2aCardIn 0.25s ease forwards;
    opacity: 0;
    transform: scale(0.97);
}
@keyframes step2aCardIn {
    to { opacity: 1; transform: scale(1); }
}

/* Step 2B reveal groups — no decorative borders */
#step-2 .est-step2b .reveal-group {
    margin-top: 0;
    padding-left: 0;
    border-left: none;
}

/* Mobile: no hover on type cards */
@media (max-width: 767px) {
    #step-2 .type-card:hover {
        border-color: #e5e5e5;
    }
    #step-2 .type-card:active:not(.active) {
        background: #fafafa;
    }
}

/* ------------------------------------------------------------------
   Step 3 — Flat Layout (matches Step 2)
   Single-column header, questions with step2b-style labels/pills.
   2-col grid for housing on desktop, single-col for terrain/immeuble.
   ------------------------------------------------------------------ */

/* Remove card for step 3 */
#step-3 .est-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* Header — hidden (now in .est-split__left) */
.est-step3__section-label {
    display: none;
}

.est-step3__heading {
    display: none;
}

.est-step3__desc {
    display: none;
}

/* Counter — shown in split left on desktop */
.est-step3__meta {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* --- Fields & Labels (step 2b style) --- */

.est-step3__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.est-step3__label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #888;
}

.est-step3__unit {
    color: #aaa;
    font-weight: 400;
    margin-left: 2px;
    text-transform: none;
    letter-spacing: normal;
}

.est-step3__optional {
    color: #aaa;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.est-step3__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Section tags — hidden (replaced by #f0f0f0 separator on section-start) */
.est-step3__section-tag {
    display: none;
}

/* --- Strip est-q-panel for step 3 — flat, no backgrounds --- */

#step-3 .est-q-panel {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

#step-3 .est-q-panel.est-q-panel--done {
    border: none;
    padding: 0;
}

#step-3 .est-q-panel--section-start {
    padding-top: 1.25rem;
    margin-top: 0;
    border-top: 1px solid #f0f0f0;
}

/* First section-start has no top separator */
#step-3 .est-q.visible:first-child .est-q-panel--section-start {
    border-top: none;
    padding-top: 0;
}

/* --- Inputs — bordered, radius 6px (matches step 2) --- */

#step-3 .est-input {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    max-width: 240px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s ease;
}

#step-3 .est-input:focus {
    border-color: #c8a26b;
    outline: none;
    box-shadow: none;
}

#step-3 .est-input::placeholder {
    color: rgba(0, 0, 0, 0.25);
    font-weight: 400;
}

/* --- All blocs: single column --- */

#bloc-details-housing,
#bloc-details-terrain,
#bloc-details-immeuble {
    display: flex;
    flex-direction: column;
}

/* Question spacing: 28px between visible questions */
#step-3 .est-q.visible {
    margin-top: 28px;
}
#step-3 .est-q.visible:first-child {
    margin-top: 0;
}

/* ------------------------------------------------------------------
   Step 4 — Contact & Project (split layout matching steps 2-3)
   Uses est-split for layout. No cascade — all 4 fields visible.
   Section 2 (project) revealed when all 4 contact fields valid.
   ------------------------------------------------------------------ */

/* Remove card for step 4 */
#step-4 .est-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* Left column — override max-height on mobile for trust signals */
.est-step4__left {
    max-height: none !important;
}

/* Trust signals — horizontal on mobile, vertical on desktop */
.est-step4__trust {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.est-step4__trust li {
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.est-step4__trust li::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold-200);
    opacity: 0.5;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .est-step4__trust {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
}

/* ----- Sections ----- */
.est-step4__section {
    margin-bottom: 1.5rem;
}

.est-step4__section-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .est-step4__section-tag {
        font-size: 11px;
        margin-bottom: 1.25rem;
    }
}

/* ----- Labels ----- */
.est-step4__label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #888;
    display: block;
}

/* ----- Fields inside project section ----- */
.est-step4__field {
    margin-bottom: 1.25rem;
}

.est-step4__field:last-child {
    margin-bottom: 0;
}

.est-step4__field .est-step4__label {
    margin-bottom: 0.5rem;
}

/* ----- Optional hint ----- */
.est-step4__optional {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #aaa;
    margin-top: 0.375rem;
}

/* ----- Project section: hidden by default, revealed via JS ----- */
.est-step4__project {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 300ms ease-out, transform 300ms ease-out, max-height 350ms ease-out;
    margin-bottom: 0;
    border-top: 1px solid #f0f0f0;
    padding-top: 0;
}

.est-step4__project.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 600px;
    overflow: visible;
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ----- Phone input left padding for Swiss flag prefix ----- */
#step-4 #est-phone {
    padding-left: 85px;
}

/* ----- Swiss phone prefix badge (native CSS — no Tailwind dependency) ----- */
.est-phone-prefix {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
@media (min-width: 640px) {
    .est-phone-prefix { left: 1rem; }
}
.est-phone-prefix__flag {
    width: 15px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
}
.est-phone-prefix__code {
    font-size: 11px;
    color: #a3a3a3;
    font-weight: 500;
    line-height: 1;
}

/* ----- Field validation checkmark (native sizing) ----- */
.est-field-check__icon {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* ----- Number inputs — bottom-border style ----- */
#step-4 .est-input[type="number"] {
    border: none;
    border-bottom: 1.5px solid var(--neutral-300);
    border-radius: 0;
    background: transparent;
    max-width: 13rem;
    padding: 0.625rem 0;
    font-weight: 500;
    transition: border-color 0.25s ease;
}

#step-4 .est-input[type="number"]:focus {
    border-bottom-color: var(--gold-200);
    box-shadow: none;
}

/* ----- Step 4 nav: full-width submit button on mobile ----- */
@media (max-width: 639px) {
    #step-4 .est-inline-nav {
        flex-direction: column-reverse;
        gap: 0.625rem;
        align-items: stretch;
    }
    #step-4 .est-inline-nav__next {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
    #step-4 .est-inline-nav__prev {
        align-self: flex-start;
    }
}

/* ----- Reveal groups — gold left accent ----- */
#step-4 .reveal-group {
    border-left: 2px solid rgba(200, 162, 107, 0.2);
    padding-left: 1rem;
    margin-top: 0.75rem;
}

@media (min-width: 768px) {
    #step-4 .reveal-group {
        padding-left: 1.25rem;
    }
}

/* ----- Consent text ----- */
.est-consent {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #aaa;
    text-align: center;
    line-height: 1.5;
    margin-top: 0.75rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

/* ------------------------------------------------------------------
   Steps : visibility & transitions — Premium animation engine
   Uses scale + fade + directional translate for depth perception.
   Forward = rise & push, Back = recede & pull.
   ------------------------------------------------------------------ */
.step-section {
    display: none;
    will-change: transform, opacity, filter;
}

.step-section.step-active {
    display: block;
    animation: stepEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.step-section.step-entering {
    display: block;
    animation: stepEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.step-section.step-leaving {
    display: block;
    animation: stepLeave 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.step-section.step-hidden {
    display: none;
}

/* Legacy compat */
.step-section.active {
    display: block;
    animation: stepEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.step-section.leaving {
    display: block;
    animation: stepLeave 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Forward enter: rise from below + scale up from 97% + fade */
@keyframes stepEnter {
    0%   { opacity: 0; transform: translateY(32px) scale(0.97); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0) scale(1);       filter: blur(0); }
}

/* Forward leave: push up + scale down + fade */
@keyframes stepLeave {
    0%   { opacity: 1; transform: translateY(0) scale(1);        filter: blur(0); }
    100% { opacity: 0; transform: translateY(-20px) scale(0.985); filter: blur(2px); }
}

/* Back navigation — reverse the feel */
.step-section.step-entering-back {
    display: block;
    animation: stepEnterBack 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.step-section.step-leaving-forward {
    display: block;
    animation: stepLeaveForward 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Back enter: drop from above + slight scale */
@keyframes stepEnterBack {
    0%   { opacity: 0; transform: translateY(-28px) scale(0.975); filter: blur(3px); }
    100% { opacity: 1; transform: translateY(0) scale(1);         filter: blur(0); }
}

/* Back leave: recede downward */
@keyframes stepLeaveForward {
    0%   { opacity: 1; transform: translateY(0) scale(1);       filter: blur(0); }
    100% { opacity: 0; transform: translateY(24px) scale(0.98); filter: blur(2px); }
}

/* ------------------------------------------------------------------
   Question-by-question flow (.est-q)
   ------------------------------------------------------------------ */
.est-q {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(12px) scale(0.985);
    transition:
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
        max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.35s ease;
    margin-top: 0;
    pointer-events: none;
}

.est-q.visible {
    opacity: 1;
    max-height: 1500px;
    transform: translateY(0) scale(1);
    margin-top: 1.5rem;
    pointer-events: auto;
    overflow: visible;
}

/* First question of a step has no top margin (via data-q attribute) */
.est-q.visible[data-q="1"]:not([data-requires]) {
    margin-top: 0;
}

/* ------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .step-section.step-active,
    .step-section.step-entering,
    .step-section.step-leaving,
    .step-section.step-entering-back,
    .step-section.step-leaving-forward,
    .step-section.active,
    .step-section.leaving {
        animation: none !important;
        opacity: 1;
        transform: none;
        filter: none;
    }
    .est-q {
        transition: none;
    }
    .est-q.visible {
        opacity: 1;
        transform: none;
        max-height: none;
    }
    .reveal-group {
        transition: none;
    }
    .est-step5__ring-svg {
        animation: none;
    }
    .est-step5__messages .est-loader__msg {
        transition: none;
        opacity: 1;
        transform: none;
    }
    .est-step5__progress-fill {
        animation: none;
        width: 100%;
        margin-left: 0;
    }
    .est-step5__dot {
        animation: none;
        background: var(--gold-200);
    }
    .pill, .type-card, .est-cta {
        transition-duration: 0s;
    }
    .est-condition-suggest,
    .est-recap,
    .est-q-panel--done {
        transition: none;
    }
}

/* ------------------------------------------------------------------
   Conditional reveals (within est-q)
   ------------------------------------------------------------------ */
.reveal-group {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(8px);
    transition:
        max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1),
        margin 0.35s ease;
    margin-top: 0;
}

.reveal-group.visible {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 1.5rem;
}

/* ------------------------------------------------------------------
   Step 2 — Sub-options reveal groups (no panel background, no borders)
   ------------------------------------------------------------------ */
.step-section[data-step="2"] .reveal-group {
    border-radius: 0;
    background: none;
    border-left: none;
    padding: 0;
}

.step-section[data-step="2"] .reveal-group.visible {
    background: none;
    border-left: none;
    padding: 0;
    margin-top: 12px;
    max-height: 400px;
}

/* Step 2B questions spacing */
.est-step2b__bloc > .est-q.visible {
    margin-top: 28px;
}
.est-step2b__bloc > .est-q.visible:first-child {
    margin-top: 0;
}

/* ------------------------------------------------------------------
   Step 3 — Question panels + section tags
   ------------------------------------------------------------------ */
.est-q-panel {
    background: linear-gradient(160deg, rgba(248,248,248,0.55) 0%, rgba(239,236,231,0.3) 100%);
    border-left: 2.5px solid rgba(200, 162, 107, 0.2);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem 1rem;
}
@media (min-width: 640px) {
    .est-q-panel {
        padding: 1rem 1.25rem 1.15rem;
        border-radius: 0.875rem;
    }
}

/* Section start — divider line above */
.est-q-panel--section-start {
    border-left-color: rgba(200, 162, 107, 0.35);
}

/* Section tag — small gold label */
.est-q-panel__section-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold-200);
    margin-bottom: 0.7rem;
    opacity: 0.75;
}
@media (min-width: 640px) {
    .est-q-panel__section-tag {
        font-size: 10.5px;
        margin-bottom: 0.85rem;
    }
}

/* Panel label (replaces inline Tailwind label classes) */
.est-q-panel__label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.45);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
@media (min-width: 640px) {
    .est-q-panel__label {
        font-size: 12px;
    }
}

/* Answered panel state — subtle gold intensification */
.est-q-panel--done {
    border-left-color: rgba(200, 162, 107, 0.45);
}

/* ------------------------------------------------------------------
   Step 3 — Live counter
   ------------------------------------------------------------------ */
.est-counter {
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.18);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}
.est-counter__sep {
    margin: 0 1px;
    opacity: 0.5;
}
.est-counter--active #step3-counter-current {
    color: var(--gold-200);
    font-weight: 600;
}
.est-counter--complete {
    color: var(--gold-200);
}
.est-counter--complete #step3-counter-current {
    color: var(--gold-200);
}

/* ------------------------------------------------------------------
   Step 3 — Micro-copy hints
   ------------------------------------------------------------------ */
.est-hint {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.25);
    margin-top: 3px;
    line-height: 1.4;
}

/* ------------------------------------------------------------------
   Step 3 — Smart default suggestion badge
   ------------------------------------------------------------------ */
.est-condition-suggest {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    color: var(--gold-200);
    opacity: 0;
    transition: opacity 0.35s ease;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.est-condition-suggest.visible {
    opacity: 0.65;
}

/* ------------------------------------------------------------------
   Step 3 — Recap line (below questions, above nav)
   ------------------------------------------------------------------ */
.est-recap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.3);
    margin-top: 1.25rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.est-recap.visible {
    opacity: 1;
    transform: translateY(0);
}
.est-recap__icon {
    width: 14px;
    height: 14px;
    color: var(--gold-200);
    opacity: 0.6;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
   Step 4 — Trust block (inline reassurance)
   ------------------------------------------------------------------ */
.est-trust-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
    .est-trust-block { margin-bottom: 1.5rem; }
}
.est-trust-block__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.32);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.est-trust-block__icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.55;
}
.est-trust-block__dot {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.15);
    line-height: 1;
    user-select: none;
}

/* ------------------------------------------------------------------
   Labels & Inputs
   ------------------------------------------------------------------ */
.est-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(0,0,0,0.55);
    line-height: 1.4;
}

.est-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--neutral-300);
    background: white;
    color: var(--dark);
    font-size: 16px; /* 16px on mobile prevents iOS auto-zoom */
    transition: border-color 0.25s ease, box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}
@media (min-width: 640px) {
    .est-input {
        font-size: 14px;
    }
}
@media (min-width: 1280px) {
    .est-input {
        font-size: 15px;
    }
    .est-input--large {
        padding: 1.125rem 1.125rem;
    }
}
.est-input::placeholder {
    color: rgba(0,0,0,0.3);
}
.est-input:focus {
    border-color: var(--gold-200);
    box-shadow: 0 0 0 3px rgba(200, 162, 107, 0.15);
}
.est-input--large {
    padding: 1rem 1rem;
    font-size: 16px;
    border-radius: 1rem;
}

/* Float labels */
.est-float-field {
    position: relative;
}
.est-input--float {
    padding-top: 1.25rem;
    padding-bottom: 0.5rem;
}
.est-float-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(0,0,0,0.4);
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: left;
}
.est-input--float:focus ~ .est-float-label,
.est-input--float:not(:placeholder-shown) ~ .est-float-label {
    top: 0.5rem;
    transform: translateY(0) scale(0.8);
    color: var(--gold-200);
}

/* Field validation check */
.est-field-check {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Old autocomplete dropdown + bottom sheet + skeleton styles removed.
   NPA lookup uses native <select> — no custom dropdown needed.
   ------------------------------------------------------------------
   Autocomplete dropdown (desktop) — REMOVED
   Uses visibility + opacity transition for smooth open AND close.
   ------------------------------------------------------------------ */
.autocomplete-dropdown {
    position: absolute;
    z-index: 50;
    width: 100%;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(200, 162, 107, 0.08);
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(200, 162, 107, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 12px 40px rgba(0, 0, 0, 0.10);
    max-height: min(420px, 50vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    padding: 6px;

    /* Hidden state — transition-based (smooth open AND close) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition:
        opacity 0.22s cubic-bezier(0.2, 0, 0, 1),
        transform 0.22s cubic-bezier(0.2, 0, 0, 1),
        visibility 0s linear 0.22s;  /* delay visibility off until after fade */
}

/* Open state — just toggle properties, transition handles the animation */
.autocomplete-dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition:
        opacity 0.25s cubic-bezier(0.34, 1.3, 0.64, 1),
        transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1),
        visibility 0s linear 0s;  /* visible immediately on open */
}

/* Custom thin scrollbar */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 5px;
}
.autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
}
.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: rgba(200, 162, 107, 0.18);
    border-radius: 3px;
}
.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 162, 107, 0.35);
}
/* Firefox */
.autocomplete-dropdown {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 162, 107, 0.18) transparent;
}

.autocomplete-dropdown:empty {
    display: none;
}

/* On mobile, hide the dropdown (bottom sheet replaces it) */
@media (max-width: 639px) {
    .autocomplete-dropdown {
        display: none !important;
    }
}

/* --- .est-address-reveal → see Step 1 Premium section below --- */

/* ------------------------------------------------------------------
   Bottom sheet (mobile autocomplete) — Premium 2026
   Native iOS-style sheet with spring physics.
   ------------------------------------------------------------------ */
.est-bottomsheet {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    visibility: hidden;
}
.est-bottomsheet.open {
    pointer-events: auto;
    visibility: visible;
}

/* Backdrop: fades in/out smoothly */
.est-bottomsheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition:
        background 0.35s ease,
        backdrop-filter 0.35s ease,
        -webkit-backdrop-filter 0.35s ease;
}
.est-bottomsheet.open .est-bottomsheet__backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Panel: slides up with iOS-style spring */
.est-bottomsheet__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    max-height: 94dvh; /* Dynamic viewport height — respects keyboard on iOS */
    height: 85vh;
    height: 85dvh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.44s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow:
        0 -4px 20px rgba(0, 0, 0, 0.08),
        0 -16px 60px rgba(0, 0, 0, 0.12);
    padding-bottom: env(safe-area-inset-bottom, 0);
    /* Prevent rubber-banding on panel itself */
    will-change: transform;
}
.est-bottomsheet.open .est-bottomsheet__panel {
    transform: translateY(0);
}
/* Closing transition is slightly faster, eased differently */
.est-bottomsheet:not(.open) .est-bottomsheet__panel {
    transition: transform 0.3s cubic-bezier(0.4, 0, 1, 1);
}

/* Handle bar: drag affordance */
.est-bottomsheet__handle {
    padding: 12px 0 2px;
    display: flex;
    justify-content: center;
    cursor: grab;
    flex-shrink: 0;
    /* Enlarge touch target */
    min-height: 28px;
}
.est-bottomsheet__bar {
    width: 36px;
    height: 5px;
    border-radius: 2.5px;
    background: var(--neutral-300);
    opacity: 0.6;
}

/* Title below handle */
.est-bottomsheet__title {
    padding: 4px 20px 8px;
    text-align: center;
    flex-shrink: 0;
}
.est-bottomsheet__title p {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold-200);
    opacity: 0.8;
}

/* Search wrapper */
.est-bottomsheet__search {
    padding: 0 16px 10px;
    position: relative;
    flex-shrink: 0;
}
.est-bottomsheet__search-wrap {
    position: relative;
}

.est-bottomsheet__search .est-input {
    width: 100%;
    font-size: 16px;
    padding: 14px 48px 14px 42px;
    border-radius: 14px;
    min-height: 52px;
    border: 1.5px solid var(--neutral-200);
    background: var(--neutral-100);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.est-bottomsheet__search .est-input:focus {
    background: white;
    border-color: var(--gold-200);
    box-shadow: 0 0 0 3px rgba(200, 162, 107, 0.10);
}
.est-bottomsheet__search .est-input::placeholder {
    color: rgba(0, 0, 0, 0.25);
}

/* Clear X button in search */
.est-bottomsheet__clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}
.est-bottomsheet__clear:active {
    background: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(0.9);
}
.est-bottomsheet__clear.hidden {
    display: none;
}

/* Results area: MUST flex-grow + proper scroll */
.est-bottomsheet__results {
    flex: 1 1 0;
    min-height: 0; /* Critical for flex scroll to work */
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 8px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    scroll-behavior: smooth;
}

/* Bottom sheet items — generous touch targets */
.est-bottomsheet__results .autocomplete-item {
    min-height: 62px;
    padding: 14px 12px;
    border-radius: 14px;
    margin-bottom: 2px;
    border-bottom: none;
    border-left-width: 3px;
    gap: 12px;
    /* Reset animation in bottom sheet — items appear instantly */
    animation: none;
    opacity: 1;
}
.est-bottomsheet__results .autocomplete-item:active {
    background: rgba(200, 162, 107, 0.06);
    border-left-color: var(--gold-200);
}
.est-bottomsheet__results .autocomplete-item .autocomplete-item__chevron {
    opacity: 0.3;
    transform: translateX(0);
}

/* Bottom sheet empty state */
.est-bottomsheet__results .autocomplete-empty {
    padding: 2.5rem 1.5rem;
    min-height: 120px;
}

/* Bottom sheet skeletons */
.est-bottomsheet__results .ac-skeleton {
    padding: 14px 12px;
}

/* Separator between search and results */
.est-bottomsheet__search::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neutral-200), transparent);
}

/* Body scroll lock when bottom sheet is open */
body.bs-scroll-lock {
    overflow: hidden;
    position: fixed;
    width: 100%;
    /* Prevent iOS bounce */
    overscroll-behavior: none;
}

/* ------------------------------------------------------------------
   Location info (district text)
   ------------------------------------------------------------------ */
.est-location-info {
    font-size: 12px;
    color: rgba(0,0,0,0.4);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.est-location-info__icon {
    color: var(--gold-200);
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
   Type de bien — base card styles (overridden by #step-2 specifics)
   ------------------------------------------------------------------ */
.type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #d8d2c8;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.2s ease;
    position: relative;
    text-align: left;
    min-height: 44px;
}

.type-card:hover {
    border-color: #1f1f1f;
}

.type-card.active {
    border-color: #1f1f1f;
    background: #f8f8f8;
}

.type-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #1f1f1f;
}

.type-card__desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

/* ------------------------------------------------------------------
   Pills (sous-type, options binaires, etc.)
   ------------------------------------------------------------------ */
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e5e5e5;
    color: #1f1f1f;
    background: #fff;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        color 0.15s ease,
        background-color 0.15s ease;
    user-select: none;
    min-height: 44px;
}

.pill:hover {
    border-color: #1f1f1f;
}

.pill:active {
    transform: none;
}

.pill.active {
    background: #1f1f1f;
    color: #fff;
    border-color: #1f1f1f;
    box-shadow: none;
    transform: none;
}

/* Brief pop on selection — subtle */
.pill.est-pill-pop {
    animation: none;
}

.pill--toggle.active {
    background: #1f1f1f;
    border-color: #1f1f1f;
}

/* ------------------------------------------------------------------
   Intention cards (step 4)
   ------------------------------------------------------------------ */
.est-intention-card {
    flex-direction: column;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 0.75rem;
    min-height: 80px;
}
.est-intention-card__icon {
    color: var(--neutral-300);
    transition: color 0.2s;
}
.est-intention-card.active .est-intention-card__icon {
    color: white;
}
.est-intention-card__text {
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
}

/* ------------------------------------------------------------------
   Checkboxes
   ------------------------------------------------------------------ */
.est-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 9999px;
    border: 1.5px solid var(--neutral-200);
    background: white;
    transition: all 0.2s;
}
.est-checkbox:hover {
    border-color: var(--neutral-300);
}
.est-checkbox__input {
    accent-color: var(--gold-200);
    width: 16px;
    height: 16px;
}
.est-checkbox__label {
    font-size: 13px;
    color: rgba(0,0,0,0.6);
}
.est-checkbox--standalone {
    padding: 12px 18px;
}

/* ------------------------------------------------------------------
   Tooltip
   ------------------------------------------------------------------ */
.est-tooltip-trigger {
    position: relative;
    cursor: help;
}
.est-tooltip-trigger:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--charcoal);
    color: white;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 8px;
    white-space: normal;
    width: max-content;
    max-width: 260px;
    z-index: 60;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ------------------------------------------------------------------
   Form field error state
   ------------------------------------------------------------------ */
.field-error input,
.field-error select,
.field-error textarea {
    border-color: #fca5a5;
}

.field-error input:focus,
.field-error select:focus,
.field-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.25);
    border-color: #fca5a5;
}

.error-message {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: none;
}

.field-error .error-message {
    display: block;
    animation: errorSlideIn 0.25s ease;
}

@keyframes errorSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------
   Validation success state
   ------------------------------------------------------------------ */
.field-valid input,
.field-valid select {
    border-color: #86efac;
    box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.12);
}

/* Inline validation checkmark pop */
.est-field-check {
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.est-field-check:not(.hidden) {
    animation: fieldCheckPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fieldCheckPop {
    0%   { opacity: 0; transform: scale(0.3); }
    60%  { opacity: 1; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------------------------------
   Navigation buttons (inline, per step)
   ------------------------------------------------------------------ */
.est-inline-nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0 0.25rem;
    margin-top: 0.5rem;
}
@media (min-width: 640px) {
    .est-inline-nav {
        padding: 1.25rem 0 0.5rem;
        margin-top: 0.75rem;
    }
}
@media (min-width: 1024px) {
    .est-inline-nav {
        padding: 1.5rem 0 0.5rem;
        margin-top: 1rem;
    }
}

.est-inline-nav__prev {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(0,0,0,0.45);
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 0.75rem;
    transition: all 0.2s;
}
.est-inline-nav__prev:hover {
    color: var(--charcoal);
    background: var(--neutral-200);
    border-color: rgba(0,0,0,0.08);
}

.est-inline-nav__next {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: var(--charcoal);
    border: none;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 0.75rem;
    transition:
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
        background 0.2s ease,
        box-shadow 0.3s ease;
    min-height: 48px;
    margin-left: auto;
}
.est-inline-nav__next:hover {
    background: black;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.est-inline-nav__next:active {
    transform: scale(0.97);
    transition-duration: 0.08s;
}

/* Entrance animation when button appears */
.est-inline-nav__next.est-btn-entering {
    animation: btnEntrance 0.5s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes btnEntrance {
    0%   { opacity: 0; transform: translateY(10px) scale(0.95); }
    60%  { opacity: 1; transform: translateY(-2px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (min-width: 1024px) {
    .est-inline-nav__next {
        padding: 14px 32px;
        font-size: 15px;
        border-radius: 0.875rem;
    }
    .est-inline-nav__prev {
        font-size: 15px;
    }
}

/* Next button hidden state */
.est-inline-nav__next.est-inline-nav__next--hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
}

/* ==================================================================
   STEP 5 — Verification: Centered layout (matches step 6)
   ================================================================== */

/* Kill the card wrapper from index.php */
#step-5 .est-card {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

/* ── Step 5 root ────────────────────────────────────────────────── */
.est-step5 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}
@media (min-width: 640px) {
    .est-step5 {
        gap: 2rem;
    }
}

/* ── Header — centered like step 6 ──────────────────────────────── */
.est-step5__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}
@media (min-width: 640px) {
    .est-step5__header {
        gap: 0.5rem;
    }
}

.est-step5__accent {
    width: 2.5rem;
    height: 3px;
    background: var(--gold-200);
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.est-step5__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-200);
}

.est-step5__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
@media (min-width: 640px) {
    .est-step5__title {
        font-size: 1.75rem;
    }
}
@media (min-width: 1024px) {
    .est-step5__title {
        font-size: 2rem;
    }
}

.est-step5__subtitle {
    font-size: 0.8125rem;
    color: rgba(0,0,0,0.4);
    line-height: 1.6;
    max-width: 28rem;
    margin-top: 0.25rem;
}
@media (min-width: 640px) {
    .est-step5__subtitle {
        font-size: 0.875rem;
    }
}

/* ── Loader card — subtle container ────────────────────────────── */
.est-step5__card {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 8px 32px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 480px;
    width: 100%;
    position: relative;
    overflow: hidden;
}
@media (min-width: 640px) {
    .est-step5__card {
        padding: 2.5rem 2.5rem;
        gap: 1.75rem;
        border-radius: 1.25rem;
    }
}

/* Top accent line like result card */
.est-step5__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-200), var(--gold-300), var(--gold-200));
    opacity: 0.6;
}

/* ── Ring Spinner ───────────────────────────────────────────────── */
.est-step5__ring {
    width: 56px;
    height: 56px;
}
@media (min-width: 640px) {
    .est-step5__ring {
        width: 64px;
        height: 64px;
    }
}

.est-step5__ring-svg {
    width: 100%;
    height: 100%;
    animation: step5RingSpin 1.4s linear infinite;
}

.est-step5__ring-arc {
    transform-origin: center;
}

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

/* ── Progress bar ───────────────────────────────────────────────── */
.est-step5__progress {
    width: 100%;
    max-width: 280px;
}

.est-step5__progress-track {
    width: 100%;
    height: 3px;
    background: var(--neutral-200);
    border-radius: 2px;
    overflow: hidden;
}

.est-step5__progress-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--gold-300), var(--gold-200));
    border-radius: 2px;
    animation: step5Progress 2s ease-in-out infinite;
}

@keyframes step5Progress {
    0%   { width: 0%; margin-left: 0%; }
    50%  { width: 40%; margin-left: 30%; }
    100% { width: 0%; margin-left: 100%; }
}

/* ── Sequential Messages — centered ─────────────────────────────── */
.est-step5__messages {
    min-height: 2.5rem;
    position: relative;
    width: 100%;
}

.est-step5__messages .est-loader__msg {
    font-size: 0.875rem;
    color: rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 1.5;
}
@media (min-width: 640px) {
    .est-step5__messages .est-loader__msg {
        font-size: 0.9375rem;
    }
}

.est-step5__messages .est-loader__msg--active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.est-step5__messages .est-loader__dynamic {
    font-weight: 600;
    color: var(--charcoal);
}

/* ── Step Dots — centered ───────────────────────────────────────── */
.est-step5__dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.est-step5__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neutral-200);
    transition: background 0.3s ease;
    animation: step5Dot 3.2s ease-in-out infinite;
}

.est-step5__dot:nth-child(1) { animation-delay: 0s; }
.est-step5__dot:nth-child(2) { animation-delay: 0.8s; }
.est-step5__dot:nth-child(3) { animation-delay: 1.6s; }
.est-step5__dot:nth-child(4) { animation-delay: 2.4s; }

@keyframes step5Dot {
    0%, 100% { background: var(--neutral-200); }
    25%      { background: var(--gold-200); }
    50%      { background: var(--neutral-300); }
}

/* ── Error State — centered ─────────────────────────────────────── */
.est-step5__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.est-step5__error-text {
    font-size: 0.875rem;
    color: #dc2626;
    line-height: 1.5;
}

.est-step5__retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: white;
    background: var(--charcoal);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    min-height: 44px;
}

.est-step5__retry:hover {
    background: #111;
    transform: translateY(-1px);
}

.est-step5__retry:active {
    transform: translateY(0) scale(0.98);
}

/* ── Legacy Loader Classes (kept for backward compat) ───────────── */
.est-loader__messages {
    min-height: 24px;
    position: relative;
}

.est-loader__msg {
    font-size: 14px;
    color: rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s, transform 0.4s;
    position: absolute;
    width: 100%;
    text-align: center;
}

.est-loader__msg--active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.est-loader__dynamic {
    font-weight: 600;
    color: var(--charcoal);
}

/* Legacy spinner fallback */
.est-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--gold-200);
    border-radius: 50%;
    animation: estSpin 0.7s linear infinite;
}

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

/* ------------------------------------------------------------------
   Result cards V2 (step 6) — Premium 2026
   ------------------------------------------------------------------ */
.est-result-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 8px 32px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
}
@media (min-width: 640px) {
    .est-result-card {
        padding: 2.5rem 2.5rem;
        gap: 2rem;
        border-radius: 1.5rem;
    }
}
@media (min-width: 1024px) {
    .est-result-card {
        padding: 3rem 3.5rem;
        gap: 2.5rem;
        border-radius: 1.75rem;
        box-shadow:
            0 1px 2px rgba(0,0,0,0.03),
            0 12px 48px rgba(0,0,0,0.08);
    }
}

/* Subtle top accent line */
.est-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-200), var(--gold-300), var(--gold-200));
    opacity: 0.6;
}

/* (confetti & badge removed) */

/* Hero price block */
.est-result-hero {
    text-align: center;
    padding: 0.5rem 0;
    position: relative;
    z-index: 1;
}

.est-result-price-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .est-result-price-range {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
}

.est-result-price-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

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

.est-result-price-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.est-result-price-currency {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #888;
}
@media (min-width: 640px) {
    .est-result-price-currency {
        font-size: 13px;
    }
}

.est-result-num {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #1f1f1f;
    letter-spacing: -0.02em;
    line-height: 1;
    min-width: 1ch;
    display: inline-block;
}
@media (min-width: 400px) {
    .est-result-num {
        font-size: 30px;
    }
}
@media (min-width: 640px) {
    .est-result-num {
        font-size: 42px;
    }
}

/* Price divider — simple vertical line */
.est-result-price-divider {
    width: 1px;
    height: 32px;
    background: #e5e5e5;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .est-result-price-divider {
        height: 40px;
    }
}

/* Range bar V2 */
.est-result-rangebar {
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
    padding: 0 0.5rem;
}
@media (min-width: 640px) {
    .est-result-rangebar {
        max-width: 420px;
    }
}

.est-result-rangebar__track {
    height: 6px;
    border-radius: 3px;
    background: #f0f0f0;
    position: relative;
    overflow: visible;
}

.est-result-rangebar__gradient {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #d8d2c8, #c8a26b);
    width: 0;
    transition: width 600ms ease-out;
}

.est-result-rangebar__marker {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 600ms ease-out 0.1s;
}

.est-result-rangebar__marker-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1f1f1f;
    box-shadow: 0 0 0 3px rgba(31,31,31,0.12);
}

/* Range bar min/max labels */
.est-result-rangebar__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: #aaa;
    font-weight: 500;
}
@media (min-width: 640px) {
    .est-result-rangebar__labels {
        font-size: 11px;
    }
}

/* Stats section */
.est-result-stats-section {
    position: relative;
    z-index: 1;
}

/* Stat cards V2 */
.est-stat-card-v2 {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 640px) {
    .est-stat-card-v2 {
        padding: 16px;
        gap: 6px;
    }
}
.est-stat-card-v2:hover {
    border-color: #d5d5d5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.est-stat-card-v2__icon-wrap {
    display: none;
}

.est-stat-card-v2__value {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1f1f1f;
    line-height: 1;
}
@media (min-width: 400px) {
    .est-stat-card-v2__value {
        font-size: 18px;
    }
}
@media (min-width: 640px) {
    .est-stat-card-v2__value {
        font-size: 20px;
    }
}

.est-stat-card-v2__label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    line-height: 1.3;
}
@media (min-width: 640px) {
    .est-stat-card-v2__label {
        font-size: 11px;
    }
}

/* Trend colors */
.est-stat-card-v2__value.trend-up { color: #16a34a; }
.est-stat-card-v2__value.trend-down { color: #dc2626; }

/* Info boxes V2 */
.est-result-info-v2 {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 0.875rem;
    padding: 1rem 1.25rem;
    background: white;
}

/* Comparison V2 */
.est-result-compare-v2 {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 0.875rem;
    padding: 1.25rem 1.5rem;
    background: var(--neutral-100);
}
.est-result-compare-v2__col {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.est-result-compare-v2__bar {
    width: 0%;
    height: 6px;
    border-radius: 3px;
    transition: width 0.8s ease;
}
.est-result-compare-v2__bar--theirs {
    background: var(--neutral-300);
}
.est-result-compare-v2__bar--ours {
    background: linear-gradient(90deg, var(--gold-200), var(--gold-300));
}

/* Expert badge */
.est-result-expert-badge {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.est-result-expert-badge__ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}
@media (min-width: 640px) {
    .est-result-expert-badge__ring {
        width: 88px;
        height: 88px;
    }
}

/* Footer V2 */
.est-result-footer-v2 {
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.04);
    position: relative;
    z-index: 1;
}
.est-disclaimer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 11px;
    color: rgba(0,0,0,0.45);
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}
.est-disclaimer-toggle:hover {
    color: rgba(0,0,0,0.6);
}
.est-disclaimer-toggle__chevron {
    transition: transform 0.25s ease;
}
.est-result-footer-v2--open .est-disclaimer-toggle__chevron {
    transform: rotate(180deg);
}
.est-disclaimer-text {
    font-size: 11px;
    color: rgba(0,0,0,0.45);
    text-align: center;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}
.est-result-footer-v2--open .est-disclaimer-text {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
}

/* CTAs V2 */
.est-result-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    position: relative;
    z-index: 1;
}
@media (min-width: 640px) {
    .est-result-ctas {
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
    }
}

.est-cta-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 0.75rem;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    min-height: 48px;
    border: none;
}
@media (min-width: 640px) {
    .est-cta-v2 {
        padding: 14px 26px;
        font-size: 14px;
    }
}

.est-cta-v2--primary {
    background: #1f1f1f;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.est-cta-v2--primary:hover {
    background: #111;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}
.est-cta-v2--primary:active {
    transform: translateY(0) scale(0.98);
}
.est-cta-v2:focus-visible {
    outline: 2px solid #c8a26b;
    outline-offset: 2px;
}

.est-cta-v2--lg {
    padding: 16px 32px;
    font-size: 15px;
    border-radius: 0.875rem;
}

.est-cta-v2--secondary {
    background: white;
    color: #1f1f1f;
    border: 1px solid #e5e5e5;
}
.est-cta-v2--secondary:hover {
    border-color: #d5d5d5;
    background: #fafafa;
}

.est-cta-v2--ghost {
    background: transparent;
    color: #888;
}
.est-cta-v2--ghost:hover {
    text-decoration: underline;
    color: #1f1f1f;
}

/* Restart CTA */
.est-cta-v2--restart {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    color: #aaa;
    padding: 10px 16px;
    min-height: 36px;
}
.est-cta-v2--restart:hover {
    color: #666;
}
.est-result-restart {
    text-align: center;
    padding-top: 0.25rem;
}

/* Share toast */
.est-share-toast {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.75rem;
    padding: 10px 16px;
    animation: toastSlideUp 0.3s ease;
    position: relative;
    z-index: 1;
}
.est-share-toast.hidden {
    display: none;
}
@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------
   Median price (prominent)
   ------------------------------------------------------------------ */
.est-result-median {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 1.25rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.est-result-median.visible {
    opacity: 1;
    transform: translateY(0);
}
.est-result-median__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-200);
}
.est-result-median__value {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-200);
    letter-spacing: -0.02em;
}
@media (min-width: 640px) {
    .est-result-median__value {
        font-size: 1.75rem;
    }
}

/* ------------------------------------------------------------------
   Analysis includes block (expert variant)
   ------------------------------------------------------------------ */
.est-result-analysis {
    padding: 1.25rem 0 0;
}
.est-result-analysis__title {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #888;
    margin-bottom: 1rem;
}
.est-result-analysis__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.est-result-analysis__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1f1f1f;
}
.est-result-analysis__item::before {
    content: '\2713';
    color: var(--gold-200);
    font-weight: 700;
    flex-shrink: 0;
    font-size: 15px;
}

/* ------------------------------------------------------------------
   Mobile specifics
   ------------------------------------------------------------------ */
@media (max-width: 639px) {
    /* Touch targets */
    .pill { min-height: 44px; padding: 10px 14px; font-size: 13px; }

    /* No hover effects on mobile */
    .type-card:hover {
        border-color: #e5e5e5;
    }
    .type-card.active:hover {
        border-color: #1f1f1f;
    }
    .pill:hover {
        background: white;
        border-color: #e5e5e5;
        color: #1f1f1f;
    }
    .pill.active:hover {
        background: #1f1f1f;
        color: white;
        border-color: #1f1f1f;
    }
    .pill--toggle.active:hover {
        background: #1f1f1f;
        border-color: #1f1f1f;
    }

    /* Active states for touch */
    .type-card:active:not(.active) {
        background: #f8f8f8;
    }
    .pill:active {
        background: #f8f8f8;
    }

}

/* ============================================================
   SHAKE ANIMATION (field validation error)
   ============================================================ */
.est-shake {
    animation: estShake 0.4s ease;
}
@keyframes estShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    .est-shake {
        animation: none;
    }
    .est-result-rangebar__gradient,
    .est-result-rangebar__marker {
        transition: none;
    }
    .est-result-expert-badge__ring {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .est-share-toast {
        animation: none;
    }
    .est-result-median {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .est-step6-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ======================================================================
   STEP 1 PREMIUM — Redesign 2026
   ====================================================================== */

/* ------------------------------------------------------------------
   Step 1 Premium — Pin pulse animation
   ------------------------------------------------------------------ */
@keyframes pinPulse {
    0%   { transform: scale(1);    opacity: 1;   }
    50%  { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1);    opacity: 1;   }
}

.est-pin-pulse {
    animation: pinPulse 2s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-200);
    pointer-events: none;
}

/* Stop pulsing when the input is focused */
.est-input:focus ~ .est-pin-pulse,
.est-float-field:focus-within .est-pin-pulse {
    animation: none;
    opacity: 0.5;
    transform: scale(1);
    transition: opacity 0.2s ease;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Autocomplete dropdown open state
   (Handled entirely by transition on .autocomplete-dropdown base +
    .autocomplete-dropdown--open toggle. No animation needed.)
   ------------------------------------------------------------------ */
/* (open styles are defined on .autocomplete-dropdown--open above) */

/* ------------------------------------------------------------------
   Step 1 Premium — Enriched autocomplete items (2026 redesign)
   ------------------------------------------------------------------ */

/* Staggered item entrance */
@keyframes itemFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--dark);
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 14px;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    min-height: 48px;
    opacity: 0;
    animation: itemFadeIn 0.25s ease forwards;
    animation-delay: calc(var(--item-i, 0) * 30ms);
}

.autocomplete-item:hover,
.autocomplete-item:focus-visible,
.autocomplete-item.highlighted {
    background: rgba(200, 162, 107, 0.05);
    border-left-color: var(--gold-200);
}

.autocomplete-item[aria-selected="true"] {
    background: rgba(200, 162, 107, 0.08);
    border-left-color: var(--gold-200);
}

/* On mobile: use :active instead of :hover */
@media (max-width: 639px) {
    .autocomplete-item:hover {
        background: none;
        border-left-color: transparent;
    }
    .autocomplete-item:active {
        background: rgba(200, 162, 107, 0.06);
        border-left-color: var(--gold-200);
    }
}

/* NPA pill — gold-tinted anchor on left */
.autocomplete-item__npa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--gold-300);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    background: rgba(200, 162, 107, 0.07);
    border-radius: 10px;
    padding: 5px 10px;
    min-width: 52px;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

/* Body (name + district) */
.autocomplete-item__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.autocomplete-item__row1 {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
}

.autocomplete-item__name {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item__commune {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.autocomplete-item__row2 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.autocomplete-item__district {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.32);
    white-space: nowrap;
}

.autocomplete-item__badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.autocomplete-item__badge--tourist {
    background: rgba(200, 162, 107, 0.12);
    color: var(--gold-300);
}

.autocomplete-item__badge--commune-seat {
    background: rgba(200, 162, 107, 0.08);
    color: var(--gold-300);
}

.autocomplete-item__listings {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

/* Chevron arrow on right */
.autocomplete-item__chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--neutral-300);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.autocomplete-item:hover .autocomplete-item__chevron,
.autocomplete-item.highlighted .autocomplete-item__chevron {
    opacity: 1;
    transform: translateX(0);
}

/* Search highlight within autocomplete items */
.autocomplete-item mark {
    background: rgba(200, 162, 107, 0.18);
    color: var(--charcoal);
    font-weight: 700;
    border-radius: 3px;
    padding: 1px 3px;
}

/* Legacy class compat (keep __main and __top-line working as aliases) */
.autocomplete-item__main {
    display: contents;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Bottom sheet enhancements (2026)
   ------------------------------------------------------------------ */
/* (bottom sheet search styles now in main bottom sheet section above) */

.est-bottomsheet__recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 6px;
    border-bottom: 1px solid var(--neutral-100);
}

.est-bottomsheet__recent-header span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 0, 0, 0.3);
}

.est-bottomsheet__recent-header button {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.25);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.est-bottomsheet__recent-header button:active {
    background: var(--neutral-100);
}

/* ------------------------------------------------------------------
   Step 1 Premium — Loading spinner in NPA input
   ------------------------------------------------------------------ */
.est-npa-loading {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.est-npa-loading__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(200, 162, 107, 0.2);
    border-top-color: var(--gold-200);
    border-radius: 50%;
    animation: estSpin 0.7s linear infinite;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Post-selection info zone
   ------------------------------------------------------------------ */
.est-location-selected {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 350ms ease, opacity 300ms ease;
}

.est-location-selected.visible {
    max-height: 300px;
    opacity: 1;
}

.est-location-selected__inner {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Premium badges
   ------------------------------------------------------------------ */
@keyframes badgeAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.est-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.8);
    animation: badgeAppear 300ms ease forwards;
}

/* Stagger badges: use inline --badge-delay or nth-child */
.est-badge:nth-child(1) { animation-delay: 0ms; }
.est-badge:nth-child(2) { animation-delay: 80ms; }
.est-badge:nth-child(3) { animation-delay: 160ms; }
.est-badge:nth-child(4) { animation-delay: 240ms; }
.est-badge:nth-child(5) { animation-delay: 320ms; }

.est-badge--district {
    border: 1.5px solid var(--gold-200);
    color: var(--gold-200);
    background: transparent;
}

.est-badge--tourist {
    background: var(--gold-200);
    color: white;
    border: 1.5px solid var(--gold-200);
}

.est-badge--price {
    background: var(--neutral-200);
    color: var(--charcoal);
    border: 1.5px solid transparent;
}

.est-badge__icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.est-badge__icon svg {
    width: 100%;
    height: 100%;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Address reveal animation
   ------------------------------------------------------------------ */
.est-address-reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(12px);
    pointer-events: none;
    transition:
        max-height 400ms ease,
        opacity 350ms ease,
        transform 350ms ease,
        margin 300ms ease;
    margin-top: 0;
}

.est-address-reveal.visible {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 1.25rem;
    overflow: visible;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Float labels (ensure compatibility with new inputs)
   ------------------------------------------------------------------ */

/* Float field with icon on the left (e.g., pin icon in NPA) */
.est-float-field--with-icon .est-input--float {
    padding-left: 2.75rem;
}

.est-float-field--with-icon .est-float-label {
    left: 2.75rem;
}

.est-float-field--with-icon .est-pin-pulse,
.est-float-field--with-icon .est-field-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* Ensure float label does not overlap with right-side elements */
.est-float-field .est-npa-loading,
.est-float-field .est-field-check {
    z-index: 2;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Time estimate badge
   ------------------------------------------------------------------ */
.est-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 9999px;
    background: var(--neutral-200);
    color: rgba(0, 0, 0, 0.35);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}

.est-time-badge__icon {
    display: inline-flex;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.est-time-badge__icon svg {
    width: 100%;
    height: 100%;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Empty state (no results)
   ------------------------------------------------------------------ */
.autocomplete-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    min-height: 100px;
}

.autocomplete-empty__icon {
    color: var(--neutral-300);
    opacity: 0.6;
}

.autocomplete-empty__icon svg {
    width: 32px;
    height: 32px;
}

.autocomplete-empty__text {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.35);
    line-height: 1.5;
    max-width: 240px;
}

.autocomplete-empty__text strong {
    color: rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Recent searches section
   (classes match JS: autocomplete-recent-header, __title, __clear)
   ------------------------------------------------------------------ */
.autocomplete-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 6px;
    border-bottom: 1px solid var(--neutral-100);
}

.autocomplete-recent-header__title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.25);
}

.autocomplete-recent-header__clear {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.2);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.autocomplete-recent-header__clear:hover {
    color: rgba(0, 0, 0, 0.4);
    background: var(--neutral-100);
}

@media (max-width: 639px) {
    .autocomplete-recent-header__clear:hover {
        color: rgba(0, 0, 0, 0.2);
        background: none;
    }
    .autocomplete-recent-header__clear:active {
        color: rgba(0, 0, 0, 0.4);
        background: var(--neutral-100);
    }
}

/* Recent search items have a clock icon prefix */
.autocomplete-item--recent {
    position: relative;
    padding-left: 40px;
}

.autocomplete-item--recent::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d8d2c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.7;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Mobile specifics (2026)
   ------------------------------------------------------------------ */
@media (max-width: 639px) {
    /* Ensure all touch targets meet 44px minimum */
    .est-badge {
        min-height: 28px;
        padding: 5px 12px;
    }

    .autocomplete-item {
        padding: 14px 12px;
        min-height: 56px;
        gap: 12px;
    }

    .autocomplete-item__npa {
        font-size: 12px;
        min-width: 48px;
        padding: 4px 8px;
    }

    .autocomplete-item__name {
        font-size: 14px;
    }

    .autocomplete-item__district {
        font-size: 11px;
    }

    /* Chevron always visible on mobile for affordance */
    .autocomplete-item__chevron {
        opacity: 0.4;
        transform: translateX(0);
    }

    .autocomplete-recent-header__clear {
        min-height: 44px;
    }

    /* No hover effects on mobile for new components */
    .est-badge:hover {
        transform: none;
    }

    .autocomplete-item__badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* ------------------------------------------------------------------
   Step 1 Premium — Loading skeletons
   ------------------------------------------------------------------ */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.ac-skeleton {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
}

.ac-skeleton__npa {
    width: 52px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 50%, var(--neutral-100) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.ac-skeleton__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ac-skeleton__line1 {
    height: 14px;
    width: 60%;
    border-radius: 7px;
    background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 50%, var(--neutral-100) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    animation-delay: 0.1s;
}

.ac-skeleton__line2 {
    height: 10px;
    width: 40%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 50%, var(--neutral-100) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

/* ------------------------------------------------------------------
   Step 1 Premium — Reduced motion overrides
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    /* Pin pulse */
    .est-pin-pulse {
        animation: none;
    }

    /* Dropdown */
    .autocomplete-dropdown {
        transition: none;
    }
    .autocomplete-dropdown--open {
        opacity: 1;
        transform: none;
    }

    /* Items */
    .autocomplete-item {
        animation: none;
        opacity: 1;
        transform: none;
    }

    /* Post-selection info zone */
    .est-location-selected {
        transition: none;
    }
    .est-location-selected.visible {
        max-height: none;
        opacity: 1;
    }

    /* Premium badges */
    .est-badge {
        animation: none;
        opacity: 1;
        transform: none;
    }

    /* Address reveal */
    .est-address-reveal {
        transition: none;
    }
    .est-address-reveal.visible {
        max-height: none;
        opacity: 1;
        transform: none;
    }

    /* Skeletons — keep functional but no shimmer */
    .ac-skeleton__npa,
    .ac-skeleton__line1,
    .ac-skeleton__line2 {
        animation: none;
        background: var(--neutral-200);
    }

    /* Bottom sheet */
    .est-bottomsheet__panel {
        transition: none;
    }
    .est-bottomsheet__backdrop {
        transition: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Chevron */
    .autocomplete-item__chevron {
        transition: none;
    }

    /* Loading spinner — keep spinning (functional, not decorative) */
    /* .est-npa-loading__spinner stays animated */

    /* Error shake (already handled above) */
}

/* ======================================================================
   STEP 2 — Type selection animations (2A/2B)
   ====================================================================== */

/* Focus-visible for keyboard navigation on type cards */
.type-card:focus-visible {
    outline: 2px solid #1f1f1f;
    outline-offset: 2px;
}

/* Pill auto-set glow (etage auto-filled for attique/rez_jardin) */
.pill.auto-set {
    animation: pillAutoGlow 1s ease;
}
@keyframes pillAutoGlow {
    0%   { box-shadow: 0 0 0 0 rgba(31, 31, 31, 0.3); }
    50%  { box-shadow: 0 0 0 4px rgba(31, 31, 31, 0.1); }
    100% { box-shadow: none; }
}

/* ------------------------------------------------------------------
   Step 2 — Reduced motion overrides
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .est-step2a--hiding .type-card,
    .est-step2a--entering .type-card {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }

    .est-step2b,
    .est-step2b.est-step2b--visible {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .pill.auto-set { animation: none; }
    .pill.est-pill-pop { animation: none; }
    .est-inline-nav__next.est-btn-entering { animation: none; }
    .est-field-check:not(.hidden) { animation: none; }
    .est-q { transition: none; }
    .est-q.visible {
        transform: none;
    }
}

/* ==================================================================
   SPLASH SCREEN (auto 3s, badges stagger)
   ================================================================== */

.est-splash {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: var(--neutral-100);
    position: relative;
    overflow: hidden;
}
/* Subtle radial glow behind cascade */
.est-splash::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200,162,107,0.06) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.est-splash.hidden {
    display: none !important;
}

/* ------------------------------------------------------------------
   Cascade — immersive vertical flow, 2-col on desktop
   ------------------------------------------------------------------ */
.est-cascade {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 22rem;
    position: relative;
    z-index: 1;
}

.est-cascade__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--charcoal);
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.15;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.est-cascade__title.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.est-cascade__divider {
    height: 2px;
    width: 2.5rem;
    background: var(--gold-200);
    border-radius: 9999px;
    margin: 1rem 0 1.25rem;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.est-cascade__divider.visible {
    opacity: 1;
    transform: scaleX(1);
}

.est-cascade__messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.est-cascade__msg {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    opacity: 0;
    transform: translateX(-28px) scale(0.98);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.est-cascade__msg.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Alternate messages slide from right on even items */
.est-cascade__msg:nth-child(even) {
    transform: translateX(28px) scale(0.98);
}
.est-cascade__msg:nth-child(even).visible {
    transform: translateX(0) scale(1);
}

.est-cascade__icon {
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--neutral-100) 0%, var(--neutral-200) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.est-cascade__icon svg {
    width: 1rem;
    height: 1rem;
    color: var(--gold-200);
}

/* ---- Tablet (640px+) ---- */
@media (min-width: 640px) {
    .est-cascade {
        max-width: 30rem;
    }
    .est-cascade__title {
        font-size: 2.25rem;
    }
    .est-cascade__divider {
        width: 3rem;
        margin: 1.25rem 0 1.75rem;
    }
    .est-cascade__messages {
        gap: 0.625rem;
    }
    .est-cascade__msg {
        padding: 1rem 1.25rem;
        border-radius: 0.875rem;
        font-size: 0.9375rem;
    }
    .est-cascade__icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    .est-cascade__icon svg {
        width: 1.125rem;
        height: 1.125rem;
    }
}

/* ---- Desktop (1024px+) — 2-column grid for messages ---- */
@media (min-width: 1024px) {
    .est-splash::before {
        width: 900px;
        height: 900px;
    }
    .est-cascade {
        max-width: 48rem;
    }
    .est-cascade__title {
        font-size: 2.75rem;
        letter-spacing: -0.03em;
    }
    .est-cascade__divider {
        width: 3.5rem;
        margin: 1.5rem 0 2rem;
    }
    .est-cascade__messages {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .est-cascade__msg {
        padding: 1.125rem 1.375rem;
        border-radius: 1rem;
        font-size: 0.9375rem;
        gap: 0.875rem;
    }
    /* Reset alternating direction — on grid they all come from below */
    .est-cascade__msg,
    .est-cascade__msg:nth-child(even) {
        transform: translateY(20px) scale(0.97);
    }
    .est-cascade__msg.visible,
    .est-cascade__msg:nth-child(even).visible {
        transform: translateY(0) scale(1);
    }
    .est-cascade__icon {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 0.625rem;
    }
    .est-cascade__icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* ---- Wide desktop (1280px+) ---- */
@media (min-width: 1280px) {
    .est-cascade {
        max-width: 54rem;
    }
    .est-cascade__title {
        font-size: 3rem;
    }
    .est-cascade__messages {
        gap: 0.875rem;
    }
    .est-cascade__msg {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .est-cascade__title,
    .est-cascade__divider,
    .est-cascade__msg,
    .est-cascade__msg:nth-child(even) {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==================================================================
   TRANSITION OVERLAY (between steps)
   ================================================================== */

/* ==================================================================
   TRANSITION OVERLAY — Cinematic inter-step screens
   ================================================================== */
/* ==================================================================
   TRANSITION SCREENS — Frosted overlay with staggered reveals
   ================================================================== */

.est-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    height: 100vh;         /* fallback */
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 248, 248, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transform: scale(0.97);
    visibility: hidden;
    transition:
        opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.45s ease;
    overflow: hidden;
}

.est-transition.active {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

/* ---- Inner: always centered, never overflows ---- */

.est-transition__inner {
    width: 100%;
    max-height: 100%;
    padding: 2rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---- Step number — scale + fade in ---- */

.est-transition__step-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 6.5rem;
    font-weight: 300;
    line-height: 1;
    color: var(--neutral-300);
    pointer-events: none;
    user-select: none;
    margin-bottom: -0.75rem;
    opacity: 0;
    transform: scale(1.4);
    animation: est-num-in 0.7s 0.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes est-num-in {
    to { opacity: 1; transform: scale(1); }
}

/* ---- Title — clip-path reveal from bottom ---- */

.est-transition__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.5rem;
    clip-path: inset(100% 0 0 0);
    animation: est-clip-up 0.55s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes est-clip-up {
    to { clip-path: inset(0 0 0 0); }
}

/* ---- Subtitle — fade + slide ---- */

.est-transition__subtitle {
    font-size: 0.8125rem;
    color: #999;
    line-height: 1.5;
    margin: 0 0 1.5rem;
    max-width: 22rem;
    opacity: 0;
    transform: translateY(8px);
    animation: est-fade-up 0.45s 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes est-fade-up {
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Rule — draws from center outward ---- */

.est-transition__rule {
    width: 3rem;
    height: 1px;
    background: var(--neutral-300);
    margin: 0 auto 1.5rem;
    transform: scaleX(0);
    animation: est-line-draw 0.5s 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes est-line-draw {
    to { transform: scaleX(1); }
}

/* ---- Data lines ---- */

.est-transition__data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.est-transition__data-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #888;
    opacity: 0;
    transform: translateY(5px);
    animation: est-fade-up 0.35s ease forwards;
}

.est-transition__data-line:nth-child(1) { animation-delay: 1.3s; }
.est-transition__data-line:nth-child(2) { animation-delay: 1.6s; }

.est-transition__data-value {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.875rem;
}

/* ---- Progress bar ---- */

.est-transition__progress {
    width: 11rem;
    margin: 1.5rem auto 0;
    opacity: 0;
    animation: est-fade-up 0.35s 1.2s ease forwards;
}

.est-transition__progress-track {
    height: 3px;
    background: var(--neutral-200);
    border-radius: 9999px;
    overflow: hidden;
}

.est-transition__progress-fill {
    height: 100%;
    background: var(--charcoal);
    border-radius: 9999px;
    width: 0%;
    transition: width 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.est-transition__progress-pct {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.6875rem;
    color: #aaa;
    font-variant-numeric: tabular-nums;
}

/* ---- Criteria checklist ---- */

.est-transition__criteria {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    text-align: left;
}

.est-transition__criteria li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--neutral-300);
    padding: 0.3rem 0;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.est-transition__criteria li.checked {
    opacity: 1;
    transform: translateY(0);
    color: var(--charcoal);
}

.est-transition__criteria li .crit-check {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--charcoal);
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s 0.08s cubic-bezier(0.22, 1, 0.36, 1);
}

.est-transition__criteria li.checked .crit-check {
    opacity: 1;
    transform: scale(1);
}

/* ---- Tips variant: left-border cascade ---- */

.est-transition__criteria--tips {
    max-width: 22rem;
    text-align: left;
}

.est-transition__criteria--tips li {
    padding-left: 1rem;
    font-size: 0.8125rem;
    color: var(--neutral-300);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-left: 2px solid var(--neutral-200);
    transform: translateX(-8px);
}

.est-transition__criteria--tips li.checked {
    color: #555;
    border-left-color: var(--charcoal);
    transform: translateX(0);
}

/* ---- Legacy icon hidden ---- */

.est-transition__icon { display: none; }

/* ---- Responsive ---- */

@media (min-width: 640px) {
    .est-transition__inner { padding: 3rem 4rem; }
    .est-transition__step-num { font-size: 8rem; margin-bottom: -1rem; }
    .est-transition__title { font-size: 2rem; }
}

/* ==================================================================
   TRANSITION — prefers-reduced-motion
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
    .est-transition { transition: none; transform: none; }
    .est-transition.active { transform: none; }
    .est-transition__step-num,
    .est-transition__title,
    .est-transition__subtitle,
    .est-transition__rule,
    .est-transition__data-line,
    .est-transition__progress {
        animation: none !important;
        opacity: 1;
        transform: none;
        clip-path: none;
    }
    .est-transition__progress-fill { transition: none; }
    .est-transition__criteria li,
    .est-transition__criteria li .crit-check {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ==================================================================
   STEP 6 — Result: Stacked Layout
   Content full-width on top, interactive map below.
   ================================================================== */

/* ── Step 6 Container Override — Full Width ─────────────────────── */
#step-6 .est-step-container,
#step-6 .est-step-container.est-step-container--result {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* ── Layout — Stacked (result on top, map below) ───────────────── */
.est-step6__layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .est-step6__layout {
        gap: 3rem;
    }
}

/* Variant wrapper */
.est-step6__variant:not(.hidden) {
    display: block;
}

/* Step 6 — full-width centered layout (no split) */

/* Map column — full width below result */
.est-step6__map-col:not(.hidden) {
    display: block;
}

/* ── Editorial Header (centered, full-width) ─────────────────── */
.est-step6__header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    text-align: center;
    align-items: center;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .est-step6__header {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
}

.est-step6__accent {
    width: 2.5rem;
    height: 3px;
    background: var(--gold-200);
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.est-step6__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold-200);
}

.est-step6__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: -0.01em;
    line-height: 1.15;
}

@media (min-width: 640px) {
    .est-step6__title {
        font-size: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .est-step6__title {
        font-size: 2rem;
    }
}

.est-step6__subtitle {
    font-size: 0.875rem;
    color: rgba(0,0,0,0.45);
    line-height: 1.5;
    margin-top: 0.25rem;
}

@media (min-width: 640px) {
    .est-step6__subtitle {
        font-size: 1rem;
    }
}

/* ── Overline Labels ───────────────────────────────────────────── */
.est-step6__overline {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .est-step6__overline {
        font-size: 11px;
    }
}

/* ── Body Text (expert variant) ────────────────────────────────── */
.est-step6__body {
    font-size: 0.875rem;
    color: rgba(0,0,0,0.55);
    line-height: 1.7;
}

@media (min-width: 640px) {
    .est-step6__body {
        font-size: 1rem;
    }
}

/* ── Hero Price Overrides ──────────────────────────────────────── */
#step-6 .est-result-hero {
    text-align: center;
    padding: 1rem 0.5rem;
    background: linear-gradient(180deg, rgba(200,162,107,0.04) 0%, rgba(200,162,107,0) 100%);
    border-radius: 0.75rem;
    margin: -0.25rem -0.25rem 0;
}
@media (min-width: 640px) {
    #step-6 .est-result-hero {
        padding: 2rem 1rem;
        border-radius: 1rem;
        margin: -0.5rem -0.5rem 0;
    }
}

#step-6 .est-result-rangebar {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Stats ──────────────────────────────────────────────────────── */
.est-step6__stats-section {
    /* Container — no special treatment */
}

.est-step6__stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 400px) {
    .est-step6__stats-grid {
        gap: 0.75rem;
    }
}

@media (min-width: 640px) {
    .est-step6__stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Info Blocks (conditional) ─────────────────────────────────── */
.est-step6__info {
    border-left: 2px solid var(--gold-200);
    padding: 0.75rem 1rem;
}

.est-step6__info--warn {
    border-left-color: #f59e0b;
}

.est-step6__info-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.est-step6__info-text {
    font-size: 13px;
    color: rgba(0,0,0,0.5);
    line-height: 1.5;
}

.est-step6__info-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0,0,0,0.4);
}

.est-step6__info-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    margin-top: 0.25rem;
}

.est-step6__info--positive .est-step6__info-value {
    color: #16a34a;
}

.est-step6__info--energy .est-step6__info-value {
    color: #0284c7;
}

/* ── Comparison Block ──────────────────────────────────────────── */
.est-step6__compare {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* ── CTAs — Charcoal Primary ───────────────────────────────────── */
#step-6 .est-result-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-top: 0.5rem;
}

@media (min-width: 640px) {
    #step-6 .est-result-ctas {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* All CTAs share one row */
    #step-6 .est-cta-v2--primary {
        flex: 1 1 auto;
    }

    #step-6 .est-cta-v2--secondary,
    #step-6 .est-cta-v2--ghost {
        flex: 1 1 auto;
    }
}

/* ── Disclaimer — Left-aligned ─────────────────────────────────── */
#step-6 .est-disclaimer-toggle {
    justify-content: flex-start;
}

#step-6 .est-disclaimer-text {
    text-align: left;
}

/* ── Analysis Items — Checkmark List ──────────────────────────── */
#step-6 .est-result-analysis {
    border-top: 1px solid #f0f0f0;
}

/* ── Map Label ─────────────────────────────────────────────────── */
.est-step6__map-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-200);
    margin-bottom: 0.75rem;
}

@media (min-width: 1024px) {
    .est-step6__map-label {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1rem;
    }
}

/* ── Map Wrapper — Full viewport immersive ─────────────────── */
#step-6 .est-map-wrapper {
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid var(--neutral-200);
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}


/* ── Map Layout — Full viewport height ─────────────────────── */
#step-6 .est-map-layout {
    display: flex;
    flex-direction: column;
    height: 50vh;
    min-height: 320px;
    max-height: 500px;
    overflow: hidden;
}
@media (min-width: 400px) {
    #step-6 .est-map-layout {
        height: 55vh;
        min-height: 350px;
        max-height: 550px;
    }
}

@media (min-width: 768px) {
    #step-6 .est-map-layout {
        flex-direction: row;
        height: calc(100vh - var(--header-h, 100px));
        min-height: 500px;
    }
}

/* Carte = flex:1 (all remaining space) */
#step-6 .est-map-layout__map {
    flex: 1;
    min-width: 0;
    min-height: 0;
}

#step-6 .est-map-container {
    height: 100%;
    border-radius: 0;
    border: none;
}

/* Panel = 320px fixed on desktop */
@media (min-width: 768px) {
    #step-6 .est-map-layout__panel {
        display: flex;
        flex-direction: column;
        position: relative;
        top: auto;
        right: auto;
        flex: 0 0 320px;
        width: 320px;
        max-width: 320px;
        background: #fff;
        border: none;
        border-left: 1px solid var(--neutral-200);
        border-radius: 0;
        padding: 1.5rem 1.25rem;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        overflow-y: auto;
        max-height: none;
        z-index: auto;
    }

    /* Gold accent bar when commune selected */
    #step-6 .est-map-layout__panel.est-map-layout__panel--active {
        border-color: rgba(200,162,107,0.3);
        box-shadow: inset 3px 0 0 var(--gold-200);
    }
}

/* ── Map label — hidden everywhere ────────────────────────────── */
#step-6 .est-step6__map-label {
    display: none;
}

/* ── Attribution — hidden on desktop ─────────────────────────── */
@media (min-width: 1024px) {
    #step-6 .est-map-attribution {
        display: none;
    }
}

/* ── Stagger Entrance — Step 6 Reveal ────────────────────────── */
.est-step6-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.est-step6-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.est-step6-reveal--fade {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.est-step6-reveal--fade.visible {
    opacity: 1;
}

/* Result card fade-in entrance */
.est-step6__variant .est-result-card {
    opacity: 0;
    transform: translateY(16px);
    animation: resultCardFadeIn 0.5s ease-out 0.15s forwards;
}

@keyframes resultCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Fullscreen Toggle Button ────────────────────────────────── */
.est-map-fs-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 8;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 0 rgba(200,162,107,0);
    cursor: pointer;
    color: var(--charcoal);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.est-map-fs-btn:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 0 0 2px rgba(200,162,107,0.25);
    transform: scale(1.08);
}

.est-map-fs-btn:active {
    transform: scale(0.94);
    transition-duration: 0.1s;
}

/* Show expand icon by default, hide collapse */
.est-map-fs-btn__collapse { display: none; }
.est-map-fs-btn__expand   { display: block; }

/* Swap icons in fullscreen */
.est-map-fs .est-map-fs-btn__collapse { display: block; }
.est-map-fs .est-map-fs-btn__expand   { display: none; }

/* ── Fullscreen ──────────────────────────────────────────────────
   Strategy: JS moves .est-map-wrapper out of #step-6 into <body>
   when entering fullscreen, so position:fixed is not broken by
   the parent's will-change/transform. No !important needed.
   ─────────────────────────────────────────────────────────────── */

/* (close button removed — fullscreen toggle button handles exit) */

/* Wrapper — fixed fullscreen overlay */
.est-map-wrapper.est-map-fs {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #fff;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    transform: none;
    border: none;
    border-radius: 0;
    max-width: none;
    animation: est-fs-enter 300ms ease-out;
}

@supports (height: 100dvh) {
    .est-map-wrapper.est-map-fs {
        height: 100dvh;
    }
}

.est-map-wrapper.est-map-fs .est-map-layout {
    height: 100%;
    max-width: none;
    border-radius: 0;
    min-height: 0;
    overflow: hidden;
}

.est-map-wrapper.est-map-fs .est-map-container {
    height: 100%;
    max-height: none;
    min-height: 0;
    border-radius: 0;
    border: none;
}

.est-map-wrapper.est-map-fs .est-map-attribution {
    display: none;
}

.est-map-wrapper.est-map-fs .est-map-fs-btn {
    top: max(16px, env(safe-area-inset-top, 16px));
    left: 16px;
    width: 46px;
    height: 46px;
}

/* Desktop fullscreen: map + panel side by side */
@media (min-width: 768px) {
    .est-map-wrapper.est-map-fs .est-map-layout {
        display: flex;
        flex-direction: row;
    }

    .est-map-wrapper.est-map-fs .est-map-layout__map {
        flex: 1;
        height: 100%;
        min-height: 0;
    }

    .est-map-wrapper.est-map-fs .est-map-layout__panel {
        display: flex;
        flex: 0 0 320px;
        width: 320px;
        max-width: 320px;
        height: 100%;
        border-radius: 0;
        border-top: none;
        border-bottom: none;
        border-right: none;
    }
}

/* Mobile fullscreen: map full, panel hidden */
@media (max-width: 767px) {
    .est-map-wrapper.est-map-fs .est-map-layout {
        display: flex;
        flex-direction: column;
    }

    .est-map-wrapper.est-map-fs .est-map-layout__map {
        flex: 1;
        height: 0;
        min-height: 0;
    }

    .est-map-wrapper.est-map-fs .est-map-layout__panel {
        display: none;
    }

    .est-map-wrapper.est-map-fs .est-map-fs-btn {
        top: max(12px, env(safe-area-inset-top, 12px));
        left: 12px;
    }
}

@keyframes est-fs-enter {
    from { opacity: 0.7; }
    to   { opacity: 1; }
}

/* Lock body scroll when fullscreen is active */
body.est-map-body-lock {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Panel empty state — cleaner */
#step-6 .est-map-panel__empty {
    padding: 2rem 0;
}

#step-6 .est-map-panel__empty svg {
    display: none;
}







/* ==================================================================
   MAP VALAIS — Carte interactive Mapbox
   ================================================================== */

/* ── Wrapper (base — overridden by #step-6 scope) ──────────────── */
.est-map-wrapper {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--neutral-200);
}

/* ── Layout: map + side panel ───────────────────────────────────── */
.est-map-layout {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .est-map-layout {
        flex-direction: row;
        align-items: stretch;
    }
}

.est-map-layout__map {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* ── Desktop panel ─────────────────────────────────────────────── */
.est-map-layout__panel {
    display: none;
}

@media (min-width: 768px) {
    .est-map-layout__panel {
        display: flex;
        flex-direction: column;
        width: 320px;
        flex-shrink: 0;
        background: #fff;
        border-left: 1px solid var(--neutral-200);
        padding: 1.5rem 1.25rem;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    /* Active indicator — gold accent when commune is selected */
    .est-map-layout__panel--active {
        border-color: rgba(200,162,107,0.3);
        box-shadow: inset 3px 0 0 var(--gold-200);
    }
}

/* ── Mobile bottom sheet ──────────────────────────────────────── */
.est-map-mobile-card {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

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

@media (min-width: 768px) {
    .est-map-mobile-card {
        display: none !important; /* desktop uses side panel */
    }
}

/* Drag handle */
.est-map-mobile-card::before {
    content: '';
    display: block;
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 3px;
    margin: 4px auto 12px;
}

.est-map-mobile-card__name {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.15;
}

.est-map-mobile-card__district {
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.est-map-mobile-card__badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-200);
    background: rgba(200,162,107,0.08);
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.est-map-mobile-card__prices {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--neutral-200);
}

.est-map-mobile-card__price-col {
    flex: 1;
}

.est-map-mobile-card__price-label {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    display: block;
}

.est-map-mobile-card__price-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--charcoal);
    margin-top: 2px;
    display: block;
}

.est-map-mobile-card__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0,0,0,0.06);
    border-radius: 50%;
    color: #888;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s ease;
}

.est-map-mobile-card__close:hover {
    background: rgba(0,0,0,0.1);
}

/* Bottom sheet stats row */
.est-map-mobile-card__stats {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--neutral-200);
}

.est-map-mobile-card__stat {
    flex: 1;
    text-align: center;
}

.est-map-mobile-card__stat-label {
    display: block;
    font-size: 9px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.est-map-mobile-card__stat-value {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--charcoal);
    margin-top: 2px;
}

.est-map-mobile-card__stat-value.trend-up { color: #16a34a; }
.est-map-mobile-card__stat-value.trend-down { color: #dc2626; }

/* Bottom sheet CTA */
.est-map-mobile-card__cta {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-top: 12px;
    background: var(--charcoal);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    min-height: 44px;
    transition: background 0.2s ease;
}

.est-map-mobile-card__cta:hover {
    background: #333;
}

/* ── Map container ──────────────────────────────────────────────── */
.est-map-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f5f3ef;
    border-radius: 0;
    border: none;
}

/* ── Desktop panel states ──────────────────────────────────────── */
.est-map-panel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px 0;
    text-align: center;
    opacity: 0.7;
}

.est-map-panel__content {
    animation: est-map-panel-in 0.25s ease both;
}

.est-map-panel__content--station {
    animation: est-map-panel-in 0.25s ease both;
}

@keyframes est-map-panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.est-map-panel__name {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
    .est-map-panel__name {
        font-size: 26px;
    }
}

.est-map-panel__district {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.est-map-panel__badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-200);
    background: rgba(200,162,107,0.08);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.est-map-panel__divider {
    height: 1px;
    background: var(--neutral-200);
    margin: 16px 0;
}

.est-map-panel__stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
}

.est-map-panel__stat-label {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.est-map-panel__stat-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--charcoal);
    white-space: nowrap;
    text-align: right;
}

@media (min-width: 1024px) {
    .est-map-panel__stat-label {
        font-size: 12px;
    }
    .est-map-panel__stat-value {
        font-size: 14px;
    }
}

.est-map-panel__stat-value.trend-up   { color: #16a34a; }
.est-map-panel__stat-value.trend-down { color: #dc2626; }


/* ── Panel CTA button ────────────────────────────────────────── */
.est-map-panel__cta {
    display: block;
    width: 100%;
    padding: 10px 16px;
    margin-top: 8px;
    background: var(--gold-200);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.est-map-panel__cta:hover {
    background: var(--gold-300);
    transform: translateY(-1px);
}

.est-map-panel__cta:active {
    transform: scale(0.98);
}

/* Legend inside panel */
.est-map-panel__legend {
    margin-top: auto;
    padding-top: 12px;
}

/* ── Loader ─────────────────────────────────────────────────────── */
.est-map-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3ef;
    z-index: 5;
}

.est-map-loader__spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--neutral-300);
    border-top-color: var(--gold-200);
    border-radius: 50%;
    animation: est-map-spin 0.8s linear infinite;
}

@keyframes est-map-spin {
    to { transform: rotate(360deg); }
}

/* ── Legend ──────────────────────────────────────────────────────── */
.est-map-legend__title {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    margin-bottom: 6px;
}

.est-map-legend__gradient {
    flex: 1;
    min-width: 120px;
    max-width: 260px;
}

.est-map-legend__bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #ede9e3, #ddd5c8, #d4c4a8, #c8a26b, #b5895a, #8b6914, #6b4f10);
}

.est-map-legend__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
    font-size: 9px;
    color: #aaa;
    font-weight: 500;
}

.est-map-legend__station-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f1f1f;
    border: 2px solid #c8a26b;
    flex-shrink: 0;
}

.est-map-legend__station-label {
    font-size: 10px;
    color: #999;
    font-weight: 500;
}

/* ── Attribution ────────────────────────────────────────────────── */
.est-map-attribution {
    max-width: 1400px;
    margin: 6px auto 0;
    padding: 0 4px;
    font-size: 9px;
    color: #bbb;
    text-align: right;
}

.est-map-attribution a {
    color: #aaa;
    text-decoration: none;
}

.est-map-attribution a:hover {
    text-decoration: underline;
}

/* ── Station markers ────────────────────────────────────────────── */
.est-map-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.15s ease;
}

.est-map-marker:hover {
    transform: translateY(-1px);
}

.est-map-marker__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--charcoal);
    border: 2.5px solid var(--gold-200);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2), 0 0 0 2px rgba(200,162,107,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.est-map-marker--hover .est-map-marker__dot {
    transform: scale(1.4);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 0 0 3px rgba(200,162,107,0.25);
}

.est-map-marker__label {
    margin-top: 3px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--charcoal);
    text-shadow:
        -1px -1px 0 #fff, 1px -1px 0 #fff,
        -1px  1px 0 #fff, 1px  1px 0 #fff,
        0 0 4px rgba(255,255,255,0.8);
    white-space: nowrap;
    pointer-events: none;
    line-height: 1;
    letter-spacing: 0.01em;
}

@media (min-width: 640px) {
    .est-map-marker__label {
        font-size: 11px;
    }
}

/* ── User commune label ─────────────────────────────────────────── */
.est-map-user-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    animation: est-map-label-in 0.5s ease both;
}

.est-map-user-label span {
    display: inline-block;
    padding: 3px 10px;
    background: #c8a26b;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(200,162,107,0.4);
}

@media (min-width: 640px) {
    .est-map-user-label span {
        font-size: 11px;
        padding: 4px 12px;
    }
}

.est-map-user-label svg {
    margin-top: -1px;
}

@keyframes est-map-label-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Mapbox Popup overrides (mobile commune popup) ────────────── */
.mapboxgl-popup-content {
    border-radius: 12px !important;
    padding: 12px 14px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.04) !important;
}

.mapboxgl-popup-close-button {
    font-size: 18px;
    color: #aaa;
    padding: 4px 8px;
    right: 2px;
    top: 2px;
}

.mapboxgl-popup-close-button:hover {
    color: var(--charcoal);
    background: none;
}

.mapboxgl-popup-tip {
    border-top-color: #fff !important;
}

.est-popup__name {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.2;
    margin-bottom: 2px;
}

.est-popup__price {
    font-size: 12px;
    font-weight: 600;
    color: var(--charcoal);
}

.est-popup__meta {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.est-popup__meta .trend-up { color: #16a34a; font-weight: 600; }
.est-popup__meta .trend-down { color: #dc2626; font-weight: 600; }

.est-popup__action {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--neutral-200);
}

.est-popup__action a {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-200);
    text-decoration: none;
}

.est-popup__action a:hover {
    color: var(--gold-300);
}

/* ── Commune detail section (mobile, below map) ──────────────── */
.est-map-detail {
    margin-top: 0;
    overflow: hidden;
}

/* Hidden on desktop — panel serves this purpose */
@media (min-width: 768px) {
    .est-map-detail {
        display: none !important;
    }
}


.est-map-detail__body {
    padding: 20px;
}

.est-map-detail__name {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.15;
}

.est-map-detail__district {
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-top: 4px;
}

.est-map-detail__prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--neutral-200);
}

.est-map-detail__price-label {
    display: block;
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.est-map-detail__price-value {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--charcoal);
    margin-top: 3px;
}

.est-map-detail__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--neutral-200);
}

.est-map-detail__stat-item {
    text-align: center;
}

.est-map-detail__stat-label {
    display: block;
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.est-map-detail__stat-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--charcoal);
    margin-top: 2px;
}

.est-map-detail__stat-value.trend-up   { color: #16a34a; }
.est-map-detail__stat-value.trend-down { color: #dc2626; }

.est-map-detail__cta {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-top: 20px;
    background: var(--gold-200);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.est-map-detail__cta:hover {
    background: var(--gold-300);
}

/* ── Filter toggle (appart/maison) — top-center, rounded pills ── */
.est-map-filter {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    display: flex;
    gap: 6px;
}

.est-map-filter__btn {
    padding: 7px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 9999px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.est-map-filter__btn--active {
    color: #fff;
    background: var(--charcoal);
    border-color: var(--charcoal);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.est-map-filter__btn:not(.est-map-filter__btn--active):hover {
    color: var(--charcoal);
    background: rgba(255,255,255,0.95);
    border-color: rgba(0,0,0,0.15);
}

/* Fullscreen: keep top-center */
.est-map-wrapper.est-map-fs .est-map-filter {
    top: max(16px, env(safe-area-inset-top, 16px));
    left: 50%;
    transform: translateX(-50%);
}

/* ── Mobile legend (overlay on map) ────────────────────────────── */
.est-map-legend-mobile {
    display: none; /* hidden on desktop — legend is in panel */
}

@media (max-width: 767px) {
    .est-map-legend-mobile {
        display: block;
        position: absolute;
        bottom: 10px;
        right: 10px;
        z-index: 6;
        background: rgba(255,255,255,0.88);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 8px;
        padding: 6px 10px;
        box-shadow: 0 1px 8px rgba(0,0,0,0.06);
        max-width: 140px;
    }
}

.est-map-legend-mobile__title {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.est-map-legend-mobile__bar {
    height: 5px;
    border-radius: 3px;
    background: linear-gradient(to right, #ede9e3, #ddd5c8, #d4c4a8, #c8a26b, #b5895a, #8b6914, #6b4f10);
}

.est-map-legend-mobile__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
    font-size: 8px;
    color: #aaa;
    font-weight: 500;
}

/* In fullscreen mobile: semi-transparent overlay */
.est-map-wrapper.est-map-fs .est-map-legend-mobile {
    background: rgba(255,255,255,0.7);
}

/* ── Mapbox overrides ───────────────────────────────────────────── */
#map-valais .mapboxgl-ctrl-top-right {
    top: 10px;
    right: 10px;
}

#map-valais .mapboxgl-ctrl-group {
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
}

#map-valais .mapboxgl-ctrl-group button {
    width: 36px;
    height: 36px;
}

#map-valais .mapboxgl-ctrl-group button + button {
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* Mapbox canvas cursor for interactive communes */
#map-valais .mapboxgl-canvas {
    cursor: default;
}

/* Hide Mapbox default attribution (we show our own) */
#map-valais .mapboxgl-ctrl-attrib {
    display: none;
}

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .est-map-loader__spinner {
        animation: none;
    }
    .est-map-marker__dot {
        transition: none;
    }
    .est-map-user-label {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   PDF MODAL
   ═══════════════════════════════════════════════════════════ */

.est-pdf-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 15, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    animation: est-pdf-fade-in 250ms ease-out forwards;
}
.est-pdf-modal-backdrop.hidden { display: none; }

@keyframes est-pdf-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.est-pdf-modal {
    position: relative;
    width: 90%;
    max-width: 440px;
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 28px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    transform: translateY(12px) scale(0.97);
    animation: est-pdf-slide-up 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes est-pdf-slide-up {
    from { transform: translateY(12px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Close button */
.est-pdf-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #999;
    border-radius: 8px;
    cursor: pointer;
    transition: background 150ms, color 150ms;
}
.est-pdf-modal__close:hover {
    background: #f5f5f5;
    color: #1f1f1f;
}

/* Header */
.est-pdf-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.est-pdf-modal__icon {
    width: 28px;
    height: 28px;
    color: #c8a26b;
    flex-shrink: 0;
}

.est-pdf-modal__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #1f1f1f;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Question text */
.est-pdf-modal__question {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Radio choices */
.est-pdf-modal__choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.est-pdf-modal__radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #e8e5e0;
    transition: border-color 200ms, background 200ms;
}
.est-pdf-modal__radio:hover {
    border-color: #d8d2c8;
    background: #fcfbf9;
}
.est-pdf-modal__radio:has(input:checked) {
    border-color: #c8a26b;
    background: rgba(200, 162, 107, 0.05);
}

.est-pdf-modal__radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.est-pdf-modal__radio-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d0ccc4;
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    transition: border-color 200ms;
}
.est-pdf-modal__radio:has(input:checked) .est-pdf-modal__radio-check {
    border-color: #c8a26b;
}
.est-pdf-modal__radio:has(input:checked) .est-pdf-modal__radio-check::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #c8a26b;
}

.est-pdf-modal__radio-label {
    font-size: 0.875rem;
    color: #1f1f1f;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.est-pdf-modal__radio-email {
    font-size: 0.8rem;
    color: #c8a26b;
    font-weight: 500;
}

/* Other email input */
.est-pdf-modal__other-wrap {
    padding-left: 42px;
    margin-top: -4px;
}
.est-pdf-modal__other-wrap.hidden { display: none; }

.est-pdf-modal__input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    border: 1.5px solid #e8e5e0;
    border-radius: 8px;
    background: #fff;
    color: #1f1f1f;
    outline: none;
    transition: border-color 200ms, box-shadow 200ms;
    font-family: inherit;
}
.est-pdf-modal__input::placeholder { color: #b5b0a8; }
.est-pdf-modal__input:focus {
    border-color: #c8a26b;
    box-shadow: 0 0 0 3px rgba(200, 162, 107, 0.12);
}
.est-pdf-modal__input.is-invalid {
    border-color: #d44;
}

.est-pdf-modal__input-error {
    display: block;
    font-size: 0.78rem;
    color: #d44;
    margin-top: 4px;
}
.est-pdf-modal__input-error.hidden { display: none; }

/* Feedback message */
.est-pdf-modal__feedback {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    margin-bottom: 16px;
    line-height: 1.4;
}
.est-pdf-modal__feedback.hidden { display: none; }
.est-pdf-modal__feedback.is-success {
    background: rgba(45, 138, 78, 0.08);
    color: #2d8a4e;
    border: 1px solid rgba(45, 138, 78, 0.15);
}
.est-pdf-modal__feedback.is-error {
    background: rgba(221, 68, 68, 0.08);
    color: #d44;
    border: 1px solid rgba(221, 68, 68, 0.15);
}

/* Action buttons */
.est-pdf-modal__actions {
    display: flex;
    gap: 10px;
}

.est-pdf-modal__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 200ms, color 200ms, box-shadow 200ms, transform 100ms;
    font-family: inherit;
    line-height: 1;
}
.est-pdf-modal__btn:active { transform: scale(0.97); }

.est-pdf-modal__btn--ghost {
    background: #f5f3ef;
    color: #1f1f1f;
}
.est-pdf-modal__btn--ghost:hover {
    background: #ece8e1;
}

.est-pdf-modal__btn--primary {
    background: #c8a26b;
    color: #fff;
}
.est-pdf-modal__btn--primary:hover {
    background: #b5895a;
    box-shadow: 0 2px 8px rgba(200, 162, 107, 0.3);
}
.est-pdf-modal__btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile tweak */
@media (max-width: 480px) {
    .est-pdf-modal {
        padding: 24px 20px 22px;
        border-radius: 14px;
    }
    .est-pdf-modal__actions {
        flex-direction: column;
    }
}


/* ======================================================================
   CALLBACK PAGE — Phone-first contact (2026 premium)
   ====================================================================== */

.est-callback {
    min-height: 100vh;
}

/* ── Hero section ──────────────────────────────────────────────────── */
.est-cb-hero {
    background: #fff;
    border-bottom: 1px solid var(--neutral-200);
    padding: 2rem 0 2.5rem;
}
.est-cb-hero__inner {
    max-width: 540px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Back link */
.est-cb-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #aaa;
    text-decoration: none;
    transition: color 0.15s;
    align-self: flex-start;
    margin-bottom: 2rem;
}
.est-cb-back:hover { color: var(--charcoal); }

/* Phone ring animation */
.est-cb-phone-ring {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.est-cb-phone-ring__icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--charcoal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(31, 31, 31, 0.15);
}
.est-cb-phone-ring__pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--gold-200);
    opacity: 0;
    animation: cb-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes cb-pulse {
    0%   { transform: scale(0.85); opacity: 0.6; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Title */
.est-cb-hero__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}
@media (min-width: 640px) {
    .est-cb-hero__title {
        font-size: 2.4rem;
    }
}

/* Subtitle */
.est-cb-hero__subtitle {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .est-cb-hero__subtitle {
        font-size: 15px;
    }
}

/* Badge */
.est-cb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(200, 162, 107, 0.08);
    color: var(--gold-300);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ── Content section ───────────────────────────────────────────────── */
.est-cb-content {
    padding: 2rem 0 3rem;
}
.est-cb-content__inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── Recap chip ────────────────────────────────────────────────────── */
.est-cb-recap {
    background: #fff;
    border: 1px solid var(--neutral-200);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.est-cb-recap__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.est-cb-recap__tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold-300);
    background: rgba(200, 162, 107, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
}
.est-cb-recap__divider {
    width: 1px;
    height: 12px;
    background: var(--neutral-300);
    flex-shrink: 0;
}
.est-cb-recap__detail {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}
.est-cb-recap__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: -0.01em;
}
.est-cb-recap__expert {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-300);
}

/* ── Sections ──────────────────────────────────────────────────────── */
.est-cb-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.est-cb-section__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: -0.01em;
}
@media (min-width: 640px) {
    .est-cb-section__title {
        font-size: 16px;
    }
}
.est-cb-section__hint {
    font-size: 13px;
    color: #999;
    margin-top: -4px;
}

/* ── Time slots ────────────────────────────────────────────────────── */
.est-cb-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.est-cb-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    border-radius: 14px;
    border: 1.5px solid #e8e8e8;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.est-cb-slot:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.est-cb-slot:active {
    transform: scale(0.97);
}
.est-cb-slot.active {
    border-color: var(--charcoal);
    background: var(--charcoal);
    box-shadow: 0 4px 16px rgba(31,31,31,0.12);
}
.est-cb-slot.active .est-cb-slot__icon { color: var(--gold-200); }
.est-cb-slot.active .est-cb-slot__label { color: #fff; }
.est-cb-slot.active .est-cb-slot__time { color: rgba(255,255,255,0.5); }

.est-cb-slot__icon {
    width: 24px;
    height: 24px;
    color: #bbb;
    transition: color 0.2s;
}
.est-cb-slot__icon svg {
    width: 100%;
    height: 100%;
}
.est-cb-slot__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal);
    transition: color 0.2s;
}
.est-cb-slot__time {
    font-size: 11px;
    color: #bbb;
    transition: color 0.2s;
}

@media (max-width: 380px) {
    .est-cb-slot {
        padding: 12px 6px;
    }
    .est-cb-slot__label {
        font-size: 12px;
    }
}

/* ── Fields ────────────────────────────────────────────────────────── */
.est-cb-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.est-cb-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.est-cb-field__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.est-cb-field--phone {
    position: relative;
}
.est-cb-field--phone .est-input {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 1rem;
}
@media (min-width: 640px) {
    .est-cb-field--phone .est-input {
        font-size: 20px;
        padding: 1.125rem 1.25rem;
    }
}

/* ── Collapsible message ───────────────────────────────────────────── */
.est-cb-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    transition: all 0.15s ease;
}
.est-cb-toggle:hover {
    border-color: #ddd;
    color: var(--charcoal);
}
.est-cb-toggle--open {
    border-color: var(--gold-200);
    color: var(--charcoal);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}
.est-cb-toggle__chevron {
    transition: transform 0.25s ease;
}
.est-cb-toggle--open .est-cb-toggle__chevron {
    transform: rotate(180deg);
}

.est-cb-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.est-cb-collapse--open {
    max-height: 200px;
}
.est-cb-collapse .est-input {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
    border-color: var(--gold-200);
}

/* ── CTA ───────────────────────────────────────────────────────────── */
.est-cb-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 0.5rem;
}

.est-cb-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    background: var(--charcoal);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    box-shadow: 0 4px 20px rgba(31, 31, 31, 0.15);
    position: relative;
    overflow: hidden;
}
.est-cb-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(200,162,107,0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}
.est-cb-cta:hover {
    background: #111;
    box-shadow: 0 6px 28px rgba(31, 31, 31, 0.22);
    transform: translateY(-1px);
}
.est-cb-cta:hover::before {
    opacity: 1;
}
.est-cb-cta:active {
    transform: translateY(0) scale(0.98);
}
.est-cb-cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.est-cb-cta__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Loading state */
.est-cb-cta--loading .est-cb-cta__icon {
    animation: cb-spin 1s linear infinite;
}
@keyframes cb-spin {
    to { transform: rotate(360deg); }
}

/* Shake animation */
.est-cb-cta--shake {
    animation: cb-shake 0.4s ease;
}
@keyframes cb-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

.est-cb-error {
    font-size: 13px;
    color: #dc2626;
    text-align: center;
}

/* ── Success state ─────────────────────────────────────────────────── */
.est-cb-success {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 24px;
}
.est-cb-success__inner {
    text-align: center;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Animated check circle */
.est-cb-success__check {
    width: 72px;
    height: 72px;
    margin-bottom: 1.5rem;
}
.est-cb-success__check-svg {
    width: 100%;
    height: 100%;
}
.est-cb-success__check-circle {
    stroke: var(--charcoal);
    stroke-width: 2;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: cb-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.est-cb-success__check-path {
    stroke: var(--gold-200);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: cb-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}
@keyframes cb-circle {
    to { stroke-dashoffset: 0; }
}
@keyframes cb-check {
    to { stroke-dashoffset: 0; }
}

.est-cb-success__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
@media (min-width: 640px) {
    .est-cb-success__title {
        font-size: 2.5rem;
    }
}

.est-cb-success__text {
    font-size: 14px;
    color: #888;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
    .est-cb-success__text {
        font-size: 15px;
    }
}

/* Phone confirmation card */
.est-cb-success__phone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--neutral-200);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    color: var(--charcoal);
}
.est-cb-success__phone svg {
    color: var(--gold-200);
    flex-shrink: 0;
}
.est-cb-success__phone-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.est-cb-success__phone-number {
    font-size: 17px;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: 0.02em;
}

/* ── Mobile refinements ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .est-cb-hero {
        padding: 1.5rem 0 2rem;
    }
    .est-cb-back {
        margin-bottom: 1.5rem;
    }
    .est-cb-phone-ring {
        width: 52px;
        height: 52px;
    }
    .est-cb-phone-ring__icon {
        width: 46px;
        height: 46px;
    }
    .est-cb-phone-ring__icon svg {
        width: 22px;
        height: 22px;
    }
    .est-cb-content__inner {
        gap: 1.5rem;
    }
    .est-cb-cta {
        padding: 14px 20px;
        font-size: 14px;
        min-height: 52px;
        border-radius: 14px;
    }
}
