/* Dashboard DAARA - Styles PreSkool Theme */

/* Variables des couleurs du thème */
:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Animations et transitions */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.35);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.35);
    }
}

/* Cartes : ombre uniquement au survol (pas de translation) */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.12s ease;
    border-radius: 12px;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Cartes de statistiques horizontales - Style PreSkool */
.stats-card-horizontal {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.12s ease;
    border-radius: 12px;
    height: 100%;
}

.stats-card-horizontal:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stats-card-horizontal .card-body {
    padding: 1.5rem;
}

/* Widgets de statistiques - Style PreSkool 3D */
.student-icon,
.teacher-icon,
.class-icon,
.subject-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: none;
    transition: box-shadow 0.12s ease;
    flex-shrink: 0;
    margin-right: 1rem;
}

.student-icon:hover,
.teacher-icon:hover,
.class-icon:hover,
.subject-icon:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.student-icon {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    background-image:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent),
        linear-gradient(135deg, #ff6b9d, #ff8fab);
}

.teacher-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    background-image:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent),
        linear-gradient(135deg, #4facfe, #00f2fe);
}

.class-icon {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    background-image:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent),
        linear-gradient(135deg, #ffecd2, #fcb69f);
}

.subject-icon {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    background-image:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent),
        linear-gradient(135deg, #a8edea, #fed6e3);
}

.student-icon i,
.teacher-icon i,
.class-icon i,
.subject-icon i {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Badges de pourcentage - Style PreSkool */
.badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.badge.bg-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: white !important;
}

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

.badge.bg-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    color: white !important;
}

/* Contenu des statistiques */
.stats-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1;
}

.stats-content p.text-muted {
    color: #6c757d !important;
    font-size: 0.9rem;
    margin: 0;
}

/* Statistiques breakdown */
.stats-breakdown {
    margin-top: 0.5rem;
}

.stats-breakdown p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.3;
}

.stats-breakdown .text-success {
    color: #28a745 !important;
}

.stats-breakdown .text-danger {
    color: #dc3545 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Titres des cartes */
.card-body h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.card-body p.text-muted {
    color: #6c757d !important;
    font-size: 0.9rem;
    margin: 0;
}

/* Barres de progression */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(0, 0, 0, 0.05);
}

.progress-sm {
    height: 0.375rem;
}

.progress-bar {
    border-radius: 0.25rem;
}

/* Graphiques */
#financialChart,
#paymentChart,
#studentAttendanceChart,
#teacherAttendanceChart,
#cycleChart {
    border-radius: 0.375rem;
}

/* Activités */
.activity-item {
    padding: 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.1s ease;
    background: rgba(0, 0, 0, 0.02);
}

.activity-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.activity-avatar .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Événements */
.event-item {
    padding: 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.1s ease;
    background: rgba(0, 0, 0, 0.02);
}

.event-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.event-date {
    min-width: 60px;
}

/* Résumé financier */
.bg-opacity-10 {
    transition: background-color 0.1s ease, box-shadow 0.1s ease;
    border-radius: 0.375rem;
}

.bg-opacity-10:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.08);
}

/* Alertes */
.alert {
    border: none;
    border-left: 4px solid var(--info-color);
    border-radius: 0.375rem;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--dark-color);
}

/* Boutons */
.btn {
    border-radius: 0.375rem;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
    font-weight: 500;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
}

.text-muted {
    color: var(--secondary-color) !important;
}

/* Page header */
.page-header {
    margin-bottom: 2rem;
}

.add-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-item-left h3 {
    margin: 0;
    color: var(--dark-color);
}

.add-item-left p {
    margin: 0.5rem 0 0 0;
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .dash-widget-info h3 {
        font-size: 1.5rem;
    }

    .add-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .add-item-right {
        margin-top: 1rem;
    }

    .activity-item,
    .event-item {
        margin-bottom: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: var(--dark-color);
        color: #e2e8f0;
    }

    .activity-item,
    .event-item {
        background: rgba(255, 255, 255, 0.05);
    }

    .activity-item:hover,
    .event-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Pas d’animation d’entrée en cascade sur les .card (affichage immédiat) */

/* Amélioration des badges */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

/* Loader pour les graphiques */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.375rem;
}

.spinner-border-sm {
    width: 2rem;
    height: 2rem;
}

/* Amélioration des dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
}

.dropdown-item {
    transition: background-color 0.1s ease, color 0.1s ease;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* Styles spécifiques aux graphiques ApexCharts */
.apexcharts-tooltip {
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.apexcharts-legend {
    font-family: inherit !important;
}

.apexcharts-title-text {
    font-family: inherit !important;
    font-weight: 600 !important;
}

/* Amélioration des cartes de résumé financier */
.bg-success.bg-opacity-10 {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(0, 123, 255, 0.1) !important;
}

.bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.1) !important;
}
