        /* === ANIMATIONS === */
        .chat-message {
            animation: slideIn 0.3s ease-out;
        }
        @keyframes slideIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .typing-indicator {
            animation: pulse 1.5s infinite;
        }
        .gradient-bg {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        /* === STYLES POUR L'ARBRE D'INDEXATION === */
        .tree-node {
            position: absolute;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            padding: 6px 10px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.2s ease;
            cursor: pointer;
            font-size: 11px;
            overflow: hidden;
        }
        
        .tree-node:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            z-index: 10;
            border-color: #3b82f6;
        }
        
        .tree-node.product {
            border-left: 3px solid #10b981;
            background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
        }
        
        .tree-node.error {
            border-left: 3px solid #ef4444;
            background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
        }
        
        .tree-node.completed {
            border-left: 3px solid #3b82f6;
            background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
        }
        
        .node-header {
            display: flex;
            align-items: center;
            margin-bottom: 2px;
        }
        
        .node-url {
            font-weight: 500;
            color: #374151;
            font-size: 10px;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .node-badges {
            display: flex;
            gap: 3px;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .node-badge {
            background: #6b7280;
            color: white;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 9px;
            font-weight: 500;
        }
        
        .node-badge.product { background: #10b981; }
        .node-badge.error { background: #ef4444; }
        .node-badge.children { background: #3b82f6; }
        
        .node-badge-mini {
            background: #6b7280;
            color: white;
            padding: 2px 5px;
            border-radius: 50%;
            font-size: 8px;
            font-weight: 600;
            min-width: 18px;
            height: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .node-badge-mini.product { 
            background: #10b981; 
            border-radius: 4px;
        }
        .node-badge-mini.children { 
            background: #3b82f6; 
        }
        
        .tree-node-more {
            position: absolute;
            background: #f3f4f6;
            border: 1px dashed #9ca3af;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 10px;
            color: #6b7280;
        }
        
        .tree-node-more:hover {
            background: #e5e7eb;
            border-color: #6b7280;
            color: #374151;
        }
        
        .node-more-text {
            display: flex;
            align-items: center;
            font-weight: 500;
        }
        
        .tree-connection {
            stroke: #9ca3af;
            stroke-width: 1.5;
            fill: none;
        }
        
        /* Styles pour la modale plein écran */
        .fullscreen-tree-container {
            transform: scale(0.95);
            transition: transform 0.2s ease;
        }
        
        #fullscreen-tree-modal:not(.hidden) .fullscreen-tree-container {
            transform: scale(1);
        }
        
        .tree-zoom-container {
            transition: transform 0.3s ease;
            transform-origin: center center;
        }

        /* === DARK MODE STYLES === */
        .dark {
            color-scheme: dark;
        }
        
        .dark body {
            background-color: #111827;
            color: #f9fafb;
        }
        
        .dark .bg-white {
            background-color: #1f2937 !important;
        }
        
        .dark .bg-gray-50 {
            background-color: #374151 !important;
        }
        
        .dark .bg-gray-100 {
            background-color: #4b5563 !important;
        }
        
        .dark .bg-gray-200 {
            background-color: #6b7280 !important;
        }
        
        .dark .text-gray-900 {
            color: #f9fafb !important;
        }
        
        .dark .text-gray-800 {
            color: #e5e7eb !important;
        }
        
        .dark .text-gray-700 {
            color: #d1d5db !important;
        }
        
        .dark .text-gray-600 {
            color: #9ca3af !important;
        }
        
        .dark .text-gray-500 {
            color: #6b7280 !important;
        }
        
        .dark .text-gray-400 {
            color: #9ca3af !important;
        }
        
        .dark .border-gray-300 {
            border-color: #4b5563 !important;
        }
        
        .dark .border-gray-200 {
            border-color: #374151 !important;
        }
        
        .dark .border {
            border-color: #4b5563 !important;
        }
        
        /* Dark mode pour les inputs */
        .dark input,
        .dark textarea,
        .dark select {
            background-color: #374151 !important;
            border-color: #4b5563 !important;
            color: #f9fafb !important;
        }
        
        .dark input::placeholder,
        .dark textarea::placeholder {
            color: #9ca3af !important;
        }
        
        /* Dark mode pour les messages de chat */
        .dark .chat-message {
            background-color: #1f2937 !important;
        }
        
        .dark .chat-message.bg-blue-100 {
            background-color: #1e3a8a !important;
        }
        
        .dark .chat-message.bg-green-100 {
            background-color: #166534 !important;
        }
        
        .dark .chat-message.bg-gray-100 {
            background-color: #374151 !important;
        }
        
        /* Dark mode pour les modales */
        .dark .bg-gray-600 {
            background-color: #111827 !important;
        }
        
        /* Dark mode pour le gradient header */
        .dark .gradient-bg {
            background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%) !important;
        }
        
        /* Dark mode pour les boutons avec hover states */
        .dark .hover\\:bg-gray-100:hover {
            background-color: #4b5563 !important;
        }
        
        .dark .hover\\:bg-gray-50:hover {
            background-color: #374151 !important;
        }
        
        /* Transition douce pour le dark mode */
        * {
            transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
        }
        
        /* Dark mode pour les nœuds d'arbre */
        .dark .tree-node {
            background: #374151 !important;
            border-color: #4b5563 !important;
            color: #f9fafb !important;
            box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
        }
        
        .dark .tree-node:hover {
            box-shadow: 0 3px 6px rgba(0,0,0,0.4) !important;
            border-color: #60a5fa !important;
        }
        
        .dark .tree-node.product {
            background: linear-gradient(135deg, #065f46 0%, #374151 100%) !important;
            border-left-color: #34d399 !important;
        }
        
        /* Styles améliorés pour la visualisation d'arbre 2D */
        .tree-node {
            position: absolute;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            padding: 6px 10px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.2s ease;
            cursor: pointer;
            font-size: 11px;
            overflow: hidden;
        }
        
        .tree-node:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            z-index: 10;
            border-color: #3b82f6;
        }
        
        .tree-node.product {
            border-left: 3px solid #10b981;
            background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
        }
        
        .tree-node.error {
            border-left: 3px solid #ef4444;
            background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
        }
        
        .tree-node.completed {
            border-left: 3px solid #3b82f6;
            background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
        }
        
        .node-header {
            display: flex;
            align-items: center;
            margin-bottom: 2px;
        }
        
        .node-url {
            font-weight: 500;
            color: #374151;
            font-size: 10px;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .node-badges {
            display: flex;
            gap: 3px;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .node-badge {
            background: #6b7280;
            color: white;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 9px;
            font-weight: 500;
        }
        
        .node-badge.product { background: #10b981; }
        .node-badge.error { background: #ef4444; }
        .node-badge.children { background: #3b82f6; }
        
        .node-badge-mini {
            background: #6b7280;
            color: white;
            padding: 2px 5px;
            border-radius: 50%;
            font-size: 8px;
            font-weight: 600;
            min-width: 18px;
            height: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .node-badge-mini.product { 
            background: #10b981; 
            border-radius: 4px;
        }
        .node-badge-mini.children { 
            background: #3b82f6; 
        }
        
        .tree-node-more {
            position: absolute;
            background: #f3f4f6;
            border: 1px dashed #9ca3af;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 10px;
            color: #6b7280;
        }
        
        .tree-node-more:hover {
            background: #e5e7eb;
            border-color: #6b7280;
            color: #374151;
        }
        
        .node-more-text {
            display: flex;
            align-items: center;
            font-weight: 500;
        }
        
        .tree-connection {
            stroke: #9ca3af;
            stroke-width: 1.5;
            fill: none;
        }
        
        /* Styles pour la modale plein écran */
        .fullscreen-tree-container {
            transform: scale(0.95);
            transition: transform 0.2s ease;
        }
        
        #fullscreen-tree-modal:not(.hidden) .fullscreen-tree-container {
            transform: scale(1);
        }
        
        .tree-zoom-container {
            transition: transform 0.3s ease;
            transform-origin: center center;
        }