/* =========================================================
   🍽️ RESTO SHINENOWS - Design Professionnel
   Palette : Noir (#000000), Jaune (#FFD700), Blanc (#FFFFFF)
   ========================================================= */

/* ---------------------- VARIABLES ---------------------- */
:root {
    --primary-black: #000000;
    --primary-yellow: #FFD700;
    --primary-white: #FFFFFF;
    --dark-gray: #1A1A1A;
    --medium-gray: #333333;
    --light-gray: #666666;
    --border-color: #404040;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------- RESET & BASE ---------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--primary-white);
    background: var(--primary-black);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------------- TYPOGRAPHY ---------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-yellow) 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-yellow);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-white);
}

/* ---------------------- BOUTONS ---------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-yellow);
    color: var(--primary-black);
}

.btn-primary:hover {
    background: #FFA500;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-white);
    border: 2px solid var(--primary-yellow);
}

.btn-secondary:hover {
    background: var(--primary-yellow);
    color: var(--primary-black);
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--dark-gray);
    color: var(--primary-white);
    border: 2px solid var(--medium-gray);
}

.btn-dark:hover {
    background: var(--primary-yellow);
    color: var(--primary-black);
    border-color: var(--primary-yellow);
}

/* ---------------------- HEADER ---------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Support Safari */
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-yellow);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '🍽️';
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--primary-white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-yellow);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-yellow);
}

/* ---------------------- BADGE PANIER ---------------------- */
.cart-link {
    position: relative !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-yellow) !important;
    color: var(--primary-black) !important;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.5s ease-in-out;
    border: 2px solid var(--primary-black) !important;
    z-index: 10;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    80% {
        transform: translateY(-2px);
    }
}

/* ---------------------- HERO SECTION ---------------------- */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-gray) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23FFD700" fill-opacity="0.03" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #CCCCCC;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* ---------------------- FEATURES SECTION ---------------------- */
.features {
    padding: 100px 0;
    background: var(--dark-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #CCCCCC;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--medium-gray);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-yellow);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-white);
}

.feature-description {
    color: #CCCCCC;
    line-height: 1.6;
}

/* ---------------------- MENU SECTION ---------------------- */
.menu-section {
    padding: 100px 0;
    background: var(--primary-black);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.category-card {
    background: var(--dark-gray);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-yellow);
}

.category-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--medium-gray); /* Fallback si image manquante */
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.8));
}

.category-info {
    padding: 1.5rem;
    position: relative;
}

.category-name {
    font-size: 1.3rem;
    color: var(--primary-yellow);
    margin-bottom: 0.5rem;
}

.category-description {
    color: #CCCCCC;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.category-link {
    color: var(--primary-yellow);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.category-link:hover {
    gap: 1rem;
}

/* ---------------------- PRODUCTS GRID ---------------------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--dark-gray);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-yellow);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--medium-gray); /* Fallback si image manquante */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    color: var(--primary-white);
    margin-bottom: 0.5rem;
}

.product-description {
    color: #CCCCCC;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-yellow);
}

.add-to-cart-btn {
    background: var(--primary-yellow);
    color: var(--primary-black);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background: #FFA500;
    transform: scale(1.05);
}

/* ---------------------- CART PAGE ---------------------- */
.cart-page {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.cart-items {
    background: var(--dark-gray);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--medium-gray); /* Fallback */
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h3 {
    color: var(--primary-white);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-yellow);
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.quantity-input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--medium-gray);
    color: var(--primary-white);
    text-align: center;
}

.remove-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.remove-btn:hover {
    background: #c82333;
}

.cart-summary {
    background: var(--dark-gray);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-line.total {
    border-bottom: none;
    border-top: 2px solid var(--primary-yellow);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-yellow);
}

.checkout-btn {
    width: 100%;
    justify-content: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    padding: 18px;
}

/* ---------------------- NOTIFICATION AJOUT PANIER ---------------------- */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    z-index: 1000;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideInRight 0.3s ease-out;
    display: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ---------------------- FOOTER ---------------------- */
.footer {
    background: var(--dark-gray);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    color: var(--primary-yellow);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #CCCCCC;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-yellow);
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: #999;
}

/* ---------------------- ANIMATIONS ---------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ---------------------- RESPONSIVE ---------------------- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--primary-black);
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .cart-count {
        top: -5px;
        right: -5px;
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .hero-content {
        padding: 0 15px;
    }

    .product-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .features-grid,
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------- ACCESSIBILITÉ ---------------------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus visible pour l'accessibilité */
.btn:focus-visible,
.nav-link:focus-visible,
.add-to-cart-btn:focus-visible {
    outline: 2px solid var(--primary-yellow);
    outline-offset: 2px;
}

/* ---------------------- UTILITIES ---------------------- */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .btn,
    .add-to-cart-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
