/* ═══════════════════════════════════════════════════════════
   MenuBellaApp — Menu Client CSS
   Design premium : Bleu marine + Doré + Étoile de mer
   Mobile-first, responsive 320px → 1200px
   ═══════════════════════════════════════════════════════════ */

/* ─── Variables & Design Tokens ─────────────────────── */
:root {
    --navy: #1B2A4A;
    --navy-deep: #0F1B33;
    --navy-light: #2A3D62;
    --gold: #C9A96E;
    --gold-light: #E2CC9A;
    --gold-dim: #A8894D;
    --cream: #FAF6F0;
    --cream-dark: #EDE5D8;
    --white: #FFFFFF;
    --text-dark: #1A1A2E;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --unavailable: #D1D5DB;
    --shadow-sm: 0 2px 8px rgba(27, 42, 74, 0.08);
    --shadow-md: 0 4px 20px rgba(27, 42, 74, 0.12);
    --shadow-lg: 0 8px 40px rgba(27, 42, 74, 0.18);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ─── Background Decoration (étoile de mer subtile) ── */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: url('/static/images/fond_etoile.jpg') center center / cover no-repeat;
    opacity: 0.15; /* Semi-transparent pour garder le menu très lisible et chic */
}

/* ─── Container ─────────────────────────────────────── */
.menu-container {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Header ────────────────────────────────────────── */
.menu-header {
    background: var(--white);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.menu-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.menu-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.welcome-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 600;
    color: var(--navy-light);
    margin-bottom: 0.8rem;
    letter-spacing: 2px;
    animation: fadeInDown 0.8s ease-out;
}

.logo-wrapper {
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out 0.1s both;
}

.logo {
    width: auto;
    max-width: 90%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(201, 169, 110, 0.4));
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 20px rgba(201, 169, 110, 0.6));
}

.restaurant-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy-deep);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.slogan {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 1px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.type-repas-badge {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.5rem 1.5rem;
    background: rgba(27, 42, 74, 0.05);
    border: 1px solid var(--navy-light);
    border-radius: 50px;
    color: var(--navy);
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    backdrop-filter: blur(10px);
}

/* ─── Menu Content ──────────────────────────────────── */
.menu-content {
    flex: 1;
    padding: 1.5rem 1rem;
}

/* ─── Sections ──────────────────────────────────────── */
.menu-section {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out both;
}

.menu-section:nth-child(1) { animation-delay: 0.1s; }
.menu-section:nth-child(2) { animation-delay: 0.25s; }
.menu-section:nth-child(3) { animation-delay: 0.4s; }
.menu-section:nth-child(4) { animation-delay: 0.55s; }

.section-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0.6rem auto 0;
}

/* ─── Menu Items ────────────────────────────────────── */
.items-list {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(201, 169, 110, 0.12);
}

.menu-item {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(27, 42, 74, 0.06);
    transition: var(--transition);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: rgba(201, 169, 110, 0.03);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--radius-sm);
}

.menu-item.unavailable {
    opacity: 0.45;
}

.menu-item.unavailable .item-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.menu-item.unavailable .item-price {
    text-decoration: line-through;
    color: var(--text-muted);
}

.item-main {
    width: 100%;
}

.item-name-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.item-name {
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    flex-shrink: 0;
    max-width: 70%;
}

.item-dots {
    flex: 1;
    border-bottom: 1px dotted var(--text-light);
    min-width: 20px;
    margin-bottom: 4px;
}

.item-price {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    flex-shrink: 0;
    white-space: nowrap;
}

.item-description {
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.item-badges {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-vegan {
    background: rgba(34, 139, 34, 0.1);
    color: #228B22;
    border: 1px solid rgba(34, 139, 34, 0.3);
}

.badge-sg {
    background: rgba(218, 165, 32, 0.1);
    color: #B8860B;
    border: 1px solid rgba(218, 165, 32, 0.3);
}

.badge-unavailable {
    background: rgba(220, 38, 38, 0.08);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
    font-size: 0.55rem;
}

/* ─── Chef Message ──────────────────────────────────── */
.chef-message {
    text-align: center;
    padding: 1.5rem;
    margin: 0 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(27, 42, 74, 0.04), rgba(201, 169, 110, 0.06));
    border-radius: var(--radius-md);
    border: 1px solid rgba(201, 169, 110, 0.15);
}

.chef-message p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--navy-light);
    line-height: 1.6;
}

/* ─── Closed State ──────────────────────────────────── */
.menu-closed {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.closed-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.menu-closed h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 0.8rem;
}

.menu-closed p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.next-menu-info {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gold);
}

.next-menu-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.next-menu-info strong {
    color: var(--navy);
    font-size: 1rem;
}

.next-menu-info span {
    display: block;
    color: var(--gold-dim);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* ─── Footer ────────────────────────────────────────── */
.menu-footer {
    background: var(--navy-deep);
    padding: 1.2rem 1.5rem;
    text-align: center;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-separator {
    color: var(--gold-dim);
    font-size: 0.6rem;
}

.footer-tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* ─── Refresh Indicator ─────────────────────────────── */
.refresh-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: rgba(27, 42, 74, 0.9);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.refresh-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

.refresh-dot {
    width: 6px;
    height: 6px;
    background: #4ADE80;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ─── Animations ────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 380px) {
    .restaurant-name {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .section-title {
        font-size: 1.1rem;
        letter-spacing: 3px;
    }

    .item-name {
        font-size: 0.85rem;
        max-width: 65%;
    }

    .item-price {
        font-size: 0.9rem;
    }

    .logo {
        width: auto;
        height: auto;
        max-height: 80px;
    }
}

@media (min-width: 600px) {
    .menu-header {
        padding: 3rem 2rem 2.5rem;
    }

    .restaurant-name {
        font-size: 2.5rem;
    }

    .menu-content {
        padding: 2rem 1.5rem;
    }

    .items-list {
        padding: 1rem 1.8rem;
    }

    .item-name {
        font-size: 1rem;
    }

    .logo {
        width: auto;
        height: auto;
        max-width: 450px;
        max-height: 160px;
    }
}

@media (min-width: 900px) {
    .menu-container {
        margin-top: 2rem;
        margin-bottom: 2rem;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-lg);
        min-height: calc(100vh - 4rem);
    }

    .restaurant-name {
        font-size: 2.8rem;
    }
}

/* ─── Print Styles ──────────────────────────────────── */
@media print {
    .bg-decoration,
    .refresh-indicator {
        display: none;
    }

    body {
        background: white;
    }

    .menu-container {
        box-shadow: none;
    }
}
