/*
 * Fichier CSS personnalisé pour l'application LEX
 * Contient les media queries et styles spécifiques au projet
 */

/* ===========================================
   DASHBOARD CARDS RESPONSIVE
   =========================================== */

/* Styles de base pour les cards du dashboard */
.dashboard-stats-card {
    transition: all 0.3s ease;
}

.dashboard-stats-card .card-body {
    padding: 1rem;
}

/* ===========================================
   MEDIA QUERIES POUR RESPONSIVE DESIGN
   =========================================== */

/* Extra Small devices (portrait phones) - Moins de 576px */
@media (max-width: 575.98px) {
    .dashboard-stats-card h3 {
        font-size: 1.5rem;
    }

    .dashboard-stats-card .fs-4 {
        font-size: 1.2rem !important;
    }

    .dashboard-stats-card .card-body {
        padding: 0.75rem;
    }

    .dashboard-stats-card .f-s-12 {
        font-size: 10px;
    }
}

/* Small devices (landscape phones) - 576px et plus */
@media (min-width: 576px) and (max-width: 767.98px) {
    .dashboard-stats-card h3 {
        font-size: 1.6rem;
    }

    .dashboard-stats-card .fs-4 {
        font-size: 1.3rem !important;
    }
}

/* Medium devices (tablets) - 768px et plus */
@media (min-width: 768px) and (max-width: 991.98px) {
    .dashboard-stats-card h3 {
        font-size: 1.75rem;
    }

    .dashboard-stats-card .fs-4 {
        font-size: 1.4rem !important;
    }
}

/* Large devices (desktops) - 992px à 1199px */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Layout horizontal pour 2 cards par ligne */
    .dashboard-stats-card .card-body {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
    }

    .dashboard-stats-card .text-center {
        text-align: left !important;
        flex-grow: 1;
        display: flex;
        align-items: center;
    }

    .dashboard-stats-card .d-flex.align-items-center.justify-content-center {
        justify-content: flex-start !important;
        margin-right: 15px;
        margin-bottom: 0 !important;
    }

    .dashboard-stats-card h3 {
        font-size: 1.8rem;
        margin-bottom: 0;
    }

    .dashboard-stats-card .fs-4 {
        font-size: 1.5rem !important;
        margin-right: 10px;
    }

    .dashboard-stats-card .f-s-12 {
        font-size: 12px;
        display: block;
        margin-top: 3px;
    }

    .dashboard-stats-card .mt-2 {
        margin-top: 0 !important;
        text-align: right;
        flex-shrink: 0;
    }
}

/* Extra Large devices (large desktops) - 1200px à 1399px */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    /* Repasser en mode 2 colonnes horizontal (comme à l'origine) */
    .dashboard-stats-card .card-body {
        padding: 0.85rem;
    }

    .dashboard-stats-card .text-center {
        text-align: left !important;
    }

    /* Restructurer le layout en 2 colonnes */
    .dashboard-stats-card .d-flex.align-items-center.justify-content-center {
        justify-content: flex-start !important;
        margin-bottom: 0 !important;
    }

    .dashboard-stats-card .card-body .d-flex.flex-column.justify-content-center {
        display: block !important;
    }

    /* Créer un layout avec flexbox horizontal */
    .dashboard-stats-card .card-body {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }

    .dashboard-stats-card .text-center {
        flex-grow: 1;
        display: flex;
        align-items: center;
        text-align: left !important;
    }

    .dashboard-stats-card .d-flex.align-items-center.justify-content-center {
        margin-right: 10px;
        margin-bottom: 0 !important;
    }

    .dashboard-stats-card h3 {
        font-size: 1.6rem;
        margin-bottom: 0;
    }

    .dashboard-stats-card .fs-4 {
        font-size: 1.3rem !important;
        margin-right: 8px;
    }

    .dashboard-stats-card .f-s-12 {
        font-size: 11px;
        display: block;
        margin-top: 2px;
    }

    /* Réorganiser les indicateurs à droite */
    .dashboard-stats-card .mt-2 {
        margin-top: 0 !important;
        text-align: right;
        flex-shrink: 0;
    }
}

/* XXL devices (very large desktops) - 1400px et plus */
@media (min-width: 1400px) {
    .dashboard-stats-card h3 {
        font-size: 2rem;
    }

    .dashboard-stats-card .fs-4 {
        font-size: 1.6rem !important;
    }
}

/* ===========================================
   ACTIONS RAPIDES RESPONSIVE
   =========================================== */

/* Style de base pour les boutons d'actions rapides */
.quick-actions-btn {
    transition: all 0.3s ease;
}

.quick-actions-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive pour actions rapides */
@media (max-width: 1399.98px) {
    /* En dessous de 1400px : 2 boutons par ligne */
    .quick-actions-btn .btn {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .quick-actions-btn .btn i {
        font-size: 1rem;
    }
}

@media (min-width: 1400px) {
    /* 1400px et plus : 4 boutons sur 1 ligne */
    .quick-actions-btn .btn {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 575.98px) {
    .quick-actions-btn .btn {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
    }

    .quick-actions-btn .btn i {
        font-size: 0.9rem;
    }
}

/* ===========================================
   STYLES UTILITAIRES
   =========================================== */

/* Debug card (temporaire) */
#resolutionDebug {
    font-family: 'Courier New', monospace;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animations et transitions */
.dashboard-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive utilities pour forcer l'affichage */
@media (max-width: 575.98px) {
    .debug-xs::after {
        content: " [XS]";
        color: red;
        font-weight: bold;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .debug-sm::after {
        content: " [SM]";
        color: orange;
        font-weight: bold;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .debug-md::after {
        content: " [MD]";
        color: blue;
        font-weight: bold;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .debug-lg::after {
        content: " [LG]";
        color: green;
        font-weight: bold;
    }
}

@media (min-width: 1200px) {
    .debug-xl::after {
        content: " [XL]";
        color: purple;
        font-weight: bold;
    }
}