/* ========== BASE STYLES ========== */
:root {
    /* Fallback values - will be overridden by dynamic styles */
    --primary: #8B0000;
    --secondary: #CD5C5C;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --hero-bg-image: url('../img/hero-img.png');
    --hero-overlay: rgba(0, 0, 0, 0.5);
    --hero-text-color: #ffffff;
    --text-dark: #333333;
    --text-light: #ffffff;
    --section-padding: 5rem 0;
}

body {
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ========== HEADER ========== */
#header {
    background: var(--primary);
    transition: all 0.3s;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
}

#header.scrolled {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--text-light);
    font-size: 28px;
    font-weight: 700;
    font-family: 'Dancing Script', cursive;
}

.navbar ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar li {
    margin-left: 30px;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--text-light);
    bottom: 0;
    left: 0;
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
}

/* ========== HERO SECTION ========== */
#hero {
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    color: var(--hero-text-color);
}

.hero-content {
    padding-right: 30px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-get-started {
    display: inline-block;
    background: var(--primary);
    color: var(--text-light);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--primary);
}

.btn-get-started:hover {
    background: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.hero-img-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-img-container:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.hero-img-container:hover .hero-img {
    transform: scale(1.05);
}

/* ========== SECTIONS COMMON ========== */
section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--menu-title-color, var(--primary)) !important;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--secondary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    font-size: 18px;
    color: var(--menu-subtitle-color, var(--text-dark)) !important;
    opacity: 0.8;
    font-style: italic;
}

.section-bg {
    background: var(--secondary);
    color: var(--text-light);
}

.section-bg .section-title h2,
.section-bg .section-title p {
    color: var(--text-light);
}

/* ========== MENU SECTION ========== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.menu-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.menu-header {
    background: var(--primary);
    color: var(--text-light);
    padding: 20px;
    text-align: center;
}

.menu-header h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.menu-price {
    font-size: 18px;
    font-weight: 700;
}

.menu-body {
    padding: 20px;
}

.menu-description {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-items li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
}

.menu-items li:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 600;
    color: var(--primary);
}

.item-price {
    font-weight: 700;
}

/* ========== CONTACT SECTION ========== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary);
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary);
}

.social-links {
    margin: 30px 0;
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.horaires h4 {
    margin-bottom: 15px;
    color: var(--primary);
}

.horaires ul {
    list-style: none;
    padding: 0;
}

.horaires li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.jour {
    font-weight: 600;
}

.contact-map {
    height: 100%;
    min-height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== FOOTER ========== */
#footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.copyright {
    font-size: 14px;
}

.credits {
    font-size: 13px;
}

.credits a {
    color: var(--secondary);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary);
    color: var(--text-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .navbar {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        background: var(--primary);
        padding: 20px 0;
        transition: all 0.5s;
        z-index: 998;
    }

    .navbar-mobile {
        left: 0;
    }

    .navbar ul {
        flex-direction: column;
        padding: 0 20px;
    }

    .navbar li {
        margin: 10px 0;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
        margin-bottom: 40px;
    }

    .hero-img-container {
        transform: none;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 0;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-map {
        min-height: 250px;
        order: -1;
    }
}