/* 1. La Normale */
@font-face {
    font-family: 'Coolvetica';
    src: url("polices/Coolvetica Rg.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

/* 2. L'Italique */
@font-face {
    font-family: 'Coolvetica';
    src: url("polices/Coolvetica Rg It.otf") format("opentype");
    font-weight: normal;
    font-style: italic;
}

/* 3. La Condensée */
@font-face {
    font-family: 'Coolvetica Condensed';
    src: url("polices/Coolvetica Rg Cond.otf") format("opentype");
    font-weight: normal;
}

/* 4. La Tassée (très étroite) */
@font-face {
    font-family: 'Coolvetica Crammed';
    src: url("polices/Coolvetica Rg Cram.otf") format("opentype");
    font-weight: normal;
}

/* 5. La Massive (très grasse) */
@font-face {
    font-family: 'Coolvetica Heavy';
    src: url("polices/Coolvetica Hv Comp.otf") format("opentype");
    font-weight: bold;
}


header{

    padding: 1%;
    background-image: url("/photos/originales/orite_longue_queue-1.jpg");
    background-size: cover;
    background-position: 20% 48%;
    box-shadow: 0 0 4px 4px whitesmoke, 0 -4px 4px whitesmoke inset;
}

h1{
    text-align: center;
    font-size: 300%;
    color: whitesmoke;
    text-shadow: 5px 5px 8px black;
}
h2{
    font-size: 160%;
    background-color: rgb(158, 158, 161);
    
}

h3{
    font-size: 250%;
    
}
h4{
    font-size: 130%;
    
}

.droite img:hover{
    /* Crée un centre transparent et des bords noirs assombris */
  background: radial-gradient(circle, rgba(0,0,0,0) 50%, rgba(0,0,0,0.7) 100%);
}

.conteneur {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* On supprime "grid-template-rows: 1fr;" qui forçait l'écrasement */
    margin: 0;
    padding: 10px;
    min-height: 100vh; /* LE SECRET : min-height au lieu de height */
    box-sizing: border-box;
    align-items: start; /* Assure que les éléments s'alignent par le haut */
}



.gauche{
    grid-column: 1;
    font-size: 80%;
    /* margin:auto; */

   
    
}

.titre{
    font-size: 130%; 
    text-align: center;        
    aspect-ratio: 3 / 1;        /* Force un ratio carré parfait */
    border: 2px solid #312d2d;  /* Bordure de la boîte */
    padding: 10px;                /* Un peu d'espace à l'intérieur de la boîte */
    
    margin-right: 10px;
   
}

.infos{
    margin-right: 10px;
    aspect-ratio: 1 / 1;        /* Force un ratio carré parfait */
    border: 2px solid #312d2d;  /* Bordure de la boîte */
    padding: 10px;                /* Un peu d'espace à l'intérieur de la boîte */
}


.droite{
    grid-column: 2/4;
    min-height: 0; 
}


.droite img{
    max-height: 1338px;           /* L'image s'étire sur toute la largeur de sa colonne */
    width: 100%;
    object-fit: cover;     /* recadre l'image pour remplir la zone sans la déformer ! */
    border-radius: 5px;    /* Petits bords arrondis */
    display: block;
    transition: all 0.2s ease-in-out;
}



.droite img:hover{
    transform: scale(0.995);
    filter: brightness(75%);
}


.conteneur-image-cliquable {
    position: relative; /* Devient le point 0,0 pour le texte absolu */
    width: 100%;
    flex-grow: 1; /* Prend tout l'espace restant sous les titres */
    cursor: zoom-in;
    border-radius: 5px;
}


.texte-survol {
    position: absolute;
    
    /* La formule magique universelle pour centrer parfaitement un élément absolu */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 150%;
    opacity: 0; /* Totalement invisible par défaut */
    transition: all 0.2s ease-in-out;
    pointer-events: none; /* Optionnel : empêche le texte de bloquer le clic sur l'image */
}

.conteneur-image-cliquable:hover .texte-survol {
    opacity: 1; /* Fait apparaître le texte en douceur */
}



#map { 
    height: 300px; 
    width: 600px;
    grid-column: 1;
}

body{
    background-color: rgb(218, 218, 222);
    margin: 0;
}


#main{
    margin-top: 2%;
}



#justeunpieddepage{
    text-align: center;
    /* font-size: 80%;
    color: #312d2d;
    padding: 10px;
    background-color: rgb(218, 218, 222);
    margin-top: 200%; */
}

a {
    text-decoration: none; /* Fait réapparaître le soulignement */
    color: #000000; /* Change la couleur au survol */
}

a:hover {
    text-decoration: none; /* Fait réapparaître le soulignement */
    color: #426b36; /* Change la couleur au survol */
}


/* Le fond noir semi-transparent */
.lightbox {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 99999; /* Obligatoire pour passer par-dessus la carte Leaflet */
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    
    /* Flexbox pour centrer l'image géante parfaitement au milieu */
    justify-content: center;
    align-items: center;
}

/* L'image affichée en grand */
.lightbox-img {
    max-width: 95%; /* Laisse une petite marge avec les bords de l'écran */
    max-height: 95%;
    object-fit: contain; /* L'image garde ses proportions sans être coupée */
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

/* La petite croix de fermeture */
.fermer {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.fermer:hover {
    color: #bdc3c7;
}



header{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    align-items: center;
}

.titre_carte{
    grid-column: 2;
}


.btn-retour {
    /* 1. On le transforme en bloc pour pouvoir lui donner des marges et des dimensions */
    justify-self: start;
    grid-column: 1;
    display: inline-block;
    margin: 20px;
    padding: 10px 20px;
    
    /* 2. Les couleurs (J'ai repris le bleu foncé de ton compteur d'espèces) */
    background-color: rgb(198, 198, 198); 
    color: rgb(0, 0, 0);
    text-decoration: none; /* Enlève le soulignement classique des liens */
    
    /* 3. La forme */
    border-radius: 8px;
    font-family: 'Coolvetica', sans-serif;
    font-size: 150%;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    
    /* 4. Préparation de l'animation */
    transition: all 0.2s ease-in-out;
}

/* L'effet au survol de la souris */
.btn-retour:hover {
    background-color: rgb(158, 158, 158); /* Un bleu légèrement plus clair */
    transform: scale(1.02); /* Petit effet de zoom */
    box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
}

footer{
    background-color: #19211c;
    padding: 1px;
    background-size: cover;
    color: rgb(194, 194, 194);
    text-align: center;
    margin: 0;
}


/* ======================================================== */
/* ADAPTATION POUR SMARTPHONE (Écrans de 768px et moins)    */
/* CARTE ESPECE                                             */
/* ======================================================== */

@media (max-width: 768px) {
    
    /* --- 1. L'EN-TÊTE --- */
    header {
        display: flex ;
        justify-content: center ; /* Centre parfaitement le titre */
        align-items: center ;
        position: relative ; /* Devient le point de repère pour le bouton flottant */
        padding: 20px 10px ;
    }

    .btn-retour {
        position: absolute ; /* Le bouton flotte par-dessus le reste */
        left: 10px ; /* On le colle à 10px du bord gauche */
        margin: 0 ;
        font-size: 70% ; /* Bouton plus petit */
        padding: 8px 12px ;
        width: auto ; /* Il s'adapte à la taille du texte */
    }

    .titre_carte {
        font-size: 180% ; 
        margin: 0 ;
        text-align: center ;
    }

    /* --- 2. LE CONTENEUR GLOBAL --- */
    .conteneur {
        display: flex ;
        flex-direction: column ;
        height: auto ; 
        padding: 10px ;
        gap: 15px ; 
    }

    /* --- 3. LA BOÎTE GAUCHE FANTÔME --- */
    .gauche {
        display: contents ; 
    }

    /* --- 4. LE BLOC 1 : LE TITRE --- */
    .titre {
        order: 1 ; 
        width: 100% ;
        margin: 0 ;
        aspect-ratio: auto ; 
        box-sizing: border-box ; 
    }

    /* --- 5. LE BLOC 2 : L'IMAGE --- */
    .droite {
        order: 2 ; 
        width: 100% ;
        margin: 0 ;
    }

    /* --- 6. LE BLOC 3 : LES INFOS --- */
    .infos {
        order: 3 ; 
        width: 100% ;
        margin: 0 ;
        aspect-ratio: auto ; 
        box-sizing: border-box ;
    }
    
    /* --- 7. LE FOOTER (La correction magique) --- */
    footer {
        order: 4 ; /* Le repousse tout en bas, après 1, 2 et 3 ! */
        width: 100% ;
    }

    /* --- 8. LA CARTE GPS --- */
    #map {
        width: 100% ; 
        height: 250px ;
    }
}