/* =============================================
   COSMOS YOPOUGON — menu.css
   Styles spécifiques à la page menus
   ============================================= */

/* ---- Page layout (below marquee + nav) ---- */
.menu-page {
    padding-top: 120px;
    /* marquee ~46px + nav ~74px */
    min-height: 100vh;
}

/* =============================================
   PAGE HERO (mini)
   ============================================= */
.menu-hero {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-mid) 100%);
    padding: 48px 32px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.menu-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 80% at 50% 120%, rgba(255, 193, 7, 0.12) 0%, transparent 60%);
}

.menu-hero-content {
    position: relative;
    z-index: 1;
}

.menu-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 8px;
}

.menu-hero h1 span {
    color: var(--gold);
}

.menu-hero p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0;
    letter-spacing: 0.04em;
}

/* =============================================
   RESTAURANT TABS
   ============================================= */
.restaurant-tabs-bar {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background: rgba(10, 22, 40, 0.95);
    border-bottom: 1px solid rgba(255, 193, 7, 0.12);
    position: sticky;
    top: 46px;
    /* below marquee */
    z-index: 90;
    padding: 0 16px;
}

.restaurant-tabs-bar::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 0 0 auto;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 18px 20px 15px;
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--white);
}

.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.tab-btn .tab-emoji,
.tab-btn .tab-emoji-fallback {
    font-size: 1.05rem;
}

.tab-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--white);
}

.tab-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =============================================
   MENU CONTENT AREA
   ============================================= */
.menu-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 120px;
}

/* Restaurant section (one per restaurant) */
.restaurant-section {
    display: none;
    animation: fadeSection 0.4s ease forwards;
}

.restaurant-section.active {
    display: block;
}

@keyframes fadeSection {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section header */
.restaurant-section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 40px 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 32px;
}

.rsh-icon {
    font-size: 3rem;
    width: 72px;
    height: 72px;
    background: var(--white);
    border: 1px solid rgba(255, 193, 7, 0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.rsh-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.rsh-info h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 4px;
}

.rsh-info p {
    font-size: 0.88rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.rsh-meta {
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}

.rsh-hours {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.rsh-badge-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #81c784;
    border-radius: 50px;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.rsh-badge-open::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #81c784;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease infinite;
}

/* Category label */
.menu-category-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-category-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 193, 7, 0.15);
}

/* Menu grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* Menu item card */
.menu-item {
    background: var(--white-glass);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item:hover {
    border-color: rgba(255, 193, 7, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.menu-item-img {
    width: 100%;
    height: 165px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.menu-item:hover .menu-item-img {
    transform: scale(1.05);
}

.menu-item-img-wrap {
    overflow: hidden;
    position: relative;
}

.item-popular-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gold);
    color: var(--blue-deep);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
}

.menu-item-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-item-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 5px;
    line-height: 1.3;
}

.menu-item-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 14px;
}

.menu-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.menu-item-price {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gold);
}

.menu-item-price span {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-light);
    margin-left: 3px;
}

.add-btn {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--blue-deep);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
    line-height: 1;
}

.add-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4);
}

.add-btn.added {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

/* =============================================
   FLOATING CART FAB (visible côté menu uniquement)
   ============================================= */
.cart-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 200;
    display: flex;
}

.cart-fab-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(255, 193, 7, 0.5);
    transition: all 0.3s ease;
    position: relative;
}

.cart-fab-btn:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    background: #e53e3e;
    color: white;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--blue-deep);
}

/* =============================================
   VUE PANIER — PLEIN ÉCRAN (style Villaverde)
   ============================================= */
#viewMenu {
    padding-top: 120px;
    /* marquee + nav */
}

#viewCart {
    padding-top: 120px;
    min-height: 100vh;
}

/* ---- En-tête panier ---- */
.cart-page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px 32px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    max-width: 1100px;
    margin: 0 auto;
}

.cart-back-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.cart-back-btn:hover {
    background: rgba(255, 193, 7, 0.12);
    border-color: var(--gold);
    color: var(--gold);
}

.cart-page-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--white);
}

/* ---- Corps panier : 2 colonnes ---- */
.cart-page-body {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 32px 80px;
    align-items: start;
}

/* ---- Colonne articles ---- */
.cart-col-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Groupe par restaurant */
.cart-group {
    background: var(--white-glass);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    overflow: hidden;
}

.cart-group-label {
    padding: 12px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(255, 193, 7, 0.06);
    border-bottom: 1px solid rgba(255, 193, 7, 0.1);
}

/* Ligne article */
.cart-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.cart-item-img-placeholder {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 3px;
}

.cart-item-unit {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.qty-btn:hover {
    background: var(--gold);
    color: var(--blue-deep);
    border-color: var(--gold);
}

.qty-value {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    min-width: 20px;
    text-align: center;
}

/* Colonne droite d'une ligne article */
.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.cart-item-total {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--gold);
}

.cart-item-del {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
}

.cart-item-del:hover {
    opacity: 1;
}

/* ---- Résumé des prix ---- */
.cart-summary-box {
    background: var(--white-glass);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 20px;
}

.cart-summ-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.88rem;
    color: var(--text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cart-summ-row:last-child {
    border-bottom: none;
}

.cart-summ-fees {
    color: rgba(255, 193, 7, 0.7);
}

.cart-summ-fees small {
    font-size: 0.72rem;
    opacity: 0.7;
}

.cart-summ-total {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem !important;
    font-weight: 800;
    color: var(--white) !important;
    padding-top: 14px !important;
    margin-top: 4px;
}

.cart-summ-total span:last-child {
    color: var(--gold);
    font-size: 1.2rem;
}

/* Panier vide */
.cart-empty-msg {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    background: var(--white-glass);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
}

.cart-empty-msg .empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

/* ---- Colonne formulaire commande ---- */
.cart-col-form {
    background: var(--white-glass);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 28px;
    position: sticky;
    top: 130px;
}

.cart-form-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 4px;
}

.cart-form-subtitle {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 24px;
    padding: 8px 14px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    color: #81c784;
}

.cart-field {
    margin-bottom: 18px;
}

.cart-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 7px;
    letter-spacing: 0.03em;
}

.req {
    color: var(--gold);
    margin-left: 2px;
}

.cart-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
    outline: none;
}

.cart-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.cart-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12);
}

.cart-input-readonly {
    background: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.2);
    color: var(--gold);
    cursor: not-allowed;
    font-weight: 700;
}

.cart-input-readonly.filled {
    color: var(--gold);
}

.cart-tel-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.cart-tel-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12);
}

.cart-tel-prefix {
    padding: 11px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(255, 193, 7, 0.07);
    border-right: 1px solid rgba(255, 193, 7, 0.15);
    white-space: nowrap;
    flex-shrink: 0;
}

.cart-input-tel {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none !important;
}

.cart-input-tel:focus {
    border: none;
    box-shadow: none !important;
}

.cart-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.cart-select option {
    background: #0e1b2e;
    color: var(--white);
}

.cart-textarea {
    resize: vertical;
    min-height: 72px;
    max-height: 160px;
}

.cart-field-hint {
    margin-top: 7px;
    font-size: 0.78rem;
    color: rgba(255, 193, 7, 0.7);
    padding: 6px 10px;
    background: rgba(255, 193, 7, 0.07);
    border-radius: 6px;
    border-left: 3px solid rgba(255, 193, 7, 0.3);
}

/* ---- Bouton Commander ---- */
.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.3s ease;
    letter-spacing: 0.04em;
    margin-top: 8px;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cart-clear-link {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
    text-align: center;
    cursor: pointer;
    margin-top: 10px;
    padding: 6px;
    transition: color 0.2s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
}

.cart-clear-link:hover {
    color: #e57373;
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.toast-notif {
    position: fixed;
    top: 88px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, var(--blue-mid) 0%, var(--blue-primary) 100%);
    border: 1px solid rgba(255, 193, 7, 0.25);
    color: var(--white);
    padding: 13px 24px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    max-width: calc(100vw - 40px);
}

.toast-notif.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .cart-page-body {
        grid-template-columns: 1fr;
    }

    .cart-col-form {
        position: static;
    }

    .cart-page-header {
        padding: 20px 20px 16px;
    }

    .cart-page-body {
        padding: 24px 20px 60px;
    }
}

@media (max-width: 768px) {

    #viewMenu,
    #viewCart {
        padding-top: 100px;
    }

    .restaurant-section-header {
        flex-wrap: wrap;
    }

    .rsh-meta {
        margin-left: 0;
        text-align: left;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .restaurant-tabs-bar {
        top: 42px;
    }

    .menu-hero {
        padding: 36px 20px 0;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 14px 14px 11px;
        font-size: 0.8rem;
    }

    .cart-page-header {
        gap: 12px;
    }

    .cart-page-title {
        font-size: 1.1rem;
    }
}

/* ---- Options de paiement ---- */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.payment-opt input[type="radio"] {
    display: none;
}

.payment-opt-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    height: 100%;
}

.payment-opt-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    background: white;
    /* Pour les logos qui ont besoin d'un fond clair s'ils sont transparents, Wave et Orange fonctionnent bien */
    padding: 2px;
}

.payment-opt input[type="radio"]:checked+.payment-opt-content {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--gold);
    color: var(--white);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.2);
}