/* Extrait de teacher-dashboard.html. Ordre historique : 14. */
/* ========== SUPERVISION MODAL - STYLES INLINE UNIQUEMENT ========== */

/* Scrollbar styling pour le modal */
.supervision-modal-content::-webkit-scrollbar {
    width: 8px;
}

.supervision-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.supervision-modal-content::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 10px;
}

.supervision-modal-content::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Responsive pour la grille d'élèves */
.supervision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

@media (max-width: 1024px) {
    .supervision-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .supervision-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .supervision-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

#supervisionInterventionModal {
    z-index: 999999 !important;
}

/* Forcer les vues TP à être en arrière-plan */
.tpProView-content {
    position: relative;
    z-index: 1 !important;
}

/* S'assurer que les conteneurs principaux n'interfèrent pas */
#app, .dashboard-container, main {
    position: relative;
    z-index: auto;
}

/* Anciens styles à nettoyer */
#supervisionPanel {
    z-index: 9999999 !important;
}

#supervisionOverlay {
    z-index: 9999998 !important;
}

#supervisionToastContainer {
    z-index: 9999997 !important;
}

/* Styles boutons filtres */
.supervision-filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.supervision-filter-btn:hover {
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.2);
}

.supervision-filter-btn.active {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Responsive pour les boutons de filtre */
@media (max-width: 768px) {
    .supervision-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .supervision-filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.813rem;
    }
}

/* Cartes élèves - version compacte pour panneau latéral */
.student-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
    margin-bottom: 1rem;
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 12px 12px 0 0;
}

.student-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.student-card.sos {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fff 0%, #fee2e2 100%);
    animation: pulseRed 4s ease-in-out infinite;
}

.student-card.sos::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.student-card.stagnant {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fff 0%, #fef3c7 100%);
}

.student-card.stagnant::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6); }
}

/* Avatar - version compacte */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 0.75rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    border: 3px solid white;
}

/* Barre de progression */
.progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    transition: width 0.5s;
    border-radius: 10px;
}

/* Badge de statut */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge.sos { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626; }
.badge.stagnant { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.badge.active { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }

/* Bouton d'action */
.action-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

/* Badge pulsant */
.pulse-badge {
    animation: pulseBadge 4s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Toast notification */
.notification-toast {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    min-width: 320px;
    max-width: 400px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.notification-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 4s infinite;
}

.notification-toast:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

@keyframes slideInRight {
    from { 
        transform: translateX(500px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    }
    50% { 
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.8);
    }
}

/* ========================================
   FORCE LE VOLET SUPERVISION AU PREMIER PLAN
   ======================================== */
.modal-overlay, 
#supervisionModal,
#supervisionPanel,
.supervision-modal-content {
    z-index: 99999 !important; /* Priorité absolue */
    position: fixed !important; /* Détache l'élément du flux parent */
}

#supervisionModal {
    display: none;
    align-items: center;
    justify-content: center;
}

#supervisionModal.active {
    display: flex !important;
}

#supervisionModal > div {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    background: white !important;
    box-shadow: 0 0 50px rgba(0,0,0,0.5) !important;
    border: 3px solid #14b8a6 !important;
    max-width: 90vw !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
}

/* S'assurer que le fond noir couvre tout */
.modal-backdrop,
#supervisionOverlay {
    z-index: 99998 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.7) !important;
}
