:root {
    /* Couleurs par défaut (Jour) */
    --pierre: #FDFCF5; 
    --ardoise: #2C3E50; 
    --or: #D4AF37; 
    --vert: #00423C; 
	--card: #FDFCF5; 
    --shadow: rgba(0, 0, 0, 0.6);
}

/* LA CLASSE DARK-MODE DOIT RE-DÉFINIR LA VARIABLE --PIERRE */
body.dark-mode {
    --pierre: #001a18 !important; /* Le vert très sombre de Valençay */
    --ardoise: #FDFCF5 !important; /* Le texte repasse en clair */
    --card: #2C3E50 !important; /* Le texte repasse en clair */	
}

body {
    font-family: 'Segoe UI', sans-serif;
    /* On utilise la variable ici */
    background-color: var(--pierre) !important; 
    color: var(--ardoise);
    margin: 0;
    padding: 0;
    transition: background-color 0.5s ease, color 0.5s ease;
    
    /* Gestion de l'image de fond pour qu'elle ne cache pas la couleur */
    background-image: url('images/V.png');
    background-repeat: no-repeat;
    background-position: left;
    background-attachment: fixed;
    background-size: 45%;
    /* On ajoute un mode de fusion pour que le V s'adapte au mode sombre */
    background-blend-mode: multiply; 
    
			/* opacity: 0.15; -> Ne pas utiliser ici car cela affecterait tout le contenu du body ! 
			Il faut vraiment que la transparence soit gérée dans la couleur du SVG lui-même. 

	color: #333;
	margin: 0;
	padding: 20px;
	cursor: none;
}

        /* --- ACCUEIL --- */
        #splashScreen {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000;
            background-color: black; display: flex; justify-content: center; align-items: center;
            transition: opacity 0.6s ease;
        }
        .splash-video-bg { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
        .splash-content { position: relative; text-align: center; color: white; z-index: 10; }
        .start-btn { background-color: var(--vert); color: white; border: none; padding: 20px 50px; font-family: 'Montserrat'; font-size: 1.3rem; border-radius: 50px; cursor: pointer; margin-top: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

        /* --- APP --- */
        #mainApp { display: none; padding: 20px; animation: fadeIn 0.8s; }
        header { text-align: center; margin-bottom: 20px; }
        .separator { width: 60px; height: 3px; background: var(--or); margin: 10px auto; }

        /* --- PLAN --- */
        .map-section { max-width: 900px; margin: 0 auto 30px auto; background: #e3d3b4; padding: 15px; border-radius: 15px; box-shadow: 0 5px 15px var(--shadow); text-align: center; }
        .level-selector { display: flex; justify-content: center; gap: 8px; margin-bottom: 15px; }
        .level-btn { padding: 10px 18px; border: 2px solid var(--or); background: none; cursor: pointer; font-family: 'Montserrat'; font-weight: bold; border-radius: 5px; transition: 0.3s; }
        .level-btn.active { background: var(--or); color: white; }
        
        .map-container { position: relative; display: inline-block; border: 1px solid #ddd; border-radius: 10px; overflow: hidden; z-index: 10; }
        #mapImage { max-width: 75%; height: auto; }
        
.hotspot {
    position: absolute;
    width: 32px;
    height: 32px;
    background: var(--or);
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Profondeur de base */
    transition: transform 0.2s, z-index 0s; /* Z-index doit être instantané */
}

.hotspot:hover {
    z-index: 9999 !important; /* Force le passage au-dessus de TOUT */
    transform: translate(-50%, -50%) scale(1.1); /* Petit effet de grossissement pour confirmer le survol */
    background: var(--vert); /* Optionnel : change de couleur au survol */
}

        /* --- GRILLE & VIGNETTES --- */
        .grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; max-width: 1100px; margin: 0 auto; }
        .card { background:var(--card); border-radius: 15px; overflow: hidden; box-shadow: 0 8px 20px var(--shadow); cursor: pointer; transition: transform 0.2s; }
        .card:active { transform: scale(0.98); } /* Effet tactile */
        
        /* Format Vignette Bloqué */
        .vignette-container { 
            position: relative; 
            height: 200px; /* Hauteur fixe */
            width: 100%; 
            background: #000; 
            overflow: hidden; 
        }
        .vignette-video { 
            width: 100%; 
            height: 100%; 
            object-fit: cover; /* Recadre proprement la vidéo */
            pointer-events: none; /* Empêche l'utilisateur d'interagir avec la miniature */
        }
		
		/* Style de la bulle d'info (Tooltip) */
		.hotspot-tooltip {
			position: absolute;
			bottom: 100%; /* Affiche la bulle au-dessus du point */
			left: 50%;
			transform: translateX(-50%);
			background-color: var(--ardoise);
			color: var(--pierre);
			padding: 8px 15px;
			border-radius: 8px;
			font-family: 'Montserrat', sans-serif;
			font-size: 0.9rem;
			white-space: nowrap; /* Empêche le texte de revenir à la ligne */
			box-shadow: 0 5px 15px rgba(0,0,0,0.3);
			opacity: 0; /* Caché par défaut */
			visibility: hidden;
			transition: opacity 0.3s, transform 0.3s;
			pointer-events: none; /* La bulle ne doit pas gêner le clic */
			z-index: 1000;
		}

		/* Petit triangle sous la bulle */
		.hotspot-tooltip::after {
			content: "";
			position: absolute;
			top: 100%;
			left: 50%;
			transform: translateX(-50%);
			border-width: 6px;
			border-style: solid;
			border-color: var(--ardoise) transparent transparent transparent;
			z-index: 9999;
		}

		/* Affichage au survol du point */
		.hotspot:hover .hotspot-tooltip {
			opacity: 1;
			visibility: visible;
			transform: translateX(-50%) translateY(-5px);
			z-index: 9999;
		}		
		
		.logo { max-width: 75%; margin-bottom: 10px; }
        
/* style.css */

/* --- NOUVEAU STYLE POUR L'ONGLET VIGNETTE --- */

/* Le conteneur parent de la vignette */
.vignette-container {
    position: relative;
    height: 200px;
    width: 100%;
    background: #000;
    overflow: hidden;
}

/* La vidéo miniature (déjà présente) */
.vignette-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Empêche l'interaction directe */
}

/* L'overlay (bandeau inférieur) de la vignette */
.vignette-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px; /* Hauteur du bandeau */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); /* Dégradé pour lisibilité */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none; /* L'overlay ne gêne pas le clic sur la carte */
}

/* Le texte "LIRE TOUT" */
.vignette-read-all {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 5px; /* Espace avant le curseur */
    margin-left: 10px; /* Aligné à gauche */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Ombre pour lisibilité */
}


        /* --- MODAL PLEIN ÉCRAN --- */
        .modal { 
			display: none; 
			position: fixed; 
			z-index: 3000; 
			top: 0; 
			left: 0; 
			width: 100%; 
			height: 100%; 
			
			background-color: #00423C; 
			background-image: url('images/volute.png'); 
    
			background-repeat: repeat;    /* Le motif se répète pour couvrir tout l'écran */
			background-position: center;   /* Centre le motif de base */
			background-attachment: fixed; /* Le fond reste fixe quand on scrolle le contenu */
			background-size: 100%;        /* Définit la taille d'un motif de base (à ajuster selon le dessin) */ 
		}
		
.start-btn, .level-btn, .hotspot, .card, .close-btn {
    cursor: pointer;
}		
        .modal-content { width: 95%;  margin: 2% auto; text-align: center; color: white; }
        video#mainVideo { width: 100%; border-radius: 10px; border: 1px solid var(--or); background: #000; }
        .close-btn { background: var(--or); color: white; border: none; padding: 15px 35px; cursor: pointer; border-radius: 50px; margin-bottom: 15px; font-weight: bold; font-family: 'Montserrat'; }

        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
		
		
/* --- JAUGE DE PROGRESSION --- */
#progress-container {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 6px;
    background: rgba(0,0,0,0.1); z-index: 1000;
}
#progress-bar {
    width: 0%; height: 100%; background: var(--or);
    transition: width 0.5s ease; box-shadow: 0 0 10px var(--or);
}
#progress-text {
    position: fixed; bottom: 10px; right: 20px; font-family: 'Montserrat';
    font-size: 0.7rem; color: var(--ardoise); opacity: 0.7;
}

/* --- MODE LUEURS NOCTURNES (Dark Mode) --- */
body.dark-mode {
    --pierre: #002622; /* Vert très sombre */
    --ardoise: #2C3E50; /* Texte clair */
    background-color: #001a18;
    color: #002622;
}
body.dark-mode .card, body.dark-mode .map-section {
    background: #002622; color: white; border: 1px solid rgba(212, 175, 55, 0.3);
}
body.dark-mode p { color: #ccc !important; }

/* Bouton de switch */
#theme-switch {
    position: fixed; top: 20px; right: 20px; z-index: 1500;
    background: var(--or); border: none; border-radius: 50%;
    width: 45px; height: 45px; cursor: pointer; font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); display: none; /* Caché sur le splash */
}

/* LE TITRE DANS LA VIDÉO */
#video-overlay-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: var(--or); /* Texte doré */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: left;
    z-index: 10;
    pointer-events: none; /* Pour pouvoir cliquer sur la vidéo derrière */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Conteneur pour superposer les éléments */
.video-wrapper {
    position: relative;
    width: 90%;
    max-width: 90%;
	max-height: 90%;
    margin: 0 auto;
    border: 3px solid var(--or);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#video-overlay-logo {
    position: absolute;
    top: 3%; /* Espace depuis le haut */
    right: 3%; /* Espace depuis la droite */
    width: 6%; /* Taille du logo (à ajuster selon votre logo) */
    height: auto; /* Maintient les proportions */
    z-index: 20000; /* Au-dessus de la vidéo et du titre */
    pointer-events: none; /* Pour pouvoir cliquer sur la vidéo derrière */
    opacity: 0; /* Caché par défaut */
    transition: opacity 1s ease-in-out; /* Animation fluide de l'apparition/disparition */
    
    /* Optionnel : Un léger dégradé noir derrière pour la lisibilité sur fond clair */
    /* background: radial-gradient(circle, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 70%); */
    /* padding: 10px; */
    /* border-radius: 50%; */
}

#mainVideo {
    width: 100%;
    display: block; /* Évite les espaces vides sous la vidéo */
}