/**
 * Styles front - Grille responsive et carrousel
 */

/* Grille de plats */
.mout-menu-grid {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Shippori Mincho', serif;
}

/* Responsive grid */
/* Desktop : 3 colonnes */
@media (min-width: 981px) {
    .mout-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablette (iPad) : 2 colonnes */
@media (min-width: 768px) and (max-width: 980px) {
    .mout-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile : 1 colonne */
@media (max-width: 767px) {
    .mout-menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Carte de plat */
.mout-dish-card {
    position: relative;
    overflow: hidden;
}

/* Image du plat */
.mout-dish-image {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.mout-dish-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    object-position: center center;
}

/* Cadrage de l'image */
.mout-dish-image.mout-crop-top img {
    object-position: center top;
}

.mout-dish-image.mout-crop-center img {
    object-position: center center;
}

.mout-dish-image.mout-crop-bottom img {
    object-position: center bottom;
}

.mout-dish-image:hover img {
    transform: scale(1.05);
}

/* Overlay avec titre au hover */
.mout-dish-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.mout-dish-image:hover .mout-dish-overlay {
    opacity: 1;
}

.mout-dish-overlay .mout-dish-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 400;
    text-align: center;
    margin: 0 0 10px 0;
    font-family: 'Shippori Mincho', serif;
}

.mout-dish-overlay .mout-dish-description {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.4;
}

/* Message aucun plat */
.mout-no-dishes {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    font-family: 'Shippori Mincho', serif;
}

/* ==================== */
/* Carrousel / Lightbox */
/* ==================== */

.mout-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mout-carousel[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

/* Bouton fermer */
.mout-carousel-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 40px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    line-height: 1;
    padding: 0;
    z-index: 10;
    font-family: 'Shippori Mincho', serif;
}

.mout-carousel-close:hover {
    opacity: 1;
}

/* Boutons navigation */
.mout-carousel-prev,
.mout-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 15px 20px;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.mout-carousel-prev:hover,
.mout-carousel-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.mout-carousel-prev {
    left: 20px;
}

.mout-carousel-next {
    right: 20px;
}

/* Contenu du carrousel */
.mout-carousel-content {
    max-width: 90%;
    max-height: 85%;
    text-align: center;
}

.mout-carousel-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.mout-carousel-caption {
    color: #fff;
    font-size: 1.1rem;
    margin-top: 15px;
    padding: 0 20px;
    font-family: 'Shippori Mincho', serif;
}

/* Responsive carrousel */
@media (max-width: 767px) {
    .mout-carousel-prev,
    .mout-carousel-next {
        padding: 10px 15px;
        font-size: 24px;
    }

    .mout-carousel-prev {
        left: 10px;
    }

    .mout-carousel-next {
        right: 10px;
    }

    .mout-carousel-close {
        top: 10px;
        right: 15px;
        font-size: 32px;
    }

    .mout-dish-overlay .mout-dish-title {
        font-size: 1.5rem;
    }

    .mout-dish-overlay .mout-dish-description {
        font-size: 0.7rem;
    }
}
