/* Couche DEMO : ne doit jamais modifier le layout du SaaS réel. */
html{color-scheme:dark}
html[data-demo-template="horizon"]{--brand-primary:#1900ff;--brand-secondary:#00b8a9;--brand-accent:#f59e0b;--brand-bg:#0b1020;--brand-bg-alt:#0040e0;--brand-surface:#151d31;--brand-surface-alt:#1b2540;--brand-text:#f7f8fb;--brand-muted:#a8b0c3;--brand-line:#33405d;--brand-success:#34d399;--brand-warning:#fbbf24;--brand-danger:#fb7185}
html[data-demo-template="ocean"]{--brand-primary:#1677ff;--brand-secondary:#06b6d4;--brand-accent:#38bdf8;--brand-bg:#061426;--brand-bg-alt:#0759b8;--brand-surface:#0d223b;--brand-surface-alt:#143150;--brand-text:#f4f9ff;--brand-muted:#9db5cc;--brand-line:#275071}
html[data-demo-template="graphite"]{--brand-primary:#7c8cff;--brand-secondary:#64748b;--brand-accent:#94a3b8;--brand-bg:#0d1117;--brand-bg-alt:#202938;--brand-surface:#161d27;--brand-surface-alt:#202a38;--brand-text:#f3f6fa;--brand-muted:#9ca9b8;--brand-line:#344152}
html[data-demo-template="emerald"]{--brand-primary:#10b981;--brand-secondary:#14b8a6;--brand-accent:#34d399;--brand-bg:#071b17;--brand-bg-alt:#087d62;--brand-surface:#0e2922;--brand-surface-alt:#153a30;--brand-text:#f1fff9;--brand-muted:#9fc6b8;--brand-line:#285647}

/* Données commerciales fictives ajoutées à la démo. */
.demo-extra-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}
.demo-extra-list{display:grid;gap:8px}
.demo-extra-row{display:grid;grid-template-columns:1.4fr .8fr .7fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--brand-line);font-size:.78rem}
.demo-extra-row:last-child{border-bottom:0}.demo-extra-row strong{color:var(--brand-text)}.demo-extra-row span,.demo-extra-row small{color:var(--brand-muted)}
.demo-bank-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px;border:1px solid color-mix(in srgb,var(--brand-primary) 26%,var(--brand-line));border-radius:14px;background:linear-gradient(135deg,var(--brand-surface-alt),color-mix(in srgb,var(--brand-bg-alt) 45%,var(--brand-surface)));color:var(--brand-text);margin-bottom:12px;box-shadow:0 16px 40px rgba(0,0,0,.18)}
.demo-bank-card small{color:var(--brand-muted)}.demo-bank-card strong{font-size:1.35rem}.demo-connected{display:inline-flex;align-items:center;gap:6px;color:var(--brand-success);font-size:.72rem}.demo-connected:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--brand-success)}
.demo-count-pill{display:inline-flex;padding:5px 8px;border-radius:999px;background:color-mix(in srgb,var(--brand-primary) 15%,var(--brand-surface));border:1px solid color-mix(in srgb,var(--brand-primary) 28%,var(--brand-line));color:var(--brand-text);font-size:.7rem;font-weight:800}

/* Sélecteur de templates de démonstration. */
.demo-template-panel{margin-bottom:16px!important}.demo-template-panel .section-head p{margin:.4rem 0 0;color:var(--brand-muted);max-width:780px;font-size:.82rem}
.demo-template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.demo-template-card{appearance:none;text-align:left;border:1px solid var(--brand-line);background:var(--brand-surface-alt);color:var(--brand-text);border-radius:14px;padding:10px;cursor:pointer;transition:.18s}
.demo-template-card:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(0,0,0,.2)}.demo-template-card.active{border:2px solid var(--brand-primary);padding:9px}
.demo-template-card strong,.demo-template-card small,.demo-template-card em{display:block}.demo-template-card strong{margin-top:9px;font-size:.86rem}.demo-template-card small{color:var(--brand-muted);font-size:.7rem;margin-top:3px}.demo-template-card em{font-style:normal;color:var(--brand-primary);font-size:.7rem;font-weight:800;margin-top:7px}
.template-preview{height:82px;border-radius:9px;display:grid;grid-template-columns:24% 1fr;grid-template-rows:1fr 1fr;gap:6px;padding:8px;overflow:hidden;background:#11182a}.template-preview:before{content:"";grid-row:1/3;border-radius:6px;background:#0b1020}.template-preview i{display:block;border-radius:6px}.template-preview i:nth-child(1){grid-column:2;background:#1b2540}.template-preview i:nth-child(2){grid-column:2;background:#0040e0}.template-preview i:nth-child(3){display:none}.template-preview.ocean{background:#0d223b}.template-preview.ocean:before{background:#061426}.template-preview.ocean i:nth-child(2){background:#0759b8}.template-preview.graphite{background:#161d27}.template-preview.graphite:before{background:#0d1117}.template-preview.graphite i:nth-child(2){background:#202938}.template-preview.emerald{background:#0e2922}.template-preview.emerald:before{background:#071b17}.template-preview.emerald i:nth-child(2){background:#087d62}.demo-template-note{margin-top:10px;color:var(--brand-muted);font-size:.72rem}

/* Contraste renforce pour le theme sombre de la demo. */
.eyebrow{color:#f8fafc!important}
.module-head p,.section-head p,.small-note,.chart-wait,.app-footer,.app-footer *{color:#e2e8f0!important}
#imports .m3-import-center-card p,#imports .m3-import-center-card small,#imports [data-import-center-history],#imports [data-import-center-history] *{color:#e2e8f0!important}
#imports .m3-import-center-card h3,#imports .m3-import-center-card strong,#imports h2{color:#f8fafc!important}

/* Passe globale de contraste pour tous les textes secondaires sur fond sombre. */
.text-btn{color:#f8fafc!important}
.business-link{color:#dbeafe!important}
.quick-action small,
.task-item small,
.chart-legend,
.bar-chart span,
.module-kpis span,
.module-kpis small,
.simple-table .tr.th,
.business-head div span,
.business-values span,
.expense-list span,
.timeline-list p,
.setting-card p,
.audit-checklist small,
.export-card small,
.toast span,
.sub,
.small-note,
.module-head p,
.section-head p,
.chart-wait,
.app-footer,
.app-footer *{color:#e2e8f0!important}

/* Démo strictement en lecture seule pour les actions métier. */
body.demo-readonly input:not([data-m3-search]):not([data-period-start]):not([data-period-end]),body.demo-readonly textarea,body.demo-readonly select{pointer-events:none!important;opacity:.72}
.m3-backend-note{display:none!important}.empty-state{display:none!important}.ui-system-preview,.icon-library{display:none!important}

@media(max-width:1100px){.demo-template-grid{grid-template-columns:repeat(2,1fr)}.demo-extra-grid{grid-template-columns:1fr}}
@media(max-width:780px){.demo-template-grid{grid-template-columns:1fr 1fr}.demo-extra-row{grid-template-columns:1fr auto}.demo-extra-row span:nth-child(2),.demo-extra-row small{display:none}}

/* Texte de la demo : aucun libelle bleu sur fond sombre. */
.business-link,.business-link b,.timeline-date span,.demo-template-card em{color:#f8fafc!important}
.module-view a,.module-view button.text-btn{color:#f8fafc!important}

/* Aucun caractere ou glyphe bleu dans la demo sombre. */
.eyebrow,.text-btn,.business-link,.business-link b,
.quick-icon,.quick-icon svg,.setting-icon,.kpi-icon,.kpi-icon svg,
.icon-swatch,.empty-icon,.timeline-date span,.doc-icon,.report-card>span,
.demo-template-card em{color:#f8fafc!important;text-shadow:none!important}
.quick-action small,.task-item small,.small-note,.chart-wait,.app-footer,.app-footer *,
.module-kpis span,.module-kpis small,.business-head div span,.business-values span,
.expense-list span,.timeline-list p,.simple-table .tr.th{color:#e2e8f0!important}

/* Demo commerciale : scénarios d'import déjà remplis pour projection client */
.demo-import-mapping{display:grid;gap:7px;padding:14px 16px;border:1px solid color-mix(in srgb,var(--brand-primary) 24%,var(--brand-line));border-radius:14px;background:color-mix(in srgb,var(--brand-surface) 88%,transparent);color:var(--brand-text)}
.demo-import-mapping span,.demo-import-mapping small{color:var(--brand-muted)!important}
#imports [data-import-center-summary]{display:block!important;width:100%;min-width:0;margin:14px 0 16px!important}
.demo-import-kpis{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important;gap:12px!important;width:100%;min-width:0;margin:8px 0 16px}
.demo-import-kpis article{min-width:0;padding:14px 16px}
.demo-import-kpis span,.demo-import-kpis small{line-height:1.35}
@media(max-width:520px){.demo-import-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.demo-import-kpis article{padding:13px}}
.demo-import-table{margin-top:8px}
#imports [data-import-center-workbench]{scroll-margin-top:24px}
#imports [data-import-center-rows] .tr strong{color:var(--brand-text)}
