/**
 * ============================================
 * STYLES POUR LES AMÉLIORATIONS
 * ============================================
 */

/* Animations */
@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;
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading spinner amélioré */
.enhanced-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E7EB;
    border-top-color: #667EEA;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-message {
    color: #6B7280;
    font-size: 14px;
    font-weight: 500;
}

/* Notifications améliorées */
.enhanced-notification {
    font-family: 'Inter', sans-serif;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-content i {
    font-size: 20px;
}

.notification-success .notification-content i {
    color: #10B981;
}

.notification-error .notification-content i {
    color: #EF4444;
}

.notification-warning .notification-content i {
    color: #F59E0B;
}

.notification-info .notification-content i {
    color: #3B82F6;
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6B7280;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #111827;
}

/* Highlight de recherche */
mark {
    background: #FEF3C7;
    color: #92400E;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Champs invalides */
input.invalid,
select.invalid,
textarea.invalid {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
}

input.invalid:focus,
select.invalid:focus,
textarea.invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Amélioration des focus */
*:focus-visible {
    outline: 2px solid #667EEA;
    outline-offset: 2px;
}

/* Transitions fluides */
button,
a,
input,
select,
textarea {
    transition: all 0.2s ease;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Amélioration des tableaux */
table {
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

table tr:hover {
    background-color: #F9FAFB;
}

/* Tooltips améliorés */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #111827;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #111827;
    margin-bottom: 2px;
}

/* Badges améliorés */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-error {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive améliorations */
@media (max-width: 768px) {
    .enhanced-notification {
        min-width: auto;
        max-width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}

/* Print styles */
@media print {
    .enhanced-notification,
    .enhanced-loading,
    button,
    .no-print {
        display: none !important;
    }
}

