/* Design tokens and basic utility styles */
:root {
    --primary: #0066CC;
    --primary-600: #005bb5;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --card-shadow: 0 8px 20px rgba(16,24,40,0.06);
    --text: #1f2937;
    --muted: #64748b;
    --success: #16a34a;
    --danger: #ef4444;
    --radius: 12px;
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 20px;
    --font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

html[data-theme='dark'] {
    --bg: #0b1220;
    --surface: #0f1724;
    --text: #e6eef8;
    --muted: #9aa8bc;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-family);
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(16,24,40,0.1);
}

/* --- IMMERSIVE UI EFFECTS --- */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .glass-panel {
    background: rgba(15, 23, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn {
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.nav-link.active {
    background: var(--primary-600) !important;
    color: white !important;
}

.badge {
    border-radius: 8px;
}

/* small utilities */
.text-muted { color: var(--muted) !important; }

/* ===== STUDENT CARDS STYLES ===== */
/* Animations de transition fluides */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Cartes d'élèves améliorées */
.col-xxl-2 .card {
    border-radius: 16px;
    overflow: hidden;
    background: white;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Photo circulaire avec ombre */
.card img.rounded-circle {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.card:hover img.rounded-circle {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.25);
}

/* Badge de statut financier */
.badge.rounded-pill {
    font-size: 0.95rem !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* En-tête avec gradient */
.card > div[style*="background: linear-gradient"] {
    border-radius: 16px 16px 0 0;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Badges de classe */
.badge.bg-primary.bg-opacity-10,
.badge.bg-secondary.bg-opacity-10 {
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.badge.bg-primary.bg-opacity-10:hover,
.badge.bg-secondary.bg-opacity-10:hover {
    background-color: rgba(0, 102, 204, 0.15) !important;
    transform: translateY(-2px);
}

/* Boîte d'infos complémentaires */
.card-body .bg-light {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%) !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.card:hover .card-body .bg-light {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
}

/* Groupes de boutons */
.btn-group-sm > .btn {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 6px 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-group-sm > .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    color: #0066CC;
    border-color: #0066CC;
}

.btn-outline-primary:hover {
    background: #0066CC;
    border-color: #0066CC;
}

.btn-outline-danger:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

/* Responsive - Très petits écrans */
@media (max-width: 576px) {
    .col-xxl-2 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .card img.rounded-circle {
        width: 130px !important;
        height: 130px !important;
    }
}

/* Responsive - Petits écrans */
@media (min-width: 576px) and (max-width: 768px) {
    .col-xxl-2 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .card img.rounded-circle {
        width: 140px !important;
        height: 140px !important;
    }
}

/* Responsive - Tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
    .col-xxl-2 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

/* Responsive - Grands écrans */
@media (min-width: 1025px) {
    .col-xxl-2 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* Responsive - Très grands écrans */
@media (min-width: 1400px) {
    .col-xxl-2 {
        flex: 0 0 20% !important;
        max-width: 20% !important;
    }
}
