/* Styles personnalisés pour le menu */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

body {
    font-family: var(--font-sans);
}

h1, h2, h3, .font-serif {
    font-family: var(--font-serif);
}

/* Animation pour l'accordéon */
.category-products {
    max-height: 0;
    overflow: hidden;
    padding-bottom: 3.5rem; /* espace pour éviter que le dernier élément soit coupé sur tablettes */
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-10px);
}

.category-products.active {
    max-height: 5000px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

/* Animation des cartes produits */
.product-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délais d'animation pour chaque carte */
.category-products.active .product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.category-products.active .product-card:nth-child(1) { animation-delay: 0.1s; }
.category-products.active .product-card:nth-child(2) { animation-delay: 0.15s; }
.category-products.active .product-card:nth-child(3) { animation-delay: 0.2s; }
.category-products.active .product-card:nth-child(4) { animation-delay: 0.25s; }
.category-products.active .product-card:nth-child(5) { animation-delay: 0.3s; }
.category-products.active .product-card:nth-child(6) { animation-delay: 0.35s; }
.category-products.active .product-card:nth-child(7) { animation-delay: 0.4s; }
.category-products.active .product-card:nth-child(8) { animation-delay: 0.45s; }
.category-products.active .product-card:nth-child(9) { animation-delay: 0.5s; }
.category-products.active .product-card:nth-child(10) { animation-delay: 0.55s; }

/* Hover effects */
.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Style pour l'indicateur de rotation */
.category-indicator {
    transition: transform 0.4s ease;
}

.category-indicator.rotate-180 {
    transform: rotate(180deg);
}

/* Lignes de description tronquées */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation d'entrée des sections */
.category-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.category-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1e9e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #b85e3a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9a4a2c;
}

/* Responsive */
@media (max-width: 640px) {
    .category-products.active .product-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .category-section {
        opacity: 1;
        transform: none;
    }
}

/* Loading state */
.menu-loading {
    position: relative;
    overflow: hidden;
}

.menu-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Badge de quantité */
.category-badge {
    background: linear-gradient(135deg, #b85e3a, #9a4a2c);
}