/* ============================================
   🍷 THEME BISTRONOMIE ELEGANT (Base ENOKOKE)
   Direction Artistique : Marie
   Template pour bistronomie haut de gamme
   Style : Clair-obscur dramatique, bordeaux signature
   ============================================ */

/* ============================================
   1. VARIABLES CSS — Palette ENOKOKE
   ============================================ */
:root {
    /* Couleurs principales */
    --bistro-elegant-bordeaux: #8B1538;
    --bistro-elegant-turquoise: #6B8E8E;
    --bistro-elegant-black: #1A1A1A;
    --bistro-elegant-light: #F5F5F5;
    --bistro-elegant-white: #FFFFFF;
    
    /* Couleurs secondaires */
    --bistro-elegant-grey-dark: #4A4A4A;
    --bistro-elegant-mint: #4CAF50;
    --bistro-elegant-fuchsia: #E91E63;
    --bistro-elegant-gold: #D4AF37;
    
    /* Couleurs texte - RAFFINÉES pour élégance */
    --bistro-elegant-text-primary: #2C2C2C;        /* Noir doux au lieu de #1A1A1A */
    --bistro-elegant-text-inverse: #FFFFFF;
    --bistro-elegant-text-secondary: #6B6B6B;      /* Gris chaud au lieu de #4A4A4A */
    --bistro-elegant-text-secondary-inverse: rgba(255,255,255,0.80);  /* Légèrement plus doux */
    --bistro-elegant-text-price: #B8860B;          /* Or élégant alternative au bordeaux */
    
    /* Accents interaction */
    --bistro-elegant-bordeaux-hover: #A91B4D;
    --bistro-elegant-turquoise-hover: #557E7E;
    
    /* Typographie */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', 'Helvetica Neue', sans-serif;
    --font-body: 'Open Sans', 'Segoe UI', sans-serif;
    --font-script: 'Pacifico', cursive;
    
    /* Espacements - OPTIMISÉS pour densité */
    --spacing-xs: 6px;
    --spacing-sm: 10px;
    --spacing-md: 14px;
    --spacing-lg: 18px;
    --spacing-xl: 24px;
    --spacing-xxl: 36px;
    
    /* Bordures */
    --radius-card: 8px;
    --border-width: 2px;
    
    /* Ombres */
    --shadow-light: 0 2px 8px rgba(26, 26, 26, 0.1);
    --shadow-medium: 0 4px 16px rgba(26, 26, 26, 0.15);
    --shadow-strong: 0 6px 24px rgba(139, 21, 56, 0.2);
}

/* ============================================
   2. BASE — Body & Container
   ============================================ */
.theme-bistronomie-elegant {
    background: linear-gradient(135deg, #1A1A1A 0%, #2A2A2A 100%);
    color: var(--bistro-elegant-text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

.theme-bistronomie-elegant #main-container {
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .theme-bistronomie-elegant #main-container {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
}

/* ============================================
   3. SECTIONS — Titres & Intros
   ============================================ */
.theme-bistronomie-elegant .section-area {
    margin-bottom: var(--spacing-xxl);
    background: var(--bistro-elegant-black);
    padding: var(--spacing-xl) var(--spacing-md);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-medium);
}

.theme-bistronomie-elegant .section-area:nth-child(even) {
    background: var(--bistro-elegant-white);
}

/* Le wrapper div autour du h3 empêche le sticky de fonctionner */
.theme-bistronomie-elegant .section-area > div:has(.section-label) {
    display: contents;
}

.theme-bistronomie-elegant .section-label {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--bistro-elegant-text-inverse);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 var(--spacing-lg) 0;
    padding-bottom: var(--spacing-md);
    border-bottom: var(--border-width) solid var(--bistro-elegant-bordeaux);
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--tabs-header-height, 70px) + 8px);
    background: var(--bistro-elegant-black);
    z-index: 90;
    padding-top: var(--spacing-md);
}

.theme-bistronomie-elegant .section-area:nth-child(even) .section-label {
    color: var(--bistro-elegant-bordeaux);
    background: var(--bistro-elegant-white);
    border-bottom-color: var(--bistro-elegant-turquoise);
}

@media (min-width: 768px) {
    .theme-bistronomie-elegant .section-label {
        font-size: 42px;
    }
}

.theme-bistronomie-elegant .intro-text,
.theme-bistronomie-elegant .outro-text {
    font-size: 14px;
    font-style: italic;
    color: var(--bistro-elegant-text-secondary-inverse);
    margin-bottom: var(--spacing-md);
}

.theme-bistronomie-elegant .section-area:nth-child(even) .intro-text,
.theme-bistronomie-elegant .section-area:nth-child(even) .outro-text {
    color: var(--bistro-elegant-text-secondary);
}

/* ============================================
   4. GRID PLATS — Mobile-first 1→2 colonnes (DENSITÉ OPTIMISÉE)
   ============================================ */
.theme-bistronomie-elegant .section-dishes {
    display: grid;
    gap: var(--spacing-md);                        /* Réduit de lg (18px) → md (14px) */
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .theme-bistronomie-elegant .section-dishes {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);                    /* Réduit de xl (24px) → lg (18px) */
    }
}

/* Table → Plats avec espacement réduit pour densité */
.theme-bistronomie-elegant .dishes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.theme-bistronomie-elegant .dishes-table tbody {
    display: block;
}

.theme-bistronomie-elegant .dishes-table tr {
    display: block;
    padding: var(--spacing-sm) 0;                  /* Réduit pour densité */
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.theme-bistronomie-elegant .section-area:nth-child(even) .dishes-table tr {
    border-bottom-color: rgba(0,0,0,0.08);
}

.theme-bistronomie-elegant .dishes-table tr:last-child {
    border-bottom: none;
}

.theme-bistronomie-elegant .dishes-table td {
    display: block;
    padding: 0;
}

/* Espacement vertical entre nom et description */
.theme-bistronomie-elegant .dish-label {
    margin-bottom: var(--spacing-xs);              /* 6px au lieu de plus */
}

.theme-bistronomie-elegant .dish-description {
    margin-top: var(--spacing-xs);
}

/* ============================================
   5. CARD PLAT — Design Marie (ENOKOKE)
   ============================================ */
.theme-bistronomie-elegant .dish-card-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-width) solid var(--bistro-elegant-turquoise);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.theme-bistronomie-elegant .section-area:nth-child(even) .dish-card-wrapper {
    background: var(--bistro-elegant-white);
    border-color: var(--bistro-elegant-turquoise);
}

.theme-bistronomie-elegant .dish-card-wrapper:hover {
    transform: translateY(-4px);
    border-color: var(--bistro-elegant-bordeaux);
    box-shadow: var(--shadow-strong);
}

/* Image plat */
.theme-bistronomie-elegant .dish-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bistro-elegant-black);
}

.theme-bistronomie-elegant .dish-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.theme-bistronomie-elegant .dish-card-wrapper:hover .dish-image {
    opacity: 0.95;
}

/* Contenu plat */
.theme-bistronomie-elegant .dish-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
}

/* Nom du plat - Sans wrapper flex, juste le titre */
.theme-bistronomie-elegant .dish-name {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 600;
    color: var(--bistro-elegant-text-inverse);
    margin: 0 0 var(--spacing-xs) 0;
}

.theme-bistronomie-elegant .section-area:nth-child(even) .dish-name {
    color: var(--bistro-elegant-text-primary);
}

@media (min-width: 768px) {
    .theme-bistronomie-elegant .dish-name {
        font-size: 18px;
    }
}

/* Description - OPTIMISÉE pour densité */
.theme-bistronomie-elegant .dish-description {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bistro-elegant-text-secondary-inverse);
    margin: 0 0 var(--spacing-sm) 0;
    flex: 1;
}

.theme-bistronomie-elegant .section-area:nth-child(even) .dish-description {
    color: var(--bistro-elegant-text-secondary);
}

@media (min-width: 768px) {
    .theme-bistronomie-elegant .dish-description {
        font-size: 14px;
    }
}

/* Prix + Wishlist - Pattern Italian Premium (en bas, séparé) */
.theme-bistronomie-elegant .dish-price {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 600;
    color: var(--bistro-elegant-bordeaux);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255,255,255,0.15);
}

.theme-bistronomie-elegant .section-area:nth-child(even) .dish-price {
    border-top-color: rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .theme-bistronomie-elegant .dish-price {
        font-size: 18px;
    }
}

/* ============================================
   WISHLIST - Bouton cœur élégant (dans zone prix)
   ============================================ */
.theme-bistronomie-elegant .btn-wishlist {
    background: transparent;
    border: 2px solid var(--bistro-elegant-bordeaux);
    color: var(--bistro-elegant-bordeaux);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    opacity: 1;
}

.theme-bistronomie-elegant .section-area:nth-child(even) .btn-wishlist {
    border-color: var(--bistro-elegant-bordeaux);
    color: var(--bistro-elegant-bordeaux);
}

.theme-bistronomie-elegant .btn-wishlist:hover {
    background: var(--bistro-elegant-bordeaux);
    color: white;
    transform: scale(1.1);
}

.theme-bistronomie-elegant .btn-wishlist.active {
    background: var(--bistro-elegant-bordeaux);
    color: white;
    border-color: var(--bistro-elegant-bordeaux);
}

.theme-bistronomie-elegant .btn-wishlist.active .wishlist-heart {
    animation: heartbeat 0.4s ease;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.25); }
    60% { transform: scale(0.95); }
}

/* Provenance italique */
.theme-bistronomie-elegant .dish-description em {
    font-style: italic;
    color: var(--bistro-elegant-mint);
}

.theme-bistronomie-elegant .section-area:nth-child(even) .dish-description em {
    color: var(--bistro-elegant-mint);
}

/* ============================================
   6. NAVBAR TOP — Header fixe
   ============================================ */
.navbar-bistronomie-elegant {
    background: linear-gradient(135deg, var(--bistro-elegant-black) 0%, #2A2A2A 100%);
    border-bottom: var(--border-width) solid var(--bistro-elegant-bordeaux);
    padding: 0.6rem 0;
    box-shadow: var(--shadow-medium);
}

.navbar-bistronomie-elegant .navbar-brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--bistro-elegant-bordeaux) !important;
    text-shadow: 2px 2px 4px rgba(139, 21, 56, 0.3);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.navbar-bistronomie-elegant .navbar-brand img {
    filter: drop-shadow(0 0 8px var(--bistro-elegant-bordeaux));
}

/* ============================================
   7. BOTTOM NAVIGATION — Tabs menu
   ============================================ */
.navbar-bistronomie-elegant-bottom {
    background: linear-gradient(135deg, var(--bistro-elegant-black) 0%, #2A2A2A 100%);
    border-top: var(--border-width) solid var(--bistro-elegant-turquoise);
    box-shadow: 0 -4px 12px rgba(107, 142, 142, 0.2);
    padding: 0.4rem 0;
    z-index: 1040;
}

.navbar-bistronomie-elegant-bottom .navbar-brand {
    color: var(--bistro-elegant-bordeaux) !important;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    margin-right: 0.5rem;
}

.navbar-bistronomie-elegant-bottom .navbar-nav {
    align-items: center;
    justify-content: center;
    flex-direction: row !important;
    flex-wrap: wrap;
}

.navbar-bistronomie-elegant-bottom .nav-item {
    margin: 0 0.2rem;
    display: inline-flex;
}

.bistronomie-elegant-nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem !important;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 0.2rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.navbar-bistronomie-elegant-bottom .nav-link,
.navbar-bistronomie-elegant-bottom .nav-link * {
    color: rgba(255, 255, 255, 0.85) !important;
}

.bistronomie-elegant-nav-link:hover {
    background: rgba(139, 21, 56, 0.2);
    color: var(--bistro-elegant-bordeaux) !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(139, 21, 56, 0.3);
}

.bistronomie-elegant-nav-link.active {
    background: rgba(139, 21, 56, 0.3);
    color: var(--bistro-elegant-bordeaux) !important;
    border-bottom: 2px solid var(--bistro-elegant-bordeaux);
    box-shadow: 0 2px 8px rgba(139, 21, 56, 0.4);
}

.badge-bistronomie-elegant {
    background: var(--bistro-elegant-bordeaux);
    color: var(--bistro-elegant-white);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.3rem;
}

/* ============================================
   8. BADGES & LABELS
   ============================================ */
.theme-bistronomie-elegant .badge-allergen {
    background: var(--bistro-elegant-fuchsia);
    color: var(--bistro-elegant-white);
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    margin-right: 0.3rem;
}

.theme-bistronomie-elegant .badge-vegan {
    background: var(--bistro-elegant-mint);
    color: var(--bistro-elegant-white);
}

.theme-bistronomie-elegant .badge-spicy {
    background: var(--bistro-elegant-bordeaux);
    color: var(--bistro-elegant-white);
}

/* ============================================
   9. RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 767px) {
    .theme-bistronomie-elegant #main-container {
        padding: var(--spacing-md) var(--spacing-xs);
    }
    
    .theme-bistronomie-elegant .section-area {
        padding: var(--spacing-lg) var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }
    
    .theme-bistronomie-elegant .section-label {
        font-size: 28px;
        top: calc(var(--tabs-header-height, 60px) + 8px);
    }
    
    .theme-bistronomie-elegant .dish-name {
        font-size: 16px;
    }
    
    .theme-bistronomie-elegant .dish-price {
        font-size: 16px;
    }
    
    .theme-bistronomie-elegant .dish-description {
        font-size: 14px;
    }
}

/* ============================================
   10. ACCESSIBILITÉ & PERFORMANCE
   ============================================ */

/* Focus states WCAG */
.theme-bistronomie-elegant .dish-card-wrapper:focus,
.theme-bistronomie-elegant .bistronomie-elegant-nav-link:focus {
    outline: 2px solid var(--bistro-elegant-bordeaux);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .theme-bistronomie-elegant * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode (si préférence système) */
@media (prefers-color-scheme: dark) {
    :root {
        --bistro-elegant-light: #1A1A1A;
        --bistro-elegant-text-primary: #FFFFFF;
    }
}
