/* ======================================================================
   SECTION CARTE
====================================================================== */

body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
            url('../images/fond-restaurant.jpg');
    margin: 0;
}

/* Conteneur global de la carte */
.carte-container {
    max-width: 1600px;
    margin: 150px auto 75px auto; 
    padding: 0 40px;
    min-height: 70vh; 
}

/* --- Barre de Filtres --- */
.filter-section {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 1px;
}

.filter-btn:hover, .filter-btn.active {
    color:#fff;
    background-color: #327C74;
    font-weight: bold;
}

/* Grille des Produits (2 par ligne) */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 65px;
}

/* Chaque carte de produit */
.menu-item {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    padding: 40px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* Animation d'apparition des cartes */
.menu-item.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.menu-item-title,
.menu-item-price,
.menu-item-description {
    transition: color 0.4s ease;
}

.menu-item:hover {
    background-color: rgb(217, 217, 217);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); 
    border-color: rgba(255, 255, 255, 0.8);
}

.menu-item:hover .menu-item-title,
.menu-item:hover .menu-item-price,
.menu-item:hover .menu-item-description {
    color: #000000 !important;
}

/* Alignement Titre et Prix */
.menu-item-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 8px;
}

/* Titre, Prix et Description */
.menu-item-title {
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
    font-weight: 400;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.menu-item-price {
    color: #fff;
    font-weight: 400;
    font-size: 1.2rem;
    white-space: nowrap;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.menu-item-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Images des boules */
.item-badges {
    position: absolute;
    top: 15px;
    right: 30px;
    width: 100px;
    height: 100px;
    z-index: 10;
    pointer-events: none;
}

.badge-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.15s ease-out, transform 0s 0.15s;
}

.badge-verte {
    z-index: 1;
}

.badge-rouge {
    z-index: 2;
}

.menu-item:hover .badge-img {
    opacity: 1;
}

/* Animation des boules flottantes */
.menu-item:hover .badge-verte {
    animation: floatVerte 3s ease-in-out infinite;
}

.menu-item:hover .badge-rouge {
    animation: floatRouge 3.5s ease-in-out infinite;
}

/* Bloc contenant le titre de la sous-catégorie */
.sub-category-title-block {
    grid-column: span 2;
    margin-top: 30px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

/* Animation d'apparition identique aux cartes */
.sub-category-title-block.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Design du titre de la sous-catégorie */
.sub-category-title {
    color: white;
    font-size: 1.6rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin: 0;
    text-transform: capitalize;
}

/* Message sur les pizzas contenant des mozza di bufala */
.pizza-disclaimer{
    padding-top: 50px;
    color: white;
    text-align: center;
}

/* Conteneur/Cadre de la suggestion */
#suggestion-container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: none; 
    margin: 3rem auto !important;
    width: max-content; 
    max-width: 95%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
}

/* L'image à l'intérieur */
.suggestion-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
}

/* Classe d'animation */
#suggestion-container.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Filtre pour mobile (pour meilleure expérience utilisateur) */
.mobile-toggle-btn {
    display: none;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 2rem auto;
    flex-wrap: wrap;
}

.no-products {
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
}

/* ======================================================================
   AJUSTEMENTS RESPONSIVE (Mobiles et tablettes)
====================================================================== */

@media screen and (max-width: 1024px) {
    .item-badges {
        width: 80px;
        height: 80px;
    }
}

@media screen and (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .carte-container {
        margin-top: 145px;
    }

    .item-badges {
        top: 15px;
        right: 40px;
        width: 80px;
        height: 80px;
    }

    .sub-category-title-block {
        grid-column: span 1;
    }

    .filter-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .mobile-toggle-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 90%;
        margin: 1.5rem auto 0 auto;
        padding: 12px 20px;
        background-color: rgba(255, 255, 255, 0.1);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        box-sizing: border-box;
        text-transform: uppercase;
    }

    .mobile-toggle-btn .arrow-icon {
        transition: transform 0.3s ease;
        font-size: 0.8rem;
    }

    .mobile-toggle-btn.open .arrow-icon {
        transform: rotate(90deg);
    }

    .filter-buttons {
        display: none; 
        flex-direction: column;
        width: 90%;
        margin: 0 auto 1.5rem auto;
        gap: 4px;
        padding: 8px;
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 0 8px 8px;
        border-top: none;
        box-sizing: border-box;
    }

    .filter-buttons.show {
        display: flex;
    }

    .mobile-toggle-btn.open {
        border-radius: 8px 8px 0 0;
    }

    .filter-btn {
        width: 100%;
        text-align: left;
        padding: 12px 15px;
        border-radius: 6px;
        background: transparent;
        border: none;
        color: #ffffff;
        box-sizing: border-box;
    }

    .filter-btn.active {
        background-color: #327C74;
    }
}

/* ======================================================================
   ANIMATIONS
====================================================================== */

@keyframes floatVerte {
    0% { transform: translate(-8px, -8px); }
    50% { transform: translate(-12px, -18px); }
    100% { transform: translate(-8px, -8px); }
}

@keyframes floatRouge {
    0% { transform: translate(8px, 8px); }
    50% { transform: translate(18px, 12px); }
    100% { transform: translate(8px, 8px); }
}