html{
    font-family: 'Montserrat', sans-serif;
}

body {
    margin : 0;
    padding : 0;
    box-sizing: border-box;
}

:root {
  --marker-bg: #E64B2B;   /* couleur rouge-orangée */
  --marker-color: #fff;   /* couleur du chiffre */
}

.legend {
  counter-reset: item;
  list-style: none;
  margin: 0;
  margin-top:25px;
  padding: 0;
}

.legend li {
  counter-increment: item;
  position: relative;
  margin: 1rem 0;
  margin-bottom:25px;
  padding-left: 50px; /* espace pour le carré */
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
}

.legend li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--marker-bg);
  color: var(--marker-color);
  width: 35px;
  height: 35px;
  border-radius: 12px; /* coins arrondis */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
}

#game-container {
    position: relative;
    display: flex;
    flex-direction: row;

}
#imageDisplay {
    position: relative;
    width: 50%;
}
#background, .question-image, .filter-image {
    max-width: 100%;
    height: auto;
    max-height:95vh;
    
}
#infoDisplay {
    margin-left: 2%;
    margin-right:2%;
    position: relative;
    width : 50%;
}
#imageWrapper {
    max-width: 1200px;
    position: relative;
    height: auto;
}
#start-btn, #resultButton {
    padding : 0.75rem 1rem;
    background-color: #e64b2b;
    color : white;
    font-weight: bold;
    font-size : 1.2rem;
    font-family: "Montserrat", sans-serif;
    border-radius: 10px;
    outline: none;
    border : none;
    box-shadow: 2px 2px 3px darkgray;
    margin-top: 1rem;
    cursor: pointer;
    text-transform:uppercase;
    width:35%;
}

#start-btn:hover, #resultButton:hover {
    background-color: #b73c23;
    box-shadow: 2px 2px 5px darkgray;
    
}
.answer{
    padding : 0.75rem 1rem;
    background-color: #e64b2b;
    color : white;
    font-weight: bold;
    font-size : 1.2rem;
    font-family: "Montserrat", sans-serif;
    border-radius: 10px;
    outline: none;
    border : none;
    box-shadow: 2px 2px 3px darkgray;
    margin-top: 1rem;
    cursor: pointer;
    text-transform:uppercase;
    width: 100%;
    min-width: 220px;
    box-sizing: border-box;
    text-align: center;
}
.answer:hover{
    background-color: #b73c23;
    box-shadow: 2px 2px 5px darkgray;
    
}

.answer > p {
    font-weight: bold;
}

.click img{
    width:45px !important;
    height:45px !important;
    margin-right:25px !important;
}
.bravo-div{
    background-color: #4DA12D !important;
}
.bravo-div img{
    width:85px !important;
    height:98px !important;
    padding:2% !important;
}
.erreur{
    background-color: #EB001A !important;
}
.erreur img{
    width:55px !important;
    height:55px !important;
}

#resultText{
    line-height: 2rem;
}

#questionAnswers{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap : 1rem;
}
#imageFilters {
    display: flex;
    flex-wrap: wrap;
    gap : .5rem;
    z-index: 10000;
}
#filterText{
    margin : 0;
    padding : .1rem;
}

#filters {
    width: fit-content;
    position: absolute;
    display: flex;
    flex-direction: column;
    left : 1rem;
    bottom : .5rem;
    background-color: #ffffffaa;
    padding : .5rem;
    border-radius: 10px;
    box-shadow: 2px 2px 3px black;
    z-index: 10001;
    
}
#imageFilters > label{
    font-size : 1.2rem;
}

.back-btn{
    text-decoration: none;
    color : white;
    font-weight: bold;
    background-color: #e64b2b;
    padding : .5rem 1rem;
    border-radius: 10px;
}

.filter-control-group{
    padding : .3rem .2rem;
    border-radius: 5px;
}
.filter-label{
    padding-right : .5rem;
}
.icon {
    
    height: 20px;
}
.granit{
    background-color: #eac9d9;
}
.basaltes{
    background-color: #c6eeb3;
}
.rhyolites{
    background-color: #efefad;
}
.basaltes, .rhyolites, .granit {
    font-weight: bold;
    padding : .2rem .5rem;
    border-radius: 10px;
    color: black;
    border : 1px solid lightgrey;
    margin : .5rem .2rem;
}
.bravo{
    animation: bounceInRight 1s;
    font-size: 1.5rem;
}
.big-bravo{
    animation: bounceInRight 1s;
}

.avertissement{
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    background-color:#113041;
    padding:1%;
    margin-top: 15px;
}
.avertissement p{
    width:80%;
    color:white;
    font-weight:700;
    line-height: 1.5em;
}
.avertissement img{
    width:70px;
    height:60px;
    margin-right:15px;
}

#infoDisplay h3{
    font-size:24px;
    text-transform:uppercase;
    font-weight:700;
}

.answer-div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: flex-start;
    align-items: center;
}
.answer-div span{
    width:10%;
}
.answer-div img{
    margin-right:20px;
    height:auto;
    width:60%;
}


/* Media querry */

@media (min-width:1600px) and (max-width:1800px){

}

@media (min-width:1300px) and (max-width:1599px){

}

@media (min-width:1180px) and (max-width:1299px){
.row-90{
width:90% !important;
}
}

@media (min-width:981px) and (max-width:1179px){
.row-90{
width:90% !important;
}
}

@media (max-width:980px){
    .row-90{
        width:90% !important;
        }
    #game-container {
        flex-direction: column;
    }

    #imageDisplay {
        width: 100%;
    }

    #infoDisplay {
        width : 100%;
    }

}

@media (max-width:767px){
    #infoDisplay h3{
    font-size:20px;
}
    .avertissement{
        padding-top:3%;
        padding-bottom:3%;
    }
    #start-btn, #resultButton {
        width:90%;
        font-size:16px;
    }
    
    #infoDisplay p, #infoDisplay li{
        font-size:14px;
    }
    
    .legend li::before {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }
    .legend li{
        padding-left: 40px;
        font-size:14px;
    }
    .basaltes, .rhyolites, .granit{
        line-height: 2.1em;
    }
    
}
/* Fin media querry */

@keyframes bounceInRight {
    from,
    60%,
    75%,
    90%,
    to {
      animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
  
    from {
      opacity: 0;
      transform: translate3d(3000px, 0, 0) scaleX(3);
    }
  
    60% {
      opacity: 1;
      transform: translate3d(-25px, 0, 0) scaleX(1);
    }
  
    75% {
      transform: translate3d(10px, 0, 0) scaleX(0.98);
    }
  
    90% {
      transform: translate3d(-5px, 0, 0) scaleX(0.995);
    }
  
    to {
      transform: translate3d(0, 0, 0);
    }
  }
  
  .bounceInRight {
    animation-name: bounceInRight;
  }
/* Accessibilité clavier */
.answer-div {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.answer-div .answer {
    display: block;
    width: 60%;
    box-sizing: border-box;
}

.answer-div:hover .answer,
.answer-div:focus-visible .answer {
    background-color: #b73c23;
    box-shadow: 2px 2px 5px darkgray;
}

#start-btn:focus-visible,
#resultButton:focus-visible,
.answer-div:focus-visible .answer,
.filter-control:focus-visible + .filter-label,
.back-btn:focus-visible {
    outline: 4px solid #005fcc;
    outline-offset: 4px;
}

#resultText:focus {
    outline: none;
}

#questionText:focus,
#infosText:focus {
    outline: none;
}

/* ── Corrections de portée pour le plugin WordPress ─────────────────────── */
/* Les styles ci-dessus s'appliquent globalement mais sont suffisamment
   spécifiques (IDs et classes uniques) pour ne pas interférer avec le thème. */

/* Assure que la section du jeu prend toute la largeur du bloc Gutenberg */
.defi-geo-wrapper {
    width: 100%;
}

/* Cache le bouton résultat par défaut (géré par JS) */
#resultButton {
    display: none;
}
