* {
    box-sizing: border-box;
}

#inatguessr-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-id-148786 body {
    margin: 0;
    padding: 15px;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
}

#tutorial, #tutorial2, #game {
    width: 100%;
}

#game{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-id-148786 a{
    text-decoration: none;
    color: #45a049;
}

.page-id-148786 h1 {
    font-size: 75px;
    text-decoration: none; /* Remove underlines */
    color: inherit; /* Use the default text color */
}

.page-id-148786 h3 {
    font-size: 30px;
}

.page-id-148786 h4 {
    font-size: 25px;
}

.page-id-148786 p {
    font-size: 16px;
}

#imageContainer {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    box-sizing: border-box;
}

figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}

#imageContainer img {
    max-width: 100%; /* Ensure images do not exceed their container width */
    height: auto; /* Maintain the aspect ratio of the images */
    display: block; /* Remove extra spacing below inline images */
}

figcaption {
    margin-top: 5px; /* Add some space between the image and caption */
}

#map {
    width: 800px;
    height: 400px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    display: block;
}

@media (max-width: 768px) {
    #map {
        width: 100% !important;
        max-width: 100% !important;
        height: 320px !important;
    }

    #mapContainer {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
.modal-target {
    width: 100% !important;
  }
}

.page-id-148786 button {
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: #3c3c3c;
}

.greenButton {
    font-size: 18px;
}

.page-id-148786 h1, .page-id-148786 h2, .page-id-148786 h3, .page-id-148786 h4, .page-id-148786 h5, .page-id-148786 h6 {
    margin-top: 10px; /* Adjust the value to reduce the top margin */
    margin-bottom: 5px; /* Adjust the value to reduce the bottom margin */
}


.not-clickable {
    cursor: grab;
}


.modal-target {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    display: block;
    margin: 0 auto;
}
  
  .modal-target:hover {opacity: 0.7;}
  
  /* The Modal (background) */
  .pictureModal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000000; /* Sit on top */
    padding-top: 20px; /* Location of the box */
    padding-bottom: 20px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
  }
  
  /* Modal Content (image) */
  .modal-content {
    margin: auto;
    display: block;
    width: 80%;
    opacity: 1 !important;
    max-width: 1100px;
    object-fit: contain;
  }


#scoreContainer {
    border-style: solid;
    padding: 20px;
    min-width: 200px;
}

#tutorial{
    width: 75vw;
}


#tutorial2{
    width: 75vw;
    font-size:16px !important;
}


hr {
    border: 10px solid green;
    border-radius: 5px;
  }


@media screen and (max-width: 1150px) {
    #map {
    width:100%;
    max-width:100%;
        height: 800px;
    }

    #tutorial{
        width: 95vw;
    }
    
    
    #tutorial2{
    width:100%;
    max-width:95vw;
    box-sizing:border-box;
    }

    .page-id-148786 p {
        font-size: 16px;
    }
    
}

.radio-inline{
    cursor: pointer;
}


.radio-inline input[type="radio"] {
    display: none;
}
.radio-inline input[type="radio"] + span {
    font-weight: normal;
}
.radio-inline input[type="radio"]:checked + span {
    font-weight: bold;
    text-shadow: 0 0 10px #45a049;
}






#gameTypeSelect{
    display:inline-block;
    min-width:320px;
    max-width:100%;
    padding:12px 16px;
    margin-left:10px;
    border:1px solid #d0d0d0;
    border-radius:10px;
    background:#fff;
    font-size:18px;
    cursor:pointer;
    transition:.2s;
}

#gameTypeSelect:hover{
    border-color:#888;
}

#gameTypeSelect:focus{
    outline:none;
    border-color:#4caf50;
    box-shadow:0 0 0 3px rgba(76,175,80,.15);
}

@media(max-width:768px){

    #gameTypeSelect{
        display:block;
        width:100%;
        min-width:unset;
        margin-top:10px;
        margin-left:0;
    }

    .page-id-148786 h1{
        font-size:40px;
        word-break: keep-all;
    }

    #filtersBar{
        flex-direction:column;
        align-items:center;
    width:auto;
    }

    .filterGroup{
        align-items:center;
        width:100%;
    }

    #taxonSelect,
    #placeSelect,
    #nPhotos{
        width:250px;
        max-width:250px;
        margin:5px auto;
    }


}

#filtersBar{
    display:flex;
    justify-content:center;
    align-items:flex-end;
    gap:0px;
    flex-wrap:wrap;
    width:100%;
}

.filterGroup{
    display:flex;
    flex-direction:column;
    align-items:center;
}

#taxonSelect,
#placeSelect{
    width:200px;
    margin:10px;
    max-width:200px;
    padding:8px 10px;
    font-size:18px;
    border:1px solid #d0d0d0;
    border-radius:8px;
    box-sizing:border-box;
}

#taxonSelect,
#placeSelect{
    width:160px;
}

#nPhotos{
    width:70px;
    margin:10px;
    max-width:70px;
    padding:8px 10px;
    font-size:18px;
    border:1px solid #d0d0d0;
    border-radius:8px;
    box-sizing:border-box;
    display: none;
}

#applyFilters{
    display:block;
    margin:15px auto;
    font-size: 18px;
}

#playButton{
    display: block;
    margin: 20px auto;
    width: fit-content;
}

#game {
    width: 100%;
}

#tutorial, #tutorial2 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#currentGameSetup{
    font-size:14px !important;
    text-align:center;
    font-style: italic !important;
}

#currentGameSetup span{
    font-size:14px !important;
    font-style: italic !important;
}

.applyContainer{

    width:100%;
    text-align:center;
    box-sizing:border-box;
    display: flex;
    justify-content: center;
    font-size: 18px;
}

#imageContainer figure {
    overflow: hidden;
}

figcaption {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    word-break: break-word;
    padding: 5px 8px;
}

#photosSelector {
    display: none !important;
}

.page-id-148786 button {
    background-color: #1e88e5;   /* bleu principal */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* HOVER STATE (bleu foncé) */
.page-id-148786 button:hover {
    background-color: #1565c0;
}

/* CLICK FEEDBACK (optionnel mais propre) */
.page-id-148786 button:active {
    transform: scale(0.98);
}

#applyFilters,
#playButton,
#confirmGuessButton {
    width: 220px;
    display: block;
    margin: 20px auto;
}

.page-id-148786 button {
    box-sizing: border-box;
}

#inatOutwardContainer,
#scoreContainer,
#game {
    align-items: center;
}


@media (max-width: 768px) {

    /* 1. FULL WIDTH SUR MOBILE */
    #inatguessr-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 10px;
    }

    /* 3. CARTE : obligatoire (sinon invisible / cassée) */
    #map {
        width: 100% !important;
        height: 60vh !important;
        max-width: 100%;
    }

    /* 4. GAME AREA */
    #tutorial, #tutorial2, #game {
        width: 100% !important;
    }

    /* 5. BOUTONS */
    #applyFilters,
    #playButton,
    #confirmGuessButton {
        width: 90%;
        max-width: 260px;
    }
}

html, body {
    overflow-x: hidden;
}

.copyright-tooltip2 {
  position: relative;
  display: block;
  text-align: center;
  cursor: help;
  width: 100%;
  font-size: 11px;
}
.copyright-tooltip2 .tooltip-text2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 12px); /* 👈 AU-DESSUS */
  width: min(360px, 90vw);
  background: #222;
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.copyright-tooltip2:hover .tooltip-text2 {
  opacity: 1;
  visibility: visible;
}


.copyright-tooltip1 {
  position: relative;
  display: block;
  text-align: center;
  cursor: help;
  width: 100%;
}

/* le texte */
.copyright-tooltip1 .tooltip-text1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  top: calc(100% + 10px); /* 👈 EN BAS maintenant */

  width: min(360px, 90vw);

  background: #222;
  color: #fff;
  padding: 12px;
  border-radius: 6px;

  font-size: 14px;
  line-height: 1.4;

  z-index: 999999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.2s ease;
}

/* affichage */
.copyright-tooltip1:hover .tooltip-text1 {
  opacity: 1;
  visibility: visible;
}

#inatguessr-wrapper,
#tutorial2,
#gameSettings {
  overflow: visible !important;
}

.tooltip-title {
  width: 100%;
  text-align: center;
  font-weight: bold;
}