     /* SYSTÈME DE VARIABLES : DOUBLE PALETTE (PAPIER ÉDITORIAL & NUIT ARDOISE) */
        :root[data-theme="paper"] {
            --bg: #faf8f5;
            --bg-canvas: #f4efe8;
            --surface: #ffffff;
            --surface-subtle: #f8f6f0;
            --border: #e2dbce;
            --border-light: #ece6dc;
            --text: #1e293b;
            --text-dim: #64748b;
            --primary: #c9041b;
            --primary-dark: #8b0312;
            --accent: #b45309;
            --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.05);
            
            --node-loi-bg: #e0f2fe;
            --node-loi-text: #0369a1;
            --node-juris-bg: #ffedd5;
            --node-juris-text: #9a3412;
            --node-action-bg: #dcfce7;
            --node-action-text: #166534;
            --edge-color: #cbd5e1;
            --edge-highlight: #c9041b;
        }

        :root[data-theme="dark"] {
            --bg: #070b12;
            --bg-canvas: #090e17;
            --surface: #0e1524;
            --surface-subtle: #131c30;
            --border: #1e293b;
            --border-light: #283548;
            --text: #f8fafc;
            --text-dim: #94a3b8;
            --primary: #c9041b;
            --primary-dark: #8b0312;
            --accent: #d4af37;
            --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.6);

            --node-loi-bg: #1e293b;
            --node-loi-text: #e0f2fe;
            --node-juris-bg: #2a1b18;
            --node-juris-text: #ffedd5;
            --node-action-bg: #132a24;
            --node-action-text: #d1fae5;
            --edge-color: #334155;
            --edge-highlight: #c9041b;
        }

        * { box-sizing: border-box; transition: background-color 0.2s ease, border-color 0.2s ease; }
        body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

        /* ÉCRAN D'ACCUEIL : MINIMALISTE ÉDITORIAL */
        #home-screen {
            position: absolute;
            inset: 0;
            background: var(--bg);
            z-index: 50;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px;
            transition: opacity 0.35s ease, visibility 0.35s ease;
        }
        #home-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

        .home-logo {
            font-size: 3.6rem;
            font-weight: 900;
            letter-spacing: 1.5px;
            color: var(--text);
            margin-bottom: 2px;
            text-align: center;
        }
        .home-logo span { color: var(--primary); }
        .home-tagline {
            font-size: 0.88rem;
            color: var(--accent);
            font-weight: 700;
            letter-spacing: 1.2px;
            margin-bottom: 34px;
            text-transform: uppercase;
        }

        .search-container {
            width: 100%;
            max-width: 650px;
            position: relative;
        }

        .home-search-box {
            width: 100%;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 30px;
            padding: 8px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: var(--shadow-card);
        }
        .home-search-box:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(201, 4, 27, 0.12);
        }
        .home-search-input {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text);
            font-size: 1.02rem;
            outline: none;
        }
        .home-mic-btn {
            background: none;
            border: none;
            color: var(--text-dim);
            cursor: pointer;
            font-size: 1.2rem;
            padding: 4px;
            display: flex;
            align-items: center;
        }
        .home-mic-btn.listening { color: #ef4444; animation: pulse 1s infinite; }
        .home-submit-btn {
            background: var(--primary);
            color: #fff;
            border: none;
            padding: 9px 20px;
            border-radius: 22px;
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
        }
        .home-submit-btn:hover { background: var(--primary-dark); }

        /* LISTE DE SUGGESTIONS AUTO-COMPLÉTÉES (5 LIGNES) */
        .suggestions-dropdown {
            position: absolute;
            top: 105%;
            left: 20px;
            right: 20px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.15);
            z-index: 60;
            overflow: hidden;
            display: none;
        }
        .suggestions-dropdown.open { display: block; }
        .suggestion-item {
            padding: 10px 16px;
            font-size: 0.88rem;
            color: var(--text);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid var(--border-light);
        }
        .suggestion-item:last-child { border-bottom: none; }
        .suggestion-item:hover {
            background: var(--surface-subtle);
            color: var(--primary);
        }
        .suggestion-icon { font-size: 0.75rem; color: var(--text-dim); }

        .home-badges {
            margin-top: 26px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            max-width: 640px;
        }
        .home-badge-chip {
            background: var(--surface);
            border: 1px solid var(--border);
            color: var(--text-dim);
            font-size: 0.78rem;
            font-weight: 500;
            padding: 6px 14px;
            border-radius: 20px;
            cursor: pointer;
        }
        .home-badge-chip:hover {
            color: var(--text);
            border-color: var(--primary);
            background: var(--surface-subtle);
        }

        .home-footer-cta {
            position: absolute;
            bottom: 24px;
            font-size: 0.82rem;
            color: var(--text-dim);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
        }
        .home-footer-cta a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 700;
            cursor: pointer;
        }
        .home-footer-cta a:hover { text-decoration: underline; }
        .no-cookie-badge {
            font-size: 0.75rem;
            color: var(--text-dim);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* HEADER SUPÉRIEUR */
        header {
            background: var(--surface);
            padding: 10px 20px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 20;
            height: 56px;
        }
        .logo-area { display: flex; align-items: center; gap: 10px; cursor: pointer; }
        .brand-title { font-weight: 900; font-size: 1.2rem; letter-spacing: 1px; color: var(--text); }
        .brand-title span { color: var(--primary); }
        .badge-hub { background: #0284c7; color: #fff; padding: 2px 7px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }

        .btn-toggle-copilot {
            background: var(--surface-subtle);
            color: var(--text);
            border: 1px solid var(--border);
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.78rem;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .btn-toggle-copilot:hover, .btn-toggle-copilot.active {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }

        .btn-theme-toggle {
            background: var(--surface-subtle);
            color: var(--text);
            border: 1px solid var(--border);
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* ESPACE DE TRAVAIL & CANEVAS */
        .workspace { position: relative; flex: 1; width: 100%; height: calc(100vh - 56px); overflow: hidden; }

        .graph-toolbar {
            position: absolute;
            top: 12px;
            left: 16px;
            right: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            z-index: 5;
            pointer-events: none;
        }
        .toolbar-inner-left, .toolbar-inner-right { pointer-events: auto; }
        
        .ingest-box {
            display: flex;
            gap: 6px;
            background: var(--surface);
            padding: 6px;
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: var(--shadow-card);
        }
        .ingest-input {
            width: 320px;
            padding: 6px 12px;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text);
            font-size: 0.8rem;
            outline: none;
        }
        .ingest-input:focus { border-color: var(--primary); }
        .btn-ingest {
            background: #0284c7;
            color: #fff;
            border: none;
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
        }

        .legend-bar {
            display: flex;
            gap: 14px;
            font-size: 0.74rem;
            font-weight: 600;
            background: var(--surface);
            padding: 8px 14px;
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: var(--shadow-card);
        }
        .legend-item { display: flex; align-items: center; gap: 6px; }
        .dot { width: 10px; height: 10px; border-radius: 3px; }

        #network-canvas { width: 100%; height: 100%; background: var(--bg-canvas); }

        /* VOLET COPILOTE (GAUCHE) */
        .copilot-panel-left {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            width: 420px;
            background: var(--surface);
            border-right: 1px solid var(--border);
            z-index: 15;
            transform: translateX(-100%);
            transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            box-shadow: 10px 0 30px rgba(0,0,0,0.15);
        }
        .copilot-panel-left.open { transform: translateX(0); }
        .copilot-header { padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); display: flex; justify-content: space-between; align-items: center; }
        .copilot-chat { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
        .chat-bubble { padding: 12px 14px; border-radius: 8px; font-size: 0.84rem; line-height: 1.5; }
        .chat-bubble.bot { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
        .chat-bubble.user { background: var(--primary); color: #fff; align-self: flex-end; max-width: 90%; }
        
        .copilot-form { padding: 12px; border-top: 1px solid var(--border); background: var(--surface-subtle); display: flex; flex-direction: column; gap: 8px; }
        .copilot-input { width: 100%; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.82rem; resize: none; height: 60px; outline: none; }
        .copilot-input:focus { border-color: var(--primary); }
        .btn-ask { background: var(--primary); color: #fff; border: none; padding: 10px; border-radius: 6px; font-size: 0.82rem; font-weight: 700; cursor: pointer; }

        /* VOLET D'INSPECTION (DROITE) */
        .node-drawer-right {
            position: absolute;
            top: 0;
            bottom: 0;
            right: 0;
            width: 440px;
            background: var(--surface);
            border-left: 1px solid var(--border);
            z-index: 15;
            transform: translateX(100%);
            transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            box-shadow: -10px 0 30px rgba(0,0,0,0.15);
        }
        .node-drawer-right.open { transform: translateX(0); }
        .drawer-header { padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); display: flex; justify-content: space-between; align-items: center; }
        .drawer-body { flex: 1; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
        .drawer-close { background: none; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer; }

        .drawer-section-title { font-size: 0.72rem; text-transform: uppercase; color: var(--text-dim); font-weight: 700; letter-spacing: 0.5px; }
        .summary-box { font-size: 0.84rem; color: var(--text); background: var(--bg); padding: 12px; border-radius: 6px; border: 1px solid var(--border); line-height: 1.5; max-height: 180px; overflow-y: auto; white-space: pre-wrap; }
        .fulltext-box { font-size: 0.82rem; color: var(--text); line-height: 1.55; white-space: pre-wrap; border-left: 3px solid var(--primary); padding: 8px 0 8px 12px; max-height: 280px; overflow-y: auto; }

        .badge-risk { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
        .risk-CRITIQUE { background: rgba(239, 68, 68, 0.15); color: #dc2626; border: 1px solid #ef4444; }
        .risk-MOYEN { background: rgba(245, 158, 11, 0.15); color: #d97706; border: 1px solid #f59e0b; }
        .risk-FAIBLE { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid #10b981; }

        /* MODALES */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.25s ease;
        }
        .modal-overlay.open { opacity: 1; visibility: visible; }
        .modal-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            max-width: 920px;
            width: 100%;
            padding: 28px;
            box-shadow: 0 16px 48px rgba(0,0,0,0.25);
            position: relative;
        }
        .pricing-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 14px;
            margin-top: 22px;
        }
        .pricing-box {
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 18px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .pricing-box.popular {
            border: 2px solid var(--primary);
            background: var(--surface);
            position: relative;
        }
        .pricing-title { font-size: 0.96rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
        .pricing-badge-popular {
            position: absolute;
            top: -11px;
            right: 14px;
            background: var(--primary);
            color: #fff;
            font-size: 0.65rem;
            font-weight: 800;
            padding: 2px 8px;
            border-radius: 10px;
            text-transform: uppercase;
        }
        .pricing-price { font-size: 1.35rem; font-weight: 900; color: var(--text); margin-bottom: 12px; }
        .pricing-price small { font-size: 0.7rem; font-weight: 500; color: var(--text-dim); }
        .pricing-features { font-size: 0.74rem; color: var(--text); line-height: 1.65; list-style: none; padding: 0; margin: 0 0 18px 0; }
        .pricing-btn {
            background: var(--surface-subtle);
            color: var(--text);
            border: 1px solid var(--border);
            padding: 9px;
            border-radius: 6px;
            font-size: 0.76rem;
            font-weight: 700;
            cursor: pointer;
            text-align: center;
        }
        .pricing-btn:hover, .pricing-box.popular .pricing-btn {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }

        /* MODALE PRIVACY & NO-COOKIE */
        .privacy-body {
            font-size: 0.86rem;
            line-height: 1.6;
            color: var(--text);
            margin-top: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .privacy-box-highlight {
            background: var(--surface-subtle);
            border-left: 3px solid #10b981;
            padding: 12px 14px;
            border-radius: 4px;
            font-size: 0.82rem;
        }
        .disclaimer-box {
            background: var(--surface-subtle);
            border-left: 3px solid var(--primary);
            padding: 12px 14px;
            border-radius: 4px;
            font-size: 0.82rem;
            color: var(--text-dim);
        }

        @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }