/* Variables de couleurs */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-hover: #34495e;
    --main-bg: #f5f6fa;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-secondary: #7f8c8d;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --border-color: #e1e5eb;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--main-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout principal */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Barre latérale */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 20px 0;
    position: fixed;
    height: 100%;
    transition: all 0.3s;
    z-index: 1000;
}

.logo {
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo h2 {
    color: white;
    margin-bottom: 5px;
}

.logo p {
    color: #bdc3c7;
    font-size: 0.9em;
}

.nav-menu ul li {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.nav-menu ul li i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-menu ul li:hover,
.nav-menu ul li.active {
    background-color: var(--sidebar-hover);
    border-left: 4px solid var(--secondary-color);
    padding-left: 16px;
}

/* Contenu principal */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s;
}

/* Barre supérieure */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Cartes de statistiques */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.stat-info h3 {
    font-size: 1.8em;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Section activités récentes */
.recent-activities {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.recent-activities h2 {
    margin-bottom: 20px;
    font-size: 1.4em;
    color: var(--primary-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s;
}

.activity-item:hover {
    background-color: #f1f3f5;
    transform: translateX(5px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #1976d2;
}

.activity-details p {
    font-weight: 500;
    margin-bottom: 3px;
}

.activity-time {
    font-size: 0.8em;
    color: var(--text-secondary);
}

/* Sections de contenu */
.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.content-section.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Styles spécifiques pour la section de messagerie */
#messages-section {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    margin-top: 0;
    border: 3px solid #ff0000 !important; /* Style de débogage */
    min-height: 500px !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* Styles de débogage pour le conteneur de messages */
.messages-container {
    border: 3px solid #00ff00 !important; /* Style de débogage */
    min-height: 400px !important;
}

/* Assurer que la section est visible */
.content-section#messages-section.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
}

.section-placeholder {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.section-placeholder i {
    font-size: 3em;
    margin-bottom: 15px;
    color: var(--primary-color);
    opacity: 0.7;
}

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

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .sidebar .logo h2,
    .sidebar .logo p,
    .nav-menu ul li span {
        display: none;
    }
    
    .nav-menu ul li {
        justify-content: center;
        padding: 15px 0;
    }
    
    .nav-menu ul li i {
        margin-right: 0;
        font-size: 1.2em;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .search-bar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
}

/* Styles pour les statuts */
.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: capitalize;
}

.status.active {
    background-color: #e3fcef;
    color: #0e9f6e;
}

.status.inactive {
    background-color: #fde8e8;
    color: #c81e1e;
}

.status.pending {
    background-color: #fef3c7;
    color: #9f580a;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #e0e0e0;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

.btn-icon i {
    font-size: 14px;
}

.btn-icon.edit {
    color: #3b82f6;
    border-color: #bfdbfe;
}

.btn-icon.edit:hover {
    background-color: #eff6ff;
}

.btn-icon.delete {
    color: #ef4444;
    border-color: #fecaca;
}

.btn-icon.delete:hover {
    background-color: #fef2f2;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:not(:disabled):hover {
    background-color: #f8f9fa;
    border-color: #cbd5e1;
}

.page-info {
    font-size: 0.9em;
    color: #666;
    padding: 0 10px;
}

/* Styles pour les badges de service */
.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px;
    padding: 4px 10px;
    background-color: #f0f7ff;
    border-radius: 12px;
    font-size: 0.8em;
    color: #1e40af;
    border: 1px solid #dbeafe;
    white-space: nowrap;
}

.service-badge i {
    font-size: 0.9em;
}

.service-badge.titre-foncier {
    background-color: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
}

.service-badge.btp {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.service-badge.immobilier {
    background-color: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}

/* Amélioration de la modale */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 10px 10px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: var(--primary-color);
    font-weight: 600;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

/* Amélioration des champs de formulaire */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 0.95em;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.2s;
    background-color: #f9fafb;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
    background-color: white;
    outline: none;
}

/* Amélioration des cases à cocher */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 5px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.checkbox-item:hover {
    background: #f0f4f8;
    border-color: #cbd5e1;
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-item .checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkbox-item input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-item .checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-item input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-item .service-icon {
    margin-right: 8px;
    color: #64748b;
    font-size: 1.1em;
}

.checkbox-item input:checked ~ .service-icon {
    color: var(--primary-color);
}

/* Boutons de la modale */
.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f9fafb;
    border-radius: 0 0 10px 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1a4b8c;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: white;
    border-color: #e0e0e0;
    color: #444;
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #cbd5e1;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .checkbox-item {
        width: 100%;
    }
}

/* Styles pour les sections spécifiques */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-top: 5px;
}

/* Cartes de statistiques */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5em;
}

.stat-info h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 0;
}

/* Barre d'outils */
.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-container input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filters select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9em;
    background-color: white;
    cursor: pointer;
    min-width: 150px;
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Tableau des services */
.table-container {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.data-table th {
    background-color: #f8f9fa;
    color: var(--text-color);
    font-weight: 600;
    text-align: left;
    padding: 15px;
    white-space: nowrap;
}

.data-table td {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Styles pour les badges de service */
.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

.service-badge i {
    font-size: 0.9em;
}

/* Barre de progression */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.7em;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20%;
    transition: width 0.3s ease;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #cbd5e1;
}

.page-info {
    font-size: 0.9em;
    color: var(--text-secondary);
    padding: 0 10px;
}

/* Modale */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: var(--primary-color);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

/* Styles pour les services */
.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
    background-color: #f0f0f0;
    color: #555;
}

.service-badge i {
    font-size: 0.9em;
}

.service-type-titre-foncier {
    background-color: #e3f2fd;
    color: #1565c0;
}

.service-type-btp {
    background-color: #fff3e0;
    color: #e65100;
}

.service-type-immobilier {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Styles pour les statuts */
.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-in-progress {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background-color: #e8f5e9;
    color: #388e3c;
}

/* Styles pour la modale des détails du service */
.service-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.detail-row.full-width {
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    min-width: 140px;
    color: #555;
}

.detail-value {
    flex: 1;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1976d2;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.document-link:hover {
    background-color: #f5f5f5;
    text-decoration: underline;
}

.document-link i {
    color: #d32f2f;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Styles pour les écrans mobiles */
@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .detail-label {
        min-width: 100%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* Styles pour les boutons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn i {
    font-size: 0.9em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Styles pour la section de mise à jour de la progression */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 16px 24px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
}

.card-body {
    padding: 24px;
}

.progress-update-section {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.progress-update-section h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-range {
    width: 100%;
    height: 1.5rem;
    margin: 0.5rem 0;
}

/* Styles pour la timeline de l'historique */
.update-history {
    margin-top: 2.5rem;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.update-history h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0 0 1.2rem 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e0e0e0;
}

.no-updates {
    color: #777;
    font-style: italic;
    padding: 1rem 0;
}

/* Styles pour la section des demandes clients */
.filters {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.demandes-list {
    margin-top: 20px;
}

.demande-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.demande-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.demande-info h3 {
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.demande-meta {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-nouveau {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-en-cours {
    background-color: #fff8e1;
    color: #ff8f00;
}

.status-traite {
    background-color: #e8f5e9;
    color: #388e3c;
}

.no-demands {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.no-demands i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #e0e0e0;
}

/* Styles pour la modale de détail */
.demande-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.info-label {
    font-weight: 600;
    width: 150px;
    color: var(--text-color);
}

.documents-section {
    margin: 25px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.documents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.document-item:hover {
    background: #f5f5f5;
    border-color: #1976d2;
}

.document-item i {
    margin-right: 8px;
    color: #1976d2;
}

.actions-section {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    align-items: center;
}

.comment-section {
    margin-top: 20px;
}

.comment-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 100px;
    margin-top: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.comment-section textarea:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.notification-badge {
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    position: absolute;
    top: 5px;
    right: 5px;
}

.update-item {
    position: relative;
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.update-item:last-child {
    padding-bottom: 0.5rem;
}

.update-item:before {
    content: '';
    position: absolute;
    left: -0.25rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #3498db;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #3498db;
}

.update-item.completed:before {
    background-color: #2ecc71;
    box-shadow: 0 0 0 2px #2ecc71;
}

.update-item.pending:before {
    background-color: #f39c12;
    box-shadow: 0 0 0 2px #f39c12;
}

.update-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.update-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-right: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.update-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 8px;
}

.update-status.pending {
    background-color: #f39c12;
    color: white;
}

.update-status.in-progress {
    background-color: #3498db;
    color: white;
}

.update-status.completed {
    background-color: #2ecc71;
    color: white;
}

.update-meta {
    text-align: right;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.update-user {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.update-user i {
    margin-right: 4px;
    color: #7f8c8d;
}

.update-date {
    white-space: nowrap;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.update-content {
    margin: 10px 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Styles pour la messagerie */
#messages-section {
    display: none;
    width: 100%;
    padding: 20px;
    background-color: #f5f7fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#messages-section.active {
    display: block;
    opacity: 1;
    visibility: visible;
    height: auto;
}

.messages-container {
    display: flex;
    height: calc(100vh - 100px);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.conversations-list {
    width: 350px;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.messages-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.messages-header h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.search-container {
    position: relative;
}

.search-container i {
    position: absolute;
    left: 10px;
    top: 10px;
    color: #999;
}

.search-container input {
    width: 100%;
    padding: 8px 10px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.conversations {
    flex: 1;
    overflow-y: auto;
}

.conversation {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.conversation:hover {
    background: #f5f5f5;
}

.conversation.active {
    background: #e3f2fd;
}

.conversation-avatar {
    margin-right: 12px;
}

.conversation-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.conversation-details {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.conversation-header h3 {
    margin: 0;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-header .time {
    font-size: 12px;
    color: #999;
}

.last-message {
    margin: 0;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-count {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #1976d2;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
}

.chat-partner {
    display: flex;
    align-items: center;
}

.chat-partner img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat-partner h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.status {
    font-size: 12px;
    color: #4caf50;
}

.status.online {
    color: #4caf50;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f0f2f5;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.message.received .message-content {
    background: white;
    border-top-left-radius: 0;
}

.message.sent .message-content {
    background: #1976d2;
    color: white;
    border-top-right-radius: 0;
}

.message-time {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.8;
    text-align: right;
}

.message.sent .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message-input {
    padding: 15px;
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.message-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    margin: 0 10px;
}

.message-input .btn-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    padding: 5px 10px;
}

.message-input .btn-primary {
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.task-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

.update-documents {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    margin-top: 0.75rem;
}

.document-link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.document-link:hover {
    text-decoration: underline;
}

.document-link i {
    margin-right: 0.35rem;
    color: #e74c3c;
}
