root {
    --primary: #4b6cb7;
    --secondary: #182848;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
}

/* Styles de base */
body {
     background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== NAVBAR ===== */
.navbar-ecole {
    background: linear-gradient(45deg, var(--primary), var(--secondary)) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== CARTES ===== */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2) !important;
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
}

/* ===== TABLEAUX ===== */
.table-hover tbody tr:hover {
    background-color: #f1f3f9;
    cursor: pointer;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* ===== BOUTONS ===== */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ===== BADGES ===== */
.badge {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 20px;
}

/* ===== RECHERCHE (liste_classes.html) ===== */
.recherche-card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#searchInput:focus {
    box-shadow: 0 0 0 0.2rem rgba(75, 108, 183, 0.25);
}

#clearBtn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.result-card {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORMULAIRES ===== */
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(75, 108, 183, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ===== MODALES ===== */
.modal-content {
    border-radius: 15px;
}

.modal-header {
    border-radius: 15px 15px 0 0 !important;
}

/* ===== ANIMATIONS GLOBALES ===== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group-sm {
        display: flex;
        flex-wrap: wrap;
    }
}



    body {
       
            min-height: 100vh;
        }
        .card {
            border: none;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        .card-header {
            border-radius: 15px 15px 0 0 !important;
            font-weight: 600;
        }
        #dropZone {
            cursor: pointer;
            transition: all 0.3s ease;
        }
        #dropZone:hover {
            background-color: #f8f9ff;
            border-color: #007bff !important;
        }
@keyframes pulse {
0%,100%{opacity: 1;}
50%{opacity: 0.5;}
}
.animate-pulse{
animation: pulse 1.5s infinite;
}


/* Champs du formset plus compacts */
#saisie-notes-form input.form-control {
    height: 38px;
    font-size: 1rem;
}

/* Ligne au survol */
#saisie-notes-form tbody tr:hover {
    background-color: #e8f5e9 !important;
}

.bg-gradient-primary {
    background: linear-gradient(45deg, #4b6cb7, #182848);
}

/* Animation des résultats */
.result-card {
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style de la barre de recherche */
#searchInput:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}



    @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

    :root {
        --glens-main: #4361ee;
        --glens-accent: #4cc9f0;
        --glens-secondary: #3f37c9;
        --glens-success: #2ec4b6;
        --glens-danger: #e63946;
        --glens-warning: #f59e0b;
        --glens-bg: #f0f4ff;
        --glens-text: #1a1c2c;
        --glens-card-bg: rgba(255, 255, 255, 0.9);
    }

    body {
        background: linear-gradient(135deg, var(--glens-bg) 0%, #e8ecff 100%);
        font-family: 'Plus Jakarta Sans', sans-serif;
        color: var(--glens-text);
        min-height: 100vh;
    }

    .glens-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 2rem;
        position: relative;
    }

    /* --- ANIMATED BACKGROUND --- */
    .school-item {
        position: absolute;
        font-size: 2rem;
        opacity: 0.05;
        z-index: 0;
        pointer-events: none;
        animation: floatAround 30s infinite linear;
    }

    @keyframes floatAround {
        0% { transform: translate(0, 0) rotate(0deg); }
        50% { transform: translate(100px, 100px) rotate(180deg); }
        100% { transform: translate(0, 0) rotate(360deg); }
    }

    /* --- DASHBOARD HEADER --- */
    .dashboard-header {
        background: white;
        border-radius: 30px;
        padding: 2.5rem;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
        margin-bottom: 2.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 2rem;
        position: relative;
        z-index: 10;
        border: 1px solid rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(10px);
    }

    .header-info h1 {
        font-weight: 800;
        font-size: 2.2rem;
        margin: 0;
        background: linear-gradient(135deg, var(--glens-main), var(--glens-secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .header-info p {
        color: #64748b;
        font-weight: 500;
        margin: 5px 0 0 0;
    }

    .header-actions {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .btn-glens {
        padding: 12px 24px;
        border-radius: 16px;
        font-weight: 700;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border: none;
        cursor: pointer;
    }

    .btn-glens-primary {
        background: linear-gradient(135deg, var(--glens-main), var(--glens-secondary));
        color: white;
        box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
    }

    .btn-glens-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(67, 97, 238, 0.3);
    }

    .btn-glens-outline {
        background: #f8fafc;
        color: var(--glens-main);
        border: 2px solid #f1f5f9;
    }

    .btn-glens-outline:hover {
        background: white;
        border-color: var(--glens-main);
        transform: translateY(-2px);
    }

    /* --- SEARCH BAR --- */
    .search-section {
        margin-bottom: 2.5rem;
        position: relative;
        z-index: 10;
    }

    .search-box {
        position: relative;
        max-width: 600px;
    }

    .search-box i {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 1.2rem;
    }

    .search-input {
        width: 100%;
        padding: 18px 25px 18px 55px;
        background: white;
        border: 2px solid #f1f5f9;
        border-radius: 20px;
        font-size: 1rem;
        font-weight: 600;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
        transition: all 0.3s;
    }

    .search-input:focus {
        outline: none;
        border-color: var(--glens-main);
        box-shadow: 0 15px 35px rgba(67, 97, 238, 0.1);
    }

    /* --- CLASSES GRID --- */
    .classes-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 2rem;
        position: relative;
        z-index: 5;
    }

    .class-card-v4 {
        background: white;
        border-radius: 30px;
        padding: 2rem;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
        border: 1px solid #f1f5f9;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
        overflow: hidden;
    }

    .class-card-v4:hover {
        transform: translateY(-10px);
        box-shadow: 0 25px 50px rgba(67, 97, 238, 0.1);
        border-color: var(--glens-main);
    }

    .card-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .class-icon-wrapper {
        width: 60px;
        height: 60px;
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }

    .icon-blue { background: #eef2ff; color: var(--glens-main); }
    .icon-orange { background: #fff7ed; color: var(--glens-warning); }

    .card-actions {
        display: flex;
        gap: 8px;
    }

    .action-btn {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
    }

    .btn-edit { background: #f1f5f9; color: #64748b; }
    .btn-edit:hover { background: var(--glens-main); color: white; }
    
    .btn-del { background: #fee2e2; color: var(--glens-danger); }
    .btn-del:hover { background: var(--glens-danger); color: white; }

    .class-name {
        font-size: 1.6rem;
        font-weight: 800;
        margin-bottom: 10px;
        display: block;
    }

    .class-badges {
        display: flex;
        gap: 10px;
        margin-bottom: 1.5rem;
    }

    .badge-v4 {
        padding: 6px 12px;
        border-radius: 10px;
        font-size: 0.8rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .badge-level { background: #f0fdf4; color: #16a34a; }
    .badge-exam { background: #fff7ed; color: #ea580c; }

    .stats-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 2rem;
        background: #f8fafc;
        padding: 15px;
        border-radius: 20px;
    }

    .stat-item {
        text-align: center;
    }

    .stat-val {
        display: block;
        font-weight: 800;
        font-size: 1.2rem;
        color: var(--glens-main);
    }

    .stat-lbl {
        font-size: 0.7rem;
        color: #94a3b8;
        text-transform: uppercase;
        font-weight: 700;
    }

    .card-footer-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .btn-footer {
        padding: 12px;
        border-radius: 14px;
        font-weight: 700;
        font-size: 0.9rem;
        text-align: center;
        text-decoration: none;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .btn-manage-students {
        background: var(--glens-main);
        color: white;
    }

    .btn-manage-students:hover {
        background: var(--glens-secondary);
        transform: scale(1.05);
    }

    .btn-schedule-v4 {
        background: white;
        color: var(--glens-text);
        border: 2px solid #f1f5f9;
    }

    .btn-schedule-v4:hover {
        border-color: var(--glens-main);
        color: var(--glens-main);
    }

    /* --- MODAL STYLING --- */
    .modal-glens-v4 .modal-content {
        border-radius: 35px;
        border: none;
        padding: 1rem;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    }

    .modal-glens-v4 .modal-header {
        border: none;
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
    }

    .delete-icon-circle {
        width: 80px;
        height: 80px;
        background: #fee2e2;
        color: var(--glens-danger);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
        animation: pulseDanger 2s infinite;
    }

    @keyframes pulseDanger {
        0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
        70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(230, 57, 70, 0); }
        100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
    }

    .modal-glens-v4 .btn-confirm-del {
        background: var(--glens-danger);
        color: white;
        border-radius: 15px;
        padding: 12px 25px;
        font-weight: 700;
    }

    .modal-glens-v4 .btn-cancel {
        background: #f1f5f9;
        color: #64748b;
        border-radius: 15px;
        padding: 12px 25px;
        font-weight: 700;
    }

    /* --- EMPTY STATE --- */
    .empty-state-v4 {
        text-align: center;
        padding: 5rem;
        background: white;
        border-radius: 40px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03);
    }

    .empty-state-v4 i {
        font-size: 4rem;
        color: #e2e8f0;
        margin-bottom: 1.5rem;
    }
