/* Dashboard Styles - Version Responsive Améliorée */
.dashboard-container {
    padding: 30px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 60px);
    width: 100%;
    box-sizing: border-box;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-subtitle {
    font-size: 1.2rem;
    color: #6b7280;
    font-weight: 400;
}

.dashboard-grid {
    display: grid;
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    /* Configuration de base pour très grands écrans */
    grid-template-columns: repeat(4, 1fr);
}

.dashboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.dashboard-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.card-icon {
    font-size: 3.5rem;
    color: #2563eb;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.dashboard-card:hover .card-icon {
    color: #1d4ed8;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 15px;
    line-height: 1.3;
}

.card-description {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.card-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #2563eb;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover .card-arrow {
    opacity: 1;
}

/* ===== RESPONSIVE DESIGN AMÉLIORÉ ===== */

/* Très grands écrans (1600px et plus) - 5 colonnes */
@media (min-width: 1600px) {
    .dashboard-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 30px;
    }
    
    .dashboard-container {
        padding: 40px;
    }
    
    .dashboard-card {
        min-height: 220px;
        padding: 35px;
    }
    
    .card-icon {
        font-size: 4rem;
    }
    
    .card-title {
        font-size: 1.6rem;
    }
}

/* Grands écrans (1200px à 1599px) - 4 colonnes */
@media (min-width: 1200px) and (max-width: 1599px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

/* Écrans moyens-grands (992px à 1199px) - 3 colonnes */
@media (min-width: 992px) and (max-width: 1199px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .dashboard-container {
        padding: 25px;
    }
    
    .dashboard-card {
        padding: 25px;
        min-height: 190px;
    }
    
    .card-icon {
        font-size: 3rem;
    }
    
    .card-title {
        font-size: 1.4rem;
    }
}

/* Tablettes (768px à 991px) - 2 colonnes */
@media (min-width: 768px) and (max-width: 991px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .dashboard-container {
        padding: 20px;
    }
    
    .dashboard-card {
        padding: 25px;
        min-height: 180px;
    }
    
    .card-icon {
        font-size: 2.8rem;
        margin-bottom: 15px;
    }
    
    .card-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .card-description {
        font-size: 0.95rem;
    }
    
    .dashboard-title {
        font-size: 2.2rem;
    }
}

/* Petits écrans/mobiles (576px à 767px) - 1 colonne */
@media (min-width: 576px) and (max-width: 767px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .dashboard-container {
        padding: 15px;
    }
    
    .dashboard-card {
        padding: 20px;
        min-height: 160px;
    }
    
    .card-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .card-title {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .dashboard-header {
        margin-bottom: 30px;
    }
}

/* Très petits écrans (moins de 576px) - 1 colonne compacte */
@media (max-width: 575px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-container {
        padding: 12px;
    }
    
    .dashboard-card {
        padding: 18px;
        min-height: 140px;
    }
    
    .card-icon {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .card-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .dashboard-title {
        font-size: 1.8rem;
    }
    
    .dashboard-header {
        margin-bottom: 25px;
    }
    
    .card-arrow {
        font-size: 1.2rem;
        top: 15px;
        right: 15px;
    }
}

/* ===== AMÉLIORATIONS VISUELLES ===== */

/* Additional styling for better visual hierarchy */
.dashboard-container::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.02) 0%, 
        rgba(59, 130, 246, 0.03) 25%, 
        rgba(147, 197, 253, 0.02) 50%, 
        rgba(191, 219, 254, 0.02) 75%, 
        rgba(239, 246, 255, 0.02) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Cards specific colors */
.dashboard-card:nth-child(1) .card-icon { color: #10b981; }
.dashboard-card:nth-child(1):hover .card-icon { color: #059669; }

.dashboard-card:nth-child(2) .card-icon { color: #3b82f6; }
.dashboard-card:nth-child(2):hover .card-icon { color: #2563eb; }

.dashboard-card:nth-child(3) .card-icon { color: #f59e0b; }
.dashboard-card:nth-child(3):hover .card-icon { color: #d97706; }

.dashboard-card:nth-child(4) .card-icon { color: #8b5cf6; }
.dashboard-card:nth-child(4):hover .card-icon { color: #7c3aed; }

.dashboard-card:nth-child(5) .card-icon { color: #06b6d4; }
.dashboard-card:nth-child(5):hover .card-icon { color: #0891b2; }

.dashboard-card:nth-child(6) .card-icon { color: #f97316; }
.dashboard-card:nth-child(6):hover .card-icon { color: #ea580c; }

.dashboard-card:nth-child(7) .card-icon { color: #84cc16; }
.dashboard-card:nth-child(7):hover .card-icon { color: #65a30d; }

.dashboard-card:nth-child(8) .card-icon { color: #ef4444; }
.dashboard-card:nth-child(8):hover .card-icon { color: #dc2626; }

.dashboard-card:nth-child(9) .card-icon { color: #6366f1; }
.dashboard-card:nth-child(9):hover .card-icon { color: #4f46e5; }

.dashboard-card:nth-child(10) .card-icon { color: #ec4899; }
.dashboard-card:nth-child(10):hover .card-icon { color: #db2777; }

/* ===== AMÉLIORATIONS DE L'ACCESSIBILITÉ ===== */

/* Focus pour l'accessibilité */
.dashboard-card:focus {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* Amélioration du contraste pour les écrans avec faible luminosité */
@media (prefers-contrast: high) {
    .dashboard-card {
        border: 2px solid #1e40af;
    }
    
    .card-title {
        color: #1e3a8a;
        font-weight: 700;
    }
    
    .card-description {
        color: #374151;
    }
}

/* Réduction des animations pour les utilisateurs qui préfèrent moins d'animations */
@media (prefers-reduced-motion: reduce) {
    .dashboard-card {
        transition: none;
    }
    
    .dashboard-card:hover {
        transform: none;
    }
    
    .card-icon {
        transition: none;
    }
    
    .card-arrow {
        transition: none;
    }
}

/* ===== ÉTAT DE CHARGEMENT ===== */

.dashboard-loading .dashboard-card {
    opacity: 0.7;
    pointer-events: none;
}

/* ===== OPTIMISATIONS POUR L'IMPRESSION ===== */

@media print {
    .dashboard-container {
        background-color: white;
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dashboard-card {
        background: white;
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .dashboard-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .card-arrow {
        display: none;
    }
}