/* ==============================================
   VARIABLES & RESET
   ============================================== */
:root {
    --color-primary: #2c3e50;
    --color-secondary: #a9141a;
    --color-accent: #f39c12;
    --color-text: #333;
    --color-bg: #fff;
    --color-bg-alt: #f8f9fa;
    --font-title: 'Playfair Display', serif;
    --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

/* ==============================================
   UTILITAIRES
   ============================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn-primary,
.btn-nav,
.btn-instagram {
    display: inline-block;
    padding: 12px 30px;
    background: var(--color-secondary);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-secondary);
}

.btn-primary:hover,
.btn-nav:hover,
.btn-instagram:hover {
    background: white;
    color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-large {
    padding: 18px 45px;
    font-size: 16px;
}

/* ==============================================
   HEADER
   ============================================== */
.header {
    background: #d9d1c1;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header.sticky {
    padding: 0;
    height: 70px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header.sticky .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header.sticky .logo {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.header.sticky .logo img {
    max-height: 30px;
    margin-top: -1px;
}

.header.sticky .logo h1 {
    font-size: 20px;
    margin-top: 8px;
    margin-left: -10px;
}

.header.sticky .nav {
    gap: 10px;
}

.header.sticky .btn-nav {
    padding: 6px 12px;
    font-size: 12px;
}

.header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.logo img {
    max-height: 120px;
    width: auto;
    transition: all 0.3s ease;
}

.logo h1 {
    font-family: 'Anton', sans-serif;
    font-size: 38px;
    color: #a9141a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.header-info {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.header.sticky .header-info {
    display: none;
}

.nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.btn-nav {
    padding: 10px 20px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-nav:hover {
    background: var(--color-primary);
    color: white;
}

/* Menu toggle (hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #a9141a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ==============================================
   SLIDER
   ============================================== */
.slider-section {
    width: 100%;
    overflow: hidden;
}

.swiper {
    width: 100%;
    max-height:600px;
    height: auto; /* auto pour s'adapter */
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.swiper-slide img.swiper-lazy-loaded {
    opacity: 1 !important; /* fade in au chargement */
}

.swiper-lazy-preloader {
    width: 42px;
    height: 42px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -21px;
    margin-top: -21px;
    z-index: 10;
    border: 4px solid var(--color-accent);
    border-radius: 50%;
    border-top-color: transparent;
    animation: swiper-preloader-spin 1s infinite linear;
}

@keyframes swiper-preloader-spin {
    100% { transform: rotate(360deg); }
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--color-accent);
    opacity: 1;
}

.swiper-button-prev,
.swiper-button-next {
    color: white;
}

@keyframes swiper-preloader-spin {
    100% {
        transform: rotate(360deg);
    }
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--color-accent);
    opacity: 1;
}

.swiper-button-prev,
.swiper-button-next {
    color: white;
}

/* ==============================================
   SECTION INTRO
   ============================================== */
.intro-section {
    padding: 80px 0;
    text-align: center;
    background: var(--color-bg-alt);
}

.slogan {
    font-family: var(--font-title);
    font-size: 24px;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 30px;
    font-weight: 400;
}

.slogan-line {
    display: inline;
}

.slogan-line:not(:last-child)::after {
    content: " ";
}

.intro-text {
    font-size: 22px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--color-primary);
    font-weight: 300;
}

/* ==============================================
   SECTION MENU
   ============================================== */
.menu-section {
    padding: 80px 0;
    background: #d9d1c1;
}

.menu-section h2 {
    font-family: 'Anton', sans-serif;
    font-size: clamp(32px, 6vw, 54px);
    text-align: center;
    margin-bottom: 20px;
    color: #ca9e68;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-subtitle {
    text-align: center;
    font-size: 20px;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.menu-composer {
    text-align: center;
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plats-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.plat-item {
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.plat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.plat-item h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    color: #a9141a;
    margin-bottom: 0px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
}

.plat-item p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.tarifs {
    text-align: center;
    margin: 40px 0;
    padding: 10px 0;
    background: transparent;
}

.tarifs p {
    font-size: 16px;
    margin: 5px 0;
    text-transform: uppercase;
}

.accord-vins {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
}

.accord-vins h3 {
    font-family: var(--font-title);
    font-size: 28px;
    margin-bottom: 20px;
}

.accord-vins p {
    font-size: 16px;
    margin: 10px 0;
}


/* ==============================================
   SECTION INSTAGRAM
   ============================================== */
.crt-widget.crt-widget-branded .crt-logo {
    display: none !important;
}

.crt-popup-wrapper .crt-popup .crt-popup-left {
    height: auto !important;
}

.instagram-section {
    padding: 0 0 80px 0;
    background: #d9d1c1;
    text-align: center;
}

.instagram-section h2 {
    font-family: 'Anton', sans-serif;
    font-size: clamp(32px, 6vw, 54px);
    margin-bottom: 40px;
    padding: 0 20px;
    color: #ca9e68;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.instagram-section .container {
    max-width: 100%;
    padding: 0;
}

.instagram-feed {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.btn-instagram {
    margin-top: 30px;
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

/* Cacher le branding Elfsight */
.eapps-link,
.elfsight-app-lazy a[href*="elfsight.com"],
a[href*="elfsight.com"][target="_blank"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* ==============================================
   SECTION CONTACT
   ============================================== */
.contact-section {
    padding: 80px 0;
    background: var(--color-bg-alt);
}

.contact-section h2 {
    font-family: 'Anton', sans-serif;
    font-size: clamp(32px, 6vw, 54px);
    text-align: center;
    margin-bottom: 50px;
    color: #ca9e68;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.contact-item h3 {
    font-family: var(--font-title);
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.contact-item p {
    font-size: 16px;
    margin: 8px 0;
}

/* ==============================================
   SECTION MAP
   ============================================== */
.map-section {
    width: 100%;
    height: 400px;
    line-height: 0;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==============================================
   FOOTER
   ============================================== */
.footer {
    padding: 40px 0;
    background: var(--color-primary);
    color: white;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--color-accent);
    transform: scale(1.1);
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    /* Désactiver le mode sticky sur mobile */
    .header,
    .header.sticky {
        padding: 20px 0;
        height: auto;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .header .container,
    .header.sticky .container {
        height: auto;
    }

    .header .container,
    .header.sticky .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .logo,
    .header.sticky .logo {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }

    .logo img,
    .header.sticky .logo img {
        max-height: 30px;
        margin-top: -1px;
    }

    .logo h1,
    .header.sticky .logo h1 {
        font-size: 20px;
        margin-top: 8px;
        margin-left: -10px;
    }

    .header-info {
        display: none;
    }

    .header.sticky .nav {
        gap: 10px;
    }

    .header.sticky .btn-nav {
        padding: 10px 20px;
        font-size: 13px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding: 20px 0;
        order: 3;
    }

    .nav.active {
        display: flex !important;
    }

    .btn-nav {
        width: 100%;
        text-align: center;
    }

    .swiper {
        height: 400px;
    }

    .intro-text {
        font-size: 18px;
    }

    .slogan-line {
        display: block;
    }

    .slogan-line:not(:last-child)::after {
        content: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }
    
    .btn-nav {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .swiper {
        height: 300px;
    }
    
    .intro-section {
        padding: 50px 0;
    }
    
    .menu-section,
    .reservation-section,
    .contact-section {
        padding: 50px 0;
    }

    .instagram-section {
        padding: 0 0 50px 0;
    }
}


#back-to-top {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: #a9141a;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ==============================================
   ANIMATIONS SCROLL
   ============================================== */
.fade-up {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition:
        opacity 0.4s ease-out,
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Délais pour effet cascade sur les éléments enfants */
.fade-up .plat-item,
.fade-up .contact-item {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition:
        opacity 0.25s ease-out,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-up.visible .plat-item,
.fade-up.visible .contact-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fade-up.visible .plat-item:nth-child(1),
.fade-up.visible .contact-item:nth-child(1) { transition-delay: 0.05s; }
.fade-up.visible .plat-item:nth-child(2),
.fade-up.visible .contact-item:nth-child(2) { transition-delay: 0.1s; }
.fade-up.visible .plat-item:nth-child(3),
.fade-up.visible .contact-item:nth-child(3) { transition-delay: 0.15s; }
.fade-up.visible .plat-item:nth-child(4) { transition-delay: 0.2s; }
.fade-up.visible .plat-item:nth-child(5) { transition-delay: 0.25s; }
.fade-up.visible .plat-item:nth-child(6) { transition-delay: 0.3s; }

/* Désactiver les animations si l'utilisateur préfère */
@media (prefers-reduced-motion: reduce) {
    .fade-up {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
    .fade-up .plat-item,
    .fade-up .contact-item {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}
