/* FoodWidget Restaurant - Version 2.3.4 by Scarfays */

.foodwidget-restaurant-widget {
    width: 100%;
}

/* Catégories */
.fwr-category {
    margin-bottom: 40px;
}

/* Bords arrondis élégants (optionnel) */
.fwr-category.fwr-has-radius {
    border-radius: 12px;
}

/* Ombre portée élégante (optionnel) - Style imposé */
.fwr-category.fwr-has-shadow {
    box-shadow: 0px 7px 19px -7px rgba(0, 0, 0, 0.3);
}

.fwr-category-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Liste */
.fwr-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Items - Décalage à gauche sur desktop/tablette */
.fwr-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    position: relative;
    margin-left: 20px;
}

/* Séparateur (toujours visible, personnalisable) */
.fwr-menu-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid #f0f0f0;
    border-style: solid;
}

/* Layout desktop/tablette */
.fwr-menu-item {
    flex-direction: row;
    gap: 20px;
}

/* Image - Width fixe uniquement (pas de height) */
.fwr-item-image {
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    width: 150px;
}

.fwr-item-image img {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    /* PAS de transition scale - effet retiré */
}

/* Icône loupe avec signe + (zoom) - 18px desktop */
.fwr-zoom-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    fill: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.fwr-lightbox-trigger:hover .fwr-zoom-icon {
    opacity: 1;
}

/* Contenu - Centré verticalement */
.fwr-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.fwr-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.fwr-item-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    line-height: 1.3;
    min-width: 0;
    word-wrap: break-word;
}

.fwr-veg-icon {
    width: 18px;
    height: 18px;
    fill: #4CAF50;
    flex-shrink: 0;
}

.fwr-item-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
}

.fwr-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #d4a574;
    white-space: nowrap;
    flex-shrink: 0;
}

/* === LIGHTBOX === */
.fwr-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fwr-lightbox-open {
    opacity: 1;
    visibility: visible;
}

.fwr-lightbox-closing {
    opacity: 0;
}

.fwr-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.fwr-lightbox-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    width: 600px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1000000;
}

.fwr-lightbox-open .fwr-lightbox-content {
    transform: scale(1);
}

.fwr-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000001;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.fwr-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.fwr-lightbox-close:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.fwr-lightbox-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: #f5f5f5;
}

.fwr-lightbox-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: fwrFadeIn 0.3s ease;
}

.fwr-lightbox-info {
    padding: 25px 30px;
    max-height: calc(90vh - 400px);
    overflow-y: auto;
    background-color: #fff;
}

.fwr-lightbox-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.fwr-lightbox-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.fwr-lightbox-veg-icon {
    width: 24px;
    height: 24px;
    fill: #4CAF50;
    flex-shrink: 0;
}

.fwr-lightbox-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.fwr-lightbox-price {
    font-size: 22px;
    font-weight: 700;
    color: #d4a574;
    margin: 0;
}

.fwr-lightbox-trigger {
    cursor: pointer;
    position: relative;
    display: block;
}

@keyframes fwrFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === RESPONSIVE === */

/* Tablette (portrait) - 1024px et moins - GARDE L'APPARENCE DESKTOP */
@media (max-width: 1024px) {
    /* Tablette garde le layout desktop, pas de changement */
}

/* Mobile (portrait) - 767px et moins */
@media (max-width: 767px) {
    .fwr-category-title {
        font-size: 24px;
        text-align: center; /* Centré sur mobile */
    }

    /* PAS de margin-left sur mobile */
    .fwr-menu-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-left: 0;
    }

    .fwr-item-image {
        margin-bottom: 0; /* PAS de margin-bottom */
        width: 150px; /* Même width qu'en desktop */
    }

    /* Loupe plus petite sur mobile - 16px */
    .fwr-zoom-icon {
        width: 16px;
        height: 16px;
    }

    /* Header en colonne sur mobile - prix sous le titre */
    .fwr-item-header {
        justify-content: center;
        flex-direction: column;
        gap: 5px;
    }

    /* Titre, prix et description centrés */
    .fwr-item-title {
        font-size: 18px;
        justify-content: center;
        text-align: center;
    }

    .fwr-item-price {
        font-size: 16px;
        text-align: center;
    }

    .fwr-item-description {
        font-size: 13px;
        text-align: center;
    }

    .fwr-lightbox-content {
        width: 95%;
        max-height: 95vh;
    }

    .fwr-lightbox-image {
        max-height: 300px;
    }

    .fwr-lightbox-info {
        padding: 20px;
        max-height: calc(95vh - 300px);
    }

    .fwr-lightbox-title {
        font-size: 20px;
    }

    .fwr-lightbox-description {
        font-size: 14px;
    }

    .fwr-lightbox-price {
        font-size: 18px;
    }

    .fwr-lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .fwr-menu-item:not(:last-child)::after {
        border-color: #333;
    }
    
    .fwr-item-description {
        color: #aaa;
    }

    .fwr-lightbox-content {
        background: #1a1a1a;
    }

    .fwr-lightbox-info {
        background-color: #1a1a1a;
    }

    .fwr-lightbox-title {
        color: #fff;
    }

    .fwr-lightbox-description {
        color: #ccc;
    }

    .fwr-lightbox-price {
        color: #d4a574;
    }

    .fwr-lightbox-image {
        background: #0a0a0a;
    }

    .fwr-category-info {
        color: #888;
    }
    
    p.fwr-veg-legend-text {
        color: #aaa;
    }
}

/* Informations complémentaires */
.fwr-category-info {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    font-style: italic;
    margin: 15px 0 0 20px; /* Décalage comme les items */
    padding: 0;
}

/* Mobile - pas de décalage */
@media (max-width: 767px) {
    .fwr-category-info {
        margin-left: 0;
    }
}

/* Légende végétarienne */
.fwr-veg-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.fwr-veg-legend-icon {
    width: 18px;
    height: 18px;
    fill: #4CAF50;
    flex-shrink: 0;
}

p.fwr-veg-legend-text {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin: 0;
}
