/* ============================================================
   Wizard — simulateur revenus fonciers
   ============================================================ */

.layout-wizard main { background: var(--bg-alt); min-height: calc(100vh - 80px); padding: 2rem 0 4rem; }

.wizard { }
.wizard-header { text-align: center; margin-bottom: 2rem; }
.wizard-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.wizard-sub { color: var(--text-light); max-width: 640px; margin: 0 auto; }

/* Progress bar */
.wizard-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto 2.5rem;
}
.wizard-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: all var(--transition);
}
.wizard-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}
.wizard-step.is-active { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-50); }
.wizard-step.is-active span { background: var(--primary); color: #fff; }
.wizard-step.is-done { color: var(--primary-dark); border-color: var(--primary-100); }
.wizard-step.is-done span { background: var(--primary-100); color: var(--primary-dark); }

/* Form / panels */
.wizard-form {
    max-width: 900px;
    margin: 0 auto;
}
.wizard-panel {
    display: none;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.wizard-panel.is-active { display: block; }
.wizard-panel h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.wizard-help { color: var(--text-light); margin-bottom: 2rem; }

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.wizard-cta { display: flex; gap: 0.75rem; }

/* Property cards */
.properties-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }

.property-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.property-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.property-card-head .property-label {
    flex: 1;
    font-weight: 600;
    background: transparent;
    border: 1px dashed transparent;
}
.property-card-head .property-label:focus { background: var(--bg-white); border-color: var(--border); }
.property-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}
.property-remove:hover { color: var(--error); border-color: var(--error); }

/* Charges section */
.property-charges {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.property-charges-title {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.charges-section { margin-bottom: 1.5rem; }
.charges-section h4 { font-size: 0.9375rem; margin-bottom: 0.75rem; color: var(--dark); }
.charges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}
.charge-field { display: flex; flex-direction: column; }
.charge-field label { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 0.25rem; }
.charge-field input { padding: 0.5rem 0.75rem; font-size: 0.9375rem; }

/* Result */
.result-area { }
.result-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.regime-card {
    background: var(--bg-alt);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    transition: all var(--transition);
}
.regime-card.is-best { border-color: var(--primary); background: var(--primary-50); }
.regime-card.is-best::before {
    content: 'Le plus avantageux';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    white-space: nowrap;
}
.regime-card h3 { font-size: 1rem; color: var(--text-light); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.regime-card .regime-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
}
.regime-card.is-best .regime-amount { color: var(--primary-dark); }
.regime-card .regime-detail { font-size: 0.875rem; color: var(--text-light); line-height: 1.7; }
.regime-card .regime-detail strong { color: var(--dark); font-weight: 600; }
.regime-card.is-disabled { opacity: 0.6; }
.regime-card.is-disabled::after {
    content: 'Non éligible (>15 000 € de loyers)';
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--error);
    font-weight: 600;
}

.savings-banner {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    text-align: center;
}
.savings-banner strong { font-size: 1.5rem; display: block; margin-bottom: 0.25rem; }

.detail-block {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.detail-block h4 { font-size: 1rem; margin-bottom: 0.75rem; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.detail-table th, .detail-table td { padding: 0.5rem 0; text-align: left; border-bottom: 1px solid var(--border-light); }
.detail-table th { font-weight: 600; color: var(--text-light); }
.detail-table td.amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.detail-table tfoot td { font-weight: 700; color: var(--dark); border-top: 2px solid var(--border); border-bottom: none; padding-top: 0.5rem; }

.form-2044-preview {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.form-2044-preview h4 { display: flex; align-items: center; gap: 0.5rem; }
.form-2044-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}
.form-2044-grid .case { display: flex; justify-content: space-between; padding: 0.375rem 0.625rem; background: var(--bg-alt); border-radius: var(--radius-sm); }
.form-2044-grid .case-num { color: var(--text-muted); font-weight: 600; }

.result-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

/* Mobile */
@media (max-width: 768px) {
    .wizard-progress { gap: 0.5rem; }
    .wizard-step { padding: 0.5rem 0.25rem; font-size: 0.75rem; flex-direction: column; }
    .wizard-step span { width: 22px; height: 22px; font-size: 0.75rem; }
    .wizard-panel { padding: 1.5rem 1.25rem; }
    .result-summary { grid-template-columns: 1fr; }
    .charges-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .wizard-nav { flex-direction: column; align-items: stretch; }
    .wizard-nav button { width: 100%; }
    .wizard-cta { flex-direction: column; }
}
