/* Styles personnalisés pour compléter Bootstrap */

/* Hauteur maximale pour les tables scrollables */
.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

/* Carte produit dans la grille */
.produit-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.produit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #0d6efd;
}

/* Badge statut stock */
.badge-stock {
    font-size: 0.7em;
    padding: 3px 8px;
}

/* Animation pour ajout au panier */
@keyframes addToCart {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.added-to-cart {
    animation: addToCart 0.3s ease;
}

/* Panier - ligne avec quantités */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-controls .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal ticket */
#ticket-content {
    font-family: 'Courier New', monospace;
    text-align: left;
    white-space: pre-line;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
}

/* Style pour les produits en rupture */
.rupture-stock {
    opacity: 0.6;
    position: relative;
}

.rupture-stock::after {
    content: "RUPTURE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    color: #dc3545;
    font-weight: bold;
    font-size: 1.2em;
    background: rgba(255,255,255,0.8);
    padding: 5px 10px;
    border-radius: 5px;
}

/* Animation chargement */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}