/* Clients.css - Styles spécifiques pour la page des clients */

/* En-tête de la page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
    color: var(--primary-color);
}

/* Section des filtres */
.filters-section {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 150px;
}

/* Grille des clients */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.client-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.client-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.client-category {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text-muted);
}

.client-info {
    margin-bottom: 1rem;
}

.client-info p {
    margin: 0.5rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.client-info i {
    width: 1rem;
    color: var(--primary-color);
}

.client-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.client-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: var(--bg-light);
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.client-actions button:hover {
    background: var(--border-color);
}

.client-actions button.danger {
    color: var(--danger-color);
}

.client-actions button.danger:hover {
    background: var(--danger-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover {
    background: var(--bg-light);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Historique des interactions */
.history-content {
    padding: 1.5rem;
}

.history-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
}

.history-item .date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.history-item .description {
    color: var(--text-color);
}

.history-item .user {
    font-size: 0.875rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .filters-section {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .filters {
        width: 100%;
    }

    .filters select,
    .filters input {
        width: 100%;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.client-card {
    animation: slideIn 0.3s ease-out;
}

/* Thème sombre spécifique */
[data-theme="dark"] .search-bar,
[data-theme="dark"] .filters select,
[data-theme="dark"] .filters input {
    background-color: var(--card-background);
}

[data-theme="dark"] .timeline-content {
    background-color: var(--card-background);
}

/* Section d'upload */
.upload-section {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.upload-section form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.upload-section .form-group {
    flex: 1;
    margin: 0;
}

.upload-section small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* Liste des fichiers */
.files-list {
    display: grid;
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: background-color 0.2s;
}

.file-item:hover {
    background: var(--border-color);
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-actions button {
    padding: 0.5rem;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.file-actions button:hover {
    color: var(--text-color);
}

.file-actions button.danger:hover {
    color: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
    .upload-section form {
        flex-direction: column;
        align-items: stretch;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }

    .file-icon {
        margin: 0 auto;
    }

    .file-info {
        text-align: center;
    }

    .file-actions {
        width: 100%;
        justify-content: center;
    }
} 