/**
 * ImmoAnalyse.be — Simulateur Renovation Energetique
 * Stylesheet
 * @version 1.0.0
 * @date    2026-02-26
 */

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f5f5fa;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================================================================
   HEADER
   ================================================================ */
.sim-header {
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 1.5rem;
}
.sim-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sim-logo {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}
.sim-logo span { color: #60a5fa; }
.sim-lang a {
    color: #94a3b8;
    margin-left: 0.75rem;
    font-size: 0.875rem;
    text-decoration: none;
}
.sim-lang a.active { color: #fff; font-weight: 600; }

/* ================================================================
   MAIN
   ================================================================ */
.sim-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ================================================================
   HERO
   ================================================================ */
.sim-hero {
    text-align: center;
    padding: 2rem 0 1rem;
}
.sim-hero h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    color: #1a1a2e;
}
.sim-hero__sub {
    font-size: 1.1rem;
    color: #475569;
    margin: 0;
}
.sim-abex-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.sim-abex-badge__info {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: #1e40af;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    cursor: help;
}

/* ================================================================
   DISCLAIMER
   ================================================================ */
.sim-disclaimer {
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.875rem;
    color: #92400e;
}
.sim-disclaimer--short { background: #fffbeb; }
.sim-disclaimer--full {
    background: #f8fafc;
    border-left-color: #94a3b8;
    color: #475569;
    margin-top: 2rem;
}
.sim-disclaimer a { color: #d97706; font-weight: 500; }
.sim-disclaimer__footer {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

/* ================================================================
   FORM STRUCTURE
   ================================================================ */
.sim-form { margin: 1rem 0; }
.sim-step {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sim-step__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0;
    border: none;
}
.sim-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}
.sim-step__desc { color: #64748b; margin: 0 0 1rem; }

/* ================================================================
   FIELDS
   ================================================================ */
.sim-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 600px) {
    .sim-field-row { grid-template-columns: 1fr; }
}
.sim-field label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: #334155;
}
.sim-field input[type="text"],
.sim-field input[type="number"],
.sim-field select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.sim-field input:focus,
.sim-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.sim-field__help {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.sim-field--inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.sim-field--inline label { margin-bottom: 0; font-weight: 500; }
.sim-input--small {
    width: 80px !important;
    padding: 0.4rem 0.5rem !important;
}
.sim-field__unit { font-size: 0.85rem; color: #64748b; }

/* ================================================================
   REGION INFO
   ================================================================ */
.sim-region-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}
.sim-region-info h3 { margin: 0 0 0.25rem; font-size: 0.95rem; }

/* ================================================================
   POST GROUPS & ITEMS
   ================================================================ */
.sim-post-group {
    margin-bottom: 1.5rem;
}
.sim-post-group__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dbeafe;
}
.sim-post {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s, background 0.2s;
}
.sim-post:has(input:checked) {
    background: #eff6ff;
    border-color: #93c5fd;
}
.sim-post__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.sim-post__check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.sim-post__check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}
.sim-post__label {
    font-weight: 600;
    font-size: 0.95rem;
}
.sim-post__price-range {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.sim-post__details {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}
.sim-post__primes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}
.sim-prime {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
    transition: background 0.2s, color 0.2s;
}
.sim-prime--active {
    background: #2563eb;
    color: #fff;
}
.sim-prime--wal.sim-prime--active { background: #dc2626; }
.sim-prime--bru.sim-prime--active { background: #7c3aed; }
.sim-prime--vla.sim-prime--active { background: #f59e0b; color: #1a1a2e; }

.sim-post__eco {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 500;
    margin-top: 0.25rem;
}
.sim-post__materiaux {
    font-size: 0.8rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.25rem;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.sim-actions {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.sim-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.sim-btn:active { transform: scale(0.98); }
.sim-btn--primary {
    background: #2563eb;
    color: #fff;
}
.sim-btn--primary:hover { background: #1d4ed8; }
.sim-btn--secondary {
    background: #e2e8f0;
    color: #475569;
}
.sim-btn--secondary:hover { background: #cbd5e1; }
.sim-btn--upload {
    background: #059669;
    color: #fff;
    padding: 0.6rem 1.5rem;
}
.sim-btn--upload:hover { background: #047857; }
.sim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================================
   RESULTS
   ================================================================ */
.sim-results {
    background: #fff;
    border: 2px solid #2563eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.sim-results__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.sim-result-card {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}
.sim-result-card__label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.sim-result-card__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}
.sim-result-card--prime { background: #ecfdf5; }
.sim-result-card--prime .sim-result-card__value { color: #059669; }
.sim-result-card--net { background: #dbeafe; }
.sim-result-card--net .sim-result-card__value { color: #1e40af; }

/* Results Table */
.sim-results__table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.sim-results__table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}
.sim-results__table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.sim-results__table tr:last-child td { border-bottom: none; }

.sim-prime-info {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* ================================================================
   PEB CORRECTION
   ================================================================ */
.sim-peb-correction {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
}
.sim-peb-correction h3 {
    margin: 0 0 0.5rem;
    color: #166534;
    font-size: 1.1rem;
}
.sim-peb-correction__desc {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 1rem;
}

/* Upload Zone */
.sim-upload-zone {
    border: 2px dashed #86efac;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}
.sim-upload-zone:hover { background: #dcfce7; }
.sim-upload-zone__icon { font-size: 2rem; margin-bottom: 0.5rem; }
.sim-upload-zone__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* RGPD Consent */
.sim-consent {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}
.sim-consent__label {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.9rem;
    cursor: pointer;
}
.sim-consent__label input { margin-top: 0.2rem; flex-shrink: 0; }
.sim-consent__details {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
    color: #64748b;
}
.sim-consent__details p { margin: 0.25rem 0; }

/* Upload Status */
.sim-upload-status {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}
.sim-upload-status--loading { background: #dbeafe; color: #1e40af; }
.sim-upload-status--success { background: #dcfce7; color: #166534; }
.sim-upload-status--error { background: #fef2f2; color: #991b1b; }

/* ================================================================
   CROSS-SELL CTAs
   ================================================================ */
.sim-crosssell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
@media (max-width: 600px) {
    .sim-crosssell { grid-template-columns: 1fr; }
}
.sim-cta {
    display: block;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sim-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
}
.sim-cta--devis {
    background: #f59e0b;
    color: #1a1a2e;
}
.sim-cta--assurance {
    background: #2563eb;
    color: #fff;
}

/* ================================================================
   PAYWALL — RAPPORT PDF
   ================================================================ */
.sim-paywall {
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
    color: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}
.sim-paywall__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sim-paywall__header h3 {
    margin: 0;
    font-size: 1.4rem;
}
.sim-paywall__price {
    text-align: right;
}
.sim-paywall__amount {
    font-size: 2rem;
    font-weight: 700;
}
.sim-paywall__vat {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}
.sim-paywall__features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.sim-paywall__features li {
    padding: 0.3rem 0 0.3rem 1.5rem;
    position: relative;
    font-size: 0.9rem;
}
.sim-paywall__features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: 700;
}
.sim-paywall__actions {
    text-align: center;
}
.sim-btn--large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}
.sim-paywall__secure {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    opacity: 0.8;
}
.sim-paywall__status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
}
.sim-paywall__status--loading {
    background: rgba(255,255,255,0.15);
}
.sim-paywall__status--error {
    background: rgba(239,68,68,0.3);
}
.sim-paywall__cancelled {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    background: rgba(251,191,36,0.2);
    text-align: center;
}

@media (max-width: 640px) {
    .sim-paywall__header {
        flex-direction: column;
        text-align: center;
    }
    .sim-paywall__price {
        text-align: center;
    }
    .sim-paywall__features ul {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   SUCCESS PAGE
   ================================================================ */
.sim-success {
    text-align: center;
    padding: 3rem 1.5rem;
}
.sim-success__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #4ade80;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
}
.sim-success__sub {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}
.sim-success__download {
    margin: 2rem 0;
}
.sim-success__note {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.75rem;
}
.sim-success__pending {
    background: #fef3c7;
    color: #92400e;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 500px;
}
.sim-crosssell--post-payment {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}
.sim-crosssell--post-payment h2 {
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}
.sim-crosssell__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}
.sim-crosssell__grid .sim-cta {
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
}
.sim-crosssell__grid .sim-cta strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.sim-crosssell__grid .sim-cta span {
    font-size: 0.85rem;
    opacity: 0.9;
}

@media (max-width: 640px) {
    .sim-crosssell__grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   FOOTER
   ================================================================ */
.sim-footer {
    background: #1a1a2e;
    color: #94a3b8;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    margin-top: 2rem;
}
