/**
 * Simulateur ARE + micro-entreprise.
 * S'appuie sur simulator.css et arbitrage.css (grille, cartes, formulaire) et n'ajoute
 * que ce qui est propre à cette page : cartes ARE/ARCE, tables larges, cas chiffrés.
 */

.chom-trust {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
}
.chom-trust::before {
    content: "🔒";
    margin-right: 6px;
}

/* ── Cartes ARE / ARCE ─────────────────────────────────────── */
.chom-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.chom-card {
    background: #fff;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 18px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.chom-card.is-winner {
    border-color: var(--primary, #059669);
    box-shadow: 0 4px 16px rgba(5, 150, 105, .12);
}
.chom-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.chom-card-head h3 {
    margin: 0;
    font-size: 1rem;
}
.chom-tag:not(:empty) {
    background: var(--primary, #059669);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.chom-card-net {
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
}
.chom-card-net strong {
    font-size: 1.6rem;
    line-height: 1.15;
    color: var(--text, #0f172a);
}
.chom-card-net span {
    font-size: .78rem;
    color: var(--text-muted, #64748b);
}
.chom-card-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border, #e2e8f0);
}
.chom-card-lines li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    font-size: .85rem;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
}
.chom-card-lines li:last-child { border-bottom: 0; }
.chom-card-lines span { color: var(--text-muted, #64748b); }

/* ── Alerte d'inversion année 1 ────────────────────────────── */
.chom-alert {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: .875rem;
    line-height: 1.55;
    color: #78350f;
}
.chom-alert.is-hidden { display: none; }

/* ── Bascule ───────────────────────────────────────────────── */
.chom-bascule-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary, #059669);
    margin: 4px 0 8px;
}
.chom-note {
    font-size: .82rem;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
    margin: 8px 0 0;
}

/* ── Sections de contenu ───────────────────────────────────── */
.chom-section {
    padding: 48px 0;
    border-top: 1px solid var(--border, #e2e8f0);
}
.chom-section--alt { background: var(--bg-light, #f8fafc); }
.chom-section h2 {
    font-size: 1.5rem;
    margin: 0 0 12px;
}
.chom-lede {
    max-width: 70ch;
    color: var(--text-muted, #475569);
    line-height: 1.65;
    margin: 0 0 20px;
}
.chom-narrow { max-width: 76ch; }
.chom-narrow p {
    line-height: 1.7;
    margin: 0 0 14px;
}

/* ── Tables larges : elles défilent DANS leur conteneur ────── */
.chom-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
}
.chom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
    min-width: 720px;
}
.chom-table caption {
    caption-side: top;
    text-align: left;
    padding: 10px 12px;
    font-size: .78rem;
    color: var(--text-muted, #64748b);
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.chom-table th,
.chom-table td {
    padding: 8px 12px;
    text-align: right;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    white-space: nowrap;
}
.chom-table th:first-child,
.chom-table td:first-child {
    text-align: left;
}
.chom-table thead th {
    background: var(--bg-light, #f8fafc);
    font-weight: 600;
    font-size: .76rem;
    color: var(--text-muted, #475569);
}
.chom-table tbody tr:last-child td { border-bottom: 0; }
.chom-table tbody tr.is-differe { background: #fef2f2; color: #7f1d1d; }
.chom-table tbody tr.is-zero { background: #fffbeb; }

/* ── Cas chiffrés ──────────────────────────────────────────── */
.chom-case {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
}
.chom-case h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}
.chom-case-detail {
    margin: 0 0 14px;
    font-size: .875rem;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
}
.chom-case-grid {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.chom-case-grid li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-light, #f8fafc);
    border-radius: 8px;
    padding: 8px 10px;
}
.chom-case-grid span {
    font-size: .72rem;
    color: var(--text-muted, #64748b);
}
.chom-case-grid strong {
    font-size: .95rem;
    color: var(--text, #0f172a);
}
.chom-case-verdict {
    margin: 0;
    padding: 12px 14px;
    background: #ecfdf5;
    border-left: 3px solid var(--primary, #059669);
    border-radius: 6px;
    font-size: .875rem;
    line-height: 1.6;
}

/* ── FAQ ───────────────────────────────────────────────────── */
.chom-faq-item {
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    margin-bottom: 8px;
}
.chom-faq-item summary {
    cursor: pointer;
    padding: 12px 14px;
    list-style: none;
}
.chom-faq-item summary::-webkit-details-marker { display: none; }
.chom-faq-item summary h3 {
    display: inline;
    margin: 0;
    font-size: .95rem;
}
.chom-faq-item summary::after {
    content: "+";
    float: right;
    color: var(--text-muted, #64748b);
    font-weight: 700;
}
.chom-faq-item[open] summary::after { content: "−"; }
.chom-faq-item p {
    margin: 0;
    padding: 0 14px 14px;
    font-size: .875rem;
    line-height: 1.65;
    color: var(--text-muted, #475569);
}

/* ── Sources et liens ──────────────────────────────────────── */
.chom-sources,
.chom-links {
    margin: 0 0 18px;
    padding-left: 18px;
}
.chom-sources li,
.chom-links li {
    font-size: .875rem;
    line-height: 1.65;
    margin-bottom: 8px;
    color: var(--text-muted, #475569);
}

/* Verdict : deux modificateurs de plus sur le composant d'arbitrage.css. */
.arb-verdict.is-are { background: linear-gradient(135deg, #047857, #10b981); }
.arb-verdict.is-arce { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }

.is-hidden { display: none !important; }

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .chom-cards { grid-template-columns: 1fr; }
    .chom-section { padding: 32px 0; }
    .chom-section h2 { font-size: 1.25rem; }
    .chom-card-net strong { font-size: 1.4rem; }
    .chom-bascule-value { font-size: 1.4rem; }
}
