
        /* --- DESIGN SYSTEM & VARS --- */
        :root {
            --bg-main: #000000;
            --bg-sidebar: #111111;
            --bg-input: #1a1a1a;
            --border-color: #2a2a2a;
            --primary: #3b82f6; /* Bleu vibrant */
            --primary-hover: #2563eb;
            --text-bright: #ffffff;
            --text-muted: #a3a3a3;
            --radius-sm: 6px;
            --radius-md: 12px;
            --font-ui: 'Inter', sans-serif;
            --font-code: 'JetBrains Mono', monospace;
        }

        /* Reset & Base */
        * { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
        body {
            font-family: var(--font-ui);
            background: var(--bg-main);
            color: var(--text-bright);
            height: 100vh;
            display: flex;
            overflow: hidden;
        }

        /* Custom Scrollbar */
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: #444; }

        /* --- UI COMPONENTS --- */
        
        /* Labels & Titres */
        .label-txt {
            font-size: 0.7rem; font-weight: 700; text-transform: uppercase; 
            letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; display: block;
        }

        /* Inputs */
        .input-ui {
            background: var(--bg-input); border: 1px solid var(--border-color);
            color: var(--text-bright); padding: 10px 12px; border-radius: var(--radius-sm);
            font-family: var(--font-ui); font-size: 0.9rem; width: 100%; transition: all 0.2s;
        }
        .input-ui:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
        textarea.input-ui { font-family: var(--font-code); font-size: 0.85rem; height: 200px; line-height: 1.5; resize: vertical; }

        /* Sliders */
        input[type=range] {
            -webkit-appearance: none; width: 100%; background: transparent; margin: 8px 0;
        }
        input[type=range]::-webkit-slider-runnable-track {
            width: 100%; height: 6px; background: var(--bg-input); border-radius: 10px; border: 1px solid var(--border-color);
        }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none; height: 18px; width: 18px; border-radius: 50%;
            background: var(--primary); margin-top: -7px; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        }

        /* Toggle Switch (Checkbox stylisée) */
        .switch-container { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
        .switch { position: relative; display: inline-block; width: 44px; height: 24px; }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider {
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
            background-color: var(--bg-input); transition: .3s; border-radius: 24px; border: 1px solid var(--border-color);
        }
        .slider:before {
            position: absolute; content: ""; height: 18px; width: 18px; left: 2px; bottom: 2px;
            background-color: var(--text-muted); transition: .3s; border-radius: 50%;
        }
        input:checked + .slider { background-color: var(--primary); border-color: var(--primary); }
        input:checked + .slider:before { transform: translateX(20px); background-color: white; }

        /* Window Theme Selectors (Radio buttons visuels) */
        .theme-selector { display: flex; gap: 8px; background: var(--bg-input); padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
        .theme-option { flex: 1; text-align: center; padding: 8px; cursor: pointer; border-radius: 4px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); transition: 0.2s; }
        .theme-option:hover { background: rgba(255,255,255,0.05); }
        .theme-option.active { background: var(--primary); color: white; }

        /* Color Grid */
        .color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
        .color-dot {
            aspect-ratio: 1; border-radius: var(--radius-sm); cursor: pointer;
            border: 2px solid transparent; transition: transform 0.2s, border-color 0.2s;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
        }
        .color-dot:hover { transform: scale(1.05); }
        .color-dot.active { border-color: white; transform: scale(1.1); }

        /* Accordion (Details/Summary) */
        details { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px; }
        details[open] { border-color: var(--primary); }
        summary {
            padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 0.9rem;
            display: flex; justify-content: space-between; align-items: center; user-select: none; transition: background 0.2s;
        }
        summary:hover { background: rgba(255,255,255,0.03); }
        summary::after { content: '›'; font-size: 1.2rem; transition: transform 0.3s; transform: rotate(90deg); }
        details[open] summary::after { transform: rotate(270deg); color: var(--primary); }
        .details-content { padding: 16px; border-top: 1px solid var(--border-color); }

        /* --- LAYOUT --- */
        
        /* SIDEBAR */
        aside {
            width: 380px; min-width: 380px; background: var(--bg-sidebar); border-right: 1px solid var(--border-color);
            display: flex; flex-direction: column; z-index: 20;
        }
        .sidebar-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); }
        .brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(to right, white, var(--text-muted)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
        .sidebar-content { flex: 1; overflow-y: auto; padding: 24px; }
        .sidebar-footer { padding: 20px 24px; border-top: 1px solid var(--border-color); background: var(--bg-sidebar); }

        .btn-group { display: flex; gap: 12px; }
        .btn { flex: 1; padding: 12px; border-radius: var(--radius-sm); border: none; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; font-size: 0.9rem; }
        .btn-primary { background: var(--primary); color: white; }
        .btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
        .btn-secondary { background: var(--bg-input); color: var(--text-bright); border: 1px solid var(--border-color); }
        .btn-secondary:hover { border-color: var(--text-muted); background: var(--border-color); }


        /* PREVIEW AREA */
        main {
            flex: 1; background: #050505;
            background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
            background-size: 30px 30px; display: flex; align-items: center; justify-content: center;
            padding: 60px; overflow: auto; position: relative;
        }

        #capture-container {
            padding: 64px; transition: padding 0.3s ease, background 0.3s ease;
        }

        /* THE WINDOW */
        .window {
            background: #1e1e1e; /* VS Code default dark */
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 25px 100px -10px rgba(0, 0, 0, 0.5); /* Ombre par défaut */
            border: 1px solid rgba(255,255,255,0.1);
            min-width: 400px; transition: box-shadow 0.3s;
        }
        .window.no-shadow { box-shadow: none !important; }

        .window-header {
            background: #252526; padding: 14px 20px; display: flex; align-items: center; position: relative;
            border-bottom: 1px solid rgba(0,0,0,0.2);
        }
        
        /* Styles de contrôles de fenêtre */
        .window-controls { display: flex; gap: 8px; }
        .control-dot { width: 12px; height: 12px; border-radius: 50%; }
        .mac .close { background: #ff5f57; } .mac .min { background: #febc2e; } .mac .max { background: #28c840; }
        
        .win .control-square { width: 12px; height: 12px; border: 1px solid var(--text-muted); opacity: 0.5; }
        .win .close { background: transparent; position: relative; }
        .win .close::before, .win .close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 8px; height: 1px; background: var(--text-muted); }
        .win .close::before { transform: translate(-50%, -50%) rotate(45deg); }
        .win .close::after { transform: translate(-50%, -50%) rotate(-45deg); }

        .none .window-controls { display: none; }
        .none .window-header { padding: 10px 20px; }
        
        .window-title {
            position: absolute; left: 0; right: 0; text-align: center; color: #888; font-size: 0.8rem; font-weight: 500; pointer-events: none;
        }
        .window-title span { cursor: text; pointer-events: auto; }

        /* Zone de code et numéros de ligne */
        .editor-container {
            display: flex; position: relative;
            font-family: var(--font-code); font-size: 14px; line-height: 1.6;
        }

        .line-numbers {
            padding: 24px 0 24px 20px;
            text-align: right; color: #4b5563; user-select: none;
            border-right: 1px solid rgba(255,255,255,0.05);
            display: none; /* Caché par défaut */
        }
        .line-numbers.show { display: block; }
        .line-number { display: block; padding-right: 16px; }

        .code-wrapper { flex: 1; padding: 24px; overflow-x: auto; }
        pre { margin: 0; }
        code.hljs { background: transparent; padding: 0; overflow: visible; }

        /* Toast Notification */
        #toast {
            position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
            background: #10b981; color: white; padding: 10px 20px; rounded: var(--radius-md); font-weight: 600;
            box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.5); opacity: 0; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 100;
        }
        #toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
   