﻿/* ============================================
   DASHBOARD - ZOOM 80%
   ============================================ */

.dashboard {
    zoom: 80% !important;
    width: 100% !important;
    min-height: 100vh !important;
    padding: 20px;
}

/* Alternative pour navigateurs sans zoom */
@supports not (zoom: 80%) {
    .dashboard {
        transform: scale(0.8) !important;
        transform-origin: top left !important;
        width: 125% !important;
        min-height: 125vh !important;
    }
}

/* ============================================
   CARTES DE STATISTIQUES
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px !important;
    min-height: 180px !important;
    border-radius: 16px;
    background: white !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

    .stat-icon i {
        font-size: 2.5rem;
        color: white;
    }

.stat-content {
    width: 100%;
    padding: 0 10px;
}

    .stat-content h3 {
        font-size: 1.5rem !important;
        font-weight: 900 !important;
        margin: 0 0 10px 0 !important;
        color: #1e293b !important;
        line-height: 1 !important;
    }

    .stat-content p {
        font-size: 1.0rem !important;
        color: #64748b !important;
        margin: 0 !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px;
    }

/* Couleurs des icônes */
.stat-icon.bg-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.stat-icon.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* ============================================
   SECTION DROITE - ACTIONS RAPIDES RESTAURÉES
   ============================================ */

.right-section {
    display: grid;
    grid-template-rows: minmax(220px, auto) minmax(320px, auto);
    gap: 24px;
    height: 100%;
}

/* CARTES DE LA SECTION DROITE */
.dashboard-card {
    flex: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

    .dashboard-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

/* EN-TÊTE DES CARTES */
.card-header-simple {
    padding: 20px 24px 16px 24px;
    border-bottom: 0.5px solid #f1f3f4;
    background: linear-gradient(to right, #f8fafc, #ffffff);
}

    .card-header-simple h3 {
        margin: 0;
        font-size: 0.75rem;
        font-weight: 600;
        color: #1e293b;
        display: flex;
        align-items: center;
    }

        .card-header-simple h3 i {
            margin-right: 10px;
            font-size: 0.75rem;
        }

/* CORPS DES CARTES */
.card-body-simple {
    flex: 1;
    padding: 24px !important;
    overflow-y: auto;
}

/* ============================================
   BOUTONS ACTIONS RAPIDES - STYLE RESTAURÉ
   ============================================ */

.actions-card {
    flex: 1 !important;
    height: auto !important;
}

    .actions-card .card-body-simple {
        padding: 20px 24px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        overflow-y: auto;
    }

/* Grille 2x2 des boutons */
.actions-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 250px;
}

/* Style des boutons carrés - RESTAURÉ */
.action-btn-square {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px !important;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1e293b;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    border: 2px solid #e2e8f0;
    width: 100%;
    height: 100%;
    min-height: 85px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

    .action-btn-square:hover {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        border-color: #cbd5e1;
    }

    /* ICÔNES GRANDES */
    .action-btn-square i {
        font-size: 1.8rem !important;
        margin-bottom: 12px !important;
        display: block;
        transition: transform 0.3s;
    }

    .action-btn-square:hover i {
        transform: scale(1.1);
    }

    /* TEXTE DES BOUTONS */
    .action-btn-square span {
        line-height: 1.3;
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.9rem !important;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    /* ============================================
   THÈMES COLORÉS DES BOUTONS - RESTAURÉS
   ============================================ */

    /* 1. BOUTON NOUVEAU DOSSIER (VERT) */
    .action-btn-square:nth-child(1) {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
        color: #065f46 !important;
        border-color: #86efac !important;
    }

        .action-btn-square:nth-child(1):hover {
            background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%) !important;
            border-color: #34d399 !important;
        }

        .action-btn-square:nth-child(1) i {
            color: #10b981 !important;
        }

    /* 2. BOUTON RELANCE DE JOUR (ORANGE) */
    .action-btn-square:nth-child(2) {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
        color: #92400e !important;
        border-color: #fcd34d !important;
    }

        .action-btn-square:nth-child(2):hover {
            background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%) !important;
            border-color: #fbbf24 !important;
        }

        .action-btn-square:nth-child(2) i {
            color: #f59e0b !important;
        }

    /* 3. BOUTON IMPORTER DONNÉES (VIOLET) */
    .action-btn-square:nth-child(3) {
        background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%) !important;
        color: #5b21b6 !important;
        border-color: #c4b5fd !important;
    }

        .action-btn-square:nth-child(3):hover {
            background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%) !important;
            border-color: #a78bfa !important;
        }

        .action-btn-square:nth-child(3) i {
            color: #8b5cf6 !important;
        }

    /* 4. BOUTON GÉNÉRER RAPPORT (BLEU) */
    .action-btn-square:nth-child(4) {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
        color: #1e40af !important;
        border-color: #93c5fd !important;
    }

        .action-btn-square:nth-child(4):hover {
            background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%) !important;
            border-color: #60a5fa !important;
        }

        .action-btn-square:nth-child(4) i {
            color: #3b82f6 !important;
        }

/* ============================================
   RÉPARTITION HAUTEUR CARTES DROITE
   ============================================ */

/* Activités Récentes plus compacte */
.right-section .activities-card {
    flex: 0 0 40%;
}

/* Actions Rapides plus grande */
.right-section .actions-card {
    flex: 0 0 60%;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .actions-grid-2x2 {
        min-height: 250px;
        gap: 14px;
    }

    .action-btn-square {
        min-height: 100px !important;
        padding: 14px 10px !important;
    }

        .action-btn-square i {
            font-size: 1.7rem !important;
        }
}

@media (max-width: 992px) {
    .right-section {
        gap: 20px;
    }

    .dashboard-card {
        min-height: 320px;
    }

    .actions-grid-2x2 {
        min-height: 300px;
        gap: 18px;
    }

    .action-btn-square {
        min-height: 130px !important;
        padding: 18px 14px !important;
    }

        .action-btn-square i {
            font-size: 2rem !important;
            margin-bottom: 15px !important;
        }

        .action-btn-square span {
            font-size: 1rem !important;
        }
}

@media (max-width: 768px) {
    .right-section {
        gap: 16px;
    }

    .dashboard-card {
        min-height: 280px;
    }

    .actions-grid-2x2 {
        min-height: 240px;
        gap: 12px;
    }

    .action-btn-square {
        min-height: 110px !important;
        padding: 14px 10px !important;
    }

        .action-btn-square i {
            font-size: 1.8rem !important;
        }

        .action-btn-square span {
            font-size: 0.9rem !important;
        }
}

@media (max-width: 576px) {
    .right-section {
        gap: 20px;
    }

    .dashboard-card {
        min-height: auto;
    }

    .actions-grid-2x2 {
        grid-template-columns: 1fr !important;
        grid-template-rows: repeat(4, 1fr) !important;
        gap: 12px;
        min-height: 350px;
    }

    .action-btn-square {
        min-height: 70px !important;
        flex-direction: row;
        padding: 15px 20px !important;
        justify-content: flex-start;
        gap: 15px;
        text-align: left;
    }

        .action-btn-square i {
            margin-bottom: 0;
            font-size: 1.8rem !important;
            flex-shrink: 0;
        }

        .action-btn-square span {
            font-size: 0.95rem !important;
            -webkit-line-clamp: 1;
            text-align: left;
            flex: 1;
        }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-btn-square {
    animation: fadeInUp 0.4s ease-out;
}

    .action-btn-square:nth-child(1) {
        animation-delay: 0.1s;
    }

    .action-btn-square:nth-child(2) {
        animation-delay: 0.2s;
    }

    .action-btn-square:nth-child(3) {
        animation-delay: 0.3s;
    }

    .action-btn-square:nth-child(4) {
        animation-delay: 0.4s;
    }
