.stats-docs-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    margin: 0px auto;
    padding: 0 20px;
}

/* ============================================ */
/* HEADER - STYLE AVEC FOND COLORÉ ET ICÔNE */
/* ============================================ */

.stats-docs-header {
    background: linear-gradient(135deg, #b794f6 0%, #9f7aea 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.stats-docs-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.header-text {
    text-align: left;
}

.stats-docs-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-docs-header p {
    margin: 5px 0 0 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    font-weight: 400;
    text-align: center;
}

/* Thèmes de couleurs pour le header */
body[data-theme="blue"] .stats-docs-header {
    background: linear-gradient(135deg, #5b72db 0%, #4a5dc7 100%);
}

body[data-theme="green"] .stats-docs-header {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

body[data-theme="orange"] .stats-docs-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

body[data-theme="red"] .stats-docs-header {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

body[data-theme="purple"] .stats-docs-header {
    background: linear-gradient(135deg, #b794f6 0%, #9f7aea 100%);
}

body[data-theme="black"] .stats-docs-header {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

body[data-theme="default"] .stats-docs-header {
    background: linear-gradient(135deg, #5eead4 0%, #2dd4bf 100%);
}

.stats-docs-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 40px 30px;
}
    
    /* Layout en deux colonnes */
    .stats-layout {
        display: grid;
        grid-template-columns: 400px 1fr;
        gap: 50px;
        align-items: start;
    }
    
    /* Colonne du graphique circulaire */
    .chart-column {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    /* Graphique Donut */
    .donut-chart {
        position: relative;
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .donut-chart svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }
    
    .donut-segment {
        transition: stroke-width 0.3s ease;
    }
    
    .donut-segment:hover {
        stroke-width: 45;
    }
    
    .donut-center {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
    }
    
    .donut-total {
        font-size: 3em;
        font-weight: 800;
        color: #2c3e50;
        line-height: 1;
    }
    
    .donut-label {
        font-size: 1.2em;
        color: #666;
        font-weight: 600;
        text-transform: uppercase;
        margin-top: 5px;
    }
    
    /* Légende du graphique */
    .chart-legend {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        background: #f8f9fa;
        border-radius: 10px;
    }
    
    .legend-item {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.95em;
    }
    
    .legend-color {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        flex-shrink: 0;
    }
    
    .legend-text {
        color: #2c3e50;
        font-weight: 500;
    }
    
    /* Colonne des barres horizontales */
    .bars-column {
        display: flex;
        flex-direction: column;
        gap: 25px;
        padding: 10px 0;
    }
    
    /* Barre horizontale */
    .horizontal-bar {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .bar-header {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .bar-icon {
        font-size: 2em;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .bar-name {
        font-size: 1.1em;
        font-weight: 700;
        color: #2c3e50;
        flex: 1;
    }
    
    .bar-percentage {
        font-size: 1.5em;
        font-weight: 800;
        color: white;
        min-width: 80px;
        text-align: center;
        padding: 8px 20px;
        border-radius: 25px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    /* Track de la barre */
    .bar-track {
        height: 40px;
        background: #e9ecef;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
    }
    
    /* Remplissage de la barre */
    .bar-fill {
        height: 100%;
        border-radius: 20px;
        position: relative;
        transition: width 1.5s ease-out;
        animation: fillBar 1.5s ease-out forwards;
    }
    
    .bar-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.3) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.1) 100%
        );
    }
    
    .bar-count {
        font-size: 0.9em;
        color: #999;
        padding-left: 62px;
    }
    
    /* Couleurs spécifiques pour chaque barre */
    .pdf-bar .bar-percentage {
        background: linear-gradient(135deg, #f8d70c, #d9c425);
    }
    
    .pdf-bar .bar-fill {
        background: linear-gradient(90deg, #f8d70c, #d9c425);
    }
    
    .doc-bar .bar-percentage {
        background: linear-gradient(135deg, #2b579a, #4a90e2);
    }
    
    .doc-bar .bar-fill {
        background: linear-gradient(90deg, #2b579a, #5fa3e8);
    }
    
    .ppt-bar .bar-percentage {
        background: linear-gradient(135deg, #d24726, #ff6b45);
    }
    
    .ppt-bar .bar-fill {
        background: linear-gradient(90deg, #d24726, #ff8866);
    }
    
    .xls-bar .bar-percentage {
        background: linear-gradient(135deg, #217346, #34a85a);
    }
    
    .xls-bar .bar-fill {
        background: linear-gradient(90deg, #217346, #45c876);
    }
    
    /* Animation de remplissage */
    @keyframes fillBar {
        from {
            width: 0 !important;
        }
    }
    
    /* Délais d'animation */
    .horizontal-bar:nth-child(1) .bar-fill {
        animation-delay: 0.2s;
    }
    
    .horizontal-bar:nth-child(2) .bar-fill {
        animation-delay: 0.4s;
    }
    
    .horizontal-bar:nth-child(3) .bar-fill {
        animation-delay: 0.6s;
    }
    
    .horizontal-bar:nth-child(4) .bar-fill {
        animation-delay: 0.8s;
    }
    
    /* Responsive */
    @media (max-width: 1024px) {
        .stats-layout {
            grid-template-columns: 1fr;
            gap: 40px;
        }
        
        .donut-chart {
            width: 250px;
            height: 250px;
        }
        
        .donut-total {
            font-size: 2.5em;
        }
    }
    
    @media (max-width: 768px) {
        .stats-docs-header {
            padding: 25px 20px;
        }
        
        .header-content {
            flex-direction: column;
            gap: 10px;
        }
        
        .header-text {
            text-align: center;
        }
        
        .stats-docs-header h2 {
            font-size: 26px;
        }
        
        .stats-docs-header p {
            font-size: 14px;
        }
        
        .header-icon {
            width: 45px;
            height: 45px;
            font-size: 24px;
        }
        
        .stats-layout {
            gap: 30px;
        }
        
        .donut-chart {
            width: 220px;
            height: 220px;
        }
        
        .donut-total {
            font-size: 2em;
        }
        
        .bar-icon {
            font-size: 1.5em;
            width: 40px;
            height: 40px;
        }
        
        .bar-name {
            font-size: 1em;
        }
        
        .bar-percentage {
            font-size: 1.2em;
            min-width: 60px;
            padding: 6px 15px;
        }
        
        .bar-track {
            height: 30px;
        }
        
        .bar-count {
            padding-left: 52px;
            font-size: 0.85em;
        }
    }
    
    @media (max-width: 480px) {
        .stats-docs-header h2 {
            font-size: 22px;
        }
        
        .header-icon {
            width: 40px;
            height: 40px;
            font-size: 20px;
        }
        
        .stats-docs-wrapper {
            padding: 25px 15px;
        }
        
        .donut-chart {
            width: 200px;
            height: 200px;
        }
        
        .chart-legend {
            padding: 15px;
        }
        
        .legend-item {
            font-size: 0.9em;
        }
    }