/* ═══ Thème clair (2026-10-09) ═══
   Activé par html[data-theme="light"] (bouton soleil / lune de la barre, mémorisé dans localStorage « theme »).
   Chargé après les feuilles de page : il redéfinit les couleurs de base, puis reprend les fonds et liserés
   écrits en dur pour le thème sombre. */
html[data-theme="light"]{
  color-scheme:light;
  --bg:#F5F7FB; --surface:#FFFFFF; --surface-2:#EEF2F8;
  --glass:#FFFFFF; --glass-2:#F1F4F9; --glass-3:#E6ECF4;
  --border:rgba(15,23,42,.10); --border-strong:rgba(15,23,42,.18);
  --cta:#0E1525; --cta-hover:#24304A; --cta-ink:#FFFFFF;
  --cta-shadow:0 1px 2px rgba(15,23,42,.18); --cta-shadow-hover:0 6px 18px rgba(15,23,42,.18);
  --accent-soft:#2563EB; --accent:#2563EB;
  --text-hi:#0B1220; --text:#1F2937; --mist:#374151; --muted:#4B5563; --faint:#6B7280;
  --danger:#DC2626; --success:#059669; --warning:#B45309;
  --edge:inset 0 0 0 1px rgba(15,23,42,.10);
  --lit:inset 0 0 0 1px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --lit-drop:inset 0 0 0 1px rgba(15,23,42,.08), 0 12px 32px rgba(15,23,42,.08);
}
html[data-theme="light"] body{background:var(--bg);color:var(--text);}
html[data-theme="light"] body > header{background:rgba(255,255,255,.88) !important;box-shadow:inset 0 -1px 0 rgba(15,23,42,.08) !important;}
html[data-theme="light"] body > header.is-scrolled{background:rgba(255,255,255,.96) !important;}

/* Logo : foncé sur fond clair */
html[data-theme="light"] .logo img,html[data-theme="light"] .auth-logo img,html[data-theme="light"] .foot-logo img{filter:grayscale(1) brightness(.18) !important;}
html[data-theme="light"] .logo:hover img{filter:grayscale(1) brightness(0) !important;}

/* Cartes et panneaux : blanc, liseré gris, ombre légère */
html[data-theme="light"] :is(.glass,.plate,.plate-main,.range,.tool,.faq-i,.tbl-wrap,.win,.route li,.inspect li,.legend,.stat-card,.dash-card,.table-card,.chart-card,
  .cfg-panel,.summary-card,.auth-card,.tool-card,.tool-cta,.post-card,.toc,.toc-card,.highlight-box,.warn-box,.contact-card,.article-cta,.hero2-app,
  .disc-card,.r-modal,.modal,.crypto-modal,.modal-box,.close-card,.page-card){
  background:#FFFFFF !important;box-shadow:0 0 0 1px rgba(15,23,42,.08), 0 10px 28px rgba(15,23,42,.05) !important;border-color:rgba(15,23,42,.08) !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;}
html[data-theme="light"] :is(.h2a-box,.ip-cell,.win-pre,.win-rows > div,.cfg-option,.tier,.cc,.qty-row,.preset-btn,.pc-type,.range-spec li,.chain-s,.legend dt,
  .disc-user,.auto-btn,.ptabs,.seg,.h2a-bar,.win-bar,.sum-top,.perk,.post-tag,.nav-mi-ico,.nav-pop-ico,.tile,.tile-sm,.disc-ico,.range .range-ico){
  background:#F4F6FA !important;box-shadow:inset 0 0 0 1px rgba(15,23,42,.08) !important;}
html[data-theme="light"] :is(.cfg-option.sel,.tier.is-on,.cc.sel,.pc-type.sel,.ptab.is-on,.auto-btn.is-on){
  background:#EAF1FE !important;box-shadow:inset 0 0 0 1.5px #2563EB !important;color:var(--text-hi) !important;}
html[data-theme="light"] :is(.tier.is-on .tier-p,.pc-type.sel,.cc.sel,.ip-big,.disc-name,.nav-mi.active,.tab-btn.active,.h2a-v,.win-t){color:var(--text-hi) !important;}
html[data-theme="light"] .h2a-row code,html[data-theme="light"] .win-pre,html[data-theme="light"] code,html[data-theme="light"] pre{color:var(--text) !important;}
html[data-theme="light"] .h2a-meter,html[data-theme="light"] .meter-bar{background:#E5EAF2 !important;}
html[data-theme="light"] .h2a-row{box-shadow:inset 0 -1px 0 rgba(15,23,42,.06) !important;}
html[data-theme="light"] .h2a-row:last-child{box-shadow:none !important;}
html[data-theme="light"] .h2a-bar s,html[data-theme="light"] .win-bar i{background:#CBD5E1 !important;}

/* Menus de la barre, menu mobile, fenêtres */
html[data-theme="light"] :is(.nav-mega,.nav-pop,#nav-mobile-menu){background:#FFFFFF !important;box-shadow:0 1px 0 rgba(15,23,42,.08), 0 20px 40px rgba(15,23,42,.10) !important;}
html[data-theme="light"] :is(.nav-mi:hover,.nav-pr:hover,.mob-link:hover,.nav-pop a:hover,.nav-lang-opt:hover,.nav-mm-btn:hover,.nav-mm.open .nav-mm-btn,.nav-ico:hover){background:#F1F4F9 !important;}
html[data-theme="light"] .nav-mk,html[data-theme="light"] .nav-pr-r{border-color:rgba(15,23,42,.08) !important;}
html[data-theme="light"] .nav-badge{color:#1D4ED8;background:#E8F0FE;}
html[data-theme="light"] .nav-wallet,html[data-theme="light"] .mob-balance{background:#F4F6FA !important;box-shadow:inset 0 0 0 1px rgba(15,23,42,.08) !important;}
html[data-theme="light"] .nav-wallet-btn{background:#E6ECF4 !important;color:var(--text-hi) !important;box-shadow:none !important;}
html[data-theme="light"] .overlay,html[data-theme="light"] .r-overlay,html[data-theme="light"] .modal-overlay,html[data-theme="light"] #crypto-overlay{background:rgba(15,23,42,.35) !important;}
html[data-theme="light"] #overlay .modal .modal-btns{background:#FFFFFF !important;box-shadow:0 -1px 0 rgba(15,23,42,.08) !important;}

/* Champs de saisie */
html[data-theme="light"] :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]){
  background:#FFFFFF !important;color:var(--text-hi) !important;box-shadow:inset 0 0 0 1px rgba(15,23,42,.14) !important;border-color:rgba(15,23,42,.14) !important;}
html[data-theme="light"] :is(input,textarea)::placeholder{color:#9AA3B2 !important;}

/* Tableaux */
html[data-theme="light"] th{background:#F4F6FA !important;color:var(--mist) !important;box-shadow:inset 0 -1px 0 rgba(15,23,42,.08) !important;}
html[data-theme="light"] td{border-bottom-color:rgba(15,23,42,.06) !important;}
html[data-theme="light"] tr:hover td{background:#F8FAFC !important;}
html[data-theme="light"] .tbl tbody tr > *{background-image:linear-gradient(rgba(15,23,42,.07),rgba(15,23,42,.07)) !important;}

/* Boutons secondaires et fantômes */
html[data-theme="light"] :is(.btn-secondary,.btn-sm,.copy-btn,.btn-refresh,.tk-filter-btn,.btn-back,.back-btn,.modal-cancel,.btn-cancel,.ip-copy,.win-copy,.disc-unlink,.range .range-go){
  background:#FFFFFF !important;color:var(--text-hi) !important;box-shadow:inset 0 0 0 1px rgba(15,23,42,.14) !important;border-color:rgba(15,23,42,.14) !important;}
html[data-theme="light"] :is(.btn-secondary,.btn-sm,.copy-btn,.range .range-go):hover{background:#F1F4F9 !important;}

/* Séparateurs et petits éléments décoratifs */
html[data-theme="light"] :is(.foot)::before,html[data-theme="light"] .eyebrow::before,html[data-theme="light"] .eyebrow::after{background:rgba(15,23,42,.12) !important;}
html[data-theme="light"] .neon-sep,html[data-theme="light"] .chain::before{background:rgba(15,23,42,.10) !important;}
html[data-theme="light"] .section-header,html[data-theme="light"] .tabs-bar,html[data-theme="light"] .tab-bar{border-color:rgba(15,23,42,.08) !important;}
html[data-theme="light"] .badge-fav,html[data-theme="light"] .range-tag,html[data-theme="light"] .ptab-new{background:#0E1525 !important;color:#fff !important;}
html[data-theme="light"] .hero2-ck li::before{background-color:#E8F0FE !important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%232563EB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;}
html[data-theme="light"] .hero2-pill{box-shadow:inset 0 0 0 1px rgba(15,23,42,.14) !important;}
html[data-theme="light"] .h2a-row em,html[data-theme="light"] .badge-green,html[data-theme="light"] .tag-ok{color:#047857 !important;background:#D1FAE5 !important;}
html[data-theme="light"] .h2a-row b{background:#10B981 !important;}
html[data-theme="light"] ::selection{background:rgba(37,99,235,.18);color:var(--text-hi);}
html[data-theme="light"] .skip{background:var(--cta);color:#fff;}

/* Textes écrits en dur pour le fond sombre (blog, pages légales, outils, espace client) */
html[data-theme="light"] :is(.article-body,.article-body p,.article-body li,.post-excerpt,.faq-item p,.cmp-table td,.callout,.toc a,.blog-lead,
  .section p,.section ul,.section ol,.section li,.toc-list li a,.highlight-box,.info-box,.contact-card p,.data-table td,.right-card-desc,
  .alias-empty,.footer-copy,.footer-nav a){color:var(--text) !important;}
html[data-theme="light"] .article-body pre code,html[data-theme="light"] .article-body pre{color:#1F2937 !important;background:#F4F6FA !important;}
html[data-theme="light"] .warn-box{color:#7C2D12 !important;background:#FFF7ED !important;}
html[data-theme="light"] .toc a:hover,html[data-theme="light"] .toc-list li a:hover{color:var(--accent-soft) !important;}
html[data-theme="light"] :is(.amount-btn.sel,.r-crypto-opt.selected,.r-tab.active,.renew-dur-btn.renew-dur-sel,.seg-b.is-on,.post-card:hover h3){color:var(--text-hi) !important;}
html[data-theme="light"] .tbl tbody th{background:transparent !important;box-shadow:none !important;color:var(--mist) !important;}
html[data-theme="light"] [style*="#fbbf24"],html[data-theme="light"] [style*="#FBBF24"]{color:#B45309 !important;}
html[data-theme="light"] [style*="color:#34d399"],html[data-theme="light"] [style*="color: #34d399"]{color:#047857 !important;}

/* Contrastes sur fond clair : verts, bleus et gris pensés pour le fond sombre */
html[data-theme="light"]{--prose:#1F2937;--code-bg:#F4F6FA;--code-line:#E2E8F0;--code-text:#1F2937;}
html[data-theme="light"] :is(.doc p,.doc li,.doc dd,.doc td,.lead,.vendor-field span,.cgv-table td,.data-table td,section > p){color:var(--text) !important;}
html[data-theme="light"] :is(.section a,.info-box a,p > a,#expired-hint > a,.doc a){color:#1D4ED8 !important;}
html[data-theme="light"] .verb.get{color:#047857 !important;background:#D1FAE5 !important;border-color:#A7F3D0 !important;}
html[data-theme="light"] .verb.post{color:#1D4ED8 !important;background:#DBEAFE !important;border-color:#BFDBFE !important;}
html[data-theme="light"] :is(.tier-r,.sum-top-label,.ip-cell .k,.auto-l,.mob-console-n,.buy-bar-label){color:var(--muted) !important;}
html[data-theme="light"] .tbl td.is-floor{color:#1D4ED8 !important;}
html[data-theme="light"] .chain .chain-s .is-off{color:#B91C1C !important;}
html[data-theme="light"] .buy-bar{background:rgba(255,255,255,.96) !important;box-shadow:0 -1px 0 rgba(15,23,42,.08), 0 -8px 24px rgba(15,23,42,.06) !important;}
html[data-theme="light"] #buy-bar-amount{color:var(--text-hi) !important;}
html[data-theme="light"] :is(.cm-icon,.cm-warning,#ct-address,#cf-credit,#cf-total,#r-fee-credit,#r-fee-amount,.r-modal span){color:var(--text) !important;}
html[data-theme="light"] .cm-warning{background:#FFF7ED !important;color:#7C2D12 !important;}
/* Verts, ambres et bleus lisibles sur blanc (y compris ceux posés en style en ligne par les scripts) */
html[data-theme="light"] :is(.cfg-stock,#v-stock,.exp-countdown.exp-ok,.dash-row-right,.tier-o){color:#047857 !important;}
html[data-theme="light"] .cfg-stock[style*="251, 191, 36"],html[data-theme="light"] .cfg-stock[style*="fbbf24"]{color:#B45309 !important;}
html[data-theme="light"] .dash-row-right[style*="f43f5e"],html[data-theme="light"] .dash-row-right[style*="244, 63, 94"]{color:#B91C1C !important;}
html[data-theme="light"] :is(#r-fee-credit,#r-fee-amount,#r-fee-total,.r-modal span:not([class*="ico"])){color:var(--text) !important;}
html[data-theme="light"] #r-btn,html[data-theme="light"] #r-btn span{color:#fff !important;}
html[data-theme="light"] :is(.mob-console-n,.mob-ln,.mob-btn2,td.mono,span > b){color:var(--text) !important;}
html[data-theme="light"] #rw-state{color:var(--text) !important;}
html[data-theme="light"] .rw-chip.top{color:#fff !important;background:#0E1525 !important;}
html[data-theme="light"] :is(.tk-kw){color:#7C3AED !important;} html[data-theme="light"] :is(.tk-str){color:#047857 !important;}
html[data-theme="light"] :is(.tk-url,.tk-key){color:#1D4ED8 !important;} html[data-theme="light"] :is(.tk-flag,.tk-num){color:#B45309 !important;}
html[data-theme="light"] .cgv-table td,html[data-theme="light"] table td{color:var(--text) !important;}
html[data-theme="light"] :is(.req,.st,.tk-com,.mob-console-n,.mob-btn2,.mob-ln,td > span){color:var(--text) !important;}
html[data-theme="light"] .rw-dot{background:#CBD5E1 !important;color:var(--text) !important;} html[data-theme="light"] .rw-dot.on{background:#0E1525 !important;color:#fff !important;}
html[data-theme="light"] .r-modal :is(#r-fee-credit,#r-fee-amount,#r-fee-total){color:var(--text-hi) !important;}
html[data-theme="light"] .r-foot{background:#FFFFFF !important;box-shadow:0 -1px 0 rgba(15,23,42,.08) !important;}
html[data-theme="light"] #panel-mobile .mob-console{background:#F4F6FA !important;border-color:rgba(15,23,42,.10) !important;}
html[data-theme="light"] #panel-mobile :is(.mob-console-hd,.mob-console-act){background:transparent !important;border-color:rgba(15,23,42,.08) !important;}
html[data-theme="light"] .rw-dot.on{background:#0E1525 !important;border-color:#0E1525 !important;color:#fff !important;}
