/* ==========================================================================
   Maison Gouëllo - Design System & Stylesheet (Sober, Terroir Breton, Mobile-First)
   ========================================================================== */

/* Variables & Custom Properties */
:root {
    --bg-color: #F5F0EB;
    --text-color: #1A1A1A;
    --text-muted: #555555;
    --accent-color: #C0392B;
    --accent-hover: #9E2F23;
    --border-color: #DCD6CF;
    --card-bg: #FFFFFF;
    --card-border: #E8E2DB;
    --active-row-bg: #EAE4DE;
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    --header-height: 70px;
    --max-width: 1000px;
}

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

html, body {
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-color);
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Common Layout Components */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem; /* Min 20px padding (which is > 16px) on sides */
}

section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

/* Section Dividers & Headings */
.section-title {
    font-size: 2rem;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-style: italic;
}

.section-divider {
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0 auto 2.5rem auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
    min-height: 44px; /* Accessibilty touch target */
}

.btn-primary {
    background-color: var(--accent-color);
    color: #FFFFFF;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-hover);
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.logo-link {
    display: flex;
    align-items: center;
    min-height: 44px; /* Touch target */
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Menu Toggle Button (Mobile: Touch target 44x44px) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px; /* Pads 24x16px bar setup to 44x44px */
    z-index: 1010;
}

.hamburger-bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Toggle Menu Active Classes (Aligned to center) */
.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav Menu (Mobile Default) */
.nav-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    display: none;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.nav-menu.active {
    display: block;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 0.85rem 2rem; /* Creates 44px+ touch height */
    width: 100%;
    text-align: center;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--bg-color);
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-badge {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: clamp(2.2rem, 9vw, 3.8rem); /* Fluid typography */
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    max-width: 100%;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-location {
    font-size: 1.05rem;
    font-weight: 500;
    margin-top: 0.75rem;
    color: var(--text-color);
    white-space: normal;
    word-wrap: break-word;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.hero-section .divider {
    width: 80px;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

/* Opening Info Card (Mobile: 90% width) */
.hero-hours-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 1.5rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.03);
    margin: 0 auto;
}

.hero-hours-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.hero-hours-item {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.hero-hours-item strong {
    color: var(--text-color);
}

.hero-hours-item.closed-day {
    color: var(--accent-color);
}

.hero-link-scroll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    border-bottom: 1px solid transparent;
    min-height: 44px; /* Touch target */
    margin-top: 0.5rem;
}

.hero-link-scroll:hover {
    border-bottom-color: var(--accent-color);
}

.arrow-icon {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Qui Sommes-Nous Section
   ========================================================================== */
.about-section {
    background-color: var(--bg-color);
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: left; /* Left/Justified on mobile */
}

.lead-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: left;
}

.body-text {
    font-size: 1rem;
    color: var(--text-muted);
    text-align: justify;
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   Carte Traiteur Section
   ========================================================================== */
.traiteur-section {
    background-color: var(--bg-color);
    text-align: center;
}

.traiteur-content {
    max-width: 600px;
    margin: 0 auto;
}

.traiteur-tagline {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    word-wrap: break-word;
    max-width: 100%;
}

.cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.btn-download {
    width: 100%; /* Full width on mobile */
}

.btn-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Horaires & Contact Section
   ========================================================================== */
.hours-contact-section {
    background-color: var(--bg-color);
}

.hours-contact-grid {
    display: grid;
    grid-template-columns: 1fr; /* Column layout on mobile */
    gap: 3.5rem;
}

.subsection-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-weight: 700;
}

/* Hours Table (Mobile: Compact cell padding to prevent squeezed text) */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
    width: 100%;
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.hours-table th, .hours-table td {
    padding: 0.75rem 0.5rem; /* Compact padding for small screens */
    border-bottom: 1px solid var(--border-color);
}

.hours-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.hours-table tr.current-day {
    background-color: var(--active-row-bg);
    font-weight: 600;
    border-left: 3px solid var(--accent-color);
}

.hours-table tr.current-day td:first-child {
    padding-left: calc(0.5rem - 3px);
}

.day-name {
    font-weight: 600;
}

.closed-cell {
    color: var(--accent-color);
    font-style: italic;
}

.hours-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input, .form-group textarea {
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 0.75rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    transition: border-color 0.2s ease;
    width: 100%; /* Full width */
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-submit {
    width: 100%; /* Full width on mobile */
    margin-top: 0.5rem;
}

.form-feedback {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-feedback.success {
    background-color: #E8F8F5;
    color: #117A65;
    border: 1px solid #A3E4D7;
}

.form-feedback.error {
    background-color: #FDEDEC;
    color: #B03A2E;
    border: 1px solid #F9D5D3;
}

.hidden {
    display: none;
}

/* ==========================================================================
   Footer Section (Mobile: Centered layout)
   ========================================================================== */
.main-footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem 0;
    font-size: 0.95rem;
    text-align: center; /* Centered on mobile */
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.footer-brand {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.footer-contact-details {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centered on mobile */
    gap: 0.75rem;
}

.footer-address, .footer-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Centered on mobile */
    gap: 0.75rem;
    min-height: 44px; /* Touch target */
    padding: 0 0.5rem;
}

.footer-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.footer-address a:hover, .footer-phone a:hover {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centered on mobile */
    gap: 0.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 100%;
}

.footer-bottom .credit a {
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid transparent;
}

.footer-bottom .credit a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Helper Responsive Classes */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

/* Floating Action Button (FAB) - Mobile defaults */
.fab-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background-color: var(--accent-color);
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.fab-btn:hover {
    background-color: var(--accent-hover);
    color: #FFFFFF;
}

.fab-btn.hidden-fab {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* ==========================================================================
   Desktop & Tablet Layout Overrides (breakpoint: 768px)
   ========================================================================== */
@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem; /* standard margins on desktop */
    }

    section {
        padding: 5rem 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-divider {
        margin-bottom: 3rem;
    }
    
    /* Header & Navigation desktop layout */
    .menu-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        display: block;
        width: auto;
        background-color: transparent;
        border-bottom: none;
        padding: 0;
        box-shadow: none;
    }
    
    .nav-menu ul {
        flex-direction: row;
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        display: inline;
        padding: 0;
        width: auto;
        text-align: left;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    /* Hero section */
    .hero-section {
        padding: 6rem 0;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-location {
        font-size: 1.15rem;
        margin-top: 0.75rem;
    }
    
    .hero-hours-card {
        padding: 2rem;
        width: 100%;
    }
    
    /* About section text layout on desktop */
    .about-content {
        text-align: center;
    }
    
    .lead-text {
        font-size: 1.35rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .body-text {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
    }
    
    /* Catering button width layout on desktop */
    .btn-download {
        width: auto;
        max-width: 280px;
    }
    
    /* Hours table padding */
    .hours-table {
        font-size: 0.95rem;
    }
    
    .hours-table th, .hours-table td {
        padding: 0.85rem 1rem;
    }
    
    .hours-table tr.current-day td:first-child {
        padding-left: calc(1rem - 3px);
    }
    
    /* Submit button alignment on desktop */
    .btn-submit {
        width: auto;
        align-self: flex-start;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
    
    /* Grid side-by-side for Horaires & Contact */
    .hours-contact-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 4rem;
        align-items: start;
    }
    
    /* Footer layout on desktop */
    .main-footer {
        text-align: left;
    }
    
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 3rem;
    }
    
    .footer-contact-details {
        align-items: flex-start;
    }
    
    .footer-address, .footer-phone {
        justify-content: flex-start;
        padding: 0;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 1.5rem;
    }
    
    .footer-info {
        max-width: 45%;
    }

    /* Responsive Helpers & FAB Desktop Overrides */
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: inline;
    }
    
    .fab-btn {
        bottom: 24px;
        right: 24px;
    }
}
