@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@500;700&display=swap');
        body { background-color: #020617; color: #e2e8f0; font-family: 'Inter', sans-serif; overflow: hidden; }
        .custom-scrollbar::-webkit-scrollbar { width: 6px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
        .node-active { border-left: 4px solid #10b981; background: rgba(16, 185, 129, 0.2) !important; color: white !important; }
        .tree-item:hover { background: rgba(255,255,255,0.05); }
        .note-badge { font-size: 9px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 800; margin-bottom: 8px; display: inline-block; }
        .highlight { background-color: rgba(234, 179, 8, 0.3); color: #fde047; padding: 0 1px; border-radius: 2px; font-weight: 600; }
        .breadcrumb-item:not(:last-child)::after { content: '›'; margin: 0 8px; color: #475569; }
        .watermark { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 8rem; font-weight: 900; color: rgba(255,255,255,0.03); pointer-events: none; z-index: 0; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5em; }
        .ai-glow { box-shadow: 0 0 20px rgba(16, 185, 129, 0.15); border-color: #10b981 !important; }
        .scroll-mt-20 { scroll-margin-top: 5rem; }
        @keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
        .ai-pulse { animation: pulse-soft 2s infinite; }
        .hybrid-badge { background: linear-gradient(135deg, #10b981, #3b82f6); }
    
        /* MOBILE */
        @media (max-width: 768px) { body { overflow: auto !important; } .desktop-layout { display: none !important; } .mobile-layout { display: flex !important; flex-direction: column; } .watermark { display: none !important; } }
        @media (min-width: 769px) { .mobile-layout { display: none !important; } }
        .mobile-layout { display: none; min-height: 100vh; background: #0f172a; }
        .mobile-header { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: #0f172a; border-bottom: 1px solid #334155; display: flex; align-items: center; padding: 0 8px; z-index: 100; gap: 6px; overflow: hidden; }
        .mobile-search-input { flex: 1; min-width: 0; background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 8px 10px; color: #e2e8f0; font-size: 13px; outline: none; }
        .mobile-search-input:focus { border-color: #10b981; }
        .mobile-content { flex: 1; margin-top: 56px; margin-bottom: 64px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
        .mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: linear-gradient(to top, #0f172a, #1e293b); border-top: 1px solid #334155; display: flex; justify-content: space-around; align-items: center; z-index: 100; }
        .mobile-nav-item { display: flex; flex-direction: column; align-items: center; flex: 1; padding: 8px; color: #64748b; cursor: pointer; }
        .mobile-nav-item.active { color: #10b981; }
        .mobile-nav-item svg { width: 22px; height: 22px; margin-bottom: 2px; }
        .mobile-nav-label { font-size: 9px; font-weight: 600; text-transform: uppercase; }
        .mobile-panel { min-height: calc(100vh - 120px); }
        .mobile-filters { display: flex; padding: 10px 12px; gap: 8px; background: #0f172a; border-bottom: 1px solid #334155; position: sticky; top: 0; z-index: 10; }
        .mobile-filter-btn { flex: 1; padding: 10px; border-radius: 8px; font-size: 11px; font-weight: 700; background: #1e293b; color: #64748b; border: 1px solid #334155; }
        .mobile-filter-btn.active { background: #10b981; color: white; border-color: #10b981; }
        .mobile-tree-item { display: flex; align-items: center; padding: 14px 12px; border-bottom: 1px solid rgba(51,65,85,0.4); cursor: pointer; }
        .mobile-tree-item.selected { background: rgba(16,185,129,0.15); border-left: 3px solid #10b981; }
        .mobile-result-card { padding: 14px; margin: 8px 12px; background: rgba(30,41,59,0.5); border: 1px solid rgba(71,85,105,0.4); border-radius: 10px; cursor: pointer; }
        .mobile-code-badge { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
        .mobile-code-badge.ML { background: rgba(239,68,68,0.2); color: #f87171; }
        .mobile-code-badge.AMA { background: rgba(251,146,60,0.2); color: #fb923c; }
        .mobile-code-badge.DU { background: rgba(59,130,246,0.2); color: #60a5fa; }
        .mobile-code-badge.USML { background: rgba(168,85,247,0.2); color: #c084fc; }
        .mobile-code-badge.CCL { background: rgba(6,182,212,0.2); color: #22d3ee; }
        .mobile-breadcrumb { display: flex; overflow-x: auto; padding: 10px 12px; gap: 6px; background: rgba(15,23,42,0.95); border-bottom: 1px solid #334155; }
        .mobile-breadcrumb-item { flex-shrink: 0; padding: 6px 10px; background: #1e293b; border-radius: 6px; font-size: 11px; color: #94a3b8; cursor: pointer; }
        .mobile-detail-content { padding: 16px; }
        .mobile-note { padding: 12px; margin-bottom: 8px; background: rgba(30,41,59,0.5); border-radius: 8px; border-left: 3px solid #10b981; }


        /* ===== EC CLASSIFIER LIGHT THEME v8 — BLEU INSTITUTIONNEL ===== */
        /* Palette inspirée : fond bleu-gris doux · blanc pur · bleu vif */
        /* Primary: #2563EB  Secondary: #3B82F6  BG: #EEF2F7  Text: #1A202C  Border: #CBD5E0 */
        body.light-theme { background:#EEF2F7 !important; color:#1A202C !important; }
        body.light-theme .desktop-layout, body.light-theme [class*="bg-slate-950"] { background:#EEF2F7 !important; }
        body.light-theme .bg-slate-900, body.light-theme .bg-\[\#0f172a\],
        body.light-theme [class*="bg-slate-900"]:not([class*="shadow"]),
        body.light-theme [class*="bg-slate-900/"] { background:#FFFFFF !important; }
        body.light-theme .bg-slate-800:not(.bg-slate-800\/80) { background:#FFFFFF !important; }
        body.light-theme .bg-slate-700 { background:#E4EAF2 !important; }
        /* Wassenaar/category badges (font-mono small badges) — keep readable in light mode */
        body.light-theme [class*="bg-slate-700\/50"][class*="font-mono"] { background:rgba(30,41,59,0.12) !important; color:#1e293b !important; }
        body.light-theme .bg-slate-950\/80, body.light-theme .bg-slate-950\/90 { background:rgba(238,242,247,0.97) !important; }
        body.light-theme .bg-slate-900\/50, body.light-theme .bg-slate-900\/80 { background:rgba(255,255,255,0.92) !important; }
        body.light-theme .bg-slate-800\/50 { background:rgba(255,255,255,0.85) !important; }
        body.light-theme .text-white { color:#1A202C !important; }
        /* Keep white text on dark-bg elements (navy badges, colored buttons) */
        body.light-theme [class*="bg-emerald-6"].text-white,
        body.light-theme [class*="bg-emerald-5"].text-white { color:#FFFFFF !important; }
        body.light-theme .text-slate-50 { color:#1A202C !important; }
        body.light-theme .text-slate-100 { color:#1A202C !important; }
        body.light-theme .text-slate-200 { color:#1A202C !important; }
        body.light-theme .text-slate-300 { color:#2D3748 !important; }
        body.light-theme .text-slate-400 { color:#4A5568 !important; }
        body.light-theme .text-slate-500 { color:#718096 !important; }
        body.light-theme .text-slate-600 { color:#4A5568 !important; }
        body.light-theme .text-slate-700 { color:#718096 !important; }
        /* Emerald → Navy institutionnel */
        body.light-theme [class*="text-emerald"] { color:#2563EB !important; }
        body.light-theme [class*="bg-emerald-6"], body.light-theme .bg-emerald-500 { background:#2563EB !important; }
        body.light-theme .hover\:bg-emerald-500:hover { background:#1D4ED8 !important; }
        body.light-theme .hover\:from-emerald-500:hover { --tw-gradient-from:#2563EB !important; }
        body.light-theme .hover\:to-emerald-400:hover { --tw-gradient-to:#3B82F6 !important; }
        body.light-theme .from-emerald-600 { --tw-gradient-from:#2563EB !important; }
        body.light-theme .from-emerald-500 { --tw-gradient-from:#2563EB !important; }
        body.light-theme .to-emerald-500 { --tw-gradient-to:#3B82F6 !important; }
        body.light-theme .to-emerald-400 { --tw-gradient-to:#60A5FA !important; }
        body.light-theme .bg-emerald-600\/20, body.light-theme .bg-emerald-500\/20, body.light-theme .bg-emerald-500\/10 { background:rgba(37,99,235,0.07) !important; }
        body.light-theme .bg-emerald-500\/5 { background:rgba(37,99,235,0.04) !important; }
        body.light-theme .bg-emerald-500\/15 { background:rgba(37,99,235,0.09) !important; }
        body.light-theme .bg-emerald-500\/30 { background:rgba(37,99,235,0.12) !important; }
        body.light-theme .hover\:bg-emerald-500\/5:hover { background:rgba(37,99,235,0.04) !important; }
        body.light-theme .hover\:bg-emerald-500\/20:hover { background:rgba(37,99,235,0.10) !important; }
        body.light-theme .hover\:bg-emerald-500\/30:hover { background:rgba(37,99,235,0.15) !important; }
        body.light-theme [class*="border-emerald"] { border-color:#2563EB !important; }
        body.light-theme [class*="ring-emerald"] { --tw-ring-color:rgba(37,99,235,0.40) !important; }
        body.light-theme .shadow-emerald-900\/30, body.light-theme .shadow-emerald-900\/20 { --tw-shadow-color:rgba(37,99,235,0.12) !important; }
        /* Purple — conserver pour onglet cross-ref */
        body.light-theme [class*="text-purple"] { color:#6D28D9 !important; }
        body.light-theme .hover\:bg-purple-500\/10:hover { background:rgba(109,40,217,0.07) !important; }
        /* Couleurs textBright des sources (icône badge fiche détail) */
        body.light-theme .text-red-500 { color:#B91C1C !important; }
        body.light-theme .text-amber-500 { color:#92400E !important; }
        body.light-theme .text-blue-500 { color:#2563EB !important; }
        body.light-theme .text-purple-500 { color:#6D28D9 !important; }
        body.light-theme .text-cyan-500 { color:#0E7490 !important; }
        body.light-theme .text-indigo-400 { color:#4338CA !important; }
        /* bgDeep : fonds très sombres des badges source → teinte pâle en clair */
        body.light-theme [class*="bg-red-950"] { background:rgba(220,38,38,0.08) !important; }
        body.light-theme [class*="bg-amber-950"] { background:rgba(217,119,6,0.08) !important; }
        body.light-theme [class*="bg-blue-950"] { background:rgba(37,99,235,0.08) !important; }
        body.light-theme [class*="bg-purple-950"] { background:rgba(126,34,206,0.08) !important; }
        body.light-theme [class*="bg-cyan-950"] { background:rgba(8,145,178,0.08) !important; }
        body.light-theme [class*="bg-indigo-950"] { background:rgba(67,56,202,0.08) !important; }
        /* borderHeavy : borders très sombres → légères */
        body.light-theme [class*="border-red-900"] { border-color:rgba(220,38,38,0.25) !important; }
        body.light-theme [class*="border-amber-900"] { border-color:rgba(217,119,6,0.25) !important; }
        body.light-theme [class*="border-blue-900"] { border-color:rgba(37,99,235,0.20) !important; }
        body.light-theme [class*="border-purple-900"] { border-color:rgba(126,34,206,0.20) !important; }
        body.light-theme [class*="border-cyan-900"] { border-color:rgba(8,145,178,0.20) !important; }
        body.light-theme [class*="border-indigo-900"] { border-color:rgba(67,56,202,0.20) !important; }
        /* Fonds des cartes related-codes / also-viewed (inline rgba sombres) */
        body.light-theme [style*="rgba(30,41,59,0.3)"] { background:rgba(37,99,235,0.05) !important; }
        body.light-theme [style*="rgba(51,65,85,0.3)"] { border-color:#CBD5E0 !important; }
        /* Couleurs d'alerte */
        body.light-theme .bg-red-900\/30 { background:rgba(220,38,38,0.06) !important; }
        body.light-theme .border-red-700 { border-color:rgba(220,38,38,0.25) !important; }
        body.light-theme .text-red-300 { color:#2D3748 !important; }
        body.light-theme .text-red-400 { color:#B91C1C !important; }
        body.light-theme .bg-amber-900\/30 { background:rgba(217,119,6,0.06) !important; }
        body.light-theme .border-amber-700 { border-color:rgba(217,119,6,0.25) !important; }
        body.light-theme .text-amber-300 { color:#2D3748 !important; }
        body.light-theme .bg-blue-900\/30 { background:rgba(37,99,235,0.06) !important; }
        body.light-theme .border-blue-700 { border-color:rgba(37,99,235,0.25) !important; }
        body.light-theme .text-blue-300 { color:#2D3748 !important; }
        body.light-theme .text-blue-400 { color:#2563EB !important; }
        body.light-theme .bg-purple-900\/30 { background:rgba(126,34,206,0.06) !important; }
        body.light-theme .border-purple-700 { border-color:rgba(126,34,206,0.25) !important; }
        body.light-theme .text-purple-300 { color:#2D3748 !important; }
        body.light-theme .bg-cyan-900\/30 { background:rgba(8,145,178,0.06) !important; }
        body.light-theme .border-cyan-700 { border-color:rgba(8,145,178,0.25) !important; }
        body.light-theme .text-cyan-300 { color:#2D3748 !important; }
        body.light-theme .text-cyan-400 { color:#0E7490 !important; }
        /* Bouton régime bleu → navy */
        body.light-theme .bg-blue-600 { background:#2563EB !important; }
        body.light-theme .border-blue-500 { border-color:#1D4ED8 !important; }
        body.light-theme .shadow-blue-900\/30 { --tw-shadow-color:rgba(37,99,235,0.15) !important; }
        /* Boutons avec fond coloré → texte blanc */
        body.light-theme button.bg-emerald-600, body.light-theme button.bg-blue-600, body.light-theme button.bg-purple-600 { color:#FFFFFF !important; }
        /* Login/Accept : dégradé navy */
        body.light-theme .from-emerald-600.to-emerald-500 { --tw-gradient-from:#2563EB !important; --tw-gradient-to:#3B82F6 !important; }
        body.light-theme button.from-emerald-600 { color:#FFFFFF !important; }
        /* Cases à cocher */
        body.light-theme .accent-emerald-500 { accent-color:#2563EB !important; }
        body.light-theme input[type="checkbox"] { accent-color:#2563EB !important; }
        body.light-theme input[type="radio"] { accent-color:#2563EB !important; }
        /* Badge Ctrl+K */
        body.light-theme .bg-slate-800\/80 { background:#2D3748 !important; color:#FFFFFF !important; }
        body.light-theme span.font-mono.pointer-events-none { background:#2D3748 !important; color:#FFFFFF !important; border-color:#1A202C !important; }
        /* Amber/Jaune → navy */
        body.light-theme .text-amber-400 { color:#2563EB !important; }
        body.light-theme .text-amber-200\/70 { color:#2563EB !important; }
        body.light-theme .text-yellow-400 { color:#2563EB !important; }
        body.light-theme .fill-yellow-400 { fill:#2563EB !important; }
        /* Amber clair (ex. text-amber-100/90 sur fond sombre) → texte lisible en mode clair */
        body.light-theme .text-amber-100\/90,
        body.light-theme [class*="text-amber-100"] { color:#4A5568 !important; }
        /* Fonds amber légers + bordures (conflict analysis, alertes) */
        body.light-theme [class~="bg-amber-500/10"] { background:rgba(217,119,6,0.06) !important; }
        body.light-theme [class~="bg-amber-500/5"]  { background:rgba(217,119,6,0.05) !important; }
        body.light-theme [class*="border-amber-500\/30"] { border-color:rgba(217,119,6,0.3) !important; }
        body.light-theme [class*="border-amber-500\/20"] { border-color:rgba(217,119,6,0.25) !important; }
        body.light-theme [class*="bg-slate-800\/30"]  { background:rgba(241,245,249,0.9) !important; }
        /* Bordures */
        body.light-theme .border-slate-700, body.light-theme .border-slate-800, body.light-theme .border-slate-900, body.light-theme .border-slate-900\/40 { border-color:#CBD5E0 !important; }
        body.light-theme .divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color:#CBD5E0 !important; }
        /* Inline style overrides */
        body.light-theme [style*="background: #0a0f1a"], body.light-theme [style*="background:#0a0f1a"] { background:#FFFFFF !important; }
        body.light-theme [style*="background: #0f172a"], body.light-theme [style*="background:#0f172a"], body.light-theme [style*="background: rgb(15, 23, 42)"] { background:#EEF2F7 !important; }
        body.light-theme [style*="background: #1e293b"], body.light-theme [style*="background:#1e293b"], body.light-theme [style*="background: rgb(30, 41, 59)"] { background:#FFFFFF !important; }
        body.light-theme [style*="background: #334155"], body.light-theme [style*="background:#334155"] { background:#E4EAF2 !important; }
        body.light-theme [style*="color: #e2e8f0"], body.light-theme [style*="color:#e2e8f0"] { color:#1A202C !important; }
        body.light-theme [style*="color: white"], body.light-theme [style*="color: #fff"], body.light-theme [style*="color:#fff"] { color:#1A202C !important; }
        body.light-theme [style*="color: #94a3b8"], body.light-theme [style*="color:#94a3b8"] { color:#718096 !important; }
        body.light-theme [style*="color: #64748b"], body.light-theme [style*="color:#64748b"] { color:#718096 !important; }
        body.light-theme [style*="color: #cbd5e1"], body.light-theme [style*="color:#cbd5e1"] { color:#4A5568 !important; }
        body.light-theme [style*="color: #f1f5f9"], body.light-theme [style*="color:#f1f5f9"] { color:#1A202C !important; }
        body.light-theme [style*="color: #f8fafc"], body.light-theme [style*="color:#f8fafc"] { color:#1A202C !important; }
        body.light-theme [style*="color: #475569"], body.light-theme [style*="color:#475569"] { color:#718096 !important; }
        body.light-theme [style*="color: #334155"], body.light-theme [style*="color:#334155"] { color:#4A5568 !important; }
        body.light-theme [style*="color: #1e293b"], body.light-theme [style*="color:#1e293b"] { color:#1A202C !important; }
        /* Vert → bleu dans les inline styles (hex brut + format rgb normalisé par le navigateur) */
        body.light-theme [style*="color: #10b981"], body.light-theme [style*="color:#10b981"],
        body.light-theme [style*="color: rgb(16, 185, 129)"], body.light-theme [style*="color: rgb(16,185,129)"] { color:#2563EB !important; }
        body.light-theme [style*="color: #34d399"], body.light-theme [style*="color:#34d399"],
        body.light-theme [style*="color: rgb(52, 211, 153)"] { color:#2563EB !important; }
        body.light-theme [style*="color: #6ee7b7"], body.light-theme [style*="color:#6ee7b7"] { color:#2563EB !important; }
        body.light-theme [style*="color: #22c55e"], body.light-theme [style*="color:#22c55e"] { color:#2563EB !important; }
        body.light-theme [style*="color: #4ade80"], body.light-theme [style*="color:#4ade80"] { color:#2563EB !important; }
        body.light-theme [style*="color: #86efac"], body.light-theme [style*="color:#86efac"] { color:#2563EB !important; }
        body.light-theme [style*="color: #a7f3d0"], body.light-theme [style*="color:#a7f3d0"] { color:#2563EB !important; }
        body.light-theme [style*="color: #059669"], body.light-theme [style*="color:#059669"],
        body.light-theme [style*="color: rgb(5, 150, 105)"] { color:#2563EB !important; }
        body.light-theme [style*="color: #047857"], body.light-theme [style*="color:#047857"],
        body.light-theme [style*="color: rgb(4, 120, 87)"] { color:#1D4ED8 !important; }
        body.light-theme [style*="color: #d1fae5"], body.light-theme [style*="color:#d1fae5"] { color:#2563EB !important; }
        body.light-theme [style*="background: #10b981"], body.light-theme [style*="background:#10b981"],
        body.light-theme [style*="background: rgb(16, 185, 129)"],
        body.light-theme [style*="background-color: rgb(16, 185, 129)"] { background:#2563EB !important; color:#FFFFFF !important; }
        body.light-theme [style*="background: #059669"], body.light-theme [style*="background:#059669"],
        body.light-theme [style*="background: rgb(5, 150, 105)"] { background:#2563EB !important; }
        body.light-theme [style*="border: 1px solid #10b981"], body.light-theme [style*="border:1px solid #10b981"],
        body.light-theme [style*="border: 1px solid rgb(16, 185, 129)"] { border-color:#2563EB !important; }
        body.light-theme [style*="border: 1px solid #334155"], body.light-theme [style*="border:1px solid #334155"] { border-color:#CBD5E0 !important; }
        body.light-theme [style*="border-left: 3px solid #10b981"], body.light-theme [style*="border-left:3px solid #10b981"] { border-left-color:#2563EB !important; }
        body.light-theme [style*="border-left: 4px solid #10b981"], body.light-theme [style*="border-left:4px solid #10b981"] { border-left-color:#2563EB !important; }
        body.light-theme [style*="rgba(16,185,129"], body.light-theme [style*="rgba(16, 185, 129"] { background:rgba(37,99,235,0.06) !important; border-color:rgba(37,99,235,0.20) !important; color:#2563EB !important; }
        body.light-theme [style*="rgba(30,41,59,0.5)"] { background:#EEF2F7 !important; }
        body.light-theme [style*="rgba(245,158,11,0.05)"] { background:rgba(37,99,235,0.04) !important; }
        body.light-theme [style*="border: 1px solid rgba(245,158,11"] { border-color:rgba(37,99,235,0.15) !important; }
        /* Boutons régime mobile */
        body.light-theme [style*="background"][style*="#3b82f6"] { background:#2563EB !important; }
        body.light-theme [style*="border"][style*="#3b82f6"] { border-color:#2563EB !important; }
        body.light-theme [style*="background"][style*="#10b981"]:not(input) { background:#2563EB !important; }
        body.light-theme [style*="border"][style*="#10b981"] { border-color:#2563EB !important; }
        /* Bouton avatar / éléments rgba(16,185,129,0.15) */
        body.light-theme [style*="rgba(16,185,129,0.15)"] { background:rgba(37,99,235,0.08) !important; color:#2563EB !important; border-color:rgba(37,99,235,0.25) !important; }
        /* Champs de saisie */
        body.light-theme input[type="text"], body.light-theme input[type="search"], body.light-theme input[type="password"], body.light-theme input[type="email"], body.light-theme input[type="date"], body.light-theme input[type="number"], body.light-theme textarea, body.light-theme select { background:#FFFFFF !important; color:#1A202C !important; border-color:#CBD5E0 !important; }
        body.light-theme input::placeholder { color:#A0AEC0 !important; }
        body.light-theme input:focus, body.light-theme select:focus, body.light-theme textarea:focus { border-color:#2563EB !important; box-shadow:0 0 0 2px rgba(37,99,235,0.15) !important; }
        /* Arbre / divers */
        body.light-theme .tree-item:hover { background:rgba(37,99,235,0.04) !important; }
        body.light-theme .node-active { background:rgba(37,99,235,0.07) !important; border-left:4px solid #2563EB !important; color:#1A202C !important; }
        body.light-theme .custom-scrollbar::-webkit-scrollbar-thumb { background:#A0AEC0; }
        body.light-theme .custom-scrollbar::-webkit-scrollbar-track { background:#EEF2F7; }
        body.light-theme .highlight { background:rgba(37,99,235,0.10) !important; color:#2563EB !important; }
        body.light-theme .watermark { color:rgba(0,0,0,0.02) !important; }
        body.light-theme span.font-mono.bg-slate-950 { background:#EEF2F7 !important; border-color:#CBD5E0 !important; }
        /* Badges source */
        body.light-theme .bg-red-500\/20 { background:rgba(220,38,38,0.08) !important; }
        body.light-theme .bg-amber-500\/20 { background:rgba(217,119,6,0.08) !important; }
        body.light-theme .bg-blue-500\/20 { background:rgba(37,99,235,0.07) !important; }
        body.light-theme .bg-purple-500\/20 { background:rgba(126,34,206,0.07) !important; }
        body.light-theme .bg-cyan-500\/20 { background:rgba(8,145,178,0.07) !important; }
        body.light-theme .mobile-code-badge.ML { background:rgba(220,38,38,0.08) !important; color:#B91C1C !important; }
        body.light-theme .mobile-code-badge.AMA { background:rgba(217,119,6,0.08) !important; color:#B45309 !important; }
        body.light-theme .mobile-code-badge.DU { background:rgba(37,99,235,0.08) !important; color:#2563EB !important; }
        body.light-theme .mobile-code-badge.USML { background:rgba(126,34,206,0.08) !important; color:#7E22CE !important; }
        body.light-theme .mobile-code-badge.CCL { background:rgba(8,145,178,0.08) !important; color:#0E7490 !important; }
        /* Effets IA */
        body.light-theme .ai-glow { box-shadow:0 0 12px rgba(37,99,235,0.12) !important; border-color:#2563EB !important; }
        body.light-theme .ai-pulse { color:#2563EB !important; }
        body.light-theme .hybrid-badge { background:linear-gradient(135deg,#2563EB,#3B82F6) !important; }
        /* Modals */
        body.light-theme [class*="rounded-2xl"][class*="shadow-2xl"].bg-slate-800 { background:#FFFFFF !important; box-shadow:0 25px 50px -12px rgba(37,99,235,0.10) !important; }
        body.light-theme .hover\:bg-slate-700:hover { background:#E4EAF2 !important; }
        body.light-theme .hover\:bg-slate-800:hover { background:#EEF2F7 !important; }
        /* Mobile layout */
        body.light-theme .mobile-layout { background:#EEF2F7 !important; }
        body.light-theme .mobile-header { background:#EEF2F7 !important; border-bottom-color:#CBD5E0 !important; }
        body.light-theme .mobile-search-input { background:#FFFFFF !important; border-color:#CBD5E0 !important; color:#1A202C !important; }
        body.light-theme .mobile-search-input:focus { border-color:#2563EB !important; }
        body.light-theme .mobile-nav { background:linear-gradient(to top,#EEF2F7,#FFFFFF) !important; border-top-color:#CBD5E0 !important; }
        body.light-theme .mobile-nav-item { color:#718096; }
        body.light-theme .mobile-nav-item.active { color:#2563EB !important; }
        body.light-theme .mobile-filters { background:#EEF2F7 !important; border-bottom-color:#CBD5E0 !important; }
        body.light-theme .mobile-filter-btn { background:#FFFFFF !important; color:#4A5568 !important; border-color:#CBD5E0 !important; }
        body.light-theme .mobile-filter-btn.active { background:#2563EB !important; color:#FFFFFF !important; border-color:#2563EB !important; }
        body.light-theme .mobile-tree-item { border-bottom-color:#EEF2F7 !important; }
        body.light-theme .mobile-tree-item.selected { background:rgba(37,99,235,0.05) !important; border-left-color:#2563EB !important; }
        body.light-theme .mobile-result-card { background:#FFFFFF !important; border-color:#CBD5E0 !important; }
        body.light-theme .mobile-breadcrumb { background:rgba(238,242,247,0.97) !important; border-bottom-color:#CBD5E0 !important; }
        body.light-theme .mobile-breadcrumb-item { background:#FFFFFF !important; color:#4A5568 !important; border-color:#CBD5E0 !important; }
        body.light-theme .mobile-note { background:#FFFFFF !important; border-left-color:#2563EB !important; }
        body.light-theme .mobile-detail-content h2 { color:#1A202C !important; }
        body.light-theme .mobile-detail-content h4 { color:#2D3748 !important; }
        body.light-theme .mobile-detail-content p { color:#4A5568 !important; }
        /* Onboarding tour */
        body.light-theme .ob-card,
        body.light-theme .ob-card-center { background:#FFFFFF !important; border-color:#2563EB !important; box-shadow:0 25px 60px rgba(37,99,235,0.18) !important; }
        body.light-theme .ob-title { color:#2563EB !important; }
        body.light-theme .ob-text { color:#1A202C !important; }
        body.light-theme .ob-step { color:#718096 !important; }
        body.light-theme .ob-btn-next { background:#2563EB !important; color:#FFFFFF !important; }
        body.light-theme .ob-btn-prev { background:#EEF2F7 !important; color:#4A5568 !important; border-color:#CBD5E0 !important; }
        body.light-theme .ob-btn-skip { color:#718096 !important; }
        body.light-theme .ob-dot { background:#CBD5E0 !important; }
        body.light-theme .ob-dot-active { background:#2563EB !important; width:18px !important; }
        /* Onboarding : halo de surbrillance */
        body.light-theme .ob-highlight { border-color:#2563EB !important; box-shadow:0 0 0 4000px rgba(0,0,0,0.55), 0 0 20px rgba(37,99,235,0.5) !important; }
        /* ── Vert résiduel → navy (compléments) ── */
        /* bg-emerald-500/90 (toasts succès) + bg-emerald-4xx (dots, indicateurs) */
        body.light-theme .bg-emerald-500\/90 { background:#2563EB !important; }
        body.light-theme [class*="bg-emerald-4"] { background:#2563EB !important; }
        /* Tailwind "green" (≠ emerald) */
        body.light-theme [class*="text-green"] { color:#2563EB !important; }
        body.light-theme [class*="bg-green-"] { background:#2563EB !important; }
        /* #16a34a (green-600) inline */
        body.light-theme [style*="background: #16a34a"], body.light-theme [style*="background:#16a34a"] { background:#1D4ED8 !important; }
        body.light-theme [style*="color: #16a34a"], body.light-theme [style*="color:#16a34a"] { color:#2563EB !important; }
        /* CIC overlay — ascenseur vert */
        body.light-theme .cic-overlay { scrollbar-color:#2563EB transparent !important; }
        body.light-theme .cic-overlay::-webkit-scrollbar-thumb { background:#2563EB !important; }
        /* Auth overlay : garder sombre même en thème clair */
        body.light-theme #auth-login-overlay { background:#020617 !important; }
        body.light-theme #auth-login-overlay * { color:revert !important; background-color:revert !important; border-color:revert !important; }
        /* Bouton toggle thème */
        .theme-toggle-btn { cursor:pointer; padding:4px 8px; border-radius:6px; border:1px solid #334155; background:transparent; font-size:14px; line-height:1; transition:all 0.2s; flex-shrink:0; }
        .theme-toggle-btn:hover { background:rgba(255,255,255,0.1); }
        body.light-theme .theme-toggle-btn { border-color:#CBD5E0; background:#FFFFFF; }
        body.light-theme .theme-toggle-btn:hover { background:#E4EAF2; }

    
        /* Phase 1: QLC Light Theme */
        body.light-theme .qlc-tab-bar { background:rgba(238,242,247,0.85) !important; border-color:#CBD5E0 !important; }
        body.light-theme .qlc-tab-bar button { color:#718096; }
        body.light-theme .qlc-tab-bar button:hover { color:#1A202C; }

        
        /* ===== Country Intelligence Card ===== */
        .cic-overlay { scrollbar-width: thin; scrollbar-color: #10b981 transparent; }
        .cic-overlay::-webkit-scrollbar { width: 6px; }
        .cic-overlay::-webkit-scrollbar-thumb { background: #10b981; border-radius: 3px; }
        .cic-grid-cell { transition: transform 0.15s ease, box-shadow 0.15s ease; }
        .cic-grid-cell:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,0,0,0.2); z-index:1; }
        body.light-theme .cic-section-bg { background: #F7FAFC !important; border-color: #CBD5E0 !important; }
        body.light-theme .cic-header-bg { background: #F7FAFC !important; border-color: #CBD5E0 !important; }
        body.light-theme .cic-accent { color: #2563EB !important; }
        @media (max-width: 640px) { .cic-ccc-grid { grid-template-columns: repeat(2, 1fr) !important; } }
/* ===== Phase 3: Detail Tab Bar + Cross-Ref ===== */
.detail-tab-bar { display:flex;align-items:center;gap:6px;padding:6px;border-radius:12px;background:rgba(15,23,42,0.4);border:1px solid rgba(51,65,85,0.6);margin-bottom:2rem;overflow-x:auto; }
.detail-tab-bar button { display:flex;align-items:center;gap:8px;padding:10px 20px;border-radius:8px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;transition:all 0.2s;white-space:nowrap;border:none;cursor:pointer;background:rgba(15,23,42,0.6);color:#64748b; }
.detail-tab-bar button:hover { color:#cbd5e1;background:rgba(30,41,59,0.8); }
.detail-tab-bar button.dt-active-fiche { background:#10b981;color:white;box-shadow:0 4px 12px rgba(16,185,129,0.25); }
.detail-tab-bar button.dt-active-hs { background:#06b6d4;color:white;box-shadow:0 4px 12px rgba(6,182,212,0.25); }
.detail-tab-bar button.dt-active-crossref { background:#8b5cf6;color:white;box-shadow:0 4px 12px rgba(139,92,246,0.25); }
.detail-tab-bar button.dt-active-license { background:#06b6d4;color:white;box-shadow:0 4px 12px rgba(6,182,212,0.25); }
.crossref-section { margin-bottom:1.5rem;padding:1.5rem;border-radius:1rem;border-left:4px solid; }
.crossref-section.eccn-usml { border-left-color:#a855f7;background:rgba(168,85,247,0.04); }
.crossref-section.euml-wa { border-left-color:#f59e0b;background:rgba(245,158,11,0.04); }
.crossref-card { padding:1rem;margin-bottom:0.75rem;border-radius:0.75rem;background:rgba(15,23,42,0.3);border:1px solid rgba(51,65,85,0.5);transition:border-color 0.2s; }
.crossref-card:hover { border-color:rgba(100,116,139,0.6); }
.badge-transferred { display:inline-flex;align-items:center;gap:4px;font-size:9px;font-weight:700;text-transform:uppercase;padding:2px 8px;border-radius:4px;background:rgba(251,146,60,0.15);color:#fb923c;border:1px solid rgba(251,146,60,0.3); }
.badge-related { display:inline-flex;align-items:center;gap:4px;font-size:9px;font-weight:700;text-transform:uppercase;padding:2px 8px;border-radius:4px;background:rgba(59,130,246,0.15);color:#60a5fa;border:1px solid rgba(59,130,246,0.3); }
.crossref-goto-btn { display:inline-flex;align-items:center;gap:4px;padding:4px 12px;border-radius:6px;font-size:10px;font-weight:700;background:rgba(16,185,129,0.1);color:#10b981;border:1px solid rgba(16,185,129,0.3);cursor:pointer;transition:all 0.2s; }
.crossref-goto-btn:hover { background:rgba(16,185,129,0.2);border-color:rgba(16,185,129,0.5); }
.hts-crossref-card { padding:12px 16px;border-radius:10px;background:rgba(6,182,212,0.04);border:1px solid rgba(6,182,212,0.15);margin-bottom:8px; }
body.light-theme .detail-tab-bar { background:rgba(238,242,247,0.9)!important;border-color:#CBD5E0!important; }
body.light-theme .detail-tab-bar button { color:#718096;background:rgba(255,255,255,0.6); }
body.light-theme .detail-tab-bar button:hover { color:#1A202C;background:rgba(255,255,255,0.9); }
body.light-theme .detail-tab-bar button.dt-active-fiche { background:#2563EB!important;color:white!important;box-shadow:0 4px 12px rgba(37,99,235,0.25)!important; }
body.light-theme .detail-tab-bar button.dt-active-hs { background:#0891b2!important;color:white!important; }
body.light-theme .detail-tab-bar button.dt-active-crossref { background:#7c3aed!important;color:white!important; }
body.light-theme .detail-tab-bar button.dt-active-license { background:#0891b2!important;color:white!important; }
body.light-theme .crossref-card { background:rgba(255,255,255,0.7)!important;border-color:#CBD5E0!important; }
body.light-theme .crossref-card:hover { border-color:#A0AEC0!important; }
body.light-theme .crossref-goto-btn { background:rgba(37,99,235,0.07)!important;color:#2563EB!important;border-color:rgba(37,99,235,0.20)!important; }
body.light-theme .crossref-goto-btn:hover { background:rgba(37,99,235,0.13)!important; }
body.light-theme .hts-crossref-card { background:rgba(8,145,178,0.04)!important;border-color:rgba(8,145,178,0.15)!important; }
@media (max-width:768px) { .detail-tab-bar{gap:4px;padding:4px;margin-bottom:1rem} .detail-tab-bar button{padding:8px 12px;font-size:9px} .crossref-section{padding:1rem;margin-bottom:1rem} .crossref-card{padding:0.75rem} }

.screening-overlay{font-family:inherit}
.screening-overlay select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%2394a3b8' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;padding-right:24px}
.screening-overlay input[type=checkbox]{accent-color:#10b981}
body.light-theme .screening-overlay input[type=checkbox]{accent-color:#2563EB}
.screening-overlay .grid{display:grid}
.screening-overlay .grid-cols-1{grid-template-columns:1fr}
@media(min-width:640px){.screening-overlay .sm\:grid-cols-2{grid-template-columns:repeat(2,1fr)}}
@media(min-width:768px){.screening-overlay .md\:grid-cols-2{grid-template-columns:repeat(2,1fr)}}

/* ===== Overlay Hierarchy & Sizing Fix v10.9.7 ===== */
.screening-overlay { min-height:60vh; max-height:92vh !important; }
.cic-overlay { min-height:60vh; max-height:92vh !important; }

/* ===== TSW Light Theme — couverture complète (scopée) ===== */
body.light-theme .screening-overlay { background:#FFFFFF !important; border-color:rgba(37,99,235,0.25) !important; }
/* Tous les fonds slate-8xx et slate-9xx dans le wizard */
body.light-theme .screening-overlay [class*="bg-slate-8"] { background:#F7FAFC !important; }
body.light-theme .screening-overlay [class*="bg-slate-9"] { background:#FFFFFF !important; }
body.light-theme .screening-overlay [class*="bg-slate-7"] { background:#EEF2F7 !important; }
/* Bordures slate */
body.light-theme .screening-overlay [class*="border-slate-7"],
body.light-theme .screening-overlay [class*="border-slate-8"],
body.light-theme .screening-overlay [class*="border-slate-9"] { border-color:#CBD5E0 !important; }
/* Textes */
body.light-theme .screening-overlay [class*="text-slate-2"],
body.light-theme .screening-overlay [class*="text-slate-3"] { color:#1A202C !important; }
body.light-theme .screening-overlay [class*="text-slate-4"],
body.light-theme .screening-overlay [class*="text-slate-5"],
body.light-theme .screening-overlay [class*="text-slate-6"] { color:#718096 !important; }
/* Inputs et selects à l'intérieur */
body.light-theme .screening-overlay input[type="text"],
body.light-theme .screening-overlay input[type="number"],
body.light-theme .screening-overlay select { background:#FFFFFF !important; color:#1A202C !important; border-color:#CBD5E0 !important; }
body.light-theme .screening-overlay input::placeholder { color:#A0AEC0 !important; }
body.light-theme .screening-overlay input:focus,
body.light-theme .screening-overlay select:focus { border-color:#2563EB !important; }
/* Dropdown pays */
body.light-theme .screening-overlay [class*="bg-slate-8"][class*="rounded"] { background:#FFFFFF !important; border-color:#CBD5E0 !important; }
body.light-theme .screening-overlay [class*="hover:bg-emerald-500\/10"]:hover { background:rgba(37,99,235,0.06) !important; }
/* Stepper buttons */
body.light-theme .screening-overlay [class*="bg-emerald-500\/20"] { background:rgba(37,99,235,0.09) !important; }
body.light-theme .screening-overlay [class*="border-emerald-500\/40"] { border-color:rgba(37,99,235,0.30) !important; }
body.light-theme .screening-overlay [class*="text-emerald-300"],
body.light-theme .screening-overlay [class*="text-emerald-400"] { color:#2563EB !important; }
/* Checkboxes Part 744 */
body.light-theme .screening-overlay [class*="bg-red-500\/10"],
body.light-theme .screening-overlay [class*="bg-red-500\/20"] { background:rgba(220,38,38,0.07) !important; }
body.light-theme .screening-overlay [class*="border-red-500"] { border-color:rgba(220,38,38,0.30) !important; }
/* Boutons action */
body.light-theme .screening-overlay [class*="bg-slate-800 hover:bg-slate-700"] { background:#F7FAFC !important; color:#2D3748 !important; border-color:#CBD5E0 !important; }

@keyframes bcFadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes bcSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Light Theme — Completions v8.1 ===== */
/* rgba(15,23,42,...) inline backgrounds (dark navy — not caught by #0f172a hex selector) */
body.light-theme [style*="rgba(15,23,42,"],
body.light-theme [style*="rgba(15, 23, 42,"] { background:rgba(238,242,247,0.85) !important; border-color:#CBD5E0 !important; }
/* Dark solid red backgrounds (BOM error banner etc.) */
body.light-theme [style*="background:#7f1d1d"],
body.light-theme [style*="background: #7f1d1d"] { background:rgba(220,38,38,0.08) !important; border-color:rgba(220,38,38,0.25) !important; }
/* EMBARGO inline backgrounds */
body.light-theme [style*="rgba(127,29,29,"],
body.light-theme [style*="rgba(127, 29, 29,"] { background:rgba(220,38,38,0.07) !important; border-color:rgba(220,38,38,0.25) !important; }
body.light-theme [style*="rgba(185,28,28,"],
body.light-theme [style*="rgba(185, 28, 28,"] { background:rgba(220,38,38,0.10) !important; border-color:rgba(220,38,38,0.30) !important; }
/* Colored verdict/badge inline backgrounds not previously covered */
body.light-theme [style*="rgba(245,158,11,0.2)"],
body.light-theme [style*="rgba(245, 158, 11, 0.2)"] { background:rgba(217,119,6,0.09) !important; }
body.light-theme [style*="rgba(239,68,68,0.2)"],
body.light-theme [style*="rgba(239, 68, 68, 0.2)"] { background:rgba(220,38,38,0.08) !important; }
/* Light/pale inline foreground colors → unreadable on white */
body.light-theme [style*="color:#fca5a5"],
body.light-theme [style*="color: #fca5a5"] { color:#B91C1C !important; }
body.light-theme [style*="color:#c4b5fd"],
body.light-theme [style*="color: #c4b5fd"] { color:#6D28D9 !important; }
body.light-theme [style*="color:#fbbf24"],
body.light-theme [style*="color: #fbbf24"] { color:#1D4ED8 !important; }
body.light-theme [style*="color:#f59e0b"],
body.light-theme [style*="color: #f59e0b"] { color:#92400E !important; }
body.light-theme [style*="color:#22d3ee"],
body.light-theme [style*="color: #22d3ee"] { color:#0E7490 !important; }
body.light-theme [style*="color:#f87171"],
body.light-theme [style*="color: #f87171"] { color:#B91C1C !important; }
body.light-theme [style*="color:#c084fc"],
body.light-theme [style*="color: #c084fc"] { color:#6D28D9 !important; }
body.light-theme [style*="color:rgba(245,158,11,"],
body.light-theme [style*="color: rgba(245,158,11,"],
body.light-theme [style*="color: rgba(245, 158, 11,"] { color:#92400E !important; }
/* Tailwind opacity text variants (e.g. text-red-300/70, text-amber-400/50) */
body.light-theme [class*="text-red-300/"] { color:#9B1C1C !important; }
body.light-theme [class*="text-red-400/"] { color:#B91C1C !important; }
body.light-theme [class*="text-amber-400/"],
body.light-theme [class*="text-amber-500/"] { color:#92400E !important; }
body.light-theme [class*="text-purple-400/"] { color:#6D28D9 !important; }
body.light-theme [class*="text-emerald-500/"] { color:#2563EB !important; }
body.light-theme [class*="text-cyan-400/"] { color:#0E7490 !important; }
body.light-theme [class*="text-slate-600/"] { color:#718096 !important; }
/* Hover text colors too light on white */
body.light-theme .hover\:text-red-200:hover,
body.light-theme .hover\:text-red-300:hover { color:#B91C1C !important; }
/* bg opacity variants — exact token match only (class~= won't match hover:bg-* prefixed classes) */
body.light-theme [class~="bg-red-500/10"],
body.light-theme [class~="bg-red-500/15"] { background:rgba(220,38,38,0.06) !important; }
body.light-theme [class~="bg-yellow-500/20"],
body.light-theme [class~="bg-yellow-400/20"] { background:rgba(37,99,235,0.05) !important; }
/* Border opacity variants */
body.light-theme [class*="border-red-500/"] { border-color:rgba(220,38,38,0.20) !important; }
body.light-theme [class*="border-red-800/"] { border-color:rgba(220,38,38,0.18) !important; }
body.light-theme [class*="border-yellow-500/"],
body.light-theme [class*="border-yellow-400/"] { border-color:rgba(37,99,235,0.18) !important; }
body.light-theme [class*="border-purple-500/"] { border-color:rgba(109,40,217,0.18) !important; }
/* Cross-ref badge classes */
body.light-theme .badge-transferred { background:rgba(234,88,12,0.08) !important; color:#C2410C !important; border-color:rgba(234,88,12,0.25) !important; }
body.light-theme .badge-related { background:rgba(37,99,235,0.07) !important; color:#1D4ED8 !important; border-color:rgba(37,99,235,0.20) !important; }
/* Broader slate border coverage (all opacity variants) */
body.light-theme [style*="rgba(51,65,85,"],
body.light-theme [style*="rgba(51, 65, 85,"] { border-color:#CBD5E0 !important; }
body.light-theme [style*="rgba(30,41,59,0.4)"],
body.light-theme [style*="rgba(30, 41, 59, 0.4)"] { border-color:#CBD5E0 !important; }
