/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    text-align: center;
    min-width: 400px;
}

.login-box h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
}

.login-field {
    margin-bottom: 20px;
    text-align: left;
}

.login-field label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 600;
}

.login-field input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-field input:focus {
    outline: none;
    border-color: #3498db;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #2980b9;
}

.login-error {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 20px 30px;
    position: relative;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    flex-wrap: wrap;
}

.header-title {
    flex: 1;
    min-width: 300px;
}

.header-title h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    font-weight: 300;
    line-height: 1.2;
}

.header .subtitle {
    opacity: 0.9;
    font-size: 1em;
    margin-top: 5px;
}

.header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
    min-width: 280px;
}

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

.current-user {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.refresh-btn, .evolution-btn, .admin-btn, .logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.refresh-btn {
    background: rgba(39, 174, 96, 0.2);
    border-color: rgba(39, 174, 96, 0.4);
}

.refresh-btn:hover {
    background: rgba(39, 174, 96, 0.3);
    border-color: rgba(39, 174, 96, 0.6);
    transform: translateY(-1px);
}

.evolution-btn {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.4);
}

.evolution-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    transform: translateY(-1px);
}

.admin-btn {
    background: rgba(155, 89, 182, 0.2);
    border-color: rgba(155, 89, 182, 0.4);
}

.admin-btn:hover {
    background: rgba(155, 89, 182, 0.3);
    border-color: rgba(155, 89, 182, 0.6);
    transform: translateY(-1px);
}

.logout-btn {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.6);
    transform: translateY(-1px);
}

.btn-text {
    font-size: 12px;
}

/* Evolution Panel Modal */
.evolution-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.evolution-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

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

.evolution-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.evolution-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-evolution {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-evolution:hover {
    background: rgba(255, 255, 255, 0.2);
}

.evolution-controls {
    padding: 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.control-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

.evolution-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

.evolution-select:focus {
    outline: none;
    border-color: #3498db;
}

.generate-chart-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    height: fit-content;
}

.generate-chart-btn:hover {
    transform: translateY(-2px);
}

.evolution-chart-container {
    padding: 30px;
    text-align: center;
}

.chart-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.chart-info p {
    margin: 0 0 10px 0;
    color: #7f8c8d;
    font-style: italic;
}

.chart-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-stats span {
    padding: 5px 10px;
    background: #3498db;
    color: white;
    border-radius: 15px;
    font-size: 0.9em;
}

#evolutionChart {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .evolution-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        min-width: auto;
    }
    
    .evolution-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* FTP Status */
.ftp-status {
    background: #f8f9fa;
    padding: 25px;
    margin: 20px;
    border-radius: 15px;
    border-left: 4px solid #27ae60;
}

.ftp-status h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.ftp-files-list {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.ftp-file-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.ftp-file-item:hover {
    background: #f8f9fa;
}

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

.file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-info {
    color: #7f8c8d;
    font-size: 0.9em;
}

.file-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.file-status.loaded {
    background: #d4edda;
    color: #155724;
}

.file-status.loading {
    background: #fff3cd;
    color: #856404;
}

.file-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    min-width: 300px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #d68910;
    transform: translateY(-2px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.stat-number {
    font-size: 3em;
    font-weight: bolder;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content {
    padding: 30px;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.group-card {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.group-card:hover {
    transform: translateY(-3px);
}

.group-name {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 15px;
}

.group-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    flex-wrap: wrap;
    gap: 10px;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.server-card {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.server-card:hover {
    transform: translateY(-3px);
}

.server-name {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
}

.server-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    flex-wrap: wrap;
    gap: 10px;
}

.bench-card {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.bench-card:hover {
    transform: translateY(-3px);
}

.bench-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.sites-in-bench {
    font-size: 0.9em;
    opacity: 0.9;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.back-btn {
    background: #95a5a6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #7f8c8d;
}

.connection-status {
    padding: 15px;
    border-radius: 8px;
    margin: 20px;
    text-align: center;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.site-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    margin-bottom: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.site-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

.site-details {
    flex: 1;
}

.site-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.site-info {
    color: #7f8c8d;
    font-size: 0.9em;
}

.size-info {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #7f8c8d;
}

.breadcrumb {
    background: #ecf0f1;
    padding: 15px 20px;
    margin: 20px;
    border-radius: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.search-bar {
    background: #f8f9fa;
    padding: 20px;
    margin: 20px;
    border-radius: 15px;
    border-left: 4px solid #27ae60;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #27ae60;
}

/* Statistiques avancées */
.advanced-stats {
    background: #f8f9fa;
    padding: 30px;
    margin-top: 20px;
    border-top: 3px solid #3498db;
}

.advanced-stats h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 300;
}

.stats-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-category {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    width: 100%;
}

.stats-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stats-category h3 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.6em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.stat-desc {
    font-size: 0.9em;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* NOUVEAUX STYLES - Catégorisation des sites */
.site-categories {
    border-left: 4px solid #2c3e50 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%) !important;
    position: relative;
    overflow: hidden;
}

.site-categories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #27ae60, #3498db, #e74c3c, #f39c12, #9b59b6, #95a5a6);
}

.site-categories h3 {
    color: #2c3e50 !important;
    text-align: center;
    font-size: 1.4em;
    font-weight: 600;
}

.stat-percentage {
    font-size: 0.75em;
    font-weight: 600;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.8);
}

/* Styles spécifiques pour chaque catégorie */
.production-sites {
    border-left: 3px solid #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

.production-sites .stat-value,
.production-sites .stat-percentage {
    color: #27ae60 !important;
}

.demo-sites {
    border-left: 3px solid #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.demo-sites .stat-value,
.demo-sites .stat-percentage {
    color: #3498db !important;
}

.dev-sites {
    border-left: 3px solid #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.dev-sites .stat-value,
.dev-sites .stat-percentage {
    color: #e74c3c !important;
}

.sandbox-sites {
    border-left: 3px solid #f39c12;
    background: rgba(243, 156, 18, 0.05);
}

.sandbox-sites .stat-value,
.sandbox-sites .stat-percentage {
    color: #f39c12 !important;
}

.testing-sites {
    border-left: 3px solid #9b59b6;
    background: rgba(155, 89, 182, 0.05);
}

.testing-sites .stat-value,
.testing-sites .stat-percentage {
    color: #9b59b6 !important;
}

.unknown-sites {
    border-left: 3px solid #95a5a6;
    background: rgba(149, 165, 166, 0.05);
}

.unknown-sites .stat-value,
.unknown-sites .stat-percentage {
    color: #95a5a6 !important;
}

.total-analyzed {
    border-left: 3px solid #2c3e50;
    background: rgba(44, 62, 80, 0.05);
    font-weight: bold;
}

.total-analyzed .stat-value {
    color: #2c3e50 !important;
    font-weight: 800;
}

.prod-ratio {
    border-left: 3px solid #8e44ad;
    background: rgba(142, 68, 173, 0.05);
}

.prod-ratio .stat-value,
.prod-ratio .stat-percentage {
    color: #8e44ad !important;
}

/* Animation pour les statistiques de catégorisation */
.site-categories .stat-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.site-categories .stat-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.site-categories .stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.site-categories .stat-item:hover::before {
    left: 100%;
}

/* Couleurs spécifiques par catégorie - ordre mis à jour */
.stats-category:nth-child(1) h3 { color: #2c3e50; } /* Catégorisation - Bleu foncé */
.stats-category:nth-child(1) .stat-value { color: #2c3e50; }

.stats-category:nth-child(2) h3 { color: #27ae60; } /* Moyennes - Vert */
.stats-category:nth-child(2) .stat-value { color: #27ae60; }

.stats-category:nth-child(3) h3 { color: #8e44ad; } /* Tailles - Violet */
.stats-category:nth-child(3) .stat-value { color: #8e44ad; }

.stats-category:nth-child(4) h3 { color: #e74c3c; } /* Extrêmes - Rouge */
.stats-category:nth-child(4) .stat-value { color: #e74c3c; }

.stats-category:nth-child(5) h3 { color: #f39c12; } /* Répartition - Orange */
.stats-category:nth-child(5) .stat-value { color: #f39c12; }

.stats-category:nth-child(6) h3 { color: #3498db; } /* Tendances - Bleu */
.stats-category:nth-child(6) .stat-value { color: #3498db; }

/* Responsive pour les catégories */
@media (max-width: 1024px) {
    .site-categories .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .header-title {
        min-width: auto;
    }
    
    .header-title h1 {
        font-size: 1.8em;
    }
    
    .header-controls {
        min-width: auto;
        align-items: center;
        width: 100%;
    }
    
    .action-buttons {
        justify-content: center;
        gap: 6px;
    }
    
    .refresh-btn, .admin-btn, .logout-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .btn-text {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .groups-grid,
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-categories .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stats-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .site-categories .stats-row {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.4em;
    }
    
    .stat-desc {
        font-size: 0.8em;
    }
}

/* Styles additionnels pour les badges de catégorie dans les listes */
.category-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    color: white;
}

.category-badge.production { background: #27ae60; }
.category-badge.demo { background: #3498db; }
.category-badge.dev { background: #e74c3c; }
.category-badge.sandbox { background: #f39c12; }
.category-badge.testing { background: #9b59b6; }
.category-badge.unknown { background: #95a5a6; }

/* Amélioration de l'affichage des résultats de recherche avec catégories */
.search-result-category {
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    text-transform: uppercase;
}

/* Styles pour l'évolution temporelle */
.evolution-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.evolution-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.evolution-header h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.evolution-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 600;
}

.summary-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.growth-positive {
    color: #27ae60 !important;
}

.growth-negative {
    color: #e74c3c !important;
}

.evolution-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: bold;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.chart-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.chart-item canvas {
    width: 100%;
    height: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.evolution-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.evolution-table th,
.evolution-table td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.evolution-table th {
    background: #3498db;
    color: white;
    font-weight: bold;
}

.evolution-table tr:hover {
    background: #f8f9fa;
}

.bench-selector,
.site-selector {
    margin-bottom: 20px;
    text-align: center;
}

.bench-selector label,
.site-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.bench-selector select,
.site-selector select {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

.evolution-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.server-actions {
    margin-top: 10px;
    text-align: center;
}

.evolution-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.3s;
}

.evolution-btn:hover {
    background: #2980b9;
}

/* Bouton Top 10 */
.top10-btn {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.top10-btn:hover {
    background: linear-gradient(135deg, #d68910 0%, #b7670f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

/* Modal Top 10 */
.top10-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.top10-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.top10-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 2px solid #ecf0f1;
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.top10-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-top10 {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-top10:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.top10-content {
    padding: 32px;
}

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

.top10-table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.top10-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.top10-table th {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top10-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
}

.top10-table tr:nth-child(even) {
    background: #f8f9fa;
}

.top10-table tr:hover {
    background: #e3f2fd;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Rang avec badges colorés */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    color: white;
}

.rank-1 { background: #ffd700; color: #333; }
.rank-2 { background: #c0c0c0; color: #333; }
.rank-3 { background: #cd7f32; color: white; }
.rank-other { background: #95a5a6; }

/* Barres de progression pour l'utilisation disque */
.disk-usage-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.usage-bar {
    flex: 1;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.usage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-low { background: #27ae60; }
.usage-medium { background: #f39c12; }
.usage-high { background: #e74c3c; }

.usage-text {
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .top10-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .top10-header {
        padding: 20px;
    }
    
    .top10-content {
        padding: 20px;
    }
    
    .top10-stats {
        grid-template-columns: 1fr;
    }
    
    .top10-table th,
    .top10-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
}

/* Actions serveur */
.server-actions-bar {
    display: flex;
    gap: 16px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.server-action-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 180px;
}

.server-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.server-action-btn.system-action {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.server-action-btn.system-action:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.server-action-btn small {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 400;
}

.no-actions-message {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
}

.server-evolution-btn {
    text-align: center;
    margin: 20px 0;
}

.bench-evolution-details,
.site-evolution-details {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.evolution-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.evolution-stats > div {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.no-data {
    text-align: center;
    padding: 50px;
    color: #7f8c8d;
    font-style: italic;
}

/* Responsive pour l'évolution */
@media (max-width: 768px) {
    .evolution-summary {
        grid-template-columns: 1fr;
    }
    
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .evolution-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-right: 2px solid transparent;
        text-align: left;
    }
    
    .tab-btn.active {
        border-right-color: #3498db;
        border-bottom-color: transparent;
   }
   
   .evolution-actions {
       flex-direction: column;
       align-items: center;
   }
   
   .evolution-table {
       font-size: 0.8em;
   }
   
   .evolution-table th,
   .evolution-table td {
       padding: 6px 8px;
   }
}

@media (max-width: 480px) {
   .evolution-container {
       padding: 15px;
   }
   
   .chart-item {
       padding: 15px;
   }
   
   .summary-item {
       padding: 10px;
   }
   
   .summary-value {
       font-size: 1em;
   }
   
   .evolution-table {
       font-size: 0.7em;
   }
   
   .bench-selector select,
   .site-selector select {
       min-width: 150px;
       font-size: 12px;
   }
}

/* Animation pour les graphiques */
.chart-item canvas {
   transition: transform 0.3s ease;
}

.chart-item:hover canvas {
   transform: scale(1.02);
}

/* Indicateurs de croissance animés */
.growth-positive::after {
   content: ' ↗';
   animation: pulse 2s infinite;
}

.growth-negative::after {
   content: ' ↘';
   animation: pulse 2s infinite;
}

@keyframes pulse {
   0%, 100% { opacity: 1; }
   50% { opacity: 0.5; }
}

/* Style pour les métadonnées d'historique */
.history-info {
   background: #00bfff;
   border-left: 4px solid #3498db;
   padding: 10px;
   margin: 10px 0;
   border-radius: 5px;
   font-size: 0.9em;
}

.history-count {
   background: #3498db;
   color: white;
   padding: 2px 8px;
   border-radius: 10px;
   font-size: 0.8em;
   margin-left: 10px;
}

/* Améliorations pour les cartes serveur avec historique */
.server-card {
   position: relative;
   overflow: hidden;
}

.server-card:hover .server-actions {
   opacity: 1;
   transform: translateY(0);
}

.server-actions {
   opacity: 0;
   transform: translateY(10px);
   transition: all 0.3s ease;
}

/* Loading states pour l'évolution */
.evolution-loading {
   display: flex;
   justify-content: center;
   align-items: center;
   min-height: 200px;
   color: #7f8c8d;
}

.evolution-loading::before {
   content: '📈';
   font-size: 2em;
   margin-right: 10px;
   animation: bounce 1s infinite;
}

@keyframes bounce {
   0%, 100% { transform: translateY(0); }
   50% { transform: translateY(-10px); }
}



/* Nouveau layout pour graphiques plus grands */
.chart-grid-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.chart-item-large {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #3498db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-item-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.chart-item-large h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
}

.chart-item-large canvas {
    width: 100% !important;
    height: 400px !important;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Graphiques pleine largeur pour bench et sites */
.chart-item-large.full-width {
    grid-column: 1 / -1;
    max-width: none;
}

.chart-item-large.full-width canvas {
    height: 500px !important;
}

/* Amélioration du container d'évolution */
.evolution-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 20px;
}

.evolution-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #ecf0f1;
}

.evolution-header h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 2.2em;
    font-weight: 300;
}

.evolution-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.summary-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-3px);
}

.summary-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

/* Amélioration des onglets */
.evolution-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #ecf0f1;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    padding: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    border-radius: 8px;
    margin: 0 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.tab-btn.active {
    color: white;
    background: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Contenu des onglets */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

.system-chart-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.system-chart-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #1e7e34 100%);
}

.system-info-current {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #27ae60;
}

.system-info-current h3 {
    margin: 0 0 16px 0;
    color: #2c3e50;
}

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

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

/* Sélecteurs de bench et site améliorés */
.bench-selector,
.site-selector {
    margin-bottom: 30px;
    text-align: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.bench-selector label,
.site-selector label {
    display: block;
    margin-bottom: 12px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.bench-selector select,
.site-selector select {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    min-width: 250px;
    background: white;
    color: #2c3e50;
    transition: border-color 0.3s ease;
}

.bench-selector select:focus,
.site-selector select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Table des détails améliorée */
.evolution-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.evolution-table th {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: bold;
    padding: 15px 12px;
    text-align: center;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evolution-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
}

.evolution-table tr:nth-child(even) {
    background: #f8f9fa;
}

.evolution-table tr:hover {
    background: #e3f2fd;
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Actions d'évolution */
.evolution-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.evolution-actions .btn {
    padding: 15px 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.evolution-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Détails bench et site améliorés */
.bench-evolution-details,
.site-evolution-details {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    margin-top: 25px;
    border-left: 4px solid #27ae60;
}

.bench-evolution-details h4,
.site-evolution-details h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.evolution-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.evolution-stats > div {
    background: white;
    padding: 15px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #2c3e50;
    border-left: 3px solid #3498db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Responsive amélioré */
@media (max-width: 1200px) {
    .chart-grid-large {
        grid-template-columns: 1fr;
    }
    
    .chart-item-large canvas {
        height: 350px !important;
    }
    
    .evolution-container {
        padding: 25px;
        margin: 10px;
    }
}

@media (max-width: 768px) {
    .evolution-summary {
        grid-template-columns: 1fr;
    }
    
    .evolution-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        margin: 2px 0;
        padding: 12px 20px;
    }
    
    .chart-item-large canvas {
        height: 300px !important;
    }
    
    .evolution-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .bench-selector select,
    .site-selector select {
        min-width: 200px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .evolution-container {
        padding: 15px;
    }
    
    .chart-item-large {
        padding: 15px;
    }
    
    .chart-item-large canvas {
        height: 250px !important;
    }
    
    .evolution-table {
        font-size: 0.8em;
    }
    
    .evolution-table th,
    .evolution-table td {
        padding: 8px 6px;
    }
}

/* Animations pour les graphiques */
.chart-item-large canvas {
    transition: transform 0.3s ease;
}

.chart-item-large:hover canvas {
    transform: scale(1.01);
}

/* Loading state pour les gros graphiques */
.evolution-loading-large {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    color: #7f8c8d;
    font-size: 1.2em;
}

.evolution-loading-large::before {
    content: '📈';
    font-size: 3em;
    margin-bottom: 15px;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Amélioration des indicateurs de croissance */
.growth-positive {
    color: #27ae60 !important;
    position: relative;
}

.growth-negative {
    color: #e74c3c !important;
    position: relative;
}

.growth-positive::after {
    content: ' ↗️';
    animation: pulse 2s infinite;
}

.growth-negative::after {
    content: ' ↘️';
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}



/* CSS à ajouter dans styles.css pour les cartes cliquables */

/* Cartes cliquables génériques */
.clickable-card {
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.clickable-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.clickable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.clickable-card:hover::before {
    left: 100%;
}

/* Indicateurs de clic sur les cartes de stats */
.click-indicator {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.7em;
    color: rgba(255,255,255,0.8);
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    animation: pulse-indicator 2s infinite;
}

@keyframes pulse-indicator {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Améliorations pour les cartes de stats existantes */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card.clickable-card:hover .stat-number {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.stat-card.clickable-card:hover .stat-label {
    color: white;
    transition: color 0.3s ease;
}

/* Hints de clic pour les cartes de groupes */
.group-click-hint,
.server-click-hint,
.site-click-hint {
    text-align: center;
    font-size: 0.8em;
    margin-top: 8px;
    opacity: 0;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
}

.clickable-card:hover .group-click-hint,
.clickable-card:hover .server-click-hint,
.clickable-card:hover .site-click-hint {
    opacity: 1;
}

/* Vue tous les sites */
.sites-overview {
    background: white;
    border-radius: 15px;
    padding: 25px;
}

.sites-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover {
    background: #bdc3c7;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Vue tous les serveurs */
.servers-overview {
    background: white;
    border-radius: 15px;
    padding: 25px;
}

#allServersGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Sites individuels cliquables */
.site-item.clickable-card {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.site-item.clickable-card:hover {
    border-left-color: #3498db;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    transform: translateX(8px) translateY(-2px);
}

/* Effet de clic pour les cartes */
.clickable-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Badge de catégorie amélioré */
.category-badge {
    transition: transform 0.3s ease;
}

.clickable-card:hover .category-badge {
    transform: scale(1.05);
}

/* Responsive pour les nouveaux éléments */
@media (max-width: 768px) {
    .sites-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        margin: 2px 0;
    }
    
    #allServersGrid {
        grid-template-columns: 1fr;
    }
    
    .click-indicator {
        font-size: 0.6em;
        bottom: 4px;
        right: 8px;
    }
}

@media (max-width: 480px) {
    .clickable-card:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .group-click-hint,
    .server-click-hint,
    .site-click-hint {
        font-size: 0.7em;
    }
}

/* États de focus pour l'accessibilité */
.clickable-card:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Animation d'highlight pour scroll vers stats avancées */
.advanced-stats.highlighted {
    animation: highlight-pulse 3s ease-in-out;
}

@keyframes highlight-pulse {
    0%, 100% { background: #f8f9fa; }
    50% { background: #e3f2fd; }
}

/* Message quand aucun site */
.no-sites {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
    font-size: 1.1em;
}

/* Amélioration des cartes de groupe existantes */
.group-card.clickable-card:hover .group-name {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.group-card.clickable-card:hover .group-stats {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Effet de ripple sur clic */
.clickable-card {
    position: relative;
    overflow: hidden;
}

.clickable-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.clickable-card:active::after {
    width: 200px;
    height: 200px;
}

/* Curseur personnalisé pour les cartes */
.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    cursor: pointer;
}

/* Tooltip personnalisé */
.clickable-card[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
}



/* CSS à ajouter dans styles.css pour le tri et l'affichage des sites */

/* Contrôles de sites améliorés */
.sites-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.sites-sorting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.sort-controls select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 200px;
}

.sort-controls select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #bdc3c7;
}

.view-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Résumé des statistiques */
.sites-stats-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

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

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 600;
}

.summary-value {
    font-size: 1em;
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

/* Container pour les différents modes d'affichage */
.sites-container-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.sites-container-list {
    display: block;
}

/* Table des sites en mode liste */
.sites-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 0.9em;
}

.sites-table thead {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.sites-table th {
    color: white;
    font-weight: bold;
    padding: 15px 12px;
    text-align: left;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.sites-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.sites-table th.sortable:hover {
    background-color: rgba(255,255,255,0.1);
}

.sort-icon {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 5px;
}

.sites-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
}

.site-row {
    transition: all 0.3s ease;
    cursor: pointer;
}

.site-row:nth-child(even) {
    background: #f8f9fa;
}

.site-row:hover {
    background: #e3f2fd;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.clickable-row {
    position: relative;
}

.clickable-row::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #3498db;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.clickable-row:hover::after {
    transform: scaleY(1);
}

/* Cellules spécifiques */
.site-name-cell {
    min-width: 200px;
}

.site-name-main {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.site-path {
    font-size: 0.8em;
    color: #7f8c8d;
    font-family: 'Courier New', monospace;
}

.server-cell {
    font-weight: 600;
    color: #34495e;
}

.category-cell {
    text-align: center;
}

.size-cell {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.files-cell {
    color: #3498db;
}

.db-cell {
    color: #e74c3c;
}

.total-cell {
    color: #27ae60;
    font-size: 1.05em;
}

.actions-cell {
    text-align: center;
    white-space: nowrap;
}

.action-btn {
    background: #ecf0f1;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 2px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #3498db;
    color: white;
    transform: scale(1.1);
}

/* Mode grille amélioré */
.sites-container-grid .site-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.sites-container-grid .site-item:hover {
    border-left-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Responsive pour les nouveaux contrôles */
@media (max-width: 1200px) {
    .sites-sorting {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-controls {
        justify-content: center;
    }
    
    .view-controls {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .sites-controls {
        padding: 15px;
    }
    
    .sites-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        margin: 2px 0;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .sort-controls select {
        min-width: 180px;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .sites-container-grid {
        grid-template-columns: 1fr;
    }
    
    /* Table responsive */
    .sites-table {
        font-size: 0.8em;
    }
    
    .sites-table th,
    .sites-table td {
        padding: 8px 6px;
    }
    
    .site-name-cell {
        min-width: 150px;
    }
    
    .site-path {
        display: none; /* Masquer le chemin sur mobile */
    }
}

@media (max-width: 480px) {
   .sites-table {
       font-size: 0.7em;
   }
   
   .sites-table th,
   .sites-table td {
       padding: 6px 4px;
   }
   
   /* Masquer certaines colonnes sur très petits écrans */
   .sites-table .server-cell,
   .sites-table th:nth-child(2) {
       display: none;
   }
   
   .action-btn {
       padding: 4px 6px;
       font-size: 12px;
   }
   
   .sort-controls select {
       min-width: 150px;
       font-size: 12px;
   }
   
   .view-btn {
       padding: 6px 12px;
       font-size: 12px;
   }
}

/* Animation pour le changement de mode d'affichage */
.sites-container-grid,
.sites-container-list {
   transition: all 0.3s ease;
}

/* Highlight pour les en-têtes de tri actifs */
.sites-table th.sortable.active {
   background-color: rgba(255,255,255,0.2);
}

.sites-table th.sortable.active .sort-icon {
   opacity: 1;
   font-weight: bold;
}

/* Indicateur de tri */
.sites-table th.sortable[data-sort-direction="asc"] .sort-icon::after {
   content: " ↑";
}

.sites-table th.sortable[data-sort-direction="desc"] .sort-icon::after {
   content: " ↓";
}

/* Animation de chargement pour le tri */
.sites-container-grid.loading,
.sites-container-list.loading {
   opacity: 0.7;
   pointer-events: none;
}

/* Amélioration des badges de catégorie dans le tableau */
.sites-table .category-badge {
   font-size: 0.7em;
   padding: 2px 8px;
   border-radius: 10px;
   white-space: nowrap;
}

/* Message quand aucun site dans la liste */
.no-sites {
   grid-column: 1 / -1; /* Pour la grille */
   text-align: center;
   padding: 60px 20px;
   color: #7f8c8d;
   font-style: italic;
   font-size: 1.2em;
   background: #f8f9fa;
   border-radius: 10px;
   border: 2px dashed #bdc3c7;
}

/* Effet de focus amélioré pour l'accessibilité */
.view-btn:focus,
.sort-controls select:focus,
.action-btn:focus {
   outline: 3px solid rgba(52, 152, 219, 0.3);
   outline-offset: 2px;
}

/* Animation pour les changements de tri */
@keyframes sortChange {
   0% { opacity: 1; transform: translateY(0); }
   50% { opacity: 0.5; transform: translateY(-5px); }
   100% { opacity: 1; transform: translateY(0); }
}

.sites-container-grid.sorting,
.sites-container-list.sorting {
   animation: sortChange 0.3s ease-in-out;
}


/* Styles pour l'autologin */
.autologin-status {
    animation: slideInFromTop 0.5s ease-out;
}

.autologin-setup {
    animation: slideInFromTop 0.5s ease-out;
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.autologin-setup button {
    transition: all 0.3s ease;
}

.autologin-setup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Indicateur de connexion automatique */
.login-box.autologin-active {
    border-left: 4px solid #27ae60;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.2);
}

/* ===========================================
   BOUTON ET MODALE STATUT FTP
   =========================================== */

/* Bouton Statut FTP dans le header */
.ftp-status-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ftp-status-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4);
}

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

/* Modale Statut FTP */
.ftp-status-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.ftp-status-modal.hidden {
    display: none;
}

.ftp-status-modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Header de la modale FTP */
.ftp-status-header {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.ftp-status-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.close-ftp-status {
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-ftp-status:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Contenu de la modale FTP */
.ftp-status-content {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.ftp-connection-info {
    margin-bottom: 30px;
}

.ftp-connection-info h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.ftp-files-section {
    margin-bottom: 30px;
}

.ftp-files-section h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.ftp-files-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
}

.ftp-files-list.empty {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Actions FTP */
.ftp-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.refresh-ftp-btn,
.test-ftp-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-ftp-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.refresh-ftp-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.test-ftp-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.test-ftp-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Status de connexion dans la modale */
#ftpConnectionStatusModal {
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    margin: 10px 0;
}

/* Responsive pour la modale FTP */
@media (max-width: 768px) {
    .ftp-status-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .ftp-status-content {
        padding: 20px;
    }
    
    .ftp-actions {
        flex-direction: column;
    }
    
    .refresh-ftp-btn,
    .test-ftp-btn {
        width: 100%;
        justify-content: center;
    }
}