:root {
            --primary-color: #007acc;
            --primary-dark: #005a9e;
            --primary-light: #4da6e0;
            --bg-color: #1e1e1e;
            --bg-dark: #181818;
            --sidebar-bg: #252526;
            --sidebar-hover: #2a2d2e;
            --text-color: #cccccc;
            --text-muted: #969696;
            --border-color: #3c3c3c;
            --border-light: #464647;
            --success-color: #4CAF50;
            --warning-color: #ff9800;
            --error-color: #f44336;
            --accent-color: #007acc;
            --selection-bg: #094771;
            --scrollbar-bg: #424242;
            --scrollbar-thumb: #686868;
            --card-bg: #2d2d30;
            --hover-overlay: rgba(255, 255, 255, 0.05);
            --transition-speed: 0.3s;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: var(--bg-color);
            color: var(--text-color);
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            line-height: 1.5;
        }

        /* Barre de titre */
        .title-bar {
            background: var(--sidebar-bg);
            padding: 8px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
            height: 40px;
            -webkit-app-region: drag;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .app-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 600;
        }

        .app-controls {
            display: flex;
            gap: 8px;
            -webkit-app-region: no-drag;
        }

        .app-controls button {
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 13px;
            padding: 6px 10px;
            border-radius: 4px;
            transition: background-color var(--transition-speed);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .app-controls button:hover {
            background-color: var(--hover-overlay);
        }

        /* Layout principal */
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        /* Barre latérale */
        .sidebar {
            width: 280px;
            background: var(--sidebar-bg);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: width var(--transition-speed);
        }

        .sidebar-header {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            font-weight: 600;
            background: var(--sidebar-bg);
        }

        .sidebar-content {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
        }

        /* Statistiques */
        .stats-section {
            background: var(--card-bg);
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 20px;
            border: 1px solid var(--border-light);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .stats-section h3 {
            margin-bottom: 12px;
            color: var(--text-color);
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .storage-info {
            margin-bottom: 16px;
        }

        .storage-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .storage-bar {
            width: 100%;
            height: 8px;
            background: var(--border-color);
            border-radius: 4px;
            overflow: hidden;
        }

        .storage-progress {
            height: 100%;
            background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
            border-radius: 4px;
            transition: width 0.5s ease;
            position: relative;
        }

        .storage-progress::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background-image: linear-gradient(
                -45deg,
                rgba(255, 255, 255, 0.2) 25%,
                transparent 25%,
                transparent 50%,
                rgba(255, 255, 255, 0.2) 50%,
                rgba(255, 255, 255, 0.2) 75%,
                transparent 75%,
                transparent
            );
            background-size: 10px 10px;
            animation: move 1s linear infinite;
            display: none;
        }
keyframes move {
            0% {
                background-position: 0 0;
            }
            100% {
                background-position: 10px 0;
            }
        }

        .stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-top: 16px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .stat-label {
            font-size: 12px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .stat-value {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-color);
        }

        /* Filtres */
        .filters-section {
            margin-bottom: 20px;
        }

        .search-box {
            width: 100%;
            padding: 10px 12px;
            background: var(--bg-dark);
            border: 1px solid var(--border-light);
            border-radius: 6px;
            color: var(--text-color);
            font-size: 14px;
            margin-bottom: 12px;
            transition: all var(--transition-speed);
        }

        .search-box:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
        }

        .filter-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .filter-tag {
            background: var(--bg-dark);
            border: 1px solid var(--border-light);
            color: var(--text-muted);
            padding: 6px 10px;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
            transition: all var(--transition-speed);
        }

        .filter-tag:hover {
            background: var(--sidebar-hover);
            color: var(--text-color);
            transform: translateY(-1px);
        }

        .filter-tag.active {
            background: var(--primary-color);
            border-color: var(--primary-color);
            color: white;
            box-shadow: 0 2px 4px rgba(0, 122, 204, 0.3);
        }

        /* Zone principale avec redimensionnement */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: var(--bg-color);
            position: relative;
        }

        .content-header {
            padding: 12px 20px;
            background: var(--sidebar-bg);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .content-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            font-weight: 600;
        }

        .content-actions {
            display: flex;
            gap: 8px;
        }

        /* Liste des fichiers */
        .file-list-container {
            flex: 1;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .file-list-header {
            padding: 12px 20px;
            background: var(--bg-dark);
            border-bottom: 1px solid var(--border-color);
            display: grid;
            grid-template-columns: 1fr 100px 120px;
            gap: 16px;
            font-size: 12px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .file-items {
            flex: 1;
            overflow-y: auto;
        }

        /* Élément de fichier */
        .file-item {
            display: grid;
            grid-template-columns: 1fr 100px 120px;
            gap: 16px;
            padding: 12px 20px;
            border-bottom: 1px solid var(--border-light);
            cursor: pointer;
            transition: all var(--transition-speed);
            align-items: center;
            font-size: 14px;
            position: relative;
        }

        .file-item:hover {
            background: var(--sidebar-hover);
            transform: translateX(2px);
        }

        .file-item.selected {
            background: var(--selection-bg);
            border-left: 3px solid var(--primary-color);
        }

        .file-info {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .file-icon {
            width: 18px;
            text-align: center;
            flex-shrink: 0;
            font-size: 16px;
        }

        .file-name {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .file-size {
            color: var(--text-muted);
            font-size: 13px;
            text-align: right;
        }

        .file-date {
            color: var(--text-muted);
            font-size: 13px;
            text-align: right;
        }

        .file-actions {
            display: flex;
            gap: 4px;
            opacity: 0;
            transition: opacity var(--transition-speed);
            justify-content: flex-end;
        }

        .file-item:hover .file-actions {
            opacity: 1;
        }

        /* Boutons */
        .btn {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 10px 14px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            transition: all var(--transition-speed);
            font-weight: 500;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn-secondary {
            background: var(--border-color);
        }

        .btn-secondary:hover {
            background: var(--border-light);
        }

        .btn-danger {
            background: var(--error-color);
        }

        .btn-danger:hover {
            background: #d32f2f;
        }

        .btn-sm {
            padding: 8px 12px;
            font-size: 13px;
        }

        .btn-icon {
            background: none;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            padding: 6px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color var(--transition-speed);
            width: 32px;
            height: 32px;
        }
 @        .btn-icon:hover {
            background: var(--hover-overlay);
            transform: scale(1.1);
        }

        /* État vide */
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            padding: 40px;
            text-align: center;
            color: var(--text-muted);
        }

        .empty-state i {
            font-size: 72px;
            margin-bottom: 16px;
            opacity: 0.3;
        }

        .empty-state h3 {
            margin-bottom: 8px;
            color: var(--text-color);
            font-size: 18px;
        }

        .empty-state p {
            margin-bottom: 20px;
            max-width: 300px;
            line-height: 1.5;
            font-size: 14px;
        }

        /* Barre de défilement */
        .file-items::-webkit-scrollbar {
            width: 10px;
        }

        .file-items::-webkit-scrollbar-track {
            background: var(--scrollbar-bg);
        }

        .file-items::-webkit-scrollbar-thumb {
            background: var(--scrollbar-thumb);
            border-radius: 5px;
        }

        .file-items::-webkit-scrollbar-thumb:hover {
            background: #7a7a7a;
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(2px);
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--sidebar-bg);
            border-radius: 8px;
            width: 460px;
            max-width: 90vw;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
            border: 1px solid var(--border-color);
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 16px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-body {
            padding: 20px;
        }

        .form-group {
            margin-bottom: 18px;
        }

        .form-label {
            display: block;
            margin-bottom: 6px;
            font-size: 13px;
            color: var(--text-muted);
            font-weight: 500;
        }

        .form-control {
            width: 100%;
            padding: 10px 12px;
            background: var(--bg-color);
            border: 1px solid var(--border-light);
            border-radius: 6px;
            color: var(--text-color);
            font-size: 14px;
            transition: all var(--transition-speed);
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
        }

        .modal-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        /* Notification */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 12px 20px;
            border-radius: 6px;
            color: white;
            font-size: 14px;
            z-index: 2000;
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            transform: translateX(150%);
            transition: transform 0.4s ease;
            max-width: 350px;
        }

        .notification.show {
            transform: translateX(0);
        }

        .notification.success {
            background: var(--success-color);
        }

        .notification.error {
            background: var(--error-color);
        }

        .notification.warning {
            background: var(--warning-color);
        }

        .notification.info {
            background: var(--primary-color);
        }

        /* Redimensionneur */
        .resizer {
            position: absolute;
            top: 0;
            left: -5px;
            width: 10px;
            height: 100%;
            background: transparent;
            cursor: col-resize;
            z-index: 20;
            transition: background-color 0.2s;
        }

        .resizer:hover,
        .resizer.resizing {
            background: var(--primary-color);
        }

        /* Indicateur de redimensionnement */
        .resize-indicator {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: var(--primary-color);
            color: white;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 12px;
            z-index: 1000;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .resize-indicator.show {
            opacity: 1;
        }

        /* Aperçu de fichier amélioré */
        .file-preview {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--card-bg);
            border-top: 1px solid var(--border-color);
            padding: 15px;
            max-height: 300px;
            overflow-y: auto;
            transform: translateY(100%);
            transition: transform 0.3s ease;
            z-index: 90;
            display: flex;
            flex-direction: column;
        }

        .file-preview.show {
            transform: translateY(0);
        }

        .preview-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border-light);
        }

        .preview-title {
            font-weight: 600;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .preview-actions {
            display: flex;
            gap: 8px;
        }

        .preview-content {
            font-family: monospace;
            font-size: 12px;
            white-space: pre-wrap;
            flex: 1;
            overflow-y: auto;
            background: var(--bg-dark);
            padding: 10px;
            border-radius: 4px;
            border: 1px solid var(--border-color);
            max-height: 200px;
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .sidebar {
                width: 240px;
            }
        }

        @media (max-width: 768px) {
            .main-container {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                height: auto;
                max-height: 40vh;
            }
            
            .file-list-header,
            .file-item {
                grid-template-columns: 1fr 80px;
            }
            
            .file-date {
                display: none;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }

            .modal-content {
                width: 95vw;
            }

            .resizer {
                display: none;
            }
            
            .file-preview {
                max-height: 50vh;
            }
        }

        @media (max-width: 480px) {
            .content-header {
                flex-direction: column;
                gap: 10px;
                align-items: flex-start;
            }

            .content-actions {
                width: 100%;
                justify-content: space-between;
            }

            .file-list-header,
            .file-item {
                grid-template-columns: 1fr 60px;
                gap: 10px;
                padding: 10px 15px;
            }

            .file-actions {
                position: absolute;
                right: 10px;
                top: 50%;
                transform: translateY(-50%);
                background: var(--sidebar-bg);
                border-radius: 4px;
                padding: 4px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            }
        }

        /* Animations */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .modal-content {
            animation: fadeIn 0.3s ease;
        }
        @keyframes slideIn {
            from { transform: translateX(100%); }
            to { transform: translateX(0); }
        }

        /* Badges */
        .badge {
            background: var(--primary-color);
            color: white;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }

        /* Tooltip */
        .tooltip {
            position: relative;
        }

        .tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: var(--bg-dark);
            color: var(--text-color);
            padding: 6px 10px;
            border-radius: 4px;
            font-size: 12px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
            border: 1px solid var(--border-color);
            z-index: 1000;
        }

        .tooltip:hover::after {
            opacity: 1;
        }

        /* Toggle sidebar */
        .sidebar-toggle {
            display: none;
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 4px;
            width: 32px;
            height: 32px;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 50;
        }

        @media (max-width: 768px) {
            .sidebar-toggle {
                display: flex;
            }
            
            .sidebar.collapsed {
                width: 0;
                min-width: 0;
                overflow: hidden;
            }
        }

        /* Loading state */
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }
