/* Fichier: style.css - Version Design "Bistrot Chic" Finale (v6) */

/* ======== VARIABLES & RESET ======== */
:root {
    --color-primary: #CC0000; /* Le rouge vif du logo et des accents */
    --color-secondary: #222222;/* Noir "charbon" pour les fonds */
    --color-dark: #1a1a1a;
    --color-light: #ffffff;
    --color-grey: #f8f8f8; /* Gris très clair pour les fonds clairs */
    --color-text: #444444; /* Couleur principale du texte */
    
    --font-heading: 'Playfair Display', serif; /* Police élégante pour les titres */
    --font-body: 'Lato', sans-serif;          /* Police moderne et lisible pour le corps */
    
    --nav-height: 80px; /* Hauteur standard sur ordinateur */
}

/* Réinitialisation de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

a {
    text-decoration: none;
    color: var(--color-primary);
}

.section-padding {
    padding: 80px 0;
}

.bg-light { background-color: var(--color-grey); }
.bg-dark { background-color: var(--color-secondary); }

/* Titres des sections */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--color-secondary);
    margin-bottom: 15px;
}
.text-center { text-align: center; }

.subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #777;
    margin-bottom: 50px;
}

h3 {
    font-family: var(--font-heading);
}

/* ======== BOUTONS (Styles Généraux) ======== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px; 
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-light);
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background-color: #a00000;
    border-color: #a00000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(204, 0, 0, 0.5); 
}
/* Contour rouge au clic (focus) */
.btn:focus,
.btn-primary:focus {
    outline: none; 
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.4); 
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}
.btn-secondary:hover {
    background-color: var(--color-secondary);
    color: var(--color-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(34, 34, 34, 0.2);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1rem;
}

/* ======== HEADER / NAVBAR ======== */
.navbar {
    height: var(--nav-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.navbar.transparent {
    background-color: transparent;
}

.navbar.scrolled {
    background-color: var(--color-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo img {
    height: 55px;
    transition: filter 0.4s ease;
}

/* Logo blanc sur fond transparent */
.navbar.transparent .nav-logo img {
    filter: brightness(0) invert(1); 
}

.nav-menu ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu .btn-primary {
    padding: 15px 35px;
    font-size: 0.9rem;
}

.nav-menu a {
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--color-dark);
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

/* Couleur des liens sur fond transparent */
.navbar.transparent .nav-menu a {
    color: var(--color-light);
}

.nav-menu a::after {
    content: '';
    display: block;
    width: 0;
    height: 4px;
    background: var(--color-primary);
    transition: width 0.3s ease;
    position: absolute;
    bottom: -7px;
    left: 0;
}

/* Ligne blanche sur fond transparent */
.navbar.transparent .nav-menu a:not(.btn)::after {
    background: var(--color-light);
    height: 4px; 
    bottom: -7px; 
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}
.nav-menu .btn::after {
    display: none;
}


.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
}
.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-dark);
    margin: 6px 0;
    transition: all 0.3s ease;
}
.navbar.transparent .nav-toggle span {
    background-color: var(--color-light);
}
/* Styles d'animation du Burger (Croix) */
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }


/* ======== SECTION ACCUEIL (HERO) ======== */
.hero {
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-light);
    background: url('img/hero-bg.jpg') no-repeat center center/cover;
    position: relative;
    /* Propriété Parallaxe pour Desktop */
    background-attachment: fixed; 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ======== SECTION CONCEPT ======== */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}
.split-col-text h2 {
    text-align: left;
}
.split-col-text h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 25px;
}
.split-col-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}
.split-col-image img {
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 100%;
    height: 450px;
    object-fit: cover;
}


/* ======== SECTION GALERIE ======== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.gallery-item img {
    display: block;
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: var(--color-light);
    padding: 30px 20px 20px;
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-weight: 700;
    transition: opacity 0.3s ease;
}


/* ======== SECTION AVIS (Livre d'Or) ======== */
.avis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.avis-item {
    background-color: var(--color-light);
    border-radius: 8px;
    padding: 30px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-left: 5px solid var(--color-primary);
}
.avis-quote {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--color-primary);
    opacity: 0.1;
    position: absolute;
    top: -10px;
    left: 20px;
    line-height: 1;
}
.avis-item p {
    font-style: italic;
    font-size: 1.15rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}
.avis-author {
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
}

/* ======== SECTION RÉSERVATION (Formulaire) ======== */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
}
.form-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.form-group {
    position: relative;
    margin-bottom: 30px;
}

/* Style des champs (sur fond sombre) */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-light);
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #555;
    outline: none;
    transition: border-color 0.3s ease;
}
.form-group select {
    background-color: var(--color-secondary);
    padding: 15px;
    border: 2px solid #555;
    border-radius: 5px;
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Placeholder et Focus */
::placeholder {
    color: #999;
    opacity: 1;
}
input[type="date"], input[type="time"] { color: #999; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Messages du formulaire */
#formMessage {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    color: var(--color-light);
}
#formMessage.success { background-color: #28a745; }
#formMessage.error { background-color: #dc3545; }


/* ======== FOOTER ======== */
.footer {
    background-color: var(--color-dark);
    color: #aaa;
    padding: 70px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.footer-logo {
    height: 60px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}
.footer-col h4 {
    color: var(--color-light);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-primary); 
    display: inline-block;
    padding-bottom: 5px;
}
.footer-col p {
    margin-bottom: 10px;
    line-height: 1.8;
}
.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin-bottom: 8px;
}
.footer-col a {
    color: #aaa;
    transition: color 0.3s ease;
}
.footer-col a:hover {
    color: var(--color-light);
}

/* ======== RESPONSIVE (Adaptation aux écrans) ======== */

/* Tablettes (992px et moins) */
@media (max-width: 992px) {
    .section-title { font-size: 2.4rem; }
    .hero-content h1 { font-size: 3.5rem; }
    
    .split-grid { grid-template-columns: 1fr; }
    .split-col-image { order: -1; margin-bottom: 30px; }
    .split-col-text h2 { text-align: center; }

    .gallery-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 20px;
    }
    .gallery-item img { height: 300px; }
    
    .footer-grid { grid-template-columns: 1fr 1fr; }
    
    .nav-menu li {
        margin-left: 15px; 
    }
    .nav-menu a {
        font-size: 0.8rem; 
    }
}

/* Mobiles (768px et moins) */
@media (max-width: 768px) {
    /* CORRECTION FIXE POUR LES TÉLÉPHONES */
    .hero {
        /* DÉSACTIVE le parallaxe sur mobile, ce qui force l'image à s'afficher correctement */
        background-attachment: scroll !important; 
        /* Réassurance que l'image couvre l'espace malgré tout */
        background-size: cover;
    }
    
    /* CORRECTION : Réduction de la hauteur de la barre de navigation et du logo */
    :root { --nav-height: 60px; } 
    .nav-logo img { height: 40px; } 

    .section-padding { padding: 40px 0; }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    
    /* Menu Burger (Plein écran) */
    .nav-menu {
        display: none; 
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(26, 26, 26, 0.98); 
        flex-direction: column;
        justify-content: center;
        align-items: center;
        backdrop-filter: blur(5px);
        z-index: 999; 
    }
    
    .nav-menu ul {
        display: none;
        flex-direction: column; 
        align-items: center;
    }

    .nav-menu.active { 
        display: flex; 
        overflow-y: auto; 
    }
    
    .nav-menu.active ul {
        display: flex;
    }

    .nav-menu a {
        color: var(--color-light);
        font-size: 1.3rem;
        margin: 10px 0; 
    }
    .nav-menu .btn-primary {
        margin-top: 15px; 
        font-size: 1.1rem;
        padding: 15px 30px; 
    }
    .nav-toggle { display: block; }
    
    /* Grilles en 1 colonne */
    .gallery-grid,
    .form-group-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid { text-align: center; }
    .footer-col h4 { display: block; }
}
/* Centrage du titre H3 de la section "Concept" uniquement sur mobile */
@media (max-width: 767px) {
    /* Cibler le h3 spécifique dans la section #concept */
    #concept .split-col-text h3 {
        text-align: center;
    }

    /* Optionnel: Centrer également le titre principal "Notre Concept" si ce n'est pas déjà fait */
    #concept .section-title {
        text-align: center;
    }
}
/* Réduction de l'espace entre H2 et H3 dans la section Concept (uniquement sur mobile) */
@media (max-width: 767px) {
    /* Cible le H3 (Ô Cent Couverts : Plus qu'un buffet) */
    #concept .split-col-text h3 {
        /* Diminue la marge supérieure pour rapprocher du H2 */
        margin-top: 0.1em; 
        /* Diminue la marge inférieure pour rapprocher du paragraphe suivant */
        margin-bottom: 0.3em; 
    }

    /* Optionnel : S'assurer que le H2 principal n'a pas une marge trop grande en bas */
    #concept .split-col-text h2 {
        margin-bottom: 0.2em; /* Rapproche le H2 du H3 */
    }
}

/* --- CORRECTION PRIORITAIRE POUR LE CENTRAGE DU FORMULAIRE --- */
/* Ceci doit être le dernier bloc de votre fichier style.css */

.form-wrapper {
    /* Centrage sur grand écran */
    max-width: 700px; /* Limite la largeur du formulaire */
    margin-left: auto; /* Centrage à gauche */
    margin-right: auto; /* Centrage à droite */
    padding: 10px;
    box-sizing: border-box; /* Assure que le padding n'augmente pas la taille */
}

/* Réorganisation des groupes de champs (Pro sur Mobile) */
.form-group-grid {
    display: flex;
    flex-direction: column; /* Par défaut : les champs sont empilés sur mobile */
    gap: 20px;
    margin-bottom: 20px;
}

/* 4. Media Query (Passage en 2 colonnes sur desktop) */
@media (min-width: 768px) {
    .form-group-grid {
        flex-direction: row; /* Champs côte à côte sur tablette/desktop */
    }
    .form-group-grid .form-group {
        flex: 1; /* Assure que chaque champ prend 50% de l'espace disponible */
    }
}

/* --- CORRECTION PRIORITAIRE : RÉALIGNEMENT DE LA NAVIGATION --- */

/* 1. Assure le positionnement et l'alignement des éléments principaux dans le header */
.navbar .container {
    display: flex; /* Active Flexbox */
    justify-content: space-between; /* Espace les éléments (Logo à gauche, Menu à droite) */
    align-items: center; /* Centre verticalement tous les éléments */
    flex-wrap: nowrap; /* Empêche le retour à la ligne non désiré */
    padding-top: 20px; /* Ajout d'un petit espace pour l'esthétique */
    padding-bottom: 20px;
}

/* 2. Assure que la liste du menu est bien horizontale sur desktop */
.nav-menu ul {
    list-style: none; /* Enlève les puces */
    display: flex; /* Met les éléments du menu en ligne */
    gap: 25px; /* Espace entre les liens */
    margin: 0; /* Enlève la marge par défaut qui peut causer des décalages */
    padding: 0;
}

/* 3. Assure que le lien Réserver est un bouton et ne décale pas l'alignement */
.nav-menu .btn {
    align-self: center; /* S'assure que le bouton est bien centré verticalement avec les liens */
    white-space: nowrap; /* Empêche le texte "Réserver" de se couper */
}

/* 4. Cache le bouton du menu mobile sur les grands écrans (si visible) */
.nav-toggle {
    display: none;
}

/* 5. Cible les liens individuels (pour un meilleur alignement) */
.nav-menu ul li {
    padding: 5px 0; /* Ajout d'un petit padding vertical si besoin */
}