:root {
    --anthracite: #4a5d5e;
    --brown: #8e6d5a;
    --olive: #5b6352;
    --light: #f4f1ee;
}

body { margin: 0; font-family: 'Montserrat', sans-serif; color: #333; overflow-x: hidden; }

/* Header & Intro */
.main-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 8%; /* Réduit un peu pour gagner de la place */
    border-bottom: 1px solid #eee;
    
    /* Ajouts pour fixer le menu */
    position: sticky;
    top: 0;
    background: white; /* Indispensable pour ne pas voir le texte défiler derrière */
    z-index: 1000;     /* Pour rester au-dessus des images */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Optionnel : une ombre légère pour le relief */
}

.logo { font-family: 'Playfair Display', serif; font-size: 1.8rem; letter-spacing: 2px; color: var(--anthracite); }
nav a { text-decoration: none; color: #666; margin-left: 25px; font-size: 0.8rem; font-weight: 600; }


/* Redimensionnement de l'image du logo */
.logo-img {
    height: 50px; /* Ajustez la taille selon vos besoins */
    width: auto;
    object-fit: contain;
}

.intro-section { padding: 60px 8%; background: var(--light); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
h1 { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--anthracite); }
h1 em { font-style: italic; font-weight: 400; text-transform: lowercase; }

.stack { position: relative; width: 100%; height: 350px; }
.stack img { 
    position: absolute; width: 220px; height: 300px; object-fit: cover; 
    border: 8px solid white; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 1.4s ease;
}
.tilt-left { transform: rotate(-6deg); left: 10%; z-index: 1; }
.tilt-right { transform: rotate(4deg); right: 15%; top: -20px; z-index: 2; }

/* Effet de Surlignage (Glow) au survol */
.stack img:hover, .village-card img:hover {
    transform: scale(1.05) rotate(0deg);
    z-index: 10;
    box-shadow: 0 0 20px 5px rgba(74, 93, 94, 0.3);
    cursor: pointer;
}

/* Philosophie & Galerie */
.philosophy-bar { background: var(--brown); color: white; padding: 50px 10%; text-align: center; }
.gallery-section { padding: 60px 8%; text-align: center; }
.villages-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.village-card { text-align: left; }
.village-card img { width: 100%; height: 300px; object-fit: cover; transition: all 0.4s ease; }
.btn-village { background: var(--anthracite); color: white; border: none; padding: 8px 20px; cursor: pointer; font-size: 0.7rem; margin-top: 10px; }

/* Citation Centrée Manuscrite */
.quote-area { padding: 60px 10%; text-align: center; }
.handwriting { font-family: 'Caveat', cursive; font-size: 3rem; color: var(--anthracite); margin: 0; }

/* Section Contact (Le retour) */
.contact-section { padding: 60px 8%; background: #fafafa; border-top: 1px solid #eee; }
.contact-container { display: flex; gap: 60px; }
.contact-form { flex: 1.2; display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { padding: 15px; border: 1px solid #ddd; font-family: inherit; }
.btn-submit { background: var(--anthracite); color: white; border: none; padding: 15px; cursor: pointer; text-transform: uppercase; font-weight: 600; }

.contact-info { flex: 1; }
.map-placeholder { width: 100%; height: 250px; background: #eee; display: flex; align-items: center; justify-content: center; color: #999; font-weight: 600; }
.details-box { margin-top: 20px; font-size: 0.9rem; line-height: 1.6; }

.olive-footer { background: var(--olive); color: rgba(255,255,255,0.7); padding: 40px; text-align: center; font-size: 0.75rem; letter-spacing: 2px; }

.social-sidebar {
    position: fixed;
    left: 0; /* Position  à gauche */
    top: 50%;
    transform: translateY(-50%); /* Centre verticalement */
    display: flex;
    flex-direction: column;
    z-index: 999;
}

/* Sidebar Réseaux Sociaux */
.social-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligne tout à gauche */
    z-index: 999;
}

/* L'étiquette "NOUS SUIVRE" */
.social-label {
    background: var(--anthracite);
    color: white;
    writing-mode: vertical-rl; /* Texte vertical */
    transform: rotate(180deg);
    padding: 15px 5px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 5px 0 0 5px;
    margin-bottom: 10px;
    align-self: flex-start;
}

/* Style des liens et images */
.social-sidebar a {
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    border-radius: 0 5px 5px 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.social-sidebar a img {
    width: 25px; /* Ajuste la taille du logo dans le carré */
    height: 25px;
    object-fit: contain;
}

/* Animation au survol */
.social-sidebar a:hover {
    width: 55px; /* S'élargit au survol */
    background: var(--light);
    padding-left: 10px;
}
#map-area {
    width: 90%;       /* Ou la largeur que vous avez déjà définie */
    height: 250px;     /* Ou la hauteur souhaitée */
    overflow: hidden;  /* Pour que l'image ne dépasse pas */
    border-radius: 8px; /* Optionnel : pour des coins arrondis */
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cela permet de remplir le cadre sans déformer l'image */
    display: block;
}


/* Container principal du village */
.village-detail-section {
    padding: 80px 8%;
    background: linear-gradient(135deg, #fff 0%, #f9f7f6 100%);
}

.v-header { text-align: left; margin-bottom: 50px; }
#v-name { font-size: 4rem; margin: 0; color: var(--anthracite); }
#v-region { font-family: 'Caveat'; font-size: 1.8rem; color: var(--brown); margin-top: -10px; }

/* Grille asymétrique */
.v-presentation-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.v-catchphrase {
    font-family: 'Playfair Display';
    font-size: 2.5rem;
    margin-bottom: 30px;
    line-height: 1.2;
}

/* Côté visuel avec chevauchement */
.v-visuals-side {
    position: relative;
    padding-bottom: 100px; /* Espace pour la photo qui dépasse */
}

.video-container {
    width: 100%;
    height: 450px;
    border-radius: 40px; /* Coins très arrondis comme l'exemple */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    right: -20px;
    width: 60%;
    height: 300px;
    border-radius: 30px;
    border: 10px solid white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    background-size: cover;
    background-position: center;
    z-index: 2;
}

/* Ajustement de la galerie secondaire */
/* 1. On prépare le cadre de l'image */
.photo-gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); 
    gap: 30px; 
}

/* On crée un conteneur pour chaque image (géré par JS après) */
.photo-gallery div {
    height: 500px;
    border-radius: 15px;
    overflow: hidden; /* TRÈS IMPORTANT : Empêche l'image de déborder du cadre */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 2. On configure l'image à l'intérieur */
.photo-gallery img { 
    width: 100%; 
    height: 100%; /* L'image remplit son parent */
    object-fit: cover; 
    transition: transform 2.5s ease; /* Animation fluide du zoom */
    display: block;
}

/* 3. L'effet de zoom au survol */
.photo-gallery div:hover img {
    transform: scale(1.1); /* Zoom de 10% */
}

/* --- Animation d'apparition (Fade-in) --- */
/* On cible les éléments que l'on veut animer */
/* --- Animation d'apparition plus délicate --- */
.reveal {
    opacity: 0;
    transform: translateY(90px); /* Un mouvement de montée un peu plus ample */
    /* "cubic-bezier" permet un démarrage lent, une accélération, puis une fin très douce */
    transition: opacity 3.5s cubic-bezier(0.2, 0, 0.2, 1), 
                transform 3.5s cubic-bezier(0.2, 0, 0.2, 1);
    visibility: hidden;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* État initial de la page portfolio */
.portfolio-fade {
    opacity: 0;
    transition: opacity 1.2s ease-in-out; /* Durée du fondu */
}

/* État quand la page est chargée */
.portfolio-visible {
    opacity: 1;
}


.itinerary-selector {
    background: var(--light);
    padding: 25px;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 900px;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.itinerary-selector select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Montserrat', sans-serif;
    min-width: 220px;
}

.itinerary-selector .btn-village {
    margin-top: 0;
    padding: 10px 25px;
    height: 42px;
}

/* Style de la Lightbox */
/* Style de la Lightbox avec animation */
.lightbox {
    display: flex; /* On le laisse en flex tout le temps */
    position: fixed;
    z-index: 2000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;

    /* ETAT INITIAL : Caché et transparent */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* ETAT ACTIF : Quand on ajoute la classe .active via JS */
.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
    /* Optionnel : petite animation de zoom pour l'image */
    transform: scale(0.9);
    transition: transform 0.5s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 20px; right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}


/* --- STYLE DU RUBAN (SLIDER) --- */
.slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.slider-container {
    width: 100%;
    overflow-x: hidden; /* Cache la barre de défilement */
    scroll-behavior: smooth;
    padding: 20px 0;
}

.slider-container {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.slider-container::-webkit-scrollbar {
    display: none; /* Chrome */
}


#nearby-container {
    display: flex; /* Aligne les cartes horizontalement */
    gap: 25px;
}

/* Style de la carte  */
.village-card {
    min-width: 300px; /* Largeur fixe pour forcer le ruban */
    flex-shrink: 0;   /* Empêche l'écrasement */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 2.5s ease;
}

/* --- STYLE SPÉCIFIQUE AU RUBAN (PORTFOLIO UNIQUEMENT) --- */

.suggestion-card {
    width: 300px;        
    min-width: 300px;    
    height: 300px;       /* Hauteur fixe pour le ruban */
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* On force la hauteur de l'image uniquement dans les suggestions */
.suggestion-card img {
    height: 250px;       /* Hauteur d'image fixe */
    width: 100%;
    object-fit: cover;
    transition: all 2.5s ease;
}

.suggestion-card-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* L'étiquette "En savoir plus" spécifique au ruban */
.suggestion-card .learn-more-overlay {
    position: absolute;
    top: 125px; /* Milieu de l'image (250px / 2) */
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--anthracite);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.suggestion-card:hover .learn-more-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.suggestion-card:hover img {
    filter: brightness(0.7);
}


/* L'étiquette "En savoir plus" au survol */
.learn-more-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: rgba(255, 255, 255, 0.9);
    color: #4a5d5e;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.village-card:hover .learn-more-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.village-card:hover img {
    filter: brightness(1.2); /* L'image devient plus lumineuse (20% de plus) */
    transform: scale(1.05);  /* Garde l'effet de zoom */
}

/* Vitesse zoom des photos */
.village-card img {
    transition: all 1.5s ease;
}

/* Boutons flèches */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
}



.nav-btn.prev { left: -10px; }
.nav-btn.next { right: -10px; }



/* --- ADAPTATION MOBILE (SMARTPHONES) --- */
@media (max-width: 768px) {
    
    /* 1. Header & Logo */
    .main-header {
        flex-direction: column; /* Le logo au dessus, le menu en dessous */
        padding: 10px;
    }
    
    nav {
        margin-top: 15px;
        display: flex;
        justify-content: center;
        gap: 10px;
    }
    
    nav a {
        margin-left: 0; /* On retire les marges de la version PC */
        font-size: 0.7rem;
    }

    /* 2. Intro Section */
    .intro-grid {
        grid-template-columns: 1fr; /* On passe sur une seule colonne */
        text-align: center;
    }
    
    h1 {
        font-size: 2rem; /* On réduit la taille du titre */
    }

    .stack {
        height: 250px; /* On réduit la hauteur du bloc image */
        margin-top: 40px;
    }

    /* 3. Galeries (Index et Portfolio) */
    .villages-grid, .photo-gallery {
        grid-template-columns: 1fr; /* Une seule photo par ligne pour la clarté */
    }

    /* 4. Contact */
    .contact-container {
        flex-direction: column; /* Le formulaire au dessus du plan */
    }

    /* 5. Sidebar Sociale (Optionnel : on peut la masquer ou la mettre en bas) */
    .social-sidebar {
        display: none; /* Souvent préférable sur mobile pour ne pas gêner la lecture */
    }

    /* 6. Portfolio - Section Détails */
    .v-presentation-grid {
        grid-template-columns: 1fr;
    }
    
    #v-name {
        font-size: 2.5rem;
    }
}

/* --- STYLE DU BURGER (Caché sur PC) --- */
.burger-menu {
    display: none; /* Caché par défaut */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--anthracite);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- ADAPTATION MOBILE --- */
@media (max-width: 768px) {
    .burger-menu {
        display: flex; /* On l'affiche sur mobile */
    }

    .nav-links {
        display: none; /* On cache les liens par défaut */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Juste sous le header */
        left: 0;
        width: 100%;
        background: white;
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    /* Quand on ajoute la classe "active" via JS */
    .nav-links.active {
        display: flex;
    }

    nav a {
        margin: 10px 0;
        font-size: 1rem;
    }
}
