/* Transitions globales dark mode */
*, *::before, *::after {
    transition-property: background-color, border-color, color;
    transition-duration: 200ms;
    transition-timing-function: ease;
}
/* Ne pas transitionner les animations déjà en cours */
.animate-spin, .animate-pulse, .toast-slide {
    transition: none !important;
}

/* Validation Blazor */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #10b981;
    outline-offset: 0;
}
.invalid {
    outline: 2px solid #ef4444;
    outline-offset: 0;
}
.validation-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Toast animation */
.toast-slide {
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Blazor error UI */
#blazor-error-ui {
    background: #fef9c3;
    bottom: 0; left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    display: none;
    font-size: 0.875rem;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem; top: 0.6rem;
}

/* Scrollbar dark mode */
.dark ::-webkit-scrollbar {
    background: #1f2937;
}
.dark ::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}
