/* --- VARIABLES ET RÉGLAGES DE BASE --- */
:root {
    --or: #C5A059;       /* Un doré élégant pour l'ébénisterie */
    --anthracite: #2c2c2c;
    --blanc: #ffffff;
    --gris-clair: #f4f4f4;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--anthracite);
    background-color: var(--gris-clair);
    padding-top: 0px; /* Espace pour le header fixe */
}

/* --- HEADER & NAVIGATION (Desktop) --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background-color: #fff;
    /* Configuration Sticky */
    position: -webkit-sticky; /* Pour la compatibilité Safari */
    position: sticky;
    top: 0;
    left: 0;
    width: 100%; /* Force le bandeau sur toute la largeur */
    
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 60px;
    width: auto;
}

.nom-atelier {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2c2c2c;
}

.nav-links-wrapper a {
    margin-left: 25px;
    text-decoration: none;
    color: #2c2c2c;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links-wrapper a:hover, 
.nav-links-wrapper a.active {
    color: #C5A059; /* Ton doré */
}

/* --- LE BURGER (Caché par défaut) --- */
.burger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background-color: #2c2c2c;
    border-radius: 2px;
    transition: 0.3s;
}

.nom-atelier {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--anthracite);
    text-transform: uppercase;
}

nav {
    display: flex;
    gap: 20px;
    position: relative;
}

nav a {
    text-decoration: none;
    color: var(--anthracite);
    font-weight: 500;
    padding: 10px 5px;
    transition: var(--transition);
    position: relative;
}

/* Le marqueur doré sous le lien actif */
nav a.active::after, nav a:hover::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--or);
    border-radius: 2px;
}

nav a.active {
    color: var(--or);
}

/* Conteneur parent pour positionner l'overlay */
.intro-text {
    position: relative;
    margin-bottom: 0;

}
/* Le fameux dégradé */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px; /* Plus c'est haut, plus le fondu est doux */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--gris-clair));
    pointer-events: none; /* Laisse passer les clics au travers */
    transition: opacity 0.6s ease;
}

/* Cache le dégradé quand on déplie tout */
.fade-overlay.hidden {
    opacity: 0;
}

/* Le contenu caché */
.collapsed-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    /* On utilise ease-out pour un atterrissage plus doux comme on en a discuté */
    transition: 
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
    opacity 0.3s ease-out, 
    margin-top 0.4s ease-out;
}

/* Gestion du "voir plus"*/
.collapsed-content.expanded {
    max-height: 200px; /* Une valeur assez grande pour tout montrer */
    opacity: 1;
    margin-top: 15px;
}

/* Style du bouton */
.read-more-btn {
    background: none;
    border: none;
    color: #C5A059; /* Ton doré */
    font-weight: bold;
    cursor: pointer;
    padding: 10px 0;
    font-family: inherit;
    text-transform: none;
    font-size: 0.9rem;
    display: block;
    margin: 20px auto 0; /* Centré */
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* --- SECTIONS ET TITRES --- */
section {
    padding: 60px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    position: relative;
}

h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--or);
    margin: 10px auto;
}

/* --- GRILLE DE LA GALERIE --- */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

.item {
    background: transparent; /* On enlève le fond blanc global */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.item a {
    text-decoration: none; /* Enlève le soulignement */
    color: inherit;        /* Le lien prend la couleur de son parent (noir/anthracite) */
}

.item:hover {
    transform: translateY(-5px);
}

.item img {
    width: 100%;
    height: 250px;      /* Garde une hauteur fixe pour l'alignement */
    object-fit: cover;
    display: block;     /* Supprime l'espace binaire sous l'image */
    background-color: #eeeeee; /* Un gris très léger en attendant que l'image charge */
    border-radius: 8px; /* Pour arrondir l'image si elle n'a pas de titre */
}


.item h3 {
    background: #fff;  
    margin: 0;
    padding: 15px;
    text-align: center;
    width: 100%;
    border-top: 1px solid #f0f0f0; /* Optionnel : une fine ligne de séparation */
    color: #2c2c2c;       /* Ton gris anthracite très foncé */
    font-weight: 600;      /* Un peu plus épais pour le titre */
    text-transform: capitalize; /* Met la première lettre en majuscule */
}

/* --- LIGHTBOX (Le Zoom) --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    border: 4px solid var(--blanc);
}

#caption {
    margin-top: 20px;
    color: var(--or);
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: capitalize; /* Met la première lettre en majuscule */
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
}

.lightbox-trigger {
    cursor: zoom-in;
    text-decoration: none;
}

/* --- FORMULAIRE DE CONTACT --- */
.form-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

input, textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-submit {
    background-color: var(--or);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

footer {
    background-color: #2c2c2c; /* Anthracite élégant */
    color: #ffffff;
    padding: 50px 10% 20px 10%;
    margin-top: 50px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap; /* Pour le mobile */
}

.footer-column {
    flex: 1;
    min-width: 250px; /* Évite que les colonnes soient trop serrées */
}

.footer-column h3 {
    color: #C5A059; /* Ton doré */
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.footer-column p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #cccccc;
}

.footer-column a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #C5A059;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.8rem;
    color: #888;
}

.address-link {
    color: inherit;         /* Garde la couleur du texte du footer */
    text-decoration: none;  /* Enlève le soulignement */
    transition: color 0.3s;
    display: inline-block;
}

.address-link:hover {
    color: #C5A059;         /* Devient doré au survol */
    text-decoration: underline; /* Optionnel : souligne au survol pour montrer que c'est cliquable */
}

.social-link-img {
    display: flex;
    align-items: center; /* Aligne l'icône et le texte sur la même ligne */
    gap: 10px;           /* Espace entre l'image et le texte */
    text-decoration: none;
    color: #cccccc;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.social-link-img img {
    width: 23px;         /* Taille de l'icône */
    object-fit: contain;
    transition: all 0.3s ease;
}

.social-link-img:hover {
    color: #C5A059;      /* Le texte devient doré au survol */
}

.social-link-img:hover img {
    filter: none;        /* L'icône reprend ses couleurs d'origine au survol */
    transform: scale(1.1);
}


/* --- RESPONSIVE (Mobile) --- */
@media (max-width: 768px) {
    header {
        padding: 5px;
    }

    .nom-atelier {
        font-size: 1.1rem; /* On réduit pour que ça tienne sur une ligne */
    }

    .burger-menu {
        display: flex; /* On l'affiche sur mobile */
    }

/* Le panneau latéral qui arrive de la droite */
    #nav-links {
        display: flex; 
        flex-direction: column;
        position: fixed;
        top: 50;
        right: 0;
        width: 280px;
        height: auto;
        max-height: 80vh;      /* Il prend au maximum 80% de l'écran */
        border-bottom-left-radius: 20px; /* Petit arrondi élégant */
        border-top-left-radius: 20px; /* Petit arrondi élégant */

        background-color: #ffffff;
        z-index: 9999;
        padding: 30px 0 30px 0;
        box-shadow: -5px 5 15px rgba(0,0,0,0.15);

        margin: 0;       /* Supprime toute marge parasite */
        transform: translateX(100%); /* Caché à droite par défaut */
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Transition fluide aller-retour */

        /* Permet de scroller à l'intérieur du menu */
        overflow-y: auto;
    }
    #nav-links.active {
        transform: translateX(0);
    }

    /* On force le bouton burger à rester au-dessus du menu quand il est ouvert */
    .burger-menu {
        z-index: 3000;
        position: relative;
    }

/* Style des liens à l'intérieur du panneau */
/* 1. Couleur par défaut pour tous les liens (Gris/Noir) */
    #nav-links a {
        color: #2c2c2c !important; /* On force le gris foncé au départ */
        border-left: 4px solid transparent; /* Liseré invisible par défaut */
        transition: all 0.3s ease;
        padding-left: 25px;
    }
    @keyframes slideIn {
        from { 
            transform: translateX(1%); 
            opacity: 0; /* Petit effet de fondu en plus pour la douceur */
        }
        to { 
            transform: translateX(0); 
            opacity: 1;
        }
    }

    #nav-links a.active {
        animation: fadeInLink 0.8s ease forwards;
        opacity: 0;
        color: #C5A059 !important; /* Ton doré */
        border-left: 4px solid #C5A059; /* Un liseré vertical est souvent plus élégant sur un menu latéral */
        padding-left: 21px; /* On ajuste le padding pour compenser l'épaisseur du liseré */
        background-color: rgba(197, 160, 89, 0.05); /* Un très léger fond doré */
    }
    /* On décale l'apparition de chaque lien pour créer l'effet d'escalier */
    #nav-links.active a:nth-child(1) { animation-delay: 0.1s; }
    #nav-links.active a:nth-child(2) { animation-delay: 0.2s; }
    #nav-links.active a:nth-child(3) { animation-delay: 0.3s; }
    #nav-links.active a:nth-child(4) { animation-delay: 0.4s; }
    #nav-links.active a:nth-child(5) { animation-delay: 0.5s; }

    @keyframes fadeInLink {
        from { opacity: 0; transform: translateX(20px); }
        to { opacity: 1; transform: translateX(0); }
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-column {
        margin-bottom: 30px;
    }

    /* Centre le bloc lien + icône Instagram */
    .social-link-img {
        justify-content: center; /* Centre horizontalement le contenu du lien flex */
        margin: 10px auto;       /* Centre le bloc lui-même dans la colonne */
    }
    
    /* Centre le lien de l'adresse si besoin */
    .address-link {
        display: block;
        margin: 0 auto;
    }


/* L'overlay (le voile sombre) */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4); /* Teinte sombre */
    z-index: 99; /* Juste sous le menu qui est à 9999 */
    
    /* On utilise opacity et visibility pour une fermeture fluide */
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

/* Quand le menu est ouvert, on affiche l'overlay */
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
}
