/* Styles personnalisés pour l'application de gestion de stock */

/* Animation de notification */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

#notification {
    animation: fadeIn 0.3s ease-out forwards;
}

#notification.hide {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Couleurs de notification */
#notification.success {
    background-color: #10B981;
}

#notification.error {
    background-color: #EF4444;
}

#notification.warning {
    background-color: #F59E0B;
}

#notification.info {
    background-color: #3B82F6;
}

/* Styles pour les tableaux */
table tbody tr:hover {
    background-color: rgba(243, 244, 246, 0.5);
}

/* Styles pour les badges de statut de stock */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-normal {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-low {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-critical {
    background-color: #FEE2E2;
    color: #B91C1C;
}

/* Styles pour les cartes de catégories */
.category-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Styles pour les boutons d'action */
.action-button {
    display: inline-flex;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.action-button:hover {
    background-color: rgba(243, 244, 246, 1);
}

.action-button.edit:hover {
    color: #4F46E5;
}

.action-button.delete:hover {
    color: #DC2626;
}

.action-button.view:hover {
    color: #2563EB;
}

/* Styles pour les modales */
.modal-transition {
    transition: opacity 0.3s ease-out;
}

/* Styles pour les éléments désactivés */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Styles pour le input de couleur */
input[type="color"] {
    cursor: pointer;
    padding: 0;
    border: none;
}

/* Styles pour les badges de type de mouvement */
.movement-in {
    background-color: #D1FAE5;
    color: #065F46;
}

.movement-out {
    background-color: #FEE2E2;
    color: #B91C1C;
}

/* Media queries pour la responsivité */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }
}

/* Styles pour les graphiques */
.chart-container {
    position: relative;
    height: 100%;
    width: 100%;
}

/* Loading animation */
.loading {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.loading:after {
    content: " ";
    display: block;
    border-radius: 50%;
    width: 0;
    height: 0;
    margin: 8px;
    box-sizing: border-box;
    border: 32px solid #4F46E5;
    border-color: #4F46E5 transparent #4F46E5 transparent;
    animation: loading 1.2s infinite;
}

@keyframes loading {
    0% {
        transform: rotate(0);
        animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
    }
    50% {
        transform: rotate(180deg);
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    100% {
        transform: rotate(360deg);
    }
}