/* Thème clair — activé uniquement quand <html data-theme="light">. N'affecte jamais
   le thème sombre par défaut, et ne modifie pas static/style.css (zéro risque de
   régression visuelle sur ce qui fonctionne déjà). */

[data-theme="light"] body{background:#f4f6fb;color:#1a2436}
[data-theme="light"] .sidebar{background:#ffffff;border-right:1px solid #dde5f2}
[data-theme="light"] nav a{color:#33425e}
[data-theme="light"] nav a:hover{background:#eef2fa}
[data-theme="light"] .navhead{color:#7b8bab}
[data-theme="light"] .subbrand{color:#5b6c8f}
[data-theme="light"] .flash{background:#eaf0fb;border:1px solid #b9c9e8;color:#1a2436}
[data-theme="light"] .muted,[data-theme="light"] small,[data-theme="light"] .hint{color:#5b6c8f}
[data-theme="light"] .card,[data-theme="light"] .panel{background:#ffffff;border:1px solid #dde5f2;box-shadow:0 1px 3px rgba(20,30,60,.05)}
[data-theme="light"] .verified{background:#eef6f1}
[data-theme="light"] .metricline,[data-theme="light"] .sourcebar{background:#eef2fa;border:1px solid #d7e0f0}
[data-theme="light"] .row{border-bottom:1px solid #e4eaf4}
[data-theme="light"] .clickable:hover{background:#f3f6fc}
[data-theme="light"] .score,[data-theme="light"] .status{background:#eaf0fb;color:#1a2436}
[data-theme="light"] .opportunity{border-bottom:1px solid #e4eaf4}
[data-theme="light"] .chip{border:1px solid #c7d4ea}
[data-theme="light"] .button,[data-theme="light"] button{background:#1a2436;color:#ffffff}
[data-theme="light"] .button.secondary,[data-theme="light"] button.secondary{background:#eaf0fb;color:#1a2436;border:1px solid #c7d4ea}
[data-theme="light"] .link{color:#2563eb}
[data-theme="light"] input,[data-theme="light"] textarea,[data-theme="light"] select{background:#ffffff;color:#1a2436;border:1px solid #c7d4ea}
[data-theme="light"] .heroScore{background:#eaf0fb;border:1px solid #c7d4ea}
[data-theme="light"] .heroScore span{color:#5b6c8f}
[data-theme="light"] .goodtext{color:#0f7a4d}
[data-theme="light"] .warntext{color:#a15c00}
[data-theme="light"] .simpleline{border-bottom:1px solid #e4eaf4}
[data-theme="light"] .actioncard pre{background:#f4f6fb;border:1px solid #d7e0f0;color:#1a2436}
[data-theme="light"] .accountbox{background:#f4f6fb;border:1px solid #dde5f2}
[data-theme="light"] .accountbox span{color:#5b6c8f}
[data-theme="light"] .authpage{background:radial-gradient(circle at top,#eef2fa,#f4f6fb 55%)}
[data-theme="light"] .authcard{background:#ffffff;border:1px solid #dde5f2;box-shadow:0 20px 60px rgba(20,30,60,.08)}

/* Module Achats/Facturation (static/purchase.css) — jamais eu de contrepartie
   thème clair jusqu'ici, sur aucune des pages qui l'utilisent. Réutilise le
   vert #0f7a4d déjà établi ailleurs (.goodtext) plutôt que le vert néon
   #39e58c/#45e993 du thème sombre, illisible sur fond blanc. */
[data-theme="light"] .purchase-eyebrow{color:#0f7a4d}
[data-theme="light"] .purchase-title{color:#1a2436}
[data-theme="light"] .purchase-subtitle{color:#5b6c8f}

[data-theme="light"] .purchase-nav-btn{color:#0f7a4d !important;background:#eaf6f0;border-color:#bfe3cf}
[data-theme="light"] .purchase-nav-btn:hover{background:#dcf0e4;border-color:#0f7a4d}
[data-theme="light"] .purchase-primary-btn.secondary{color:#1a2436 !important;background:#eaf0fb;border-color:#c7d4ea}
[data-theme="light"] .purchase-primary-btn.primary{color:#ffffff !important;background:#0f7a4d;border-color:#0f7a4d}
[data-theme="light"] .purchase-primary-btn:hover{filter:brightness(.96)}
[data-theme="light"] .purchase-icon{color:#0f7a4d}

[data-theme="light"] .purchase-stat{background:#ffffff;border:1px solid #dde5f2;box-shadow:0 1px 3px rgba(20,30,60,.05)}
[data-theme="light"] .purchase-stat-icon{color:#0f7a4d}
[data-theme="light"] .purchase-stat-label{color:#5b6c8f}
[data-theme="light"] .purchase-stat-value{color:#1a2436}

[data-theme="light"] .purchase-panel{background:#ffffff;border:1px solid #dde5f2;box-shadow:0 1px 3px rgba(20,30,60,.05)}
[data-theme="light"] .purchase-panel h2{color:#1a2436}
[data-theme="light"] .purchase-table th{color:#5b6c8f;border-bottom:1px solid #e4eaf4}
[data-theme="light"] .purchase-table td{color:#1a2436;border-bottom:1px solid #eef2fa}
[data-theme="light"] .purchase-link{color:#1a2436 !important}
[data-theme="light"] .purchase-link:hover{color:#0f7a4d !important}
[data-theme="light"] .purchase-muted{color:#7b8bab}

[data-theme="light"] .purchase-status{background:#eaf0fb;color:#1a2436}
[data-theme="light"] .purchase-status.paid{background:#eaf6f0;color:#0f7a4d}
[data-theme="light"] .purchase-status.overdue{background:#fdeceb;color:#b3261e}
[data-theme="light"] .purchase-empty{color:#7b8bab}

[data-theme="light"] .purchase-page-btn{background:#eaf0fb;color:#1a2436}
[data-theme="light"] .purchase-page-btn.current{background:#0f7a4d;color:#ffffff}
[data-theme="light"] .purchase-detail-link{color:#0f7a4d !important}
[data-theme="light"] .purchase-detail-link:hover,
[data-theme="light"] .purchase-detail-link:focus{color:#1a2436 !important}

[data-theme="light"] .purchase-dropzone{background:#f3faf6;border-color:#bfe3cf}
[data-theme="light"] .purchase-dropzone:has(input:focus-visible){background:#eaf6f0;border-color:#0f7a4d}
[data-theme="light"] .purchase-dropzone .purchase-icon{color:#0f7a4d}
[data-theme="light"] .purchase-dropzone input[type="file"]{color:#1a2436}
[data-theme="light"] .purchase-dropzone input[type="file"]::file-selector-button{background:#eaf6f0;color:#0f7a4d;border-color:#bfe3cf}
[data-theme="light"] .purchase-dropzone input[type="file"]::file-selector-button:hover{background:#dcf0e4;border-color:#0f7a4d}
[data-theme="light"] .purchase-detected-banner{background:#eaf6f0;border-color:#bfe3cf}
[data-theme="light"] .purchase-detected-banner .purchase-icon{color:#0f7a4d}

[data-theme="light"] .purchase-field-group h4{color:#5b6c8f}
[data-theme="light"] .purchase-field-group h4 .purchase-icon{color:#0f7a4d}
[data-theme="light"] .purchase-field-group + .purchase-field-group{border-top:1px solid #e4eaf4}
[data-theme="light"] .purchase-total-line{background:#f4f6fb;border:1px solid #dde5f2}
[data-theme="light"] .purchase-total-line strong{color:#1a2436}
[data-theme="light"] .purchase-strong-heading{color:#1a2436}
[data-theme="light"] .purchase-status-warn{background:#fdf3e2;color:#a15c00}
[data-theme="light"] .purchase-alert-text{color:#b3261e}
[data-theme="light"] .purchase-label-muted{color:#5b6c8f}
[data-theme="light"] .purchase-ok-text{color:#0f7a4d}
[data-theme="light"] nav a.active{background:#e8f8ef;color:#137a45;box-shadow:inset 3px 0 0 #1f9d5a}
[data-theme="light"] .navgroup>summary{color:#1f7a4a}
[data-theme="light"] .navgroup>summary:hover{background:#eef2fa}
[data-theme="light"] .mobilebar{background:#ffffff;border-bottom-color:#dde5f2}
[data-theme="light"] .mobilebar .brand{color:#0f1c33}
[data-theme="light"] .navtoggle{background:#eef2fa;border-color:#dde5f2}
[data-theme="light"] .navtoggle span{background:#0f1c33}
/* v43x : textes blancs « en dur » lisibles en thème clair (titres de panneaux, montants). */
[data-theme="light"] main [style*="color:#fff"]:not([style*="background"]){color:#1a2436 !important}
[data-theme="light"] .logout-link{background:none;color:#0f5fa8;padding:0}
/* Trésorerie & scénarios : bandeau d'alerte, scénarios et simulation. */
[data-theme="light"] .cash-alert{background:#eef4ff;border-color:#c7d4ea;color:#1a2436}
[data-theme="light"] .cash-alert span{color:#1a2436}
[data-theme="light"] .cash-alert.stable{background:#e8f8f0;border-color:#9fdcc0}
[data-theme="light"] .cash-alert.stable strong{background:#0f7a4d;color:#ffffff}
[data-theme="light"] .cash-alert.vigilance{background:#fff6e0;border-color:#f0d08a}
[data-theme="light"] .cash-alert.vigilance strong{background:#8a5a00;color:#ffffff}
[data-theme="light"] .cash-alert.alerte{background:#fdecee;border-color:#f3b4bc}
[data-theme="light"] .cash-alert.alerte strong{background:#b3261e;color:#ffffff}
[data-theme="light"] .cash-alert.incomplet strong{background:#8a5a00;color:#ffffff}
[data-theme="light"] .scenario-grid>div,[data-theme="light"] .whatif-result>div{background:#f6f8fc;border-color:#dde5f2;color:#1a2436}
[data-theme="light"] .scenario-grid strong,[data-theme="light"] .whatif-result strong{color:#1a2436}
[data-theme="light"] .scenario-grid span,[data-theme="light"] .scenario-grid small{color:#4a5a78}
[data-theme="light"] .cash-balance-card h2,[data-theme="light"] .purchase-panel h2,[data-theme="light"] .purchase-panel h3{color:#1a2436}
[data-theme="light"] .purchase-danger-btn{color:#b3261e!important;background:#fdecee;border-color:#f3b4bc}
[data-theme="light"] .flash.flash-error,[data-theme="light"] .purchase-error{background:#fdecee;border-color:#f3b4bc;color:#8c1d18}
[data-theme="light"] .navmode-btn{border-color:#c9d4e6;color:#5a6a85}
[data-theme="light"] nav a.nav-locked{color:#7a879c}[data-theme="light"] nav a.nav-locked small{color:#1f8f55;border-color:#9fd9b8}

/* v441 — Thème clair : lisibilité générale (audit de contraste sur toutes les pages).
   Boutons principaux verts (comme les boutons « purchase ») au lieu du bleu nuit
   presque noir ; boutons secondaires blancs bordés ; textes gris et couleurs néon du
   thème sombre assombris pour atteindre un contraste lisible sur fond clair. */
[data-theme="light"] .button,[data-theme="light"] button{background:#0f7a4d;color:#ffffff}
[data-theme="light"] .button:hover,[data-theme="light"] button:hover{box-shadow:0 0 0 3px rgba(15,122,77,.18)}
[data-theme="light"] .button.secondary,[data-theme="light"] button.secondary,
[data-theme="light"] .btn-secondary,[data-theme="light"] button.btn-secondary{background:#ffffff;color:#1a2436;border:1px solid #c7d4ea}
[data-theme="light"] .btn-secondary:hover,[data-theme="light"] button.secondary:hover{border-color:#0f7a4d;box-shadow:none}
[data-theme="light"] .navmode-btn{background:none;color:#4f5f7d;border:1px dashed #c9d4e6}
[data-theme="light"] .navmode-btn:hover{color:#0f7a4d;border-color:#0f7a4d}
[data-theme="light"] button.purchase-detail-link,[data-theme="light"] button.purchase-link{background:none;box-shadow:none}
[data-theme="light"] input::placeholder,[data-theme="light"] textarea::placeholder{color:#7b8bab;opacity:1}
[data-theme="light"] input:focus,[data-theme="light"] select:focus,[data-theme="light"] textarea:focus{border-color:#0f7a4d;outline:2px solid rgba(15,122,77,.18)}
[data-theme="light"] input:disabled,[data-theme="light"] select:disabled{background:#eef2f8;color:#5b6c8f}

/* Textes */
[data-theme="light"] .brand span{color:#0f8a52}
[data-theme="light"] .sidebar summary{color:#0f7a4d}
[data-theme="light"] main label,[data-theme="light"] .sidebar label{color:#33425e}
[data-theme="light"] .eyebrow{color:#4f5f7d}
[data-theme="light"] .eyebrow.green,[data-theme="light"] .green,[data-theme="light"] .grow,[data-theme="light"] .match{color:#0f7a4d}
[data-theme="light"] .red,[data-theme="light"] .recover{color:#b3261e}
[data-theme="light"] .amber,[data-theme="light"] .save{color:#8a5a00}
[data-theme="light"] .muted,[data-theme="light"] small,[data-theme="light"] .hint{color:#4f5f7d}
[data-theme="light"] .purchase-muted,[data-theme="light"] .purchase-empty{color:#5b6c8f}
[data-theme="light"] code{color:#1a2436}
[data-theme="light"] pre,[data-theme="light"] .actioncard pre{background:#f4f6fb;border:1px solid #dde5f2;color:#1a2436}
[data-theme="light"] main [style*="color:#ffc149"]{color:#8a5a00 !important}
[data-theme="light"] .db a[style*="b26b00"],[data-theme="light"] .db-pulse-link{color:#8a5200}
[data-theme="light"] .chip.good{color:#0f7a4d}[data-theme="light"] .chip.warn{color:#8a5a00}

/* Onglets segmentés (balances, périodes) */
[data-theme="light"] .seg-tabs{background:#ffffff;border-color:#c7d4ea}
[data-theme="light"] .seg-tabs a{color:#33425e}
[data-theme="light"] .seg-tabs a.is-active{background:#0f7a4d;color:#ffffff}

/* Formules & facturation (billing-v178.css) */
[data-theme="light"] .billing-hero h1,[data-theme="light"] .billing-plan h2,[data-theme="light"] .billing-section h2,
[data-theme="light"] .quota-card h3,[data-theme="light"] .pricing-cta h2,[data-theme="light"] .billing-price{color:#1a2436}
[data-theme="light"] .billing-lead,[data-theme="light"] .billing-section-lead,[data-theme="light"] .billing-faq p,
[data-theme="light"] .pricing-hero p,[data-theme="light"] .pricing-cta p,[data-theme="light"] .billing-plan-code,
[data-theme="light"] .billing-price small,[data-theme="light"] .billing-feature-title,
[data-theme="light"] .billing-note,[data-theme="light"] .billing-tax-note{color:#4f5f7d}
[data-theme="light"] .billing-for{color:#33425e}
[data-theme="light"] .billing-feature{color:#1a2436}
[data-theme="light"] .billing-feature.off,[data-theme="light"] .billing-feature.off .tick,[data-theme="light"] .billing-no{color:#66768f}
[data-theme="light"] .billing-feature .tick,[data-theme="light"] .billing-yes,[data-theme="light"] .billing-pill strong{color:#0f7a4d}
[data-theme="light"] .billing-pill{background:#ffffff;border-color:#c7d4ea;color:#33425e}
[data-theme="light"] .billing-plan,[data-theme="light"] .quota-card,[data-theme="light"] .billing-faq details,
[data-theme="light"] .pricing-cta,[data-theme="light"] .billing-matrix{background:#ffffff;border-color:#dde5f2;box-shadow:0 1px 3px rgba(20,30,60,.05)}
[data-theme="light"] .billing-plan.is-pro{border-color:#0f7a4d;box-shadow:0 0 0 1px rgba(15,122,77,.15),0 12px 32px rgba(20,30,60,.08)}
[data-theme="light"] .billing-badge{background:#0f7a4d;color:#ffffff}
[data-theme="light"] .billing-plan.is-current{border-color:#2563eb}
[data-theme="light"] .billing-plan.is-current .billing-badge{background:#2563eb;color:#ffffff}
[data-theme="light"] .billing-matrix th{background:#f4f6fb;color:#33425e}
[data-theme="light"] .billing-matrix td{color:#1a2436}
[data-theme="light"] .billing-matrix th,[data-theme="light"] .billing-matrix td{border-color:#e4eaf4}
[data-theme="light"] .billing-faq summary{color:#1a2436}
[data-theme="light"] .quota-bar{background:#e4eaf4}
[data-theme="light"] .billing-notice{background:#fff6e0;border-color:#f0d08a;color:#5a3d00}
[data-theme="light"] .billing-period{background:#ffffff;border-color:#c7d4ea}
[data-theme="light"] .billing-period a{color:#33425e}
[data-theme="light"] .billing-period a small{color:#0f7a4d}
[data-theme="light"] .billing-period a.is-active{background:#0f7a4d;color:#ffffff}
[data-theme="light"] .billing-period a.is-active small{color:#ffffff}

/* Simulateur de décision, trésorerie, formulaires de lots */
[data-theme="light"] .decision-form label,[data-theme="light"] .lot-form label,
[data-theme="light"] .cash-balance-form label,[data-theme="light"] .consortium-member label{color:#33425e}
[data-theme="light"] .decision-constraint-group{background:#f3faf6;border-color:#bfe3cf}
[data-theme="light"] .decision-check{background:#ffffff;border-color:#c7d4ea;color:#1a2436}
[data-theme="light"] .lot-hint{color:#5b6c8f}
[data-theme="light"] .scenario-summary-card{border-color:#dde5f2;background:#ffffff}
[data-theme="light"] .scenario-summary-card span,[data-theme="light"] .scenario-summary-card b{color:#4a5a78}
[data-theme="light"] .cash-legend .prudent,[data-theme="light"] .scenario-summary-card.prudent small{color:#9a5b00}
[data-theme="light"] .cash-legend .probable,[data-theme="light"] .scenario-summary-card.probable small{color:#2257c9}
[data-theme="light"] .cash-legend .optimiste,[data-theme="light"] .scenario-summary-card.optimiste small{color:#0f7a4d}
[data-theme="light"] .cash-line.prudent{stroke:#c97a00}
[data-theme="light"] .cash-line.probable{stroke:#2f6fd6}
[data-theme="light"] .cash-line.optimiste{stroke:#178a4c}
[data-theme="light"] .security-table th{color:#33425e}[data-theme="light"] .security-table code{color:#1a2436}
[data-theme="light"] .security-table th,[data-theme="light"] .security-table td{border-bottom-color:#e4eaf4}
[data-theme="light"] [style*="color:#3ddc84"]{color:#0f7a4d !important}
[data-theme="light"] [style*="color:#a0a0a0"]{color:#4f5f7d !important}
[data-theme="light"] .cash-legend .legend{background:#ffffff;border-color:#dde5f2}
[data-theme="light"] body .db{--db-green:#11804a;--db-amber:#9a5b00}
[data-theme="light"] .cash-chart-wrap{background:#ffffff;border-color:#dde5f2}
[data-theme="light"] .chart-axis{stroke:#b8c4d8}
[data-theme="light"] .chart-days{color:#4f5f7d}
/* Trésorerie pro (v442) */
[data-theme="light"] .cash-jump a{border-color:#c7d4ea;color:#33425e}
[data-theme="light"] .cash-jump a:hover{border-color:#0f7a4d;color:#0f7a4d}
[data-theme="light"] .cash-jump .cash-jump-export{border-color:#bfe3cf;color:#0f7a4d;background:#eaf6f0}
[data-theme="light"] .chart-threshold{stroke:#b26b00}
[data-theme="light"] .chart-threshold-label{fill:#8a5a00}
[data-theme="light"] .cash-cascade-row{border-bottom-color:#e4eaf4}
[data-theme="light"] .cash-cascade-bar{background:#eef2f8}
[data-theme="light"] .cash-cascade-bar i{background:#2f6fd6}
[data-theme="light"] .cash-cascade-row.is-in .cash-cascade-bar i{background:#178a4c}
[data-theme="light"] .cash-cascade-row.is-out .cash-cascade-bar i{background:#d33a4a}
[data-theme="light"] td.is-in,[data-theme="light"] .is-in{color:#0f7a4d}
[data-theme="light"] td.is-out,[data-theme="light"] .is-out{color:#b3261e}
[data-theme="light"] .cash-suggestions{border-color:#bfe3cf;background:#f6fbf8}
[data-theme="light"] .cash-suggestion{border-bottom-color:#e4eaf4}
[data-theme="light"] .cash-flow-form,[data-theme="light"] .cash-settings-form{border-top-color:#e4eaf4}
[data-theme="light"] .cash-flow-form label,[data-theme="light"] .cash-settings-form label{color:#33425e}
/* Simulateur de décision (v444) */
[data-theme="light"] .decision-gap small,[data-theme="light"] .decision-kpis small,[data-theme="light"] .decision-kpis span,
[data-theme="light"] .optimizer-kpis span,[data-theme="light"] .decision-before-after small,[data-theme="light"] .decision-before-after span{color:#4f5f7d}
[data-theme="light"] .decision-kpis strong,[data-theme="light"] .optimizer-kpis strong,[data-theme="light"] .decision-before-after strong,
[data-theme="light"] .planner-plan-card>strong,[data-theme="light"] .cfo-answer strong{color:#1a2436}
[data-theme="light"] .decision-kpis strong.is-in,[data-theme="light"] .optimizer-kpis strong.is-in{color:#0f7a4d}
[data-theme="light"] .decision-kpis strong.is-out,[data-theme="light"] .optimizer-kpis strong.is-out{color:#b3261e}
[data-theme="light"] .optimizer-kpis>div,[data-theme="light"] .decision-before-after>div:not(.decision-before-after-arrow),
[data-theme="light"] .planner-plan-card{background:#ffffff;border-color:#dde5f2}
[data-theme="light"] .planner-plan-card.recommended{background:#f3faf6;border-color:#9fdcc0}
[data-theme="light"] .planner-plan-card span{color:#2257c9}
[data-theme="light"] .planner-plan-card p{color:#4f5f7d}
[data-theme="light"] .planner-debt-free{background:#f6fbf8;border-color:#bfe3cf;color:#1a2436}
[data-theme="light"] .cfo-answer{background:#f3faf6;border-color:#9fdcc0}
[data-theme="light"] .decision-optimized-status{color:#0f7a4d;background:#eaf6f0;border-color:#9fdcc0}
[data-theme="light"] .decision-before-after>div:last-child strong{color:#0f7a4d}
[data-theme="light"] .decision-before-after-arrow{color:#7b8bab}
[data-theme="light"] .optimizer-details summary{color:#1d5fd1}
[data-theme="light"] .decision-verdict.warning{border-left-color:#c97a00}
[data-theme="light"] .decision-verdict.good{border-left-color:#178a4c}
[data-theme="light"] .decision-verdict.danger{border-left-color:#d33a4a}
