/* Import des fichiers CSS organisés - doivent être AVANT toute règle */
@import url('base.css');
@import url('components.css');
@import url('layout.css');
@import url('responsive.css');
@import url('attachments.css');
@import url('cards.css');

.comment-file-limit {
    display: none;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #9a3412;
    border: 1px solid #fdba74;
    font-size: 0.875rem;
}

.comment-file-limit.show {
    display: block;
}

.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.file-preview-item .file-preview-image {
    width: 160px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.file-preview-item .file-preview-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
}

.file-preview-item {
    position: relative;
}

.remove-file-btn-overlay {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 9999px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* ================================================
   MAIN CSS - Règles spécifiques après imports
   ================================================ */

/* ================================================
   STYLES SPÉCIFIQUES À L'APPLICATION
   ================================================ */

/* ================================================
   HEADER MTS SPÉCIFIQUE
   ================================================ */

.mts-header {
    background: linear-gradient(90deg, #005baa 60%, #0074d9 100%);
    color: white;
    padding: 1rem 0 0.7rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 50;
}

.mts-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mts-header h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: white;
}

.mts-header h1::before {
    content: '';
    display: inline-block;
    width: 38px;
    height: 38px;
    background: #fff url('/assets/img/SNF_logo.png') no-repeat center/80%;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    margin-right: 0.5rem;
    border: 2px solid #e5e7eb;
}

.mts-header nav {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.mts-header nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.45rem 1.1rem;
    border-radius: 7px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 4px rgba(0,91,170,0.07);
    letter-spacing: 0.01em;
}

.mts-header nav a:hover {
    background: rgba(255,255,255,0.16);
    color: #e6f0fa;
    box-shadow: 0 2px 8px rgba(0,91,170,0.13);
}

/* ================================================
   LAYOUT PRINCIPAL POUR FOOTER STICKY
   ================================================ */

/* Structure flexbox pour maintenir le footer en bas */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Conteneur principal qui prend tout l'espace disponible */
.mts-app-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Contenu principal qui s'étend */


/* ================================================
   FOOTER SNF SPÉCIFIQUE
   ================================================ */

.footer-snf {
    width: 100%;
    background: rgba(0,91,170,0.93);
    color: #fff;
    text-align: center;
    padding: 1.2rem 0 0.7rem 0;
    font-size: 1.05rem;
    flex-shrink: 0; /* Empêche le footer de rétrécir */
    border-top: 2px solid #e5e7eb;
    letter-spacing: 0.02em;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.07);
    position: relative;
    z-index: 10;
    margin-top: auto; /* Pousse le footer vers le bas */
}

.footer-snf a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 0.7rem;
    transition: color 0.2s ease;
}

.footer-snf a:hover {
    color: #b3d4fc;
}

/* ================================================
   CONTAINER PRINCIPAL MTS
   ================================================ */



/* ================================================
   CONTAINERS OPTIMISÉS
   ================================================ */

/* Conteneur principal transparent */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    flex: 1 0 auto;
    width: calc(100% - 6rem); /* Plus d'espace sur les côtés */
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Conteneur optimisé pour les pages projets et utilisateurs */
.container-white {
    max-width: 800px; /* Réduit la largeur */
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.92); /* Moins opaque pour laisser voir l'image */
    backdrop-filter: blur(6px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: calc(100% - 8rem); /* Beaucoup plus d'espace sur les côtés */
    box-sizing: border-box;
}

/* KPI page container variant: allow wider charts without overflow */
.container-white.kpi-container {
    max-width: 1200px;
    width: calc(100% - 4rem);
    padding: 2rem;
    display: block;
}
@media (max-width: 1024px) {
  .container-white.kpi-container { max-width: 100%; width: calc(100% - 2rem); padding: 1.25rem; }
}

/* Conteneur spécifique pour les vues détaillées */
.container-detail {
    max-width: 1000px; /* Plus large pour les détails */
    margin: 2rem auto;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: calc(100% - 4rem); /* Moins d'espace sur les côtés */
    box-sizing: border-box;
}

/* Styles pour les tableaux de détail */
.container-detail .mts-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.container-detail .mts-table th {
    background: rgba(0, 91, 170, 0.08);
    color: #005baa;
    font-weight: 600;
    padding: 1rem 1.5rem;
    text-align: left;
    width: 25%;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.container-detail .mts-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.4);
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
}

.container-detail .mts-table tr:last-child th,
.container-detail .mts-table tr:last-child td {
    border-bottom: none;
}

.container-detail .mts-table tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.container-detail .mts-table tr {
    border-bottom: 1px solid #e9ecef;
}

.container-detail .mts-table tr:last-child {
    border-bottom: none;
}

/* Styles pour les sections de la vue détaillée */
.container-detail h2 {
    color: #005baa;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 91, 170, 0.2);
}

.container-detail h3, .container-detail h4 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid rgba(0, 91, 170, 0.4);
}

.container-detail hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 91, 170, 0.3), transparent);
    margin: 2rem 0;
}

/* Styles pour les commentaires */
.container-detail .mts-comments-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.container-detail .mts-comments-list li {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid rgba(0, 91, 170, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Styles pour les pièces jointes */
.container-detail ul:not(.mts-comments-list) {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
}

.container-detail ul:not(.mts-comments-list) li {
    margin-bottom: 0.5rem;
}

.container-detail ul:not(.mts-comments-list) a {
    color: #005baa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.container-detail ul:not(.mts-comments-list) a:hover {
    color: #0074d9;
    text-decoration: underline;
}

/* Formulaire de commentaire */
.container-detail form {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.container-detail form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    background: rgba(255, 255, 255, 0.9);
}

.container-detail form textarea:focus {
    outline: none;
    border-color: #005baa;
    box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.1);
}

/* ================================================
   ATTACHMENTS DANS LA VUE TICKET
   ================================================ */

.no-attachments {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    margin: 1rem 0;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.attachment-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    display: block;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.attachment-item:hover {
    border-color: #005baa;
    box-shadow: 0 4px 12px rgba(0, 91, 170, 0.15);
    transform: translateY(-1px);
}

.attachment-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
}

.attachment-icon svg {
    width: 24px;
    height: 24px;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    display: block;
    font-weight: 600;
    color: #005baa;
    text-decoration: none;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.attachment-name:hover {
    color: #0074d9;
    text-decoration: underline;
}

.attachment-size {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ================================================
   PRÉVISUALISATION D'IMAGES DANS LES ATTACHMENTS
   ================================================ */

.attachment-image {
    flex-direction: column;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

.attachment-preview {
    position: relative;
    width: 100%;
    height: 140px;
    cursor: pointer;
    overflow: hidden;
    background: #f3f4f6;
}

.attachment-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.attachment-preview:hover .attachment-thumbnail {
    transform: scale(1.05);
}

.attachment-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.attachment-preview:hover .attachment-overlay {
    opacity: 1;
}

.expand-icon {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.attachment-image .attachment-info {
    padding: 0.75rem;
    background: white;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.attachment-image .attachment-name {
    font-weight: 600;
    color: #1f2937;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 0.5rem;
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    word-break: break-word;
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.attachment-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
}

.attachment-action:hover {
    background: #005baa;
    color: white;
    transform: translateY(-1px);
}

.attachment-action svg {
    width: 18px;
    height: 18px;
}

/* ================================================
   MODAL D'AGRANDISSEMENT D'IMAGE
   ================================================ */

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: -20px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1);
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-modal-info {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    color: #1f2937;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.5rem;
    }
    
    .attachment-preview {
        height: 120px;
    }
    
    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .modal-image {
        max-height: 70vh;
    }
    
    .image-modal-close {
        top: -40px;
        right: -10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .image-modal-info {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* ================================================
   PRÉVISUALISATION DE DOCUMENTS NON-IMAGES
   ================================================ */

.document-preview {
    position: relative;
    width: 100%;
    height: 120px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.document-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.document-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.document-icon svg {
    width: 36px;
    height: 36px;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.file-type-badge {
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.document-preview:hover .document-overlay {
    opacity: 1;
}

.download-icon {
    width: 24px;
    height: 24px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.file-type-name {
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Types de fichiers spécialisés */
.file-pdf {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.file-pdf .file-type-name {
    background: #dc2626;
    color: white;
}

.file-word {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.file-word .file-type-name {
    background: #2563eb;
    color: white;
}

.file-excel {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.file-excel .file-type-name {
    background: #16a34a;
    color: white;
}

.file-powerpoint {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.file-powerpoint .file-type-name {
    background: #d97706;
    color: white;
}

.file-archive {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #7c3aed;
}

.file-archive .file-type-name {
    background: #7c3aed;
    color: white;
}

.file-video {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #be185d;
}

.file-video .file-type-name {
    background: #be185d;
    color: white;
}

.file-audio {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
}

.file-audio .file-type-name {
    background: #059669;
    color: white;
}

.file-text {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
}

.file-text .file-type-name {
    background: #475569;
    color: white;
}

.file-generic {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    color: #6b7280;
}

.file-generic .file-type-name {
    background: #6b7280;
    color: white;
}

/* Amélioration de l'affichage des métadonnées */
.attachment-item:not(.attachment-image) .attachment-info {
    padding: 0.75rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.attachment-item:not(.attachment-image) .attachment-name {
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    overflow: hidden;
    word-break: break-word;
}

.attachment-item:not(.attachment-image) .attachment-name:hover {
    color: #005baa;
    text-decoration: underline;
}

/* Responsive pour les documents */
@media (max-width: 768px) {
    .document-preview {
        height: 100px;
    }
    
    .document-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .file-type-badge {
        font-size: 0.625rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ================================================
   SECTION COMMENTAIRES AMÉLIORÉE
   ================================================ */

.comment-section {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.comment-section h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.125rem;
}

.comment-form .form-group {
    margin-bottom: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    background: white;
    transition: all 0.2s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #005baa;
    box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.1);
}

.checkbox-group {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #005baa;
    cursor: pointer;
}

.checkbox-text {
    font-size: 0.95rem;
}

.comment-form .form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(229, 231, 235, 0.6);
}

.comment-form .btn-primary {
    background: linear-gradient(135deg, #005baa, #0074d9);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.comment-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 91, 170, 0.3);
}

/* ================================================
   ACTIONS DU TICKET
   ================================================ */

.ticket-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* ================================================
   LISTE DES COMMENTAIRES AMÉLIORÉE
   ================================================ */

.comments-list {
    margin: 1.5rem 0;
}

.comment-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.comment-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.comment-author {
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
}

.comment-date {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 400;
}

.comment-internal-badge {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.comment-content {
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ================================================
   FORMULAIRES D'ÉDITION UTILISATEURS
   ================================================ */

/* Layout en grille pour les formulaires */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #005baa;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(221, 221, 221, 0.8);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #005baa;
    box-shadow: 0 0 0 2px rgba(0, 91, 170, 0.1);
    background: rgba(255, 255, 255, 1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

/* Section d'informations utilisateur */
.user-info {
    background: rgba(248, 249, 250, 0.9);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid rgba(233, 236, 239, 0.8);
    backdrop-filter: blur(4px);
}

.user-info h3 {
    margin: 0 0 1rem 0;
    color: #005baa;
    font-size: 1.1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 0.5rem 0;
}

.info-item strong {
    color: #495057;
}

/* Actions de formulaire */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(238, 238, 238, 0.8);
    flex-wrap: wrap;
}

/* Message de succès spécifique */
.success-msg {
    background: rgba(212, 237, 218, 0.9);
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid rgba(195, 230, 203, 0.8);
    backdrop-filter: blur(4px);
}

/* ================================================
   STYLES SPÉCIFIQUES POUR LES FORMULAIRES MTS
   ================================================ */

/* Formulaires MTS optimisés */
.mts-form {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* ================================================
   STYLES SPÉCIFIQUES POUR LES TABLEAUX MTS
   ================================================ */

/* Liste MTS optimisée avec transparence */
.mts-list-box {
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem auto 2rem auto;
  max-width: 1200px;  /* Remis : pour limiter la largeur max */
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mts-table {
  width: 100%;  /* Force le tableau à prendre 100% de la largeur de la boîte */
  table-layout: fixed;  /* Force les colonnes à respecter les largeurs définies, même si le contenu est plus large */
  border-collapse: collapse;  /* Optionnel : pour un meilleur rendu */
}

/* Largeurs fixes pour chaque colonne (ajustez selon vos besoins) */
.mts-table th:nth-child(1), .mts-table td:nth-child(1) { width: 5%; }  /* id */
.mts-table th:nth-child(2), .mts-table td:nth-child(2) { width: 10%; } /* first_name */
.mts-table th:nth-child(3), .mts-table td:nth-child(3) { width: 10%; } /* last_name */
.mts-table th:nth-child(4), .mts-table td:nth-child(4) { width: 15%; } /* email */
.mts-table th:nth-child(5), .mts-table td:nth-child(5) { width: 15%; } /* password */
.mts-table th:nth-child(6), .mts-table td:nth-child(6) { width: 5%; }  /* level */
.mts-table th:nth-child(7), .mts-table td:nth-child(7) { width: 5%; }  /* is_active */
.mts-table th:nth-child(8), .mts-table td:nth-child(8) { width: 10%; } /* created_at */
.mts-table th:nth-child(9), .mts-table td:nth-child(9) { width: 10%; } /* updated_at */
.mts-table th:nth-child(10), .mts-table td:nth-child(10) { width: 15%; } /* Actions */

.mts-table-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(249, 250, 251, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 12px 12px 0 0;
}

/* Form header pour une intégration harmonieuse dans le container */
.form-header {
    padding: 1.5rem 2rem 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    margin-bottom: 1.5rem;
}

.form-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-header .btn-view {
    background: #f3f4f6;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.form-header .btn-view:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: translateY(-1px);
}

.mts-search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.mts-search-container::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 1;
}

.mts-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.mts-search:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.mts-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 0.98rem;
    margin-bottom: 0.5rem;
    table-layout: fixed;
}

.mts-table th, .mts-table td {
    padding: 1rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.mts-table th {
    background: #eaf6ff;
    color: #005baa;
    font-weight: 700;
    font-size: 1.01rem;
    white-space: nowrap;
}

.mts-table tr:nth-child(even) {
    background: #f8fafc;
}

/* Suppression de l'effet hover pour éviter la barre bleue */
/* .mts-table tr:hover {
    background: #f8fafc;
    transition: background 0.15s ease;
} */

.mts-table tr:last-child td {
    border-bottom: none;
}

/* Définition des largeurs de colonnes */
.mts-table th:nth-child(1), .mts-table td:nth-child(1) { width: 12%; min-width: 140px; }
.mts-table th:nth-child(2), .mts-table td:nth-child(2) { width: 20%; min-width: 200px; }
.mts-table th:nth-child(3), .mts-table td:nth-child(3) { width: 10%; min-width: 120px; }
.mts-table th:nth-child(4), .mts-table td:nth-child(4) { width: 10%; min-width: 120px; }
.mts-table th:nth-child(5), .mts-table td:nth-child(5) { width: 15%; min-width: 150px; }
.mts-table th:nth-child(6), .mts-table td:nth-child(6) { width: 8%; min-width: 100px; }
.mts-table th:nth-child(7), .mts-table td:nth-child(7) { width: 10%; min-width: 120px; }
.mts-table th:nth-child(8), .mts-table td:nth-child(8) { width: 15%; min-width: 180px; }
.mts-table th:nth-child(9), .mts-table td:nth-child(9) { width: 10%; min-width: 100px; }

/* ================================================
   STYLES SPÉCIFIQUES POUR LES FILTRES MTS
   ================================================ */

/* Filtres MTS avec transparence */
.mts-filters {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.5);
    backdrop-filter: blur(6px);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem !important;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    transition: all 0.2s ease;
}

.mts-filters:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.mts-filters label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mts-filters select,
.mts-filters input[type="text"] {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    background: #f9fafb;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
    min-width: 140px;
    color: #374151;
    font-weight: 500;
}

.mts-filters select:hover,
.mts-filters input[type="text"]:hover {
    background: #ffffff;
    border-color: #9ca3af;
}

.mts-filters select:focus,
.mts-filters input[type="text"]:focus {
    border-color: #005baa;
    box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.1);
    outline: none;
    background: #ffffff;
}

.mts-filters button[type="submit"] {
    background: #005baa;
    color: #ffffff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 91, 170, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.mts-filters button[type="submit"]:hover {
    background: #004080;
    box-shadow: 0 4px 12px rgba(0, 91, 170, 0.3);
    transform: translateY(-1px);
}

/* ================================================
   STYLES SPÉCIFIQUES POUR LES BOUTONS MTS
   ================================================ */

.btn-nouvelle-mts {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-nouvelle-mts:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-nouvelle-mts::before {
    content: '+';
    font-size: 1.25rem;
    font-weight: bold;
}

.btn-export {
    background: #4c51bf;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.btn-export:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.btn-export::before {
    content: '⬇';
    font-size: 1rem;
}

/* ================================================
   STYLES SPÉCIFIQUES POUR LES KPI
   ================================================ */

.kpi-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.kpi-item {
    background: #eaf6ff;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: 0 2px 8px rgba(0,91,170,0.07);
    min-width: 90px;
    text-align: center;
    color: #005baa;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* ================================================
   STYLES SPÉCIFIQUES POUR LES COMMENTAIRES
   ================================================ */

.mts-comments-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.mts-comments-list li {
    background: #f8f8fa;
    border-radius: 5px;
    margin-bottom: 0.7rem;
    padding: 0.7rem 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    text-align: left;
}

.mts-list-box form textarea[name="comment"] {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 0.5rem;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.mts-list-box form button[type="submit"] {
    background: #1abc9c;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.mts-list-box form button[type="submit"]:hover {
    background: #16a085;
}

.mts-form .form-group {
    margin-bottom: 1.5rem;
}

.mts-form label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mts-form input,
.mts-form textarea,
.mts-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    background: var(--white);
}

.mts-form input:focus,
.mts-form textarea:focus,
.mts-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.1);
}

/* Styles spécifiques pour les formulaires MTS */
.mts-form {
    padding: 2rem;
    max-width: none;
}

.mts-form label {
    font-weight: 600;
    color: #22314a;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mts-form input[type="text"],
.mts-form input[type="password"],
.mts-form input[type="number"],
.mts-form input[type="datetime-local"],
.mts-form select,
.mts-form textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid #bfc9d6;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    background: #f8fafc;
    transition: border 0.2s;
}

.mts-form input:focus,
.mts-form select:focus,
.mts-form textarea:focus {
    border-color: #005baa;
    outline: none;
}

.impact-fieldset {
    border: 1.5px solid #bfc9d6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
}

.impact-fieldset legend {
    padding: 0 0.75rem;
    font-weight: 600;
    color: #22314a;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.impact-fieldset label {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 500;
    gap: 0.75rem;
    color: #374151;
    cursor: pointer;
    transition: color 0.2s ease;
}

.impact-fieldset label:hover {
    color: #22314a;
}

.impact-fieldset input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #005baa;
    cursor: pointer;
}

.mts-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Styles pour les boutons dans les formulaires MTS */
.mts-form button:not(.remove-file-btn-overlay) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-right: 1rem;
    margin-top: 1rem;
}

.mts-form button:not(.remove-file-btn-overlay):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 91, 170, 0.3);
}

.mts-form .btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-normal);
    margin-top: 1rem;
}

.mts-form .btn-cancel:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

/* Actions du formulaire */
.mts-form .form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.mts-form .form-actions button,
.mts-form .form-actions .btn-cancel {
    margin-top: 0;
}





/* ================================================
   BOUTONS MTS OPTIMISÉS
   ================================================ */

/* Base pour tous les boutons MTS */
.btn-create, .btn-view, .btn-cancel, .btn-export, .btn-nouvelle-mts {
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Bouton créer */
.btn-create {
    background: linear-gradient(135deg, #005baa, #0074d9);
    color: white;
}

.btn-create:hover {
    background: linear-gradient(135deg, #004080, #005baa);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 91, 170, 0.2);
}

/* Bouton voir */
.btn-view {
    background: rgba(234, 246, 255, 0.9);
    color: #005baa;
    border: 1px solid rgba(0, 91, 170, 0.3);
}

.btn-view:hover {
    background: rgba(208, 234, 255, 0.95);
    color: #0074d9;
    transform: translateY(-1px);
}



/* Styles pour les tableaux */
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--gray-50);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
}

.table tr:hover {
    background: var(--gray-50);
}

/* Styles pour les messages d'alerte */
.message {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.message.success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border-color: rgba(5, 150, 105, 0.2);
}

.message.error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border-color: rgba(220, 38, 38, 0.2);
}

.message.warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
    border-color: rgba(217, 119, 6, 0.2);
}

.message.info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--info-color);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Alertes améliorées */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Styles pour les pages d'authentification */


/* Styles spécifiques pour les pages d'authentification */
body.auth-bg {
    background: #f4f8fb url('/assets/img/Carte_SNF_Forez.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-box h2 {
    color: #4c51bf;
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.login-box h2::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background: #fff url('/assets/img/SNF_logo.png') no-repeat center/80%;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 0 auto 1rem auto;
    border: 2px solid #e5e7eb;
}

.login-box label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
    width: 100%;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus,
.login-box input[type="email"]:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
    transform: translateY(-1px);
}

.login-box button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(76, 81, 191, 0.4);
}

.error-msg {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border-left: 4px solid #dc2626;
    text-align: left;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
}

/* Styles pour les pages de dashboard */
.dashboard-header {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
}

/* Styles pour les filtres et recherche */
.filters-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.filter-input {
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

/* Styles pour les paginations */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-item {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.pagination-item.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

/* Styles pour les tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background: var(--gray-900);
    color: var(--white);
    text-align: center;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    font-size: 0.875rem;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--gray-900) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Styles pour les loaders */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-200);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

.loader.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.loader.large {
    width: 32px;
    height: 32px;
    border-width: 4px;
}

/* Styles pour les transitions de page */
.page-transition {
    animation: fadeIn 0.3s ease-in-out;
}

/* Styles pour les notifications toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.info {
    border-left-color: var(--info-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Styles pour les confirmations */
.confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.confirmation-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.confirmation-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.confirmation-message {
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Styles pour les breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: var(--gray-600);
    text-decoration: none;
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--gray-900);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--gray-400);
}

/* Styles pour les badges de notification */
.notification-badge {
    position: relative;
    display: inline-block;
}

.notification-badge .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--white);
}

/* Styles pour les progress bars */
.progress {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

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

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

.progress-bar.danger {
    background: var(--danger-color);
}

/* Styles pour les accordéons */
.accordion {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--gray-200);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background: var(--gray-50);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: var(--gray-100);
}

.accordion-title {
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.accordion-icon {
    transition: transform var(--transition-fast);
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 1rem;
    background: var(--white);
    display: none;
}

.accordion-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* Styles pour les onglets */
.tabs {
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-item {
    margin-right: 0.5rem;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
} 

/* ================================================
   USER MANAGEMENT STYLES
   ================================================ */

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.user-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.user-stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4c51bf;
    margin-bottom: 0.5rem;
}

.user-stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* KPI Container pour les statistiques utilisateurs */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Style spécifique pour KPI dans container-white */
.container-white .kpi-container {
    margin-bottom: 1.5rem;
}

/* KPI items optimisés avec transparence */
.kpi-item {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.kpi-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.kpi-label {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.kpi-value {
    display: block;
    color: #1f2937;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.page-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.875rem;
    font-weight: 700;
}

/* Style spécifique pour le header dans container-white */
.container-white .page-header {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

/* Badges pour les rôles utilisateurs */
.badge-admin {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.badge-tech {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.badge-support {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* Action buttons dans les tableaux */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-buttons .btn-view,
.action-buttons .btn-cancel,
.action-buttons .btn-success,
.action-buttons .btn-warning {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.action-buttons .btn-view {
    background: #eaf6ff;
    color: #005baa;
    border: 1px solid #005baa;
}

.action-buttons .btn-view:hover {
    background: #d0eaff;
    color: #0074d9;
    transform: translateY(-1px);
}

.action-buttons .btn-cancel {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #dc2626;
}

.action-buttons .btn-cancel:hover {
    background: #fee2e2;
    color: #b91c1c;
    transform: translateY(-1px);
}

.action-buttons .btn-success {
    background: #f0fdf4;
    color: #059669;
    border: 1px solid #059669;
}

.action-buttons .btn-success:hover {
    background: #dcfce7;
    color: #047857;
    transform: translateY(-1px);
}

.action-buttons .btn-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #d97706;
}

.action-buttons .btn-warning:hover {
    background: #fef3c7;
    color: #b45309;
    transform: translateY(-1px);
}

/* Status badges pour les utilisateurs */
.status-badge.status-active {
    background: #10b981 !important;
    color: white !important;
    border-color: #059669 !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}

.status-badge.status-inactive {
    background: #6b7280 !important;
    color: white !important;
    border-color: #4b5563 !important;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2) !important;
}

/* ================================================
   PROJECT MANAGEMENT STYLES
   ================================================ */

.projects-grid {
    display: block;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem; /* Espacement réduit car maintenant dans mts-list-box */
    width: 100%;
    box-sizing: border-box;
}

/* Cartes projets avec transparence */
.project-card {
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.project-country {
    background: #4c51bf;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    color: #666;
    font-size: 0.9rem;
}

.stat strong {
    color: #333;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #999;
    font-size: 0.8rem;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Project Edit and Users Management Styles */
.project-info {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
}

.project-info h3 {
    margin-top: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.users-management {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.add-user-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.add-user-section h3 {
    margin-top: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.add-user-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.add-user-form .form-group {
    flex: 1;
}

.add-user-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s ease;
}

.add-user-form select:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.assigned-users-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.assigned-users-section h3 {
    margin-top: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.user-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info h4 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
}

.user-email {
    margin: 0 0 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.user-assigned {
    margin: 0;
    color: #9ca3af;
    font-size: 0.75rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.project-actions .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.project-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.project-actions .btn-info {
    background: #17a2b8;
    color: white;
}

.project-actions .btn-danger {
    background: #dc3545;
    color: white;
}

.project-actions .btn:hover {
    opacity: 0.9;
}

/* ================================================
   MTS NUMBER LINKS
   ================================================ */

.mts-number {
    color: #4c51bf;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mts-number:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* ================================================
   PROGRESS BARS
   ================================================ */

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ================================================
   RESPONSIVE DESIGN POUR MTS
   ================================================ */

/* ================================================
   RESPONSIVE DESIGN OPTIMISÉ
   ================================================ */

@media (max-width: 768px) {
    .mts-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .mts-main-content {
        padding: 1rem;
    }

    /* Containers plus compacts sur mobile */
    .container, .container-white, .container-detail {
        width: calc(100% - 2rem);
        margin: 1rem auto;
        padding: 1.5rem;
    }
    
    .container-detail .mts-table th,
    .container-detail .mts-table td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .container-detail .mts-table th {
        width: 30%;
    }
    
    /* Formulaires d'édition utilisateurs responsive */
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }

    .mts-list-box {
        width: calc(100% - 2rem);
        margin: 1rem auto;
        padding: 1rem;
    }

    .kpi-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .mts-table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .mts-search-container {
        max-width: none;
    }

    .btn-export {
        margin-left: 0;
        justify-content: center;
    }

    /* Amélioration du responsive pour la table MTS */
    .mts-table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,91,170,0.08);
    max-width: 100vw;
}

/* Style spécifique pour le tableau dans container-white */
.container-white .mts-table-responsive {
    margin-bottom: 1rem;
}
    
    .mts-table {
        min-width: 1000px;
        font-size: 0.95rem;
    }
    
    .mts-table th, .mts-table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .mts-form {
        padding: 1rem;
    }

    .impact-fieldset {
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .mts-header {
        padding: 0.75rem;
    }

    .mts-header h1 {
        font-size: 1.25rem;
    }

    .login-box {
        padding: 1.5rem;
    }

    /* Containers très compacts sur très petits écrans */
    .container, .container-white, .container-detail {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
        padding: 1rem;
    }
    
    .container-detail .mts-table {
        font-size: 0.85rem;
    }
    
    .container-detail .mts-table th,
    .container-detail .mts-table td {
        padding: 0.5rem 0.75rem;
        display: block;
        width: 100% !important;
    }
    
    .container-detail .mts-table th {
        background: rgba(0, 91, 170, 0.1);
        font-weight: 700;
        margin-bottom: 0.25rem;
    }

    .mts-list-box {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
        padding: 0.75rem;
    }
    
    /* Optimisation pour smartphone */
    .mts-list-box {
        padding: 1rem 0.5rem 1.5rem 0.5rem;
        margin: 1rem 0.5rem 1.5rem 0.5rem;
        border-radius: 12px;
    }
    
    .mts-table-responsive {
        border-radius: 8px;
    }
    
    .mts-table {
        min-width: 900px;
        font-size: 0.9rem;
    }
    
    .mts-table th, .mts-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.9rem;
    }
    
    /* Badges plus compacts sur smartphone */
    .status-badge {
        padding: 0.3em 0.6em;
        font-size: 0.75em;
        border-radius: 12px;
    }
}

/* ================================================
   ANIMATIONS POUR MTS
   ================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mts-list-box,
.kpi-item {
    animation: fadeInUp 0.6s ease-out;
}

/* ================================================
   LOADING STATES POUR MTS
   ================================================ */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4c51bf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================================
   SNF COLORS ENFORCEMENT
   ================================================ */

/* Force l'application des couleurs SNF pour tous les badges de statut */
.status-badge {
    display: inline-block !important;
    padding: 0.4em 0.8em !important;
    border-radius: 6px !important;
    font-size: 0.8em !important;
    font-weight: 600 !important;
    margin-right: 0.2em !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
    border: 1px solid transparent !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    transition: all 0.2s ease !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Couleurs SNF pour les statuts - avec !important pour forcer l'application */
.status-badge.status-open {
    background: #10b981 !important;
    color: white !important;
    border-color: #059669 !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}

.status-badge.status-close {
    background: #ef4444 !important;
    color: white !important;
    border-color: #dc2626 !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2) !important;
}

.status-badge.status-critical {
    background: #f59e0b !important;
    color: white !important;
    border-color: #d97706 !important;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2) !important;
}

.status-badge.status-in_progress {
    background: #3b82f6 !important;
    color: white !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2) !important;
}

/* Statut par défaut avec couleur SNF - avec !important */
.status-badge:not(.status-open):not(.status-close):not(.status-critical):not(.status-in_progress) {
    background: #005baa !important;
    color: white !important;
    border-color: #005baa !important;
    box-shadow: 0 2px 4px rgba(0, 91, 170, 0.2) !important;
}

/* Hover effects pour les badges */
.status-badge:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12) !important;
    filter: brightness(1.05) !important;
}

/* REX Badge */
.rex-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
    background: #8b5cf6;
    color: white;
    box-shadow: 0 1px 3px rgba(139, 92, 246, 0.3);
    border: 1px solid #7c3aed;
    transition: all 0.2s ease;
}

.rex-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
    filter: brightness(1.1);
}

/* ================================================
   BUTTON STYLES COMPLETS
   ================================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #005baa, #0074d9);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,91,170,0.15);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #004080, #005baa);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,91,170,0.25);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* ================================================
   DESCRIPTION FORMATÉE - MTS VIEW
   ================================================ */

/* Formatted Description */
.formatted-description {
    line-height: 1.6;
}

.description-main {
    margin-bottom: 1.5rem;
    color: #374151;
}

.description-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.description-section:first-child {
    margin-top: 0;
}

.section-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title:before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.section-content {
    color: #4b5563;
    line-height: 1.6;
}

/* Closure Report Styling */
.closure-report-section {
    margin-top: 2rem !important;
}

.closure-report-title {
    color: #047857 !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
}

.closure-report-title:before {
    background: linear-gradient(135deg, #10b981, #047857) !important;
}

.closure-report-content {
    color: #065f46;
    font-weight: 500;
    line-height: 1.7;
}



/* Enhanced File Upload Zone */
.file-upload-zone {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    margin-bottom: 1rem;
}

.file-upload-zone:hover {
    border-color: var(--primary-color);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.file-upload-zone.dragover {
    border-color: var(--primary-color);
    background: var(--primary-100);
    box-shadow: var(--shadow-lg);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}

.file-upload-icon {
    width: 3rem;
    height: 3rem;
    color: var(--gray-400);
    transition: color var(--transition-normal);
}

.file-upload-zone:hover .file-upload-icon {
    color: var(--primary-color);
}

.file-upload-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-upload-main {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
}

.file-upload-sub {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}





/* Responsive Design for Attachments */
@media (max-width: 768px) {
    /* Table users mobile: transformer en cartes sans scroll horizontal */
    .users-table { display: block; width: 100%; }
    .users-table thead { display: none; }
    .users-table tbody { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
    .users-table tr { display: grid; grid-template-columns: 1fr; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0.75rem 1rem; }
    .users-table td { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; border: none; }
    .users-table td::before { content: attr(data-label); font-weight: 600; color: #374151; margin-right: 1rem; }
    .users-table td:last-child { padding-top: 0.75rem; border-top: 1px dashed #e5e7eb; margin-top: 0.25rem; }
    .action-buttons { flex-wrap: wrap; gap: 0.5rem; }
    
    /* (garde les règles suivantes dans le même media query) */
    .attachments-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .document-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .document-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .document-actions {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: center;
    }
    
    .file-upload-zone {
        padding: 1.5rem 1rem;
    }
    
    .section-header {
        margin: 1.5rem 0 1rem 0;
    }
    
    .section-title-main {
        font-size: 1.25rem;
    }
}

/* Impacts List Styling */
.impacts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.impact-active {
    background: linear-gradient(135deg, #dcfdf4, #ecfdf5);
    border-color: #10b981;
    color: #065f46;
}

.impact-inactive {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
}

.impact-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.impact-active .impact-indicator {
    background: #10b981;
    border: 2px solid #065f46;
}

.impact-active .impact-indicator:after {
    content: '✓';
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.impact-inactive .impact-indicator {
    background: #e5e7eb;
    border: 2px solid #9ca3af;
}

.impact-inactive .impact-indicator:after {
    content: '✕';
    color: #6b7280;
    font-size: 10px;
    font-weight: bold;
}

.impact-name {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive adjustments for description */
@media (max-width: 768px) {
    .description-section {
        padding: 0.75rem;
        margin-top: 1rem;
    }
    
    .section-title {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .impacts-list {
        gap: 0.5rem;
    }
    
    .impact-item {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
}

/* ================================================
   UTILITAIRES FINALES
   ================================================ */

.btn-create, .btn-create:visited, .btn-create:active {
    text-decoration: none !important;
}

/* Transitions douces sur tous les éléments interactifs */
button, .btn-create, .btn-view, .btn-cancel, .btn-export, .btn-nouvelle-mts, input, select {
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

/* ================================================
   NOUVELLE STRUCTURE DESCRIPTION - MTS VIEW
   ================================================ */

/* Section subtitles */
.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* ================================================
   ADMIN KPIs HEATMAP
   ================================================ */
.kpi-page { display: flex; flex-direction: column; gap: 1rem; }
.kpi-toolbar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.kpi-toolbar label { font-weight: 600; color: #374151; }
.kpi-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.kpi-card .kpi-card-body > div[id^="pie_"] { width: 100%; height: 420px !important; }
@media (min-width: 1280px) {
  .kpi-cards { grid-template-columns: repeat(2, minmax(420px, 1fr)); gap: 1.25rem; }
  .kpi-card .kpi-card-body > div[id^="pie_"] { height: 460px !important; }
}
.kpi-card { border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.06); background: #ffffff; box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.kpi-card-header { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 1rem; background: #f5f9ff; color: #0b5eb7; font-weight: 700; }
.kpi-card-body { padding: 1rem; }
/* Full-bleed geo chart inside its card */
#geo_card .kpi-card-body { padding: 0; }
#geo_chart { width: 100%; height: 100%; min-height: 560px; display: block; }
.kpi-heat { height: 14px; border-radius: 8px; background: #e5efff; position: relative; overflow: hidden; }
.kpi-heat-bar { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, #96c9ff, #2c7be5, #0b5eb7); border-radius: 8px; }
.kpi-meta { display: flex; justify-content: space-between; margin-top: 0.6rem; font-size: 0.9rem; color: #334155; }
.kpi-summary { display: flex; gap: 1rem; flex-wrap: wrap; }
.kpi-summary .kpi-item { min-width: 140px; }

/* Initial Actions Section */
.initial-actions-section {
    margin: 1.5rem 0;
}

.initial-actions-content {
    line-height: 1.6;
}

/* Impacts Section */
.impacts-section {
    margin: 1.5rem 0;
}

.impacts-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.impact-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.impact-badge.impact-active {
    background: #dc2626;
    color: white;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    border: 1px solid #b91c1c;
}

.impact-badge.impact-active:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

.impact-badge.impact-inactive {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.impact-badge.impact-inactive:hover {
    background: #e5e7eb;
    color: #4b5563;
}

/* Closure Report Section */
.closure-report-section {
    margin: 2rem 0;
}

.closure-report-section .section-subtitle {
    color: #047857;
    border-bottom-color: #10b981;
}


.closure-report-content {
    color: #065f46;
    font-weight: 500;
    line-height: 1.7;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .impacts-badges {
        gap: 0.5rem;
    }
    
    .impact-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .closure-report-section {
        padding: 1rem;
        margin: 1.5rem 0;
    }
} 