@keyframes slideIn {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes turboSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.cart-sidebar {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
.cart-sidebar.open  { transform: translateX(0); }
.cart-overlay       { opacity: 0; visibility: hidden; transition: all 0.3s; }
.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-item { animation: slideIn 0.3s ease; }

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #FF4500;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 3000;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

#splash-screen {
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#splash-screen.hidden   { opacity: 0; visibility: hidden; }
#main-content           { opacity: 0; transition: opacity 1s ease 0.5s; }
#main-content.visible   { opacity: 1; }

.turbo-pizza-loader { animation: turboSpin 1s infinite linear; }

.splash-logo {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
    line-height: 1.1;
}
.splash-logo .logo-turbo,
.splash-logo .logo-pizza {
    display: block;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

nav.nav-links a {
    position: relative;
    padding-bottom: 4px;
    border-bottom: none !important;
    transition: color 0.25s ease;
}
nav.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
nav.nav-links a:hover::after,
nav.nav-links a.active::after { width: 100%; }

.modal-overlay { opacity: 0; visibility: hidden; transition: all 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }

.delivery-option.selected { border-color: #FF4500 !important; background: rgba(255,69,0,0.1); }

.modal-size-opt.selected { border-color: #FF4500 !important; background: rgba(255,69,0,0.1); }

.taille-card.selected { border-color: #FF4500 !important; background: rgba(255,69,0,0.06); }
.taille-card.selected .taille-cercle { border-color: #FF4500; color: #FF4500; }

.dropdown-wrap { position: relative; }

.dropdown-menu {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    top: 100%;
}
.dropdown-wrap:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

nav.nav-links .dropdown-menu a::after { display: none; }

.mobile-dropdown { display: none; }

/* Popup boisson/dessert */
#popup-boisson-dessert {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
#popup-boisson-dessert.active { opacity: 1; }
.popup-bd-card {
    background: #161616;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 28px 24px 24px;
    max-width: 360px;
    width: 100%;
    position: relative;
    text-align: center;
}
.popup-bd-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.popup-bd-close:hover { color: white; }
.popup-bd-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f5;
    margin: 0 0 20px;
    line-height: 1.4;
}
.popup-bd-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.popup-bd-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    color: #f5f5f5;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}
.popup-bd-btn:hover { border-color: #FF4500; color: #FF4500; background: rgba(255,69,0,0.06); }
.popup-bd-icon { font-size: 2rem; }

.mobile-submenu-items { display: none; flex-direction: column; }
.mobile-submenu-wrap.open .mobile-submenu-items { display: flex; }
.mobile-submenu-wrap.open .mobile-chevron { transform: rotate(180deg); }

@media (max-width: 767px) {
    .mobile-menu-btn { display: flex !important; }

    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10,10,10,0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 10px 0 20px;
        border-bottom: 1px solid #222;
        z-index: 999;
        overflow-y: auto;
        max-height: calc(100vh - 60px);
    }
    .nav-links.mobile-open { display: flex; }

    .nav-links ul {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100%;
        align-items: stretch !important;
    }
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #1a1a1a;
    }
    .nav-links > ul > li > a,
    .nav-links > ul > li > button {
        display: block;
        padding: 14px 5%;
        font-size: 1rem !important;
        width: 100%;
    }
    .nav-links li.dropdown-wrap > a { padding-right: 5%; }

    .nav-links .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: hidden;
        pointer-events: none;
        background: rgba(255,255,255,0.03);
        border: none !important;
        box-shadow: none !important;
        padding: 0 0 0 5%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, visibility 0.3s;
    }
    .nav-links li.dropdown-wrap.open .dropdown-menu {
        visibility: visible;
        pointer-events: auto;
        max-height: 200px;
    }
    .nav-links .dropdown-menu a {
        padding: 11px 0;
        font-size: 0.9rem !important;
        display: block;
        border-bottom: 1px solid #1a1a1a;
    }
    .nav-links .dropdown-menu li:last-child a { border-bottom: none; }

    #mobile-menu-btn.open #hbg-1 { transform: rotate(45deg) translate(5px, 5px); }
    #mobile-menu-btn.open #hbg-2 { opacity: 0; }
    #mobile-menu-btn.open #hbg-3 { transform: rotate(-45deg) translate(5px, -5px); }

    .mobile-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10,10,10,0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid #222;
        flex-direction: column;
        z-index: 998;
        overflow-y: auto;
        max-height: calc(100vh - 60px);
    }
    .mobile-dropdown.mobile-open { display: flex; }
}
