/* =========================================
   1. RÉGLAGES DE BASE
   ========================================= */
html {
    /* Force le smartphone à débloquer le défilement sur les pages de texte */
    overflow: visible !important;
    height: auto !important;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f7ec;
    color: #333;
    overflow-y: auto; /* Autorise le défilement de haut en bas */
}

/* MODE APPLICATION : S'applique UNIQUEMENT à la page de la carte */
body.page-carte {
    height: 100vh !important;
    overflow: hidden !important; /* Bloque l'écran uniquement sur la carte */
    display: flex;
    flex-direction: column;
}
/* =========================================
   2. EN-TÊTE (TITRE)
   ========================================= */
header {
    background-color: #4CAF50; 
    color: white;
    text-align: center;
    padding: 15px 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000; 
    flex-shrink: 0; 
    
    /* Garde le titre visible en haut quand on lit les pages d'explications */
    position: sticky;
    top: 0;
}

/* =========================================
   3. CARTE INTERACTIVE (ZONE PANZOOM)
   ========================================= */
body.page-carte main {
    flex-grow: 1; 
    overflow: hidden; 
    position: relative;
    touch-action: none; 
}

.map-container {
    position: relative; /* INDISPENSABLE pour que le calque SVG reste par-dessus l'image */
    width: 1200px; 
    margin: 0 auto; 
    user-select: none; 
    -webkit-user-drag: none;
}

.map-container img {
    display: block;
    width: 100%;
    height: auto; 
    pointer-events: none; 
}

/* --- Le calque SVG (qui superpose nos zones) --- */
.calque-interactif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Les zones tactiles (Cercles) --- */
.zone-cliquable {
    /* Le 0.2 à la fin donne une opacité de 20% (légèrement blanc) au lieu de 0 */
    fill: rgba(255, 255, 255, 0.2); 
    
    /* On ajoute un petit contour pointillé blanc très élégant */
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 2px;
    stroke-dasharray: 5; /* Crée l'effet de pointillés */
    
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; 
    transition: all 0.2s ease-in-out; /* Rend le changement de couleur fluide */
}

/* Effet quand on touche une zone avec le doigt */
.zone-cliquable:active, 
.zone-cliquable:hover {
    fill: rgba(255, 255, 255, 0.5); /* Devient plus blanc pour confirmer le clic */
    stroke: rgba(255, 255, 255, 1); /* Le contour devient 100% blanc */
}


/* =========================================
   4. PAGES D'EXPLICATIONS (LES SOUS-PAGES)
   ========================================= */

/* --- Conteneur global des pages --- */
.page-contenu {
    padding: 0; /* On enlève le padding pour que les photos touchent les bords */
    margin: 0;
    padding-bottom: 100px;
}

/* --- Les nouvelles grandes sections avec photo de fond (Parallaxe) --- */
.section-parallax {
    background-attachment: fixed; /* LA MAGIE EST ICI : l'image reste fixe pendant que le reste défile */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover; /* L'image s'étire pour couvrir toute la zone */
    padding: 60px 15px; /* Espace en haut et en bas des cadres de texte */
}

/* --- Pour centrer les cadres au milieu de l'écran --- */
.conteneur-texte {
    max-width: 600px;
    margin: 0 auto;
}

/* --- Rend les cadres légèrement transparents --- */
.texte-explicatif.translucide {
    /* 255, 255, 255 c'est le blanc. 0.85 c'est l'opacité (85% visible, 15% transparent) */
    background-color: rgba(255, 255, 255, 0.70); 
    /* Petit bonus très moderne : floute légèrement l'image qui passe derrière le texte */
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
}
.texte-explicatif {
    background-color: white;
    padding: 20px;
    border-radius: 12px; /* Bords arrondis */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Petite ombre */
    line-height: 1.6; /* Améliore la lisibilité */
    color: #444;
}

.texte-explicatif h2 {
    color: #8D6E63; /* Couleur marron/terre */
    margin-top: 0;
    font-size: 1.3rem;
}

.texte-explicatif ul {
    padding-left: 20px;
}

.texte-explicatif li {
    margin-bottom: 10px;
}

/* --- LE NOUVEAU BOUTON DE RETOUR (GRAND ET CENTRÉ) --- */
.bouton-retour {
    position: fixed;
    bottom: 25px; /* Écart par rapport au bas de l'écran */
    left: 50%;
    transform: translateX(-50%); /* Astuce magique pour le centrer parfaitement */
    
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 30px; /* Bords bien arrondis */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* Belle ombre pour le démarquer */
    z-index: 1000;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espace entre les émoticones et le texte */
    width: 80%; /* Prend 80% de la largeur de l'écran */
    max-width: 350px; /* Évite qu'il soit trop géant sur un grand écran */
}

/* Effet quand on appuie dessus */
.bouton-retour:active {
    background-color: #388E3C;
    transform: translateX(-50%) scale(0.95); /* Le bouton s'enfonce légèrement */
}

/* --- Style des photos dans les pages --- */
.photo-page {
    width: 100%; /* La photo prend toute la largeur disponible */
    height: auto;
    border-radius: 12px; /* Même arrondi que le bloc de texte */
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- Style pour un petit dessin à côté du texte --- */
.image-flottante {
    float: right; /* Place l'image à droite */
    width: 45%; /* Elle prend un peu moins de la moitié de l'écran */
    max-width: 160px;
    margin: 0 0 10px 15px; /* Laisse un peu d'espace entre l'image et le texte */
    border-radius: 8px;
}

/* Astuce pour éviter que le texte du bloc suivant ne remonte trop haut */
.nettoyeur {
    clear: both;
}

