/* Variables CSS */
:root {
    --primary-color: #15a415;
    --secondary-color: #ffffff;
    --text-color: #2c3e50;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --footer-color: #107b10;
    --accent-color: #2e8b57;
    --shadow: rgba(0, 0, 0, 0.08);
    --menu-bg: #f1f8e9;
    --soft-section: #e8f4f8;
    --border-color: #e0e0e0;
    --gold-color: #ffcb21;
}

/* Thème nuit */
.night-mode {
    --primary-color: #197219;
    --secondary-color: #121212;
    --text-color: #e0e0e0;
    --background-color: #1a2a3a;
    --card-background: #1a2a3a;
    --footer-color: #061f06;
    --accent-color: #3cb371;
    --shadow: rgba(0, 0, 0, 0.25);
    --menu-bg: #1a2a3a;
    --soft-section: #1a2a3a;
    --border-color: #333333;
    --gold-color: #ffd700;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: all 0.4s ease;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--gold-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--gold-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo p {
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--gold-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold-color);
    transition: width 0.3s;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* Contrôles Header & Mobile Menu */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-btn {
    display: none; /* Caché sur desktop */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.halel-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.halel-indicator.active {
    background-color: rgba(212, 175, 55, 0.3);
    border: 1px solid var(--gold-color);
}

.halel-indicator i {
    color: var(--gold-color);
}

.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('images/back.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
}

.hero h2 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Taille réactive */
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin: 0 auto 40px;
    max-width: 700px;
    padding: 0 10px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.btn-gold {
    background-color: var(--gold-color);
    color: #333;
}

.btn-gold:hover {
    background-color: #e6c34c;
}

/* Sections Communes */
.reservation-section, .menu-section, .soft-section {
    padding: 80px 0;
}

.reservation-section {
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--gold-color);
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Formulaire */
.reservation-form {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Grille réactive améliorée */
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-control {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-family: inherit;
    width: 100%;
}

/* Table Selection */
.table-selection {
    padding: 25px;
    background-color: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px var(--shadow);
}

.table-selection h3 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.restaurant-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

.table-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid transparent;
    background-color: var(--secondary-color);
    width: 160px;
    box-shadow: 0 4px 10px var(--shadow);
    transition: all 0.3s;
}

.table-option:hover, .table-option.selected {
    transform: translateY(-5px);
    border-color: var(--gold-color);
}

.table-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    position: relative;
}

.table-option.selected .table-icon {
    background-color: var(--gold-color);
}

.table-capacity {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #525252;
    color: white;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.table-label {
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
}

.table-desc {
    font-size: 0.8rem;
    text-align: center;
    opacity: 0.7;
}

/* Menu */
.menu-section {
    background-color: var(--menu-bg);
}

.menu-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.menu-category-btn {
    padding: 12px 20px;
    background-color: var(--card-background);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-category-btn.active, .menu-category-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.menu-card {
    background-color: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.menu-card:hover {
    transform: translateY(-10px);
}

.menu-card.food { border-top: 4px solid var(--accent-color); }
.menu-card.alcohol { border-top: 4px solid #ff9800; }
.menu-card.soft { border-top: 4px solid #2196f3; }

.menu-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.menu-content {
    padding: 20px;
}

.menu-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.menu-description {
    font-size: 0.95rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.menu-price {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.food-badge, .alcohol-badge, .soft-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 15px;
    color: white;
}

.food-badge { background-color: var(--accent-color); }
.alcohol-badge { background-color: #ff9800; }
.soft-badge { background-color: #2196f3; }

/* Soft Section & Cert */
.soft-section {
    background-color: var(--soft-section);
}

.halel-cert-container {
    text-align: center;
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.certification-badge {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--primary-color), #2e8b57);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left;
}

.certification-badge i {
    font-size: 2rem;
}

/* Footer */
footer {
    background-color: var(--footer-color);
    color: white;
    padding: 60px 0 20px;
    border-top: 3px solid var(--gold-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold-color);
    display: inline-block;
}

.footer-column p {
    color: #ddd;
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--gold-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: #aaa;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--card-background);
    padding: 40px 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color);
}

/* RESPONSIVE MEDIA QUERIES (Mobile First approach completed) */

/* Tablette et Desktop Moyen */
@media (max-width: 992px) {
    .hero {
        padding-top: 120px;
    }
}

/* Mobile & Tablette Portrait */
@media (max-width: 768px) {
    .logo {margin:auto;}
    .header {padding: 1px 0; }
    .header-content {
        padding: 1px 0;
    }
    
    .mobile-menu-btn {
        display: block; /* Afficher le bouton burger */
        order: 3;
    }

    nav {
        display: none; /* Cacher le menu par défaut sur mobile */
        width: 100%;
        order: 4;
        margin-top: 15px;
        background-color: rgba(0,0,0,0.1);
        padding: 10px;
        border-radius: 8px;
    }

    nav.active {
        display: block; /* Afficher si actif */
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .header-controls {
        order: 2;
    }

    .reservation-form {
        grid-template-columns: 1fr; /* Une seule colonne pour le formulaire */
    }
    
    .table-option {
        width: 130px; /* Plus petit sur mobile */
        padding: 10px;
    }
    
    .table-icon {
        width: 50px;
        height: 50px;
    }
    
    .certification-badge {
        flex-direction: column;
        text-align: center;
    }
}

/* Très petits écrans (iPhone SE, etc.) */
@media (max-width: 480px) {
    .logo-text h1 { font-size: 1.2rem; }
    .logo-text p { display: none; }
    .hero h2 { font-size: 1.8rem; }
    
    .tables-container {
        gap: 10px;
    }
    
    .table-option {
        width: 45%; /* Deux par ligne */
    }
    
    .menu-category-btn {
        width: 100%; /* Boutons pleine largeur */
        margin-bottom: 5px;
    }
    
    .modal-content {
        padding: 25px 15px;
    }
}