/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
    --emerald: #062c21;
    --gold: #c5a059;
    --cream: #fdfbf7;
    --white: #ffffff;
    --dark: #03140f;
    --gray: #777;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --navbar-h: 80px;
    --announce-h: 36px;
    --header-total: 116px;
}

/* RESET & BASE */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
body { font-family: 'Montserrat', sans-serif; background: var(--cream); color: var(--emerald); overflow-x: hidden; max-width: 100%; line-height: 1.6; }
img { display: block; max-width: 100%; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* LOADER */
#loader {
    position: fixed; inset: 0; background: var(--emerald); z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    flex-direction: column; transition: opacity 0.8s ease;
}
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.loader-brand-logo {
    width: clamp(100px, 20vw, 150px);
    height: clamp(100px, 20vw, 150px);
    object-fit: contain;
    display: block;
    border-radius: 20px;
    background: var(--emerald);
    padding: 8px;
    box-shadow: 0 0 0 2px rgba(197,160,89,0.35), 0 10px 40px rgba(3,20,15,0.85);
    animation: logoPulse 2s ease-in-out infinite;
}
@keyframes logoPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px rgba(197,160,89,0.35), 0 10px 40px rgba(3,20,15,0.85); }
    50%       { transform: scale(1.05); box-shadow: 0 0 0 3px rgba(197,160,89,0.75), 0 14px 50px rgba(3,20,15,0.9), 0 0 28px rgba(197,160,89,0.25); }
}
.loader-logo { color: var(--gold); font-family: 'Cormorant Garamond', serif; font-size: clamp(1.6rem, 5vw, 2.5rem); letter-spacing: 12px; }
.loader-sub { color: rgba(197,160,89,0.5); font-size: 0.6rem; letter-spacing: 5px; font-weight: 600; margin-top: -10px; }
.progress-container { width: clamp(160px, 40vw, 220px); height: 1px; background: rgba(197,160,89,0.2); }
.progress-bar { width: 0; height: 100%; background: var(--gold); }

/* NAVIGATION */
.main-header { position: fixed; top: 0; width: 100%; max-width: 100%; z-index: 1000; overflow: hidden; }
.top-announcement {
    background: var(--dark); color: var(--gold); font-size: 0.6rem; text-align: center;
    padding: 8px 16px; letter-spacing: 3px; font-weight: 600;
    height: var(--announce-h); display: flex; align-items: center; justify-content: center;
}
.navbar {
    background: rgba(255,255,255,0.97); backdrop-filter: blur(15px);
    height: var(--navbar-h); display: flex; justify-content: space-between; align-items: center;
    padding: 0 4%; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.logo { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: 5px; font-weight: 600; white-space: nowrap; }
.nav-left, .nav-right { display: flex; gap: clamp(16px, 2.5vw, 30px); align-items: center; flex: 1; }
.nav-right { justify-content: flex-end; }
.nav-left a, .nav-right a { color: var(--emerald); font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; transition: var(--transition); white-space: nowrap; }
.nav-left a:hover, .nav-right a:hover { color: var(--gold); }

/* Hamburger */
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--emerald); transition: var(--transition); border-radius: 2px; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-mobile-drawer {
    position: fixed; top: var(--header-total); left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(15px);
    padding: 0 6%; flex-direction: column;
    border-bottom: 1px solid rgba(0,0,0,0.06); z-index: 999;
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    display: flex;
}
.nav-mobile-drawer.open { max-height: 400px; padding: 24px 6%; }
.nav-mobile-drawer a, .nav-mobile-drawer .fav-trigger {
    font-size: 0.82rem; font-weight: 600; letter-spacing: 2px;
    color: var(--emerald); padding: 12px 0;
    border-bottom: 1px solid rgba(6,44,33,0.08);
    display: flex; align-items: center; gap: 8px;
}
.nav-mobile-drawer .fav-trigger { border: none; padding: 12px 0; background: none; }

/* Favorites trigger */
.fav-trigger {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.72rem; font-weight: 600; cursor: pointer;
    border: 1px solid var(--gold); padding: 6px 14px;
    transition: var(--transition); color: var(--emerald); white-space: nowrap;
}
.fav-trigger:hover { background: var(--gold); color: white; }
.fav-trigger svg { width: 13px; height: 13px; flex-shrink: 0; }
#fav-count, #fav-count-mobile { color: var(--gold); font-weight: 700; transition: transform 0.2s; }
.fav-trigger:hover #fav-count, .fav-trigger:hover #fav-count-mobile { color: white; }

/* HERO */
.hero-section {
    height: 100svh; position: relative;
    display: flex; justify-content: center; align-items: center;
    text-align: center; color: white; overflow: hidden;
    padding-top: var(--header-total);
}
.hero-bg-wrapper { position: absolute; inset: 0; z-index: 0; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); animation: pan 20s infinite alternate; will-change: transform; }
@keyframes pan { from { transform: scale(1.1); } to { transform: scale(1.18) translateY(-15px); } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(3,20,15,0.25), rgba(3,20,15,0.72)); }
.hero-body { position: relative; z-index: 1; padding: 0 16px; }
.hero-frame {
    position: relative;
    border: 1px solid rgba(197,160,89,0.45);
    padding: clamp(28px,5vw,55px) clamp(22px,7vw,80px);
    overflow: hidden;
}

/* Image cuisine en fond du cadre — désaturée, sombre, fondue */
.hero-frame::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url('hero-kitchen.png');
    background-size: cover;
    background-position: center 30%;
    filter: grayscale(70%) brightness(0.22) sepia(30%);
    z-index: 0;
}

/* Voile émeraude semi-transparent par-dessus l'image */
.hero-frame::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(3, 20, 15, 0.62);
    z-index: 1;
}

/* Tout le texte du cadre passe au premier plan */
.hero-frame > * { position: relative; z-index: 2; }
.hero-pretitle { display: block; letter-spacing: 8px; font-size: clamp(0.6rem,1.5vw,0.8rem); margin-bottom: 16px; color: var(--gold); }
.hero-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem,7vw,5rem); font-style: italic; font-weight: 300; }
.hero-divider { width: 70px; height: 1px; background: var(--gold); margin: 22px auto; }
.hero-subtitle { letter-spacing: 4px; font-size: clamp(0.65rem,1.5vw,0.9rem); opacity: 0.9; }
.scroll-btn { margin-top: 36px; display: inline-block; padding: 14px 36px; border: 1px solid white; color: white; font-size: 0.68rem; letter-spacing: 2px; transition: var(--transition); }
.scroll-btn:hover { background: white; color: var(--emerald); }

/* CONCEPT */
.concept-section { padding: clamp(70px,12vw,130px) clamp(20px,6%,80px); text-align: center; background: white; }
.section-tag { color: var(--gold); letter-spacing: 5px; font-size: 0.72rem; font-weight: 600; display: block; margin-bottom: 18px; }
.concept-section h3 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem,5vw,3.2rem); font-weight: 400; margin-bottom: 24px; }
.concept-section p { max-width: 720px; margin: 0 auto 44px; color: var(--gray); font-size: clamp(0.9rem,1.8vw,1.05rem); line-height: 2; }
.concept-stats { display: flex; justify-content: center; gap: clamp(30px,8vw,80px); flex-wrap: wrap; }
.stat strong { display: block; font-family: 'Cormorant Garamond', serif; font-size: clamp(1.8rem,4vw,2.5rem); color: var(--gold); }
.stat span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; }

/* MENU SHOWCASE */
.menu-showcase { padding: 30px 0; }
.dish-item {
    display: flex; align-items: center;
    min-height: 78vh;
    padding: clamp(40px,6vw,70px) clamp(20px,6%,7%);
    gap: clamp(30px,5vw,70px);
}
.dish-item.reversed { flex-direction: row-reverse; background: #f6f8f7; }

.dish-visual-box {
    flex: 1.2;
    height: clamp(300px,46vh,540px);
    position: relative; border-radius: 4px; overflow: hidden;
    box-shadow: 0 28px 70px rgba(0,0,0,0.09); background: #eee; flex-shrink: 0;
}
.media-container { width: 100%; height: 100%; position: relative; }
.media-layer {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 0.5s ease;
    pointer-events: none; border: none;
}
.media-layer.active { opacity: 1; pointer-events: auto; }
.placeholder-frame { display: flex; justify-content: center; align-items: center; background: #ddd; font-family: 'Cormorant Garamond', serif; font-style: italic; color: #999; font-size: 0.9rem; text-align: center; padding: 20px; }

/* Heart */
.btn-heart {
    position: absolute; top: 16px; right: 16px;
    width: 44px; height: 44px; background: rgba(255,255,255,0.96);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-heart:hover { transform: scale(1.15); }
.btn-heart svg { width: 20px; height: 20px; transition: all 0.3s ease; }
.btn-heart .heart-icon { fill: none; stroke: #bbb; stroke-width: 2; }
.btn-heart.active .heart-icon { fill: #e53e3e; stroke: #e53e3e; }
.btn-heart.animate { animation: heartBeat 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes heartBeat { 0%{transform:scale(1)} 50%{transform:scale(1.35)} 100%{transform:scale(1)} }

/* Bouton 3D */
.btn-3d-toggle {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    background: var(--emerald); color: white; border: none;
    padding: clamp(10px,2vw,15px) clamp(18px,3.5vw,30px);
    border-radius: 50px; font-size: clamp(0.6rem,1.1vw,0.72rem);
    font-weight: 600; letter-spacing: 1.5px; cursor: pointer; transition: 0.3s;
    z-index: 10; box-shadow: 0 8px 24px rgba(0,0,0,0.18); white-space: nowrap;
}
.btn-3d-toggle:hover { transform: translateX(-50%) translateY(-4px); }
.btn-3d-toggle.gold-mode { background: var(--gold); }

/* Détails plat */
.dish-details { flex: 1; padding: 0 clamp(8px,2.5vw,28px); min-width: 0; }
.dish-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.dish-index { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.5rem,5.5vw,4.5rem); color: var(--gold); opacity: 0.2; line-height: 1; flex-shrink: 0; }
.dish-category { letter-spacing: 4px; font-size: 0.7rem; font-weight: 600; color: var(--gold); }
.dish-details h3 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.7rem,3.5vw,2.8rem); margin-bottom: 18px; font-weight: 400; line-height: 1.1; }
.dish-desc { font-size: clamp(0.85rem,1.4vw,0.98rem); color: var(--gray); line-height: 1.85; margin-bottom: 24px; font-weight: 300; }
.dish-features { list-style: none; margin-bottom: 28px; display: flex; gap: 10px; flex-wrap: wrap; }
.dish-features li { font-size: 0.62rem; padding: 4px 12px; border: 1px solid rgba(6,44,33,0.12); border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; }
.dish-footer { display: flex; align-items: center; }
.btn-buy { background: var(--emerald); color: white; border: none; padding: clamp(11px,2vw,15px) clamp(20px,3.5vw,36px); font-size: clamp(0.68rem,1.1vw,0.78rem); font-weight: 600; transition: 0.3s; letter-spacing: 1.5px; border-radius: 2px; }
.btn-buy:hover { background: var(--gold); transform: translateY(-3px); }
.btn-buy.is-fav { background: #c0392b; }

/* FAVORIS PANEL */
.fav-panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.48); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.fav-panel-overlay.open { opacity: 1; pointer-events: all; }
.fav-panel { position: fixed; top: 0; right: -110%; width: min(440px,100vw); height: 100vh; height: 100dvh; background: var(--cream); z-index: 2001; transition: right 0.45s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; box-shadow: -16px 0 50px rgba(0,0,0,0.12); }
.fav-panel.open { right: 0; }
.fav-panel-header { background: var(--emerald); color: white; padding: 26px 22px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.fav-panel-header h3 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.3rem,4vw,1.7rem); font-weight: 400; letter-spacing: 3px; }
.fav-panel-header span { color: var(--gold); font-size: 0.68rem; letter-spacing: 2px; display: block; margin-top: 4px; }
.btn-close-panel { background: none; border: 1px solid rgba(255,255,255,0.3); color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; transition: 0.3s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-close-panel:hover { background: rgba(255,255,255,0.12); }
.fav-panel-body { flex: 1; overflow-y: auto; padding: 22px; }
.fav-empty { text-align: center; padding: 50px 20px; color: var(--gray); }
.fav-empty svg { width: 52px; height: 52px; margin: 0 auto 16px; opacity: 0.25; }
.fav-empty p { font-size: 0.88rem; line-height: 1.9; }
.fav-item { display: flex; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid rgba(6,44,33,0.07); animation: slideIn 0.3s ease; }
@keyframes slideIn { from{opacity:0;transform:translateX(16px)} to{opacity:1;transform:translateX(0)} }
.fav-item img { width: 62px; height: 62px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.fav-item-info { flex: 1; min-width: 0; }
.fav-item-info .cat { font-size: 0.6rem; letter-spacing: 3px; color: var(--gold); font-weight: 600; }
.fav-item-info .name { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }
.fav-item-info .desc { font-size: 0.7rem; color: var(--gray); margin-top: 2px; line-height: 1.5; }
.btn-remove-fav { background: none; border: none; cursor: pointer; color: #e53e3e; font-size: 1.1rem; padding: 6px; opacity: 0.55; transition: 0.2s; flex-shrink: 0; }
.btn-remove-fav:hover { opacity: 1; transform: scale(1.2); }

/* CONTACT & FOOTER */
.info-section { background: var(--emerald); color: white; padding: clamp(60px,10vw,110px) clamp(20px,7%,8%); }
.grid-container { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(40px,6vw,80px); align-items: center; }
.info-block h4 { color: var(--gold); letter-spacing: 3px; font-size: 0.92rem; margin-bottom: 18px; }
.info-block p { opacity: 0.78; font-weight: 300; margin-bottom: 8px; font-size: 0.92rem; }
.center { text-align: center; }
.text-right { text-align: right; }
.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem,5vw,3rem); color: var(--gold); margin-bottom: 14px; letter-spacing: 10px; }
.newsletter-form { margin-top: 22px; display: flex; max-width: 340px; margin-left: auto; margin-right: auto; }
.newsletter-form input { background: transparent; border: 1px solid rgba(255,255,255,0.2); padding: 11px 14px; color: white; flex: 1; outline: none; font-family: inherit; font-size: 0.83rem; }
.newsletter-form button { background: var(--gold); border: none; padding: 0 16px; color: white; font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; transition: 0.3s; }
.newsletter-form button:hover { opacity: 0.85; }
.bottom-bar { background: var(--dark); padding: 30px 20px; text-align: center; color: rgba(255,255,255,0.28); font-size: 0.58rem; letter-spacing: 2px; }

/* ── RESPONSIVE ── */

/* Tablette large */
@media (max-width: 1100px) {
    .dish-item { gap: clamp(24px,4vw,50px); }
    .dish-visual-box { height: clamp(280px,42vh,460px); }
}

/* Tablette portrait */
@media (max-width: 900px) {
    :root { --navbar-h: 68px; --announce-h: 30px; --header-total: 98px; }
    .nav-left, .nav-right { display: none; }
    .nav-burger { display: flex; }

    .dish-item, .dish-item.reversed {
        flex-direction: column; text-align: center;
        padding: clamp(50px,7vw,70px) 5%; min-height: auto; gap: 28px;
    }
    .dish-visual-box { width: 100%; height: clamp(260px,55vw,420px); flex: none; }
    .dish-details { padding: 0; }
    .dish-header { justify-content: center; }
    .dish-features { justify-content: center; }
    .dish-footer { justify-content: center; }

    .grid-container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .text-right { text-align: center; }
}

/* Mobile */
@media (max-width: 600px) {
    :root { --navbar-h: 60px; --announce-h: 0px; --header-total: 60px; }
    .top-announcement { display: none; }
    .logo { font-size: 1.25rem; letter-spacing: 3px; }
    .hero-frame { padding: 22px 16px; }
    .hero-subtitle { letter-spacing: 2px; }
    .scroll-btn { padding: 12px 26px; }
    .dish-visual-box { height: clamp(220px,62vw,320px); }
    .btn-3d-toggle { font-size: 0.58rem; padding: 9px 18px; bottom: 12px; }
    .fav-panel { width: 100%; }
    .info-section { padding: 50px 5%; }
    .concept-section { padding: 55px 5%; }
}

/* Très grand écran — anti-trop-gros */
@media (min-width: 1600px) {
    .dish-item { max-width: 1440px; margin: 0 auto; padding-left: 80px; padding-right: 80px; }
    .dish-visual-box { height: 500px; }
    .menu-showcase > section.dish-item { max-width: 100%; }
    .dish-details h3 { font-size: 2.6rem; }
    .dish-desc { font-size: 0.96rem; }
}
