/* --- CSS SPA CLEAN --- */
html {
    scroll-behavior: auto; /* Important : Pas de smooth scroll pour l'effet "changement de page" */
}

/* --- Variables --- */
:root {
    --bg-cream: #F9F7F2;
    --text-brown: #4A3B32;
    --accent-green: #7A9A88;
    --wood-color: #A65E3B;
    --white: #ffffff;
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-brown);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- LOGIQUE SPA : HIDE & SHOW --- */
/* Par défaut, toutes les sections sont CACHÉES */
.spa-section {
    display: none !important; /* On force le masquage */
    animation: fadeIn 0.5s ease-in-out;
    padding-top: 140px !important;
    padding-bottom: 50px;
    min-height: 80vh;
}

/* Quand la section a la classe 'active', on l'affiche */
.spa-section.active {
    display: block !important; 
}

/* Cas particulier pour l'accueil qui utilise Flexbox */
#accueil.active {
    display: flex !important;
    flex-direction: row;
}

/* Correction spéciale pour le Contact : il doit être en Flex quand il est actif */
#contact.spa-section.active {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TYPOGRAPHIE --- */
h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
    cursor: pointer; /* Indique qu'on peut cliquer même sans href */
}

/* --- HEADER & NAV --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(249, 247, 242, 0.95);
    padding: 10px 40px;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 80px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-brown);
}

.nav-links li a:hover {
    color: var(--accent-green);
}

/* Logo */
.brand-logo {
    height: 90px;
    transition: transform 0.5s ease;
}
.brand-logo:hover {
    transform: rotate(5deg);
}

/* --- SECTION HERO (Accueil) --- */
.hero {
    display: flex; /* Géré par le .spa-section.active, mais on le laisse ici pour la structure interne */
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
}

.hero-content {
    flex: 1;
    padding-right: 20px;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--wood-color);
    margin-bottom: 0.2rem;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: var(--accent-green);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 150px 150px 20px 20px;
    box-shadow: 10px 10px 0px var(--accent-green);
    object-fit: cover;
}

/* --- BOUTONS --- */
.btn-cta {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-green);
    color: var(--white);
    border-radius: 30px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    border: 1px solid var(--accent-green);
}
.btn-cta:hover {
    background-color: transparent;
    color: var(--accent-green);
}

.btn-facebook {
    display: inline-block;
    padding: 12px 30px;
    margin-top: 15px;
    margin-left: 10px;
    background-color: #3b5998;
    color: #ffffff;
    border: 1px solid #3b5998;
    border-radius: 30px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
}
.btn-facebook:hover {
    background-color: transparent;
    color: #3b5998;
}

/* --- GENERAL TEXTE --- */
.section-text {
    text-align: center;
    background-color: rgba(143, 169, 152, 0.1); /* Vert pâle */
    padding: 60px 20px;
}
.container {
    max-width: 800px;
    margin: 0 auto;
}
.section-text h3 {
    font-size: 2.5rem;
    color: var(--wood-color);
    margin-bottom: 20px;
}
/* Titres H1 internes (Location, Mentions) */
.section-text h1 {
    font-size: 3.5rem;
    color: var(--wood-color);
    margin-bottom: 20px;
}

/* --- CARDS --- */
.cards-section {
    text-align: center;
    padding: 60px 20px;
}
.cards-section h3 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-brown);
}
.cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}
.card {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 8px;
    flex: 1 1 300px;
    max-width: 350px;
    border-top: 5px solid var(--accent-green);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.card h4 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--wood-color);
}

/* --- CONTACT --- */
.contact-section {
    background-image: url('violon-NB.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 20px;
    display: flex; /* Centrage */
    justify-content: center;
    align-items: center;
}
.contact-box {
    background: rgba(253, 252, 248, 0.95);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
}
.contact-info {
    list-style: none;
    margin: 30px 0;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 20px;
    background: var(--text-brown);
    color: var(--bg-cream);
}

/* --- MOBILE & HAMBURGER --- */
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--wood-color); transition: 0.3s; }

/* Styles FB Mobile */
.fb-text-mobile { display: none; }
.nav-icon-link { display: flex; align-items: center; color: var(--text-brown); }
.nav-icon-link svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
    header { padding: 10px 20px; }
    .navbar { flex-direction: row; justify-content: space-between; height: 80px; }
    
    .hamburger { display: block; z-index: 1001; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .spa-section {
        padding-top: 110px !important; /* Force 110px sur mobile */
    }
    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-cream);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding-bottom: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }
    .nav-links.mobile-menu-active { left: 0; }
    .nav-links {
    position: fixed;
    left: -100%;
    top: 80px; /* Hauteur de votre header */
    
    flex-direction: column;
    background-color: var(--bg-cream);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    
    /* --- MODIFICATIONS POUR LA HAUTEUR --- */
    /* 1. On calcule la hauteur disponible (100% de l'écran - 80px du header) */
    height: calc(100vh - 80px);
    
    /* 2. On autorise le scroll SI le menu est trop grand pour l'écran */
    overflow-y: auto; 
    
    /* 3. On ajoute un peu d'espace en bas pour le confort tactile */
    padding-bottom: 50px; 
}
    
    /* Adaptations Accueil Mobile */
    .hero, #accueil.active {
        flex-direction: column; /* Important pour l'ordre mobile */
        text-align: center;
        padding-top: 20px;
    }
    .hero-content { padding-right: 0; }
    .hero-content h1 { font-size: 3rem; }
    .hero-image img { max-width: 280px; }
    
    .btn-cta, .btn-facebook { display: block; width: 100%; max-width: 300px; margin: 10px auto; }
    
    /* FB Mobile */
    .fb-text-mobile { display: inline-block; margin-left: 10px; }
    .nav-icon-link { justify-content: center; width: 100%; padding: 10px 0; }
}
/* --- CORRECTION CENTRAGE CONTACT --- */

/* force le Flexbox spécifiquement pour la section contact quand elle est active */
#contact.spa-section.active {
    display: flex !important; /* Le !important est nécessaire pour écraser le "display: block" du système SPA */
    flex-direction: column;   /* Garde l'alignement vertical */
    justify-content: center;  /* Centre horizontalement */
    align-items: center;      /* Centre verticalement */
}

/* Sécurité supplémentaire : assure que la boîte elle-même a des marges automatiques */
.contact-box {
    margin: 0 auto;
}
/* --- SECURITÉ MENTIONS LÉGALES --- */
#mentions.spa-section {
    background-image: none !important; /* Pas d'image */
    background-color: var(--bg-cream) !important; /* Couleur crème unie */
}

/* On force l'affichage en mode BLOC quand c'est actif (pour écraser le flex du contact) */
#mentions.spa-section.active {
    display: block !important;
}
/* --- SECURITÉ ABSOLUE MENTIONS LÉGALES --- */
#mentions.spa-section {
    /* On réinitialise tout */
    background: var(--bg-cream) !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

#mentions.spa-section.active {
    /* On force l'affichage en bloc */
    display: block !important;
    
    /* SECURITÉ : On s'assure qu'elle prend toute la place et cache ce qu'il y a dessous */
    position: relative; 
    z-index: 9999; 
    min-height: 100vh;
    width: 100%;
}

/* On cache spécifiquement la boîte de contact si on est sur la page mentions */
#mentions.active .contact-box {
    display: none !important;
}

