:root {
    --bg-light: #F5F2EB; /* Elegant warm beige */
    --bg-card: #ffffff;
    --color-terra: #a24936; /* Premium deeper terracotta */
    --color-accent: #a24936;
    --text-main: #2C2520; /* Classy deep charcoal brown */
    --text-muted: #70655B; /* Warm taupe gray */
    --border-soft: rgba(44, 37, 32, 0.08); /* Scriptorium sober border */
}

body {
    background-color: var(--bg-light);
    background-image: url("https://www.transparenttextures.com/patterns/p6.png");
    /* Subtle paper texture */
    color: var(--text-main);
}

header {
    background: rgba(245, 242, 235, 0.85) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
}

header .nav-desktop a,
header .logo a,
.burger-menu span {
    color: var(--color-terra) !important;
}

.burger-menu span {
    background: var(--color-terra) !important;
}

h1,
h2,
h3,
h4,
.section-title h2 {
    color: var(--color-terra) !important;
}

.underline {
    background: var(--color-terra) !important;
}

.cta-btn {
    background: var(--color-terra) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

.cta-btn.btn-outline {
    background: transparent !important;
    border: 2px solid var(--color-terra) !important;
    color: var(--color-terra) !important;
}

.cta-btn.btn-outline:hover {
    background: var(--color-terra) !important;
    color: #fff !important;
}

.cta-btn:hover {
    background: #8e4335 !important;
    box-shadow: 0 10px 20px rgba(177, 84, 66, 0.2) !important;
}

/* Menu Section */
.menu-section {
    background: transparent !important;
}

.menu-tab-btn {
    color: var(--text-muted) !important;
    border-color: var(--border-soft) !important;
}

.menu-tab-btn.active {
    background: var(--color-terra) !important;
    color: #fff !important;
}

.menu-item-card {
    background: #fff !important;
    border: 1px solid var(--border-soft) !important;
    box-shadow: 0 10px 30px rgba(177, 84, 66, 0.05) !important;
}

.menu-item-header h3 {
    color: var(--color-terra) !important;
}

.menu-item-header .price {
    color: var(--color-terra) !important;
}

.menu-item-info p {
    color: var(--text-muted) !important;
}

/* Gallery Section */
.gallery-section {
    background: rgba(245, 242, 235, 0.5) !important;
}

/* Modal & Reservation */
.reservation-modal {
    background: rgba(245, 242, 235, 0.96) !important;
}

.modal-content {
    background: #fff !important;
    border: 1px solid var(--border-soft) !important;
    color: var(--text-main) !important;
}

.modal-close {
    background: var(--border-soft) !important;
    color: var(--color-terra) !important;
}

.booking-progress {
    background: rgba(177, 84, 66, 0.05) !important;
}

.progress-step span {
    background: var(--border-soft) !important;
    color: var(--color-terra) !important;
}

.progress-step.active span {
    background: var(--color-terra) !important;
    color: #fff !important;
}

.guest-option {
    background: #fff !important;
    border: 1px solid var(--border-soft) !important;
    color: var(--color-terra) !important;
}

.guest-option.active {
    background: var(--color-terra) !important;
    color: #fff !important;
}

.day {
    color: var(--text-main);
}

.day:hover {
    background: var(--border-soft) !important;
}

.day.selected {
    background: var(--color-terra) !important;
    color: #fff !important;
}

.time-btn {
    background: #fff !important;
    border: 1px solid var(--border-soft) !important;
    color: var(--color-terra) !important;
}

.time-btn.active {
    background: var(--color-terra) !important;
    color: #fff !important;
}

.sticky-reserve-btn {
    background: var(--color-terra) !important;
    color: #fff !important;
    box-shadow: 0 10px 30px rgba(177, 84, 66, 0.4) !important;
}

/* About Section Overlay */
.about-overlay h2 {
    color: #fff !important;
    /* Keep white on image overlay for contrast */
}

.about-overlay p {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Contact Info */
.contact-card {
    background: #fff !important;
    border: 1px solid var(--border-soft) !important;
}

.contact-card i {
    color: var(--color-terra) !important;
}

footer {
    background: var(--bg-light) !important;
    border-top: 1px solid var(--border-soft) !important;
    color: var(--text-muted) !important;
}

.social-btn {
    background: #fff !important;
    color: var(--color-terra) !important;
    border: 1px solid var(--border-soft) !important;
}

.social-btn:hover {
    background: var(--color-terra) !important;
    color: #fff !important;
}


/* Hero adjustments */
.hero {
    background: #111 !important;
}

.hero-content h1 {
    color: var(--color-terra) !important;
}

.hero-content p {
    color: var(--text-muted) !important;
}

/* Nav Mobile */
.nav-mobile {
    background: var(--bg-light) !important;
}

.nav-mobile a {
    color: var(--color-terra) !important;
}

/* Fix for reveal effect opacity/blur */
.reveal {
    filter: blur(5px);
}

.reveal.active {
    filter: blur(0);
}

/* Inputs and Forms */
input::placeholder,
textarea::placeholder {
    color: rgba(177, 84, 66, 0.4) !important;
}

.premium-form label {
    color: var(--color-terra) !important;
}

.premium-form input,
.premium-form textarea {
    background: #fff !important;
    border: 1px solid var(--border-soft) !important;
    color: var(--text-main) !important;
}

/* Sticky Button transform fix */
.sticky-reserve-btn {
    bottom: 20px !important;
}

@media (max-width: 900px) {
    .sticky-reserve-btn {
        bottom: 10px !important;
    }
}

#intro-blur {
    background: var(--bg-light) !important;
}

/* Header Image visibility */
header img {
    max-height: 60px;
    width: auto;
    display: block !important;
}

/* Sections Gradients */
#about {
    background: linear-gradient(to bottom, #F5F2EB 0%, #ffffff 100%) !important;
}

#menu {
    background: #ffffff !important;
}

#contact {
    background: linear-gradient(to bottom, #ffffff 0%, #F5F2EB 100%) !important;
}

/* Calendar Fixes */
.calendar-panel {
    background: #ffffff !important;
    max-width: 380px;
    margin: 0 auto;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.calendar-weekdays span {
    color: #000000 !important;
    font-weight: 700;
}

.day {
    color: #333 !important;
}

.day.empty {
    background: transparent !important;
}

/* Buttons Fixes */
.btn-prev {
    color: #b15442 !important;
    border: 1px solid #b15442 !important;
    background: transparent !important;
    transition: 0.3s;
}

.btn-prev:hover {
    background: rgba(177, 84, 66, 0.05) !important;
}

.btn-prev i {
    color: #b15442 !important;
}

/* Ensure Logo is centered/visible */
.logo img {
    filter: none !important;
    /* In case any previous rule added a filter */
}

.gallery-section {
    background: #ffffff !important;
}

/* Ensure the logo image is really visible */
.logo a {
    display: block !important;
}

.logo img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hero background is handled by .hero-photo */
.hero {
    background: #111 !important;
}

/* If logosite.png is white, let's make it visible on light background */
/* Assuming it might need a dark filter if it's a white logo */
.logo img {
    filter: brightness(0) saturate(100%) invert(39%) sepia(17%) saturate(1514%) hue-rotate(323deg) brightness(88%) contrast(93%) !important;
    /* This filter approximates #b15442 terracotta color for a white logo */
}

/* Header enhancements */
header {
    border-bottom: 1px solid var(--border-soft) !important;
    box-shadow: 0 4px 20px rgba(44, 37, 32, 0.05) !important;
}

/* Nav Desktop styling with icons */
.nav-desktop ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-desktop ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
    color: #b15442 !important;
}

.nav-desktop ul li a i {
    font-size: 1rem;
    opacity: 0.8;
}

.nav-desktop ul li a:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(177, 84, 66, 0.2);
}

/* Submit Button Color */
.btn-submit {
    background: #b15442 !important;
    color: #fff !important;
}

.btn-submit:hover {
    background: #8e4335 !important;
}

/* Hero Fix — photo sits in .hero-photo */
.hero {
    background: #111 !important;
    background-attachment: scroll !important;
}

@media (max-width: 900px) {
    .hero {
        background-attachment: scroll !important;
    }
}

/* Hero Button Fix */
.hero-content .cta-btn:last-child {
    background: #b15442 !important;
    color: #fff !important;
}

/* Hero Description Polish */
.hero-description {
    max-width: 800px;
    margin: 20px auto !important;
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    font-weight: 300 !important;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Mobile Hero Buttons Fix */
.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .hero-btns {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-btns .cta-btn {
        margin-left: 0 !important;
        text-align: center;
    }

    .hero-description {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
}

/* Mobile Nav Close Button */
.mobile-nav-close {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 2rem;
    color: #b15442;
    cursor: pointer;
    z-index: 1001;
}

.nav-mobile {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    transform: translateX(100%);
    display: flex !important;
    /* Always display flex but hidden by transform */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nav-mobile.active {
    transform: translateX(0);
}

/* Modal Close Button Relocation */
.modal-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #b15442 !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important;
    z-index: 10001;
    /* Above modal content */
    font-size: 1.5rem !important;
    border: 2px solid #fff !important;
    transition: 0.3s;
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
}

@media (max-width: 600px) {
    .modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem !important;
    }
}


/* Navigation Premium Polish */
.nav-desktop ul li {
    position: relative;
}

.nav-desktop ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #b15442;
    transition: width 0.3s ease;
}

.nav-desktop ul li a:hover::after {
    width: 100%;
}

.nav-desktop ul li a i {
    color: #b15442;
    font-size: 0.8rem;
    padding: 8px;
    background: rgba(177, 84, 66, 0.05);
    border-radius: 50%;
    transition: 0.3s;
}

.nav-desktop ul li a:hover i {
    background: #b15442;
    color: #fff;
    transform: rotate(15deg);
}

/* Modal Submit Button Fix */
.btn-submit {
    background: #b15442 !important;
    border: none !important;
    color: white !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 20px rgba(177, 84, 66, 0.3) !important;
}

/* Remove Header CTA */
.header-cta .cta-btn {
    display: none !important;
}

/* Remove Scroll Indicator */
.scroll-indicator {
    display: none !important;
}

/* Hero Modernization */
.hero {
    background: #111 !important;
}

/* Hero Text Visibility */
.hero-content h1,
.hero-content p {
    color: #fff !important;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.hero-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 40px;
    border-radius: 40px;
    backdrop-filter: blur(5px);
}

.hero-content .cta-btn {
    background: #b15442 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.hero-content .cta-btn:hover {
    transform: translateY(-5px) !important;
}

/* 3D Card Effect on Modal */
.modal-content {
    border: 1px solid rgba(177, 84, 66, 0.2) !important;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(177, 84, 66, 0.05) !important;
    transform: perspective(1000px) rotateX(0deg) !important;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

/* Success Step Styling */
.success-slide {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #b15442;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 30px;
    animation: scaleCheck 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes scaleCheck {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-slide h3 {
    font-size: 2.5rem;
    color: #b15442 !important;
    margin-bottom: 20px;
}

.success-slide p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 40px;
}

.close-final-btn {
    padding: 15px 40px;
    background: var(--text-main);
    color: #fff;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.close-final-btn:hover {
    background: #000;
}

/* Success Header Adjustments for slide-5 */
#slide-5 .success-slide {
    animation: fadeInSlide 0.5s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Menu Suppressions --- */
@media (max-width: 960px) {

    .nav-desktop,
    .burger-menu,
    .nav-mobile {
        display: none !important;
    }
}

/* --- Modal Height Adaptation Fixes --- */
.reservation-modal {
    display: flex !important;
    /* Ensure flex is used for centering */
    align-items: center;
    justify-content: center;
}

.modal-content {
    height: auto !important;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* We want the inner container to scroll if needed, or the modal itself */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.booking-module {
    height: auto !important;
    display: flex;
    flex-direction: column;
}

.booking-slider-container {
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#slide-5 .success-slide {
    padding: 40px 20px;
}

/* --- Step 4 Mobile Improvements --- */
@media (max-width: 600px) {

    /* Fields in 1 column on mobile */
    .premium-form .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .booking-slider-container {
        overflow-y: auto !important;
        max-height: 70vh;
    }

    /* Make the single field row span both columns if it's alone */
    /* This depends on the domestic structure, but usually if there's only one child, we might want it full width or not. 
       The user said "champs en 2 colonne", so if Name is in a row alone, it will take 50%. 
       If they want it 100%, we'd need grid-column: span 2. */

    /* Stacking CTA buttons */
    .slide-actions {
        flex-direction: column-reverse !important;
        /* Submit on top? Or Back on top? usually Submit is more important but usually buttons follow natural order. 
                                                     Let's stick to standard vertical: Prev then Submit or Submit then Prev. 
                                                     User said "les un en dessous des autres", often Submit is at the bottom or top. 
                                                     Let's do standard order but vertical. */
        flex-direction: column !important;
        gap: 15px !important;
    }

    .slide-actions .btn-prev,
    .slide-actions .btn-submit,
    .slide-actions button {
        width: 100% !important;
        margin: 0 !important;
        padding: 15px !important;
    }
}

/* Ensure single fields span both columns if needed, or just let them be 50% as requested */
/* But for better UX: */
.premium-form .form-row .field:only-child {
    grid-column: span 2;
}

/* Adjust labels on mobile for better fit */
@media (max-width: 600px) {
    .premium-form label {
        font-size: 0.75rem !important;
    }

    .premium-form input {
        padding: 12px !important;
        font-size: 0.9rem !important;
    }
}

/* --- Detailed Form Icons Styling --- */
.premium-form label i {
    margin-right: 8px;
    color: var(--color-terra);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

/* Ensure the form row on desktop also respects the 2-column layout correctly */
.premium-form .form-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
}

/* On mobile, we already have grid-template-columns: repeat(2, 1fr) in our previous media query */
/* --- Scrollability Adjustments --- */
@media (max-width: 600px) {
    .modal-content {
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    .booking-module {
        padding-bottom: 20px;
    }
}
