/* Partage de Fichiers - Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --border-color: #dee2e6;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-muted: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.breadcrumb a:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.breadcrumb a::after {
    content: ' / ';
    margin-left: 10px;
    color: var(--text-muted);
}

.breadcrumb a:last-child::after {
    display: none;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
}

/* Sidebar */
.sidebar {
    width: 200px;
    flex-shrink: 0;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85em;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* File Browser */
.file-browser {
    flex: 1;
    min-height: 400px;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.file-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.file-icon {
    font-size: 3em;
    line-height: 1;
}

.file-name {
    font-weight: 500;
    word-break: break-word;
    font-size: 0.9em;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-size {
    font-size: 0.8em;
    color: var(--text-muted);
}

.file-actions {
    display: flex;
    gap: 5px;
    width: 100%;
    justify-content: center;
}

.file-item.folder {
    background-color: rgba(0, 123, 255, 0.05);
}

.file-item.pdf {
    background-color: rgba(220, 53, 69, 0.05);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.modal-content input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 1em;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .breadcrumb {
        flex-wrap: wrap;
    }
}

/* Utilities */
.mt-20 {
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}
