
/* --- 1. STRUCTURE PARALLAX ADAPTATIVE --- */
.parallax-container {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	width: 100%;
	overflow: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 5rem 1rem;
}

/* Fond Parallax haute performance */
.parallax-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	min-height: 130%;
	background-size: cover;
	background-position: center;
	z-index: 1;
	will-change: transform;
	transform: translateZ(0);
}

/* Ajout d'une ombre progressive en bas du conteneur */
.parallax-container::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100px; /* Hauteur de l'ombre */
	/* Dégradé du transparent vers du noir semi-opaque */
  	background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
	pointer-events: none; /* Permet de cliquer à travers l'ombre sans bloquer l'interaction */
	z-index: 3; /* Se place au-dessus du fond parallax et du texte */
}

/* --- 2. CONTENU TEXTE AVEC OVERFLOW ET SCROLLBAR PERSONNALISÉE --- */
.parallax-content {
	position: relative;
	z-index: 2;
	text-align: center;
	max-width: 750px;
	width: 90%; /* Pour laisser une marge sur les côtés sur mobile */
	
	background: rgba(0, 0, 0, 0.40);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	border-radius: 16px;
	padding: 2rem; /* Espace interne pour que le texte ne colle pas aux bords */

	/* S'adapte au contenu, mais ne dépasse pas 85% de la hauteur de l'écran */
	height: auto;
	max-height: 85vh;
	max-height: 85svh;
	
	/* Le scroll n'apparaît que si le contenu dépasse la max-height ci-dessus */
	overflow-y: auto;
	
	/* Barre de défilement pour Firefox */
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.5) rgba(0, 0, 0, 0.2);
}

/* Barre de défilement pour Webkit (Chrome, Safari, Edge) */
.parallax-content::-webkit-scrollbar {
 	width: 6px;
}

.parallax-content::-webkit-scrollbar-track {
	 background: rgba(0, 0, 0, 0.2);
	 border-radius: 10px;
	 margin: 10px 0;
}

.parallax-content::-webkit-scrollbar-thumb {
	 background: rgba(255, 255, 255, 0.4);
	 border-radius: 10px;
	 transition: background 0.3s ease;
}

.parallax-content::-webkit-scrollbar-thumb:hover {
	 background: rgba(255, 255, 255, 0.8);
}

/* Typographie fluide */
.parallax-content h1 {
	font-size: clamp(1.8rem, 2vw, 3.2rem);
	margin-bottom: 0.8rem;
	text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.parallax-content p {
	font-size: clamp(0.95rem, 2.5vw, 1.2rem);
	line-height: 1.6;
	color: #eee;
	margin-bottom: 0.8rem;
	text-shadow: 0 1px 5px rgba(0,0,0,0.5);
	text-align:justify;
}

/* --- 3. EFFET D'APPARITION ET DISPARITION (FADE-IN / FADE-OUT) --- Voir Fichier css.css */
/*.fade-element {}*/

/* Arrière plan de chaque page */
.bg-1 {
	background-image: url('/images/accueil.jpg');
	background-color: rgba(153,0,0,1);
}

.bg-2 {
	background-image: url('/images/cave-a-vin.jpg');
	background-color: rgba(153,0,0,1);
}

.bg-3 {
	background-image: url('/images/fromagerie.jpg');
	background-color: rgba(153,0,0,1);
}

.bg-4 {
	background-image: url('/images/traiteur.jpg');
	background-color: rgba(153,0,0,1);
}

.bg-5 {
	background-image: url('/images/produits_artisanaux.jpg');
	background-color: rgba(153,0,0,1);
}

.bg-6 {
	background-image: url('/images/afterwork.jpg');
	background-color: rgba(153,0,0,1);
}

.bg-7 {
	background-image: url('/images/accueil.jpg');
	background-color: rgba(153,0,0,1);
}

/* Personalisation individuelle de l'arriere plan du contenu */
.accueil{
	background: rgba(0, 0, 0, 0.45);
}

.cave_vin{
	background: rgba(0, 0, 0, 0.45);
}

.fromagerie{
	background: rgba(0, 0, 0, 0.45);
}

.traiteur{
	background: rgba(0, 0, 0, 0.45);
}

.artisanaux{
	background: rgba(0, 0, 0, 0.45);
}

.privatif{
	background: rgba(0, 0, 0, 0.45);
}

.contact{
	background: rgba(0, 0, 0, 0.45);
}

/* Arrière-plan (gère le fondu d'apparition/disparition) */
.modal-overlay {
    display: flex; /* Toujours en flex pour que les transitions CSS fonctionnent */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    
    /* Propriétés d'animation par défaut (état masqué) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* État lorsque la modale est visible */
.modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Boîte de la modale (gère l'effet de zoom/glissement) */
.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* État de départ de l'animation (légèrement plus petit et décalé) */
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* État final de la boîte lorsque la modale s'ouvre */
.modal-overlay.is-visible .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-caption {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #334155;
    text-align: center;
}

/* Croix de fermeture */
.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f1f5f9;
}

/* --- MEDIA QUERIES (MOBILE) --- */
@media (max-width: 768px) {

	/* 1. Amélioration du cadrage des images sur mobile */
	.bg-1 {
		background-image: url('/images/mobile/accueil_mobile.jpg');
		background-color: rgba(153,0,0,1);
	}
	.bg-2 {
		background-image: url('/images/mobile/cave-a-vin-spiritueux_mobile.jpg');
		background-color: rgba(153,0,0,1);
	}
	.bg-3 {
		background-image: url('/images/mobile/fromagerie_mobile.jpg');
		background-color: rgba(153,0,0,1);
	}
	.bg-4 {
		background-image: url('/images/mobile/traiteur_mobile.jpg');
		background-color: rgba(153,0,0,1);
	}
	.bg-5 {
		background-image: url('/images/mobile/produits_artisanaux_mobile.jpg');
		background-color: rgba(153,0,0,1);
	}	
	.bg-6 {
		background-image: url('/images/mobile/afterwork_mobile.jpg');
		background-color: rgba(153,0,0,1);
	}
	.bg-7 {
		background-image: url('/images/mobile/contact_mobile.jpg');
		background-color: rgba(153,0,0,1);
	}
	
	/* Typographie fluide */
		.parallax-content h1 {
		font-size: clamp(1.5rem, 2vw, 3.2rem);
	}
	
	/* 2. Réduction de l'opacité du fond du texte pour laisser passer l'image */
	.parallax-content {
		padding: 1.2rem 1rem;
		max-height: 70vh;  /*Libère du champ visuel au-dessus et en-dessous */
		width: 90%; /* Laisse voir l'image sur les côtés gauche et droit */
	}

	.parallax-bg {
		min-height: 115%;
	}

	.contact {
		padding: 0.5rem 1rem;     /* Padding ultra réduit */
		max-width: 490px;         /* Moins large pour libérer de la hauteur */
		max-height: 100vh;        /* S'assure que le bloc ne dépasse jamais la vue */
	}
}

/* --- CORRECTION ULTRA-COMPACTE : MOBILE EN MODE PAYSAGE --- */
@media (max-height: 500px) and (orientation: landscape)
{
	.parallax-container {
		/* Maintien strict de la hauteur sur les mobiles landscape avec barres système */
		height: 100vh;
		height: 100svh;
	}
	
	.parallax-content {
		padding: 0.5rem 1rem;     /* Padding ultra réduit */
		max-width: 490px;         /* Moins large pour libérer de la hauteur */
		max-height: 80vh;         /* S'assure que le bloc ne dépasse jamais la vue */
		border-radius: 10px;
	}
	.parallax-content h1 {
		font-size: 1.1rem;        /* Titre très compact */
		margin-bottom: 0.2rem;
	}
	.parallax-content p {
		font-size: 0.80rem;       /* Texte ajusté */
		line-height: 1.5;
	}
	
	.parallax-bg {
		height: 115%;
	}
	
	.contact {
		padding: 0.5rem 1rem;     /* Padding ultra réduit */
		max-width: 490px;         /* Moins large pour libérer de la hauteur */
		max-height: 80vh;         /* S'assure que le bloc ne dépasse jamais la vue */
		border-radius: 10px;
	}
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce)
{
	.parallax-bg {
		transform: none !important;
	}
	.fade-element {
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}