/* Styles pour la modal des statistiques de cache */

/* Modal principale */
#cacheStatsModal .modal-dialog {
    max-width: 800px;
}

#cacheStatsModal .modal-content {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#cacheStatsModal .modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: none;
}

#cacheStatsModal .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Cartes des statistiques */
#cacheStatsModal .card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

#cacheStatsModal .card-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
}

#cacheStatsModal .card-body {
    padding: 1rem;
}

/* Indicateurs de performance */
.cache-ratio-excellent {
    color: #28a745 !important;
    font-weight: bold;
}

.cache-ratio-good {
    color: #fd7e14 !important;
    font-weight: bold;
}

.cache-ratio-poor {
    color: #dc3545 !important;
    font-weight: bold;
}

.cache-ratio-none {
    color: #6c757d !important;
    font-style: italic;
}

/* Barres de progression */
#cacheStatsModal .progress {
    background-color: #f1f3f4;
    border-radius: 10px;
    overflow: hidden;
}

#cacheStatsModal .progress-bar {
    transition: width 0.8s ease;
    border-radius: 10px;
}

/* Indicateurs de remplissage */
.cache-usage-low {
    color: #28a745;
}

.cache-usage-medium {
    color: #fd7e14;
}

.cache-usage-high {
    color: #dc3545;
}

/* Styles pour les tips d'optimisation */
#optimizationTips {
    padding-left: 1.2rem;
}

#optimizationTips li {
    margin-bottom: 0.5rem;
    color: #856404;
    font-size: 0.9rem;
}

#optimizationTips li::marker {
    content: "💡 ";
}

/* Loading state */
#cacheStatsLoading {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#cacheStatsLoading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Boutons du footer */
#cacheStatsModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

#cacheStatsModal .btn-group .btn {
    border-radius: 6px !important;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    margin: 0 2px;
}

#cacheStatsModal .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

#cacheStatsContent .card {
    animation: fadeInUp 0.3s ease;
}

#cacheStatsContent .card:nth-child(1) {
    animation-delay: 0.1s;
}

#cacheStatsContent .card:nth-child(2) {
    animation-delay: 0.2s;
}

#cacheStatsContent .card:nth-child(3) {
    animation-delay: 0.3s;
}

#cacheStatsContent .card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Responsive design */
@media (max-width: 768px) {
    #cacheStatsModal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    #cacheStatsModal .modal-body {
        padding: 1rem 0.8rem;
    }
    
    #cacheStatsModal .card-body .row {
        margin: 0;
    }
    
    #cacheStatsModal .card-body .col-md-6 {
        padding: 0 0.5rem;
    }
    
    #cacheStatsModal .btn-group {
        flex-wrap: wrap;
    }
    
    #cacheStatsModal .btn-group .btn {
        margin-bottom: 0.3rem;
    }
}

/* États spéciaux */
.cache-file-exists {
    color: #28a745;
}

.cache-file-missing {
    color: #dc3545;
}

.cache-empty {
    opacity: 0.6;
}

.cache-full {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

/* Tooltips pour les icônes */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Style pour les badges */
.cache-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.cache-status-active {
    background-color: #d4edda;
    color: #155724;
}

.cache-status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Transitions fluides */
* {
    transition: all 0.2s ease;
}

/* Focus states */
#cacheStatsModal .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Amélioration de la lisibilité */
#cacheStatsModal .fw-bold {
    font-weight: 600;
}

#cacheStatsModal .text-muted {
    color: #6c757d !important;
}

#cacheStatsModal .small {
    font-size: 0.875rem;
    word-break: break-all;
}