/* ═══════════════════════════════════════════════
   Calculateur ROI — Sequance
   Single-step, large UX, mobile-first
   ═══════════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #F7F4EF;
    color: #07140D;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hidden { display: none !important; }

/* ── Header ──────────────────────────────────── */
.header {
    padding: 1.25rem;
}

.header__logo-img {
    height: 32px;
    width: auto;
}

/* ── Main ────────────────────────────────────── */
.main {
    flex: 1;
    padding-bottom: 3rem;
}

/* ── Hero ────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 2.5rem 0 2rem;
}

.hero__title {
    font-size: 2rem;
    font-weight: 800;
    color: #07140D;
    line-height: 1.15;
    margin-bottom: 0.625rem;
}

.hero__subtitle {
    font-size: 1.0625rem;
    font-weight: 400;
    color: #295C4F;
}

/* ── Calc Card ───────────────────────────────── */
.calc-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(7, 20, 13, 0.05), 0 8px 24px rgba(7, 20, 13, 0.06);
}

.calc-section__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #07140D;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-section__title::before {
    content: '';
    width: 4px;
    height: 20px;
    background-color: #295C4F;
    border-radius: 2px;
    flex-shrink: 0;
}

.calc-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #d8d3c8, transparent);
    margin: 2rem 0;
}

/* ── Calc Field ──────────────────────────────── */
.calc-field {
    margin-bottom: 2rem;
}

.calc-field:last-child {
    margin-bottom: 0;
}

.calc-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.calc-label__text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1D3630;
}

.calc-value-badge {
    font-size: 0.875rem;
    font-weight: 700;
    color: #295C4F;
    background-color: rgba(41, 92, 79, 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    min-width: 60px;
    text-align: center;
}

/* ── Range Slider ────────────────────────────── */
.calc-range {
    width: 100%;
    height: 8px;
    appearance: none;
    -webkit-appearance: none;
    background: #e8e3da;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Webkit: colored track via gradient set by JS */
.calc-range::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #295C4F var(--progress, 0%), #e8e3da var(--progress, 0%));
}

.calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #1D3630;
    border: 4px solid #F7F4EF;
    box-shadow: 0 2px 8px rgba(7, 20, 13, 0.25);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.calc-range::-webkit-slider-thumb:hover {
    box-shadow: 0 3px 12px rgba(7, 20, 13, 0.35);
    transform: scale(1.1);
}

.calc-range::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.calc-range::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #1D3630;
    border: 4px solid #F7F4EF;
    box-shadow: 0 2px 8px rgba(7, 20, 13, 0.25);
    cursor: pointer;
}

.calc-range::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: #e8e3da;
}

.calc-range::-moz-range-progress {
    height: 8px;
    border-radius: 4px;
    background: #295C4F;
}

.calc-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #8a8478;
}

/* ── Pill Radio Group ────────────────────────── */
.pill-group {
    display: flex;
    gap: 0.5rem;
}

.pill {
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pill__label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1rem;
    border: 2px solid #d8d3c8;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1D3630;
    transition: all 0.2s ease;
    text-align: center;
}

.pill:hover .pill__label {
    border-color: #295C4F;
    background-color: rgba(41, 92, 79, 0.03);
}

.pill input:checked ~ .pill__label {
    border-color: #1D3630;
    background-color: #1D3630;
    color: #F7F4EF;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(29, 54, 48, 0.2);
}

/* ── Calculate Button ────────────────────────── */
.btn-calculate {
    display: block;
    width: 100%;
    padding: 1.125rem;
    margin-top: 2rem;
    background-color: #07140D;
    color: #F7F4EF;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-calculate:hover {
    background-color: #1D3630;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 20, 13, 0.2);
}

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

/* ═══════════════════════════════════════════════
   Results
   ═══════════════════════════════════════════════ */
.results {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results__heading {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
}

.results__grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background-color: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(7, 20, 13, 0.05), 0 6px 16px rgba(7, 20, 13, 0.04);
    text-align: center;
}

.result-card__icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-card__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.6;
    margin-bottom: 0.375rem;
}

.result-card__value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.result-card--highlight {
    background-color: #07140D;
    color: #F7F4EF;
}

.result-card--highlight .result-card__label {
    color: rgba(247, 244, 239, 0.6);
}

/* ── Score Block ─────────────────────────────── */
.score-block {
    text-align: center;
    margin-bottom: 2rem;
}

.score-block__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #8a8478;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.score-badge {
    display: inline-block;
    padding: 0.625rem 2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #F7F4EF;
    background-color: #295C4F;
}

.score-block__desc {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #295C4F;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ── CTA Block ───────────────────────────────── */
.cta-block {
    background-color: #fff;
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(7, 20, 13, 0.05);
    border: 2px solid #e8e3da;
}

.cta-block__text {
    font-size: 1.1875rem;
    font-weight: 600;
    color: #07140D;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: #07140D;
    color: #F7F4EF;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-cta:hover {
    background-color: #1D3630;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 20, 13, 0.25);
}

.cta-block__note {
    font-size: 0.8125rem;
    color: #8a8478;
    margin-top: 0.75rem;
}

/* ── Reset Button ────────────────────────────── */
.btn-reset {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.75rem 1.75rem;
    background: transparent;
    border: 1.5px solid #295C4F;
    border-radius: 8px;
    color: #295C4F;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background-color: rgba(41, 92, 79, 0.06);
}

/* ── Footer ──────────────────────────────────── */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #ece8e0;
    margin-top: auto;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
}

.footer__logo {
    height: 24px;
    width: auto;
    opacity: 0.5;
}

.footer__copy {
    font-size: 0.75rem;
    color: #8a8478;
}

/* ═══════════════════════════════════════════════
   Responsive — Tablet+
   ═══════════════════════════════════════════════ */
@media (min-width: 640px) {
    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.125rem;
    }

    .calc-card {
        padding: 2.5rem 2.5rem;
    }

    .result-card__value {
        font-size: 2rem;
    }

    .results__grid {
        grid-template-columns: 1fr 1fr;
    }

    .result-card--highlight {
        grid-column: 1 / -1;
    }

    .cta-block {
        padding: 2.5rem 2rem;
    }

    .cta-block__text {
        font-size: 1.3125rem;
    }
}

@media (min-width: 960px) {
    .hero__title {
        font-size: 2.75rem;
    }

    .calc-card {
        padding: 3rem;
    }
}
