/* ═══════════════════════════════════════════════════════════════════
   Δ-Score — Dark Mode V3.1
   Override CSS variables to force dark blue-black design
   ═══════════════════════════════════════════════════════════════════ */

/* Force dark variables globally */
:root {
  --bg: #04060a !important;
  --surface: #0d1018 !important;
  --surfaceAlt: #0d1018 !important;
  --surfaceWarm: #0a0c12 !important;
  --border: rgba(201,168,76,.2) !important;
  --borderLight: rgba(201,168,76,.12) !important;
  --text: rgba(240,236,228,.92) !important;
  --textBody: rgba(240,236,228,.85) !important;
  --textMuted: rgba(240,236,228,.65) !important;
  --textDim: rgba(240,236,228,.65) !important;
  --accent: #c9a84c !important;
  --accentLight: #ddbf88 !important;
  --accentBg: rgba(201,169,106,.08) !important;
  --zoneAccord: #c9a84c !important;
  --zonePlein: #6b9fd4 !important;
  --zoneTension: #daa050 !important;
  --zoneRupture: #d06060 !important;
  --paramC: #6b9fd4 !important;
  --paramE: #eac070 !important;
  --paramS: #9888cc !important;
  --paramR: #6aad6a !important;
  --paramP: #c47a95 !important;
  --paramCo: #6a9ab0 !important;
  --card-shadow: none !important;
}
html, body { background: #04060a !important; }

/* ═══════════════════════════════════════════════════════════════════
   TOGGLE — OFF gris, ON doré avec cercle blanc
   ═══════════════════════════════════════════════════════════════════ */
.gymn-toggle {
  background: rgba(240,236,228,.12) !important;
}
.gymn-toggle::after {
  background: rgba(240,236,228,.7) !important;
}
.gymn-toggle.on {
  background: #8B6914 !important;
}
.gymn-toggle.on::after {
  background: #fff !important;
}

/* ═══════════════════════════════════════════════════════════════════
   CHIPS & STEP-OPT-BTN — sélection bien visible
   ═══════════════════════════════════════════════════════════════════ */
.chip.sel,
.step-opt-btn.sel,
[class*="repas-type-btn"].sel {
  background: #8B6914 !important;
  border-color: #8B6914 !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   MÉDITATION DU JOUR
   ═══════════════════════════════════════════════════════════════════ */
#citation-niveau-card .t-quote {
  color: rgba(240,236,228,.85) !important;
}
#citation-niveau-card .t-src {
  color: rgba(201,168,76,.6) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   SAISIE OVERLAY — full dark
   ═══════════════════════════════════════════════════════════════════ */
#saisie-overlay {
  background: #04060a !important;
}
#saisie-overlay .saisie-header {
  background: #04060a !important;
  border-color: rgba(139,105,20,.15) !important;
}
#saisie-overlay .saisie-body {
  background: #04060a !important;
}
#saisie-overlay .saisie-nav {
  background: #04060a !important;
  border-color: rgba(139,105,20,.12) !important;
}
#saisie-overlay .btn-prev {
  background: none !important;
  color: rgba(240,236,228,.65) !important;
  border: none !important;
}
#saisie-overlay .btn-next,
#saisie-overlay .btn.btn-next {
  background: #8B6914 !important;
  color: #fff !important;
  border: none !important;
}
#saisie-overlay .saisie-period,
#saisie-overlay .saisie-step-info {
  color: rgba(240,236,228,.65) !important;
}
#saisie-overlay .saisie-close {
  color: rgba(240,236,228,.6) !important;
  background: none !important;
  border: none !important;
}
#saisie-overlay .progress-bar {
  background: rgba(139,105,20,.1) !important;
}
#saisie-overlay .progress-fill {
  background: #8B6914 !important;
}
body:has(#saisie-overlay.open) .nav,
body:has(#saisie-overlay.open) #global-nav,
body:has(#saisie-overlay.active) #global-nav,
body:has(#saisie-overlay[style*="display:block"]) #global-nav,
body:has(#saisie-overlay[style*="display: block"]) #global-nav {
  display: none !important;
}
#saisie-overlay {
  z-index: 250 !important;
}
/* Result overlay — also hide nav */
body:has(#result-overlay.open) #global-nav,
body:has(#result-overlay.active) #global-nav,
body:has(#result-overlay[style*="display:block"]) #global-nav,
body:has(#result-overlay[style*="display: block"]) #global-nav {
  display: none !important;
}
#result-overlay {
  z-index: 250 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   INSCRIPTION — gender, fields, reconnect
   ═══════════════════════════════════════════════════════════════════ */
.gender-btn {
  color: rgba(240,236,228,.6) !important;
}
#page-inscription .field input,
#page-inscription .field select,
#reconnect-box input,
#create-password-box input {
  background: #0d1018 !important;
  color: rgba(240,236,228,.92) !important;
  border-color: rgba(201,168,76,.2) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   GUIDE — paragraphs readable on dark
   ═══════════════════════════════════════════════════════════════════ */
.guide-p {
  color: rgba(240,236,228,.75) !important;
}
.guide-trinite-desc {
  color: rgba(240,236,228,.65) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   RESULT OVERLAY — dark
   ═══════════════════════════════════════════════════════════════════ */
#result-overlay {
  background: #04060a !important;
}
#result-content {
  background: #04060a !important;
  color: rgba(240,236,228,.85) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL NAV — gold bar, dark text, maximum readability
   ═══════════════════════════════════════════════════════════════════ */
#global-nav {
  background: #c9a84c !important;
  border-top: none !important;
}
#global-nav .nav-btn,
#global-nav button {
  background: transparent !important;
  border-color: rgba(0,0,0,.08) !important;
}
/* ALL nav labels & icons — force dark text on gold, override inline styles */
#global-nav button[data-nav] span,
#global-nav .nav-btn span,
#global-nav button span,
#global-nav #gnav-cercle-icon {
  color: rgba(10,6,2,.5) !important;
}
#global-nav button span:last-child,
#global-nav .nav-btn span:last-child {
  font-size: 11px !important;
  font-weight: 600 !important;
}
#global-nav button span:first-child,
#global-nav .nav-btn span:first-child {
  font-size: 19px !important;
}
/* Active nav item — uses .active class set by JS */
#global-nav button.active span,
#global-nav button[data-active="true"] span,
#global-nav .nav-btn.active span {
  color: #0A0A0A !important;
}
#global-nav button.active,
#global-nav button[data-active="true"],
#global-nav .nav-btn.active {
  border-top: 3px solid #0A0A0A !important;
  padding-top: 9px !important;
}

/* ═══════════════════════════════════════════════════════════════════
   BODY / HTML — catch ds-styles.css defaults
   ═══════════════════════════════════════════════════════════════════ */
html, body, #app, #page-main {
  background: #04060a !important;
}

/* ═══════════════════════════════════════════════════════════════════
   STREAK & CELEBRATION CARDS
   ═══════════════════════════════════════════════════════════════════ */
#streak-fire, #streak-msg {
  color: rgba(240,236,228,.6) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   HOME PAGE — force dark on all containers
   ═══════════════════════════════════════════════════════════════════ */
#page-home {
  background: #04060a !important;
  color: rgba(240,236,228,.85) !important;
}
#page-home > div {
  background: #04060a !important;
}

/* ── V31 STAT CARDS — the actual white culprit ── */
.v31-stat {
  background: #0d1018 !important;
  border: 1px solid rgba(139,105,20,.15) !important;
  color: rgba(240,236,228,.85) !important;
}
.v31-stat-val {
  color: rgba(240,236,228,.85) !important;
}
.v31-stat-label {
  color: rgba(240,236,228,.65) !important;
}
.v31-stat-sub {
  color: #c9a84c !important;
}
.v31-stats-4, .v31-stats-3 {
  background: transparent !important;
}
.v31-milestone {
  background: #0d1018 !important;
  border: 1px solid rgba(139,105,20,.15) !important;
  color: rgba(240,236,228,.7) !important;
}
.v31-badge {
  background: #0d1018 !important;
  border: 1px solid rgba(139,105,20,.15) !important;
  color: rgba(240,236,228,.6) !important;
}

/* ── ENV CARDS (stats page) — same problem ── */
.env-item, .v31-env-box {
  background: #0d1018 !important;
  border: 1px solid rgba(139,105,20,.15) !important;
}
.env-val, .v31-env-val {
  color: rgba(240,236,228,.85) !important;
}
.env-lbl, .v31-env-label {
  color: rgba(240,236,228,.65) !important;
}
.v31-env, .v31-env-grid {
  background: transparent !important;
}
/* KPI cards, graph, coach, citation — any card with border-radius inside home */
#page-home div[style*="border-radius:20px"],
#page-home div[style*="border-radius: 20px"] {
  background: #0d1018 !important;
  color: rgba(240,236,228,.85) !important;
}
/* KPI stat values */
#page-home div[style*="text-align:center"] > div {
  color: rgba(240,236,228,.85) !important;
}
/* Activités grid — force dark on empty/filled cards */
#home-acts-grid-v31 > div {
  background: #0d1018 !important;
  border-color: rgba(139,105,20,.15) !important;
}
/* Lattice section cards */
#page-home [style*="border:2px dashed"] {
  background: #0d1018 !important;
}
/* Streak card & celebration */
#page-home div[style*="grid-template-columns:repeat"] > div {
  background: #0d1018 !important;
  border-color: rgba(139,105,20,.15) !important;
}
/* Streak message */
#streak-msg {
  color: rgba(240,236,228,.6) !important;
}
/* Citation badge / niveau tag */
#page-home span[style*="border-radius:12px"],
#page-home div[style*="border-radius:12px"] {
  background: #0d1018 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDER RANGE INPUT (saisie axes)
   ═══════════════════════════════════════════════════════════════════ */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8B6914;
  border: 2px solid #c9a84c;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════
   NUCLEAR — catch any remaining inline light colors
   ═══════════════════════════════════════════════════════════════════ */

/* ── ds-styles.css var(--surface) = #FFFFFF overrides ── */
.card, .stat-box, .env-item, .counter-row, .time-field,
.wakeup-btn, .chip, textarea, .goal-input, .evo-leg-btn,
.insights-panel, .hm-tab, .period-tab, .btn-prev,
.evo-card, .evo-wrap, .sparkline-wrap,
.insights-overlay .insights-panel {
  background: #0d1018 !important;
  color: rgba(240,236,228,.85) !important;
}
/* SVG/Canvas inside cards — transparent background */
.card svg, .evo-card svg, .evo-wrap svg,
.sparkline-wrap svg, .card canvas, .evo-card canvas {
  background: transparent !important;
}
.chip.sel, .chip.sel-pos, .chip.sel-neg, .chip.sel-neu,
.wakeup-btn.sel, .hm-tab.active, .period-tab.active {
  background: #8B6914 !important;
  color: #fff !important;
}
/* var(--surfaceAlt) overrides */
.autosug-preview {
  background: rgba(139,105,20,.05) !important;
  color: rgba(240,236,228,.85) !important;
}
/* var(--bg) used as background */
.overlay, .saisie-header, .header, .nav, .saisie-nav {
  background: #04060a !important;
}
/* Saisie-nav — kill the #F5F0E8 !important in ds-styles.css line 856 */
.saisie-nav {
  background: #04060a !important;
  border-top-color: rgba(139,105,20,.12) !important;
}
/* Text colors from var(--text*) */
.counter-label, .toggle-label, .saisie-period,
.step-q, .gauge-score, .step-val, .counter-val,
.stat-val, .axbar-label, .score-line {
  color: rgba(240,236,228,.92) !important;
}
.saisie-step-info, .counter-sub, .toggle-sub,
.sleep-norm, .step-level, .slider-tick, .time-label,
.header-sub, .env-lbl, .stat-lbl, .gauge-desc,
.citation-attr, .hm-leg-item, .bal-labels span {
  color: rgba(240,236,228,.65) !important;
}
.citation, .insights-body, .stat-table td {
  color: rgba(240,236,228,.78) !important;
}
.stat-table th {
  color: rgba(240,236,228,.65) !important;
  border-bottom-color: rgba(139,105,20,.2) !important;
}
.stat-table td {
  border-bottom-color: rgba(139,105,20,.08) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   DIRECT CLASS OVERRIDES — bypass var() caching issues
   ═══════════════════════════════════════════════════════════════════ */
/* Word cloud */
.dream-word {
  color: rgba(240,236,228,.85) !important;
}
.dream-cloud {
  color: rgba(240,236,228,.85) !important;
}
/* Radar SVG text labels */
#st-radar text {
  fill: rgba(240,236,228,.85) !important;
}
/* Evolution SVG text */
#evo-svg text {
  fill: rgba(240,236,228,.65) !important;
}
/* Sparkline SVG text */
#sparkline-svg text {
  fill: rgba(240,236,228,.65) !important;
}
/* Card titles */
.card-title {
  color: #c9a84c !important;
}
/* All stat labels and values */
.stat-val, .env-val, .gauge-score {
  color: rgba(240,236,228,.92) !important;
}
.stat-lbl, .env-lbl, .gauge-desc, .header-sub {
  color: rgba(240,236,228,.65) !important;
}
/* Correlation items */
.corr-item {
  color: rgba(240,236,228,.85) !important;
  border-color: rgba(139,105,20,.1) !important;
}
/* Score lines */
.score-line {
  color: rgba(240,236,228,.85) !important;
  border-color: rgba(139,105,20,.08) !important;
}
/* Citation */
.citation {
  color: rgba(240,236,228,.85) !important;
  border-left-color: #c9a84c !important;
}
.citation-attr {
  color: rgba(240,236,228,.65) !important;
}
/* Guide paragraphs */
.guide-p {
  color: rgba(240,236,228,.78) !important;
}
/* Insights */
.insights-body {
  color: rgba(240,236,228,.85) !important;
}
.insights-title {
  color: rgba(240,236,228,.92) !important;
}
/* Header */
.header-brand {
  color: rgba(240,236,228,.65) !important;
}
.header-title {
  color: rgba(240,236,228,.92) !important;
}
/* Table */
.stat-table td {
  color: rgba(240,236,228,.85) !important;
  border-color: rgba(139,105,20,.08) !important;
}
.stat-table th {
  color: rgba(240,236,228,.65) !important;
  border-color: rgba(139,105,20,.15) !important;
}



/* ═══════════════════════════════════════════════════════════════════
   ABSOLUTE NUCLEAR — kill ALL white/beige via var(--surface)
   ═══════════════════════════════════════════════════════════════════ */
/* Any v31-* class with white background */
[class*="v31-"][class*="-box"],
[class*="v31-"][class*="-stat"],
[class*="v31-"][class*="-env"],
[class*="v31-"][class*="-card"],
[class*="v31-"][class*="-item"],
[class*="v31-"][class*="-milestone"],
[class*="v31-"][class*="-badge"] {
  background: #0d1018 !important;
  border: 1px solid rgba(139,105,20,.15) !important;
}
[class*="v31-"][class*="-val"] {
  color: rgba(240,236,228,.85) !important;
}
[class*="v31-"][class*="-label"],
[class*="v31-"][class*="-sub"],
[class*="v31-"][class*="-lbl"] {
  color: rgba(240,236,228,.65) !important;
}
[class*="v31-"][class*="-grid"],
[class*="v31-"][class*="-env"]:not([class*="-box"]):not([class*="-val"]):not([class*="-label"]) {
  background: transparent !important;
}

/* Any div inside #page-home with border-radius (= card) */
#page-home div[style*="border-radius"] {
  background: #0d1018 !important;
}
/* Stats/Evolution page cards */
.ds-page div[style*="border-radius"],
.ds-screen div[style*="border-radius"] {
  background: #0d1018 !important;
}
/* Pages secondaires */
.ds-page, .ds-screen, .pbody, .ptab, .bloc {
  background: #04060a !important;
  color: rgba(240,236,228,.85) !important;
}
/* Stats page — kill ALL white cards */
#page-stats, #page-stats .pbody, #page-stats .ptab {
  background: #04060a !important;
}
#page-stats .card,
#page-stats .evo-card,
#page-stats [class*="v31-"]:not(.active),
#page-stats div[style*="border-radius"] {
  background: #0d1018 !important;
  color: rgba(240,236,228,.85) !important;
}
/* Stats page SVG backgrounds */
#page-stats svg {
  background: transparent !important;
}
/* Correlation bars — visible on dark */
#page-stats .corr-item {
  border-color: rgba(139,105,20,.1) !important;
}
/* Correlation bar fills — lighten from black to gold */
#page-stats [style*="background:#0"],
#page-stats [style*="background:#1"],
#page-stats [style*="background:#2"],
#page-stats [style*="background: #0"],
#page-stats [style*="background: #1"],
#page-stats [style*="background: #2"] {
  background: #c9a84c !important;
}
/* Word cloud text — lighten dark accent colors */
#page-stats [style*="color:#8B6914"],
#page-stats [style*="color:#8b6914"],
#page-stats span[style*="color:#8B6914"],
#page-stats span[style*="color:#8b6914"] {
  color: #c9a84c !important;
}
/* Any dark brown/olive text in stats */
#page-stats [style*="color:rgb(139"],
#page-stats [style*="color: rgb(139"] {
  color: #c9a84c !important;
}
/* Settings page */
#page-settings, #settings-content {
  background: #04060a !important;
  color: rgba(240,236,228,.85) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   CALENDAR DETAIL — day popup overlay
   ═══════════════════════════════════════════════════════════════════ */
#cal-detail-overlay {
  background: #04060a !important;
  color: rgba(240,236,228,.85) !important;
}
#cal-detail-overlay > div {
  background: #04060a !important;
}
#cal-detail-overlay div {
  color: rgba(240,236,228,.85) !important;
}
#cal-detail-overlay p {
  color: rgba(240,236,228,.78) !important;
}
#cal-detail-overlay [style*="background:#F"],
#cal-detail-overlay [style*="background:#f"],
#cal-detail-overlay [style*="background:#FFF"],
#cal-detail-overlay [style*="background:rgb(255"],
#cal-detail-overlay [style*="background: rgb(255"],
#cal-detail-overlay [style*="background:#fff"],
#cal-detail-overlay [style*="background:white"],
#cal-detail-overlay [style*="background:#F0F0F0"] {
  background: #0d1018 !important;
}
#cal-detail-overlay [style*="border-bottom:1px solid #F"],
#cal-detail-overlay [style*="border-bottom:1px solid #E"],
#cal-detail-overlay [style*="border:1px solid #F"] {
  border-color: rgba(139,105,20,.12) !important;
}
#cal-detail-overlay [style*="color:#333"],
#cal-detail-overlay [style*="color:#1A"],
#cal-detail-overlay [style*="color:#2C"],
#cal-detail-overlay [style*="color:#0A"] {
  color: rgba(240,236,228,.85) !important;
}
/* Sticky header */
#cal-detail-overlay [style*="position:sticky"],
#cal-detail-overlay [style*="position: sticky"] {
  background: #04060a !important;
  border-color: rgba(139,105,20,.15) !important;
}
/* Axbar track */
#cal-detail-overlay .axbar-track {
  background: rgba(201,168,76,.12) !important;
}

#cal-detail, #cal-detail-content,
#prc-cal-detail, #prc-cal-detail-content {
  background: #04060a !important;
  color: rgba(240,236,228,.85) !important;
}
#cal-detail-content div,
#prc-cal-detail-content div {
  background: transparent !important;
}
#cal-detail-content .card,
#cal-detail-content div[style*="background:#fff"],
#cal-detail-content div[style*="background:#FFF"],
#cal-detail-content div[style*="background:#FFFFFF"],
#cal-detail-content div[style*="background:white"] {
  background: #0d1018 !important;
}
/* Calendar page */
#page-cal {
  background: #04060a !important;
}
.cal-grid {
  background: #04060a !important;
}
.cal-nav, .cal-month, .cal-arrow {
  color: rgba(240,236,228,.85) !important;
  background: transparent !important;
}
/* Axbar labels in day detail */
#cal-detail-content .axbar-label span,
#prc-cal-detail-content .axbar-label span {
  color: rgba(240,236,228,.85) !important;
}
#cal-detail-content .axbar-track {
  background: rgba(201,168,76,.12) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   REMAINING WHITE BACKGROUNDS IN HTML
   ═══════════════════════════════════════════════════════════════════ */
#ds-blocked-overlay input {
  background: #0d1018 !important;
  color: rgba(240,236,228,.92) !important;
}
#settings-content input,
#settings-content select,
#settings-content textarea {
  background: transparent !important;
  color: rgba(240,236,228,.92) !important;
  border-color: rgba(139,105,20,.15) !important;
}
#settings-content select option {
  background: #0d1018 !important;
  color: rgba(240,236,228,.92) !important;
}

/* Preserve accent colors from nuclear override */
[style*="color:#8B6914"] { color: #8B6914 !important; }
[style*="color:#8b6914"] { color: #8b6914 !important; }
[style*="color:#c9a84c"] { color: #c9a84c !important; }
[style*="color:#4a6fa5"] { color: #4a6fa5 !important; }
[style*="color:#a05070"] { color: #a05070 !important; }
[style*="color:#6a5aad"] { color: #6a5aad !important; }
[style*="color:#7ab648"] { color: #7ab648 !important; }
[style*="color:#CC4400"] { color: #CC4400 !important; }
[style*="color:#c06060"] { color: #c06060 !important; }
[style*="color:#b71c1c"] { color: #b71c1c !important; }
[style*="color:#e65100"] { color: #e65100 !important; }
[style*="color:#e6a817"] { color: #e6a817 !important; }
[style*="color:#1565c0"] { color: #1565c0 !important; }
[style*="color:#7a3a7a"] { color: #7a3a7a !important; }

/* ═══════════════════════════════════════════════════════════════════
   DOOMSDAY — override var(--surface) at root level
   This is the definitive fix: since ds-dark.css loads LAST,
   re-declaring --surface here overrides ds-styles.css :root
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --surface: #0d1018 !important;
  --surfaceAlt: #0d1018 !important;
  --surfaceWarm: #0a0c12 !important;
  --bg: #04060a !important;
  --text: rgba(240,236,228,.92) !important;
  --textBody: rgba(240,236,228,.85) !important;
  --textMuted: rgba(240,236,228,.65) !important;
  --textDim: rgba(240,236,228,.65) !important;
  --accent: #c9a84c !important;
  --accentLight: #ddbf88 !important;
  --accentBg: rgba(201,169,106,.08) !important;
  --border: rgba(201,168,76,.2) !important;
  --borderLight: rgba(201,168,76,.12) !important;
  --card-shadow: none !important;
  /* Zone colors — lightened for dark */
  --zonePlein: #6b9fd4 !important;
  --zoneAccord: #c9a84c !important;
  --zoneTension: #daa050 !important;
  --zoneRupture: #d06060 !important;
  /* Param colors — lightened for dark backgrounds */
  --paramC: #6b9fd4 !important;
  --paramE: #eac070 !important;
  --paramS: #9888cc !important;
  --paramR: #6aad6a !important;
  --paramP: #c47a95 !important;
  --paramCo: #6a9ab0 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   DOOMSDAY TEXT — catch ALL hardcoded dark text colors
   These target inline styles with light-mode text colors
   that are invisible on dark backgrounds
   ═══════════════════════════════════════════════════════════════════ */

/* Dark text colors → light (covers #0xxxxx, #1xxxxx, #2xxxxx, #3xxxxx, #4xxxxx, #5xxxxx) */
[style*="color:#0"],
[style*="color:#1"],
[style*="color:#2"],
[style*="color:#3"],
[style*="color:#4"],
[style*="color:#5"],
[style*="color: #0"],
[style*="color: #1"],
[style*="color: #2"],
[style*="color: #3"],
[style*="color: #4"],
[style*="color: #5"] {
  color: rgba(240,236,228,.85) !important;
}

/* rgba dark text → light */
[style*="color:rgba(60,40,10"],
[style*="color: rgba(60,40,10"],
[style*="color:rgba(44,30,8"],
[style*="color: rgba(44,30,8"],
[style*="color:rgba(26,23,20"],
[style*="color: rgba(26,23,20"],
[style*="color:rgba(10,10,10"],
[style*="color: rgba(10,10,10"] {
  color: rgba(240,236,228,.7) !important;
}

/* Light background catchers — global, not just #app */
[style*="background:#F"],
[style*="background:#f"],
[style*="background:#E"],
[style*="background:#e"],
[style*="background:#FFF"],
[style*="background:#fff"],
[style*="background:white"],
[style*="background: #F"],
[style*="background: #f"],
[style*="background: #E"],
[style*="background: #e"],
[style*="background: #FFF"],
[style*="background: #fff"],
[style*="background: white"],
[style*="background:#F7F3EE"],
[style*="background:#f5f0e8"],
[style*="background:#F5F0E8"] {
  background: #0d1018 !important;
}

/* Preserve accent/zone colors — LIGHTENED for dark mode readability */
[style*="color:#8B6914"] { color: #c9a84c !important; }
[style*="color:#8b6914"] { color: #c9a84c !important; }
[style*="color:#c9a84c"] { color: #c9a84c !important; }
[style*="color:#C9A84C"] { color: #C9A84C !important; }
[style*="color:#c47a10"] { color: #daa050 !important; }
[style*="color:#4a6fa5"] { color: #6b9fd4 !important; }
[style*="color:#6b9fd4"] { color: #6b9fd4 !important; }
[style*="color:#a05070"] { color: #c47a95 !important; }
[style*="color:#6a5aad"] { color: #9888cc !important; }
[style*="color:#9888cc"] { color: #9888cc !important; }
[style*="color:#7ab648"] { color: #9cd06a !important; }
[style*="color:#6aad6a"] { color: #8cd08c !important; }
[style*="color:#2e7d32"] { color: #6aad6a !important; }
[style*="color:#CC4400"] { color: #e06830 !important; }
[style*="color:#c06060"] { color: #d08080 !important; }
[style*="color:#d06060"] { color: #e08080 !important; }
[style*="color:#b71c1c"] { color: #d04040 !important; }
[style*="color:#e65100"] { color: #f07030 !important; }
[style*="color:#e6a817"] { color: #f0c040 !important; }
[style*="color:#1565c0"] { color: #4a90e0 !important; }
[style*="color:#7a3a7a"] { color: #a060a0 !important; }
[style*="color:#c47a95"] { color: #d49aaa !important; }
[style*="color:#6a9ab0"] { color: #8abace !important; }
[style*="color:#daa050"] { color: #eac070 !important; }
[style*="color:#4a8090"] { color: #6aa0b0 !important; }

/* ═══════════════════════════════════════════════════════════════════
   PATCH — Extension Chrome audit 06/04/2026
   ═══════════════════════════════════════════════════════════════════ */
/* Dreams cloud words */
.v31-dreams-cloud span,
[class*="dreams-cloud"] span {
  color: rgba(240,236,228,.85) !important;
}
/* Resolution clarity slider */
#res-clarity {
  accent-color: #c9a84c !important;
  background: rgba(201,168,76,.12) !important;
}
/* All range inputs */
input[type="range"] {
  accent-color: #c9a84c !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PATCH — Titres pages sph (Résolution, Intention, etc.)
   ═══════════════════════════════════════════════════════════════════ */
.sph-title {
  color: rgba(240,236,228,.92) !important;
}
.sph-back {
  color: #c9a84c !important;
}
.sph-sub {
  color: rgba(240,236,228,.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PATCH — Lisibilité V3.1 — 07/04/2026
   Placeholders, labels, textes muted plus visibles
   ═══════════════════════════════════════════════════════════════════ */

/* Placeholders — plus lumineux sur fond sombre */
::placeholder {
  color: rgba(240,236,228,.40) !important;
  opacity: 1 !important;
}
::-webkit-input-placeholder { color: rgba(240,236,228,.40) !important; opacity: 1 !important; }
::-moz-placeholder { color: rgba(240,236,228,.40) !important; opacity: 1 !important; }

/* Textes muted / dim — remonter de .25-.35 vers .50 */
[style*="color:rgba(240,236,228,.2)"] { color: rgba(240,236,228,.45) !important; }
[style*="color:rgba(240,236,228,.25)"] { color: rgba(240,236,228,.45) !important; }
[style*="color:rgba(240,236,228,.3)"] { color: rgba(240,236,228,.50) !important; }
[style*="color:rgba(240,236,228,.35)"] { color: rgba(240,236,228,.50) !important; }
[style*="color:rgba(240,236,228,.4)"] { color: rgba(240,236,228,.55) !important; }
[style*="color:rgba(240,236,228,.45)"] { color: rgba(240,236,228,.55) !important; }

/* Labels DM Mono uppercase — plus lumineux */
[style*="letter-spacing:.16em"][style*="color:rgba(240,236,228"] {
  color: rgba(240,236,228,.55) !important;
}
[style*="letter-spacing:.18em"][style*="color:rgba(240,236,228"] {
  color: rgba(240,236,228,.55) !important;
}
[style*="letter-spacing:.14em"][style*="color:rgba(240,236,228"] {
  color: rgba(240,236,228,.55) !important;
}

/* Or muted — remonter aussi */
[style*="color:rgba(201,168,76,.4)"] { color: rgba(201,168,76,.6) !important; }
[style*="color:rgba(201,168,76,.3)"] { color: rgba(201,168,76,.5) !important; }
[style*="color:rgba(139,105,20,.45)"] { color: rgba(201,168,76,.6) !important; }

/* Sous-titres des notifications et settings */
[style*="font-size:13px"][style*="color:rgba(240,236,228,.4)"] {
  color: rgba(240,236,228,.55) !important;
}

/* Counter values et labels */
.counter-label { color: rgba(240,236,228,.85) !important; }
.counter-sub { color: rgba(240,236,228,.55) !important; }
.counter-val { color: #c9a84c !important; }
