
:root {
    --est-navy: #072b5b;
    --est-deep: #041d3d;
    --est-orange: #ff7900;
    --est-blue: #3155ff;
    --est-ink: #172033;
    --est-muted: #5b667a;
    --est-bg: #f6f8fc;
    --est-line: #dfe5ee;
    --est-good: #14804a;
    --est-radius: 18px;
    --est-shadow: 0 18px 45px rgba(4,29,61,.11)
}

.page-offerte-builder {
    background: var(--est-bg);
    color: var(--est-ink)
}

    .page-offerte-builder .menu-list {
        display: flex;
        align-items: center;
        gap: 8px;
        list-style: none;
        margin: 0;
        padding: 0
    }

    .page-offerte-builder .menu-link {
        display: block;
        padding: 12px 14px;
        border-radius: 8px;
        color: #fff;
        font-weight: 800
    }

        .page-offerte-builder .menu-link:hover, .page-offerte-builder .menu-link.is-current {
            background: rgba(255,255,255,.12);
            color: #ff9a3c
        }

.estimate-shell {
    width: min(calc(100% - 32px),1180px);
    margin-inline: auto
}

.estimate-hero {
    padding: 64px 0;
    background: radial-gradient(circle at 80% 20%,rgba(255,121,0,.2),transparent 28%),linear-gradient(135deg,#eef5ff,#fff 57%,#fff4e8)
}

.estimate-hero-grid {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: 48px;
    align-items: center
}

.estimate-kicker, .step-heading > p {
    margin: 0 0 10px;
    color: var(--est-orange);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase
}

.estimate-hero h1 {
    margin: 0;
    color: var(--est-navy);
    font-size: clamp(2.5rem,6vw,5rem);
    line-height: 1;
    letter-spacing: -.05em
}

.estimate-lead {
    max-width: 820px;
    margin: 24px 0 0;
    color: var(--est-muted);
    font-size: 1.1rem;
    line-height: 1.75
}

.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    font-weight: 800
}

    .hero-benefits li:before {
        content: '✓';
        margin-right: 8px;
        color: var(--est-good)
    }

.hero-note {
    padding: 26px;
    border-radius: var(--est-radius);
    background: var(--est-deep);
    color: #fff;
    box-shadow: var(--est-shadow)
}

    .hero-note strong {
        font-size: 1.2rem
    }

    .hero-note p {
        margin: 10px 0 0;
        color: rgba(255,255,255,.78);
        line-height: 1.65
    }

.builder-section {
    padding: 42px 0 80px
}

.builder-topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    padding: 18px 4px
}

    .builder-topbar > div:first-child {
        display: grid;
        gap: 4px
    }

    .builder-topbar span {
        color: var(--est-muted);
        font-size: .88rem
    }

    .builder-topbar strong {
        font-size: 1.2rem
    }

.confidence-mini {
    text-align: right
}

    .confidence-mini strong {
        display: block;
        color: var(--est-good)
    }

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #e2e8f0;
    margin-bottom: 24px
}

    .progress-track span {
        display: block;
        width: 12.5%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg,var(--est-orange),#ffad60);
        transition: width .3s ease
    }

.builder-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 320px;
    gap: 24px;
    align-items: start
}

#estimateForm {
    min-width: 0;
    padding: clamp(22px,4vw,42px);
    border: 1px solid #e8edf4;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--est-shadow)
}

.form-step {
    display: none
}

    .form-step.is-active {
        display: block;
        animation: stepIn .28s ease
    }

@keyframes stepIn {
    from {
        opacity: .2;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.step-heading {
    margin-bottom: 28px
}

    .step-heading h2 {
        margin: 0;
        color: var(--est-navy);
        font-size: clamp(1.65rem,3vw,2.35rem);
        letter-spacing: -.03em
    }

    .step-heading > span {
        display: block;
        margin-top: 10px;
        color: var(--est-muted);
        line-height: 1.65
    }

.choice-grid {
    display: grid;
    gap: 16px
}

.choice-grid-3 {
    grid-template-columns: repeat(3,1fr)
}

.choice-card, .addon-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 170px;
    padding: 22px;
    border: 2px solid var(--est-line);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: .2s
}

    .choice-card:hover, .addon-card:hover {
        border-color: #a9b9dc;
        transform: translateY(-2px)
    }

    .choice-card:has(input:checked), .addon-card:has(input:checked) {
        border-color: var(--est-orange);
        box-shadow: 0 0 0 4px rgba(255,121,0,.1)
    }

    .choice-card input, .addon-card input {
        position: absolute;
        top: 16px;
        right: 16px;
        accent-color: var(--est-orange)
    }

    .choice-icon, .addon-card > span {
        font-size: 2rem
    }

    .choice-card strong, .addon-card strong {
        font-size: 1.1rem
    }

    .choice-card small, .addon-card small {
        color: var(--est-muted);
        line-height: 1.5
    }

.field-grid {
    display: grid;
    gap: 18px;
    margin-top: 24px
}

    .field-grid.two {
        grid-template-columns: repeat(2,1fr)
    }

    .field-grid.three {
        grid-template-columns: repeat(3,1fr)
    }

label {
    font-weight: 800;
    color: #273044;
    font-size: 1rem
}

    label > span {
        color: #d71920
    }

input, select, textarea {
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border: 1px solid #cad3df;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
    transition: .18s
}

    input::placeholder, textarea::placeholder {
        color: #8ea0b4;
        opacity: 1
    }

    input:focus, select:focus, textarea:focus {
        border-color: #4664ff;
    }

    input[aria-invalid=true], select[aria-invalid=true] {
        border-color: #d71920;
        box-shadow: 0 0 0 3px rgba(215,25,32,.1)
    }

.check-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 22px;
    padding: 16px;
    border-radius: 12px;
    background: #f7f9fc;
    font-weight: 500;
    line-height: 1.55
}

    .check-row input {
        width: auto;
        margin: 4px 0 0;
        accent-color: var(--est-orange)
    }

.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

    .address-grid fieldset {
        margin: 0;
        padding: 20px;
        border: 1px solid var(--est-line);
        border-radius: 16px
    }

    .address-grid legend {
        padding: 0 8px;
        color: var(--est-navy);
        font-weight: 900
    }

    .address-grid .field-grid {
        margin-top: 4px
    }

.room-tabs {
    display: flex;
    gap: 8px;
    overflow: auto;
    padding-bottom: 6px
}

.room-tab {
    white-space: nowrap;
    padding: 10px 14px;
    border: 1px solid var(--est-line);
    border-radius: 99px;
    background: #fff;
    font-weight: 800;
    cursor: pointer
}

    .room-tab.is-active {
        color: #fff;
        background: var(--est-navy);
        border-color: var(--est-navy)
    }

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
    margin-top: 18px
}

.inventory-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--est-line);
    border-radius: 14px
}

    .inventory-item small {
        display: block;
        color: var(--est-muted);
        margin-top: 4px
    }

.qty {
    display: flex;
    align-items: center;
    gap: 8px
}

    .qty button {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 8px;
        color: #fff;
        background: var(--est-orange);
        font-size: 1.25rem;
        cursor: pointer
    }

    .qty output {
        min-width: 26px;
        text-align: center;
        font-weight: 900;
        font-size: 1.1rem
    }

.inventory-total {
    display: flex;
    justify-content: flex-end;
    gap: 34px;
    margin: 20px 0;
    padding: 18px;
    border-radius: 14px;
    background: #eef4ff
}

    .inventory-total div {
        display: grid;
        gap: 4px
    }

    .inventory-total span {
        color: var(--est-muted);
        font-size: .85rem
    }

    .inventory-total strong {
        font-size: 1.25rem;
        color: var(--est-navy)
    }

.option-list {
    display: grid;
    gap: 12px;
    margin-top: 22px
}

.switch-row {
    display: flex;
    gap: 14px;
    padding: 17px;
    border: 1px solid var(--est-line);
    border-radius: 14px;
    cursor: pointer
}

    .switch-row input {
        width: auto;
        margin: 3px 0 0;
        accent-color: var(--est-orange)
    }

    .switch-row span {
        color: inherit
    }

    .switch-row small {
        display: block;
        margin-top: 5px;
        color: var(--est-muted);
        font-weight: 500;
        line-height: 1.5
    }

.recommendation-box {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 22px;
    border: 1px solid #b9cef1;
    border-radius: 16px;
    background: #f0f6ff
}

    .recommendation-box .rec-icon {
        font-size: 2.4rem
    }

    .recommendation-box strong {
        display: block;
        color: var(--est-navy);
        font-size: 1.2rem
    }

    .recommendation-box small {
        color: var(--est-muted)
    }

.rec-badge {
    padding: 8px 12px;
    border-radius: 99px;
    color: #fff;
    background: var(--est-good);
    font-weight: 900
}

.inline-warning, .assumption-box, .legal-note {
    margin-top: 22px;
    padding: 17px;
    border-radius: 12px;
    background: #fff8e6;
    color: #614700;
    line-height: 1.55
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px
}

.addon-card {
    min-height: 150px
}

.upload-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    margin-top: 24px;
    padding: 22px;
    border: 2px dashed #bdc8d8;
    border-radius: 16px;
    background: #fafcff
}

    .upload-box p {
        margin: 6px 0 0;
        color: var(--est-muted);
        line-height: 1.5
    }

.upload-button {
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    background: var(--est-navy);
    cursor: pointer
}

.photo-preview {
    grid-column: 1/-1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

    .photo-preview img {
        width: 76px;
        height: 76px;
        object-fit: cover;
        border-radius: 10px;
        border: 1px solid var(--est-line)
    }

.result-hero {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
    padding: 26px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg,var(--est-navy),#0a438e)
}

    .result-hero > div:first-child {
        display: grid;
        gap: 7px
    }

    .result-hero strong {
        font-size: clamp(2rem,5vw,3.6rem);
        letter-spacing: -.04em
    }

    .result-hero small {
        color: rgba(255,255,255,.72)
    }

.quality-ring {
    display: grid;
    place-items: center;
    width: 130px;
    height: 130px;
    border: 10px solid rgba(255,255,255,.22);
    border-top-color: #69e0a2;
    border-radius: 50%;
    text-align: center
}

    .quality-ring strong {
        font-size: 1.55rem
    }

    .quality-ring span {
        font-size: .75rem
    }

.breakdown {
    display: grid;
    gap: 10px;
    margin-top: 22px
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--est-line)
}

    .breakdown-row span {
        color: var(--est-muted)
    }

    .breakdown-row strong {
        color: var(--est-navy)
    }

.final-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.final-card {
    padding: 26px;
    border: 1px solid var(--est-line);
    border-radius: 18px
}

    .final-card > span {
        font-size: 2.2rem
    }

    .final-card h3 {
        margin: 14px 0 8px;
        color: var(--est-navy)
    }

    .final-card p {
        color: var(--est-muted);
        line-height: 1.6
    }

.button-primary, .button-secondary, .button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    min-width: 150px;
    padding: 14px 34px;
    border: 0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .02em;
    cursor: pointer;
    transition: all .2s ease
}

.button-primary {
    color: #fff;
    background: var(--est-orange);
    box-shadow: 0 10px 22px rgba(255,121,0,.28)
}

    .button-primary:hover {
        background: #e86e00;
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(255,121,0,.36)
    }

.button-secondary {
    color: #fff;
    background: var(--est-navy)
}

    .button-secondary:hover {
        background: #0b3b7a;
        transform: translateY(-1px)
    }

.button-ghost {
    color: var(--est-navy);
    background: #edf2f8
}

    .button-ghost:hover {
        background: #e2e9f3;
        transform: translateY(-1px)
    }

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid var(--est-line)
}

.success-message {
    margin-top: 20px;
    padding: 20px;
    border-radius: 14px;
    color: #0b5932;
    background: #e7f8ef
}

    .success-message code {
        font-size: .85em
    }

.summary-card {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid #e0e6ef;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--est-shadow)
}

.summary-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--est-line)
}

    .summary-head div {
        display: grid;
        gap: 5px
    }

    .summary-head span {
        color: var(--est-muted);
        font-size: .82rem
    }

    .summary-head strong {
        color: var(--est-blue);
        font-size: 1.55rem
    }

    .summary-head > span {
        color: var(--est-good);
        font-weight: 900
    }

.summary-card dl {
    display: grid;
    gap: 11px;
    margin: 18px 0
}

    .summary-card dl div {
        display: flex;
        justify-content: space-between;
        gap: 16px
    }

.summary-card dt {
    color: var(--est-muted)
}

.summary-card dd {
    margin: 0;
    text-align: right;
    font-weight: 900
}

.summary-volume {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 15px;
    border-radius: 12px;
    background: #eef4ff
}

    .summary-volume span {
        color: var(--est-muted)
    }

    .summary-volume strong {
        color: var(--est-navy)
    }

    .summary-volume[hidden] {
        display: none !important
    }

.summary-quality {
    margin-top: 16px
}

    .summary-quality > div:first-child {
        display: flex;
        justify-content: space-between
    }

.quality-bar {
    height: 7px;
    margin-top: 9px;
    border-radius: 99px;
    background: #e5eaf1;
    overflow: hidden
}

    .quality-bar span {
        display: block;
        width: 55%;
        height: 100%;
        background: linear-gradient(90deg,#f2b705,#21a461);
        transition: width .25s
    }

.summary-disclaimer {
    margin: 16px 0 0;
    color: var(--est-muted);
    font-size: .8rem;
    line-height: 1.5
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px
}

.addon-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 160px;
    padding: 22px;
    border: 2px solid var(--est-line);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: .2s
}

    .addon-card:hover {
        border-color: #a9b9dc;
        transform: translateY(-2px)
    }

    .addon-card:has(input:checked) {
        border-color: var(--est-orange);
        box-shadow: 0 0 0 4px rgba(255,121,0,.1)
    }

    .addon-card .addon-header {
        display: flex;
        justify-content: space-between;
        align-items: center
    }

    .addon-card .addon-icon {
        font-size: 2.2rem
    }

    .addon-card input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0
    }

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--est-line);
    border-radius: 14px;
    cursor: pointer;
    background: #fff;
    margin-bottom: 8px;
    transition: border-color .2s
}

    .switch-row:hover {
        border-color: #a9b9dc
    }

    .switch-row input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0
    }

.switch-slider {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 48px;
    height: 26px;
    background-color: #cbd5e1;
    border-radius: 99px;
    transition: background-color .25s ease
}

    .switch-slider::before {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 20px;
        height: 20px;
        background-color: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.18);
        transition: transform .25s ease
    }

input[type="checkbox"]:checked + .switch-slider {
    background-color: #4a72ff
}

    input[type="checkbox"]:checked + .switch-slider::before {
        transform: translateX(22px)
    }

.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.cleaning-grid-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.cleaning-grid-mid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px
}

.field-inline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px
}

    .field-inline-row label {
        margin: 0;
        font-weight: 700
    }

    .field-inline-row input {
        width: 110px;
        margin: 0;
        text-align: right
    }

.inventory-room-panel {
    display: none
}

    .inventory-room-panel.is-active {
        display: block
    }

.estimate-footer {
    padding: 40px 0;
    background: var(--est-deep);
    color: #fff
}

    .estimate-footer .estimate-shell {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 26px;
        align-items: center
    }

    .estimate-footer p {
        color: rgba(255,255,255,.7)
    }

    .estimate-footer nav {
        display: flex;
        gap: 16px;
        flex-wrap: wrap
    }

        .estimate-footer nav a:hover {
            color: var(--est-orange)
        }

@media(max-width:980px) {
    .estimate-hero-grid, .builder-layout {
        grid-template-columns: 1fr
    }

    .summary-card {
        position: static;
        order: -1
    }

    .choice-grid-3 {
        grid-template-columns: 1fr
    }

    .address-grid {
        grid-template-columns: 1fr
    }

    .estimate-footer .estimate-shell {
        grid-template-columns: 1fr
    }

    .page-offerte-builder .menu-list {
        position: absolute;
        top: 68px;
        right: 16px;
        display: none;
        min-width: 260px;
        padding: 10px;
        border-radius: 14px;
        background: var(--est-navy);
        box-shadow: var(--est-shadow)
    }

    .page-offerte-builder .main-navigation.is-open .menu-list {
        display: block
    }

    .page-offerte-builder .menu-toggle {
        display: flex
    }
}

@media(max-width:680px) {
    .estimate-hero {
        padding: 42px 0
    }

    .field-grid.two, .field-grid.three, .inventory-grid, .addon-grid, .final-grid {
        grid-template-columns: 1fr
    }

    .builder-section {
        padding-top: 22px
    }

    #estimateForm {
        padding: 20px
    }

    .builder-topbar {
        align-items: start
    }

    .confidence-mini {
        display: none
    }

    .result-hero {
        align-items: flex-start;
        flex-direction: column
    }

    .quality-ring {
        width: 105px;
        height: 105px
    }

    .upload-box {
        grid-template-columns: 1fr
    }

    .estimate-footer nav {
        flex-direction: column
    }

    .choice-card {
        min-height: 145px
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important
    }
}

.field-error {
    display: block;
    color: #d71920;
    font-size: .85rem;
    font-weight: 700;
    margin-top: 5px;
    line-height: 1.3
}

.is-invalid, input[aria-invalid=true], select[aria-invalid=true] {
    border-color: #d71920 !important;
    box-shadow: 0 0 0 3px rgba(215,25,32,.12) !important
}

.form-step-error-banner {
    background: #fdf2f2;
    border: 1px solid #f8b4b4;
    color: #9b1c1c;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .95rem;
    box-shadow: 0 4px 12px rgba(215,25,32,.08)
}

.form-actions-error-banner {
    background: #fdf2f2;
    border: 1px solid #f8b4b4;
    color: #9b1c1c;
    padding: 12px 18px;
    border-radius: 12px;
    margin-top: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .95rem;
    animation: errShake .3s ease-in-out
}

@keyframes errShake {
    0%,100% {
        transform: translateX(0)
    }

    25% {
        transform: translateX(-6px)
    }

    75% {
        transform: translateX(6px)
    }
}
