* {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    transition: ease-in-out 0.2s !important;
}

body {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6b7280;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

#profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#notif-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chevron i {
    transition: transform 0.3s ease;
}

.section-open {
    max-height: 500px !important;
    padding-bottom: 1.5rem;
}

.group-hover\/sidebar\:opacity-100:hover {
    opacity: 1 !important;
}

.group-hover\/item\:max-h-\[550px\]:hover {
    max-height: 550px !important;
}

#banner {
    position: relative;
    z-index: 40;
    width: 100%;
    top: 0;
}

/* Animations pour les notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

#simple-notif {
    animation: slideInRight 0.3s ease-out;
}

#simple-notif.hiding {
    animation: slideOutRight 0.3s ease-out;
}

/* Améliorations des formulaires */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Styles pour les tabs */
.tab-button {
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.tab-button:hover::before {
    width: 100%;
}

.tab-button.active::before {
    width: 100%;
}

/* Améliorations des tableaux */
.table-row {
    transition: all 0.2s ease;
}

.table-row:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Amélioration des boutons */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Animations pour les cards */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Amélioration des modales */
.modal-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Loading states */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Améliorations pour les statistiques */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Améliorations du système de commentaires */
.comment {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.comment:hover {
    border-left-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.02);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .sidebar-container {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar-container.open {
        left: 0;
    }
    
    .mobile-backdrop {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-backdrop.show {
        opacity: 1;
        visibility: visible;
    }
}

/* Améliorations d'accessibilité */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark mode improvements */
.dark .stat-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8) 0%, rgba(17, 24, 39, 0.4) 100%);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Pulse animation for active elements */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid #3b82f6;
    border-radius: inherit;
    opacity: 0;
    transform: scale(0.8);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus states */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-opacity: 0.5;
}