
@import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap');

* {
    font-family: "Roboto Flex", sans-serif;
    font-optical-sizing: auto;
    font-weight:400;
    font-style:normal;
    font-variation-settings:
      "slnt" 0,
      "wdth" 100,
      "GRAD" 0,
      "XOPQ" 96,
      "XTRA" 468,
      "YOPQ" 79,
      "YTAS" 750,
      "YTDE" -203,
      "YTFI" 738,
      "YTLC" 514,
      "YTUC" 712;
}
body {

    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background: url(BG/bg_départ_stars.jpg) no-repeat ;
    background-size: cover;
 /*   background-color: aquamarine;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}


h1 {
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 8px;
    margin-top: 35px ;
    padding-bottom: 40px;
    color: #333;
}
.info-conteneur {
    max-height: 375px; /* Limite la hauteur visible à 300px */
    overflow-y: auto; /* Active le défilement vertical */
    max-width: 80%; /* Limite la largeur du paragraphe */
    margin: 20px auto; /* Centre le conteneur horizontalement */
    padding: 15px; /* Ajoute un espace intérieur */
    border: 2px solid #007BFF; /* Bordure bleue */
    border-radius: 10px; /* Coins arrondis */
    background-color: #F9F9F9; /* Arrière-plan léger */
    font-size: 15px; /* Taille de texte adaptée */
    color: #333; /* Couleur du texte */
    text-align:center; /* Justifie le texte pour une meilleure lecture */
   /* justify-content: center;*/
    overflow-wrap: break-word; /* Coupe les textes trop longs */
    position: relative;
    cursor: pointer;
}

.short-text {
    text-align: center  ;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content:space-evenly;
    margin: 0;
}
.full-text {
    display: none; /* Masque le contenu étendu au départ */
    margin-top: 10px;
}

/*.toggle-arrow {
    font-size: 1.2rem;
    color: #007BFF;
    cursor: pointer;
    user-select: none;
} */   
.toggle-arrow::after {
    content: "\25B6"; /* Code Unicode pour une flèche droite */
    font-size: 16px; /* Ajustez la taille */
    color: #007BFF;
    
}
.toggle-arrow.active::after {
    content: "\25BC"; /* Flèche vers le bas pour indiquer "Afficher moins" */
    color: #007BFF;
}
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Ajoute un espace entre les boutons */
    flex-wrap: wrap; /* Permet de passer en plusieurs lignes si nécessaire */
    margin: 20px auto;
    max-width: 800px;
}




#questionnaire-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    text-align: center;
    font-size: 25px;
    justify-content: center;
    border: 1px solid black;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    width: 80%; /* Redimensionner le conteneur */
    max-width: 700px; /* Largeur maximale */
    margin-bottom: 20px;

    

}


#explication-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    text-align: center;
    font-size: 25px;
    justify-content: center;
    border: 1px solid black;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 1, 1, 0.6);
    width: 80%; /* Redimensionner le conteneur */
    max-width: 700px; /* Largeur maximale */
    margin: 10px;
}

#explication-text {
    margin-bottom: 40px;
}



#btnModeVert {background-color: rgb(85, 131, 17);
    border: 2px solid darkgreen;
    color:#fff;  
} 

#btnModeVert:hover {background-color: lightgreen;
    border: 4px solid green;
    color: #000;
}

#btnModeRouge {background-color: rgb(194, 81, 115);
    border: 2px solid darkred;
    color:#fff;  
} 

#btnModeRouge:hover {background-color: lightcoral;
    border: 4px solid red;
    color: #000;
}

#btnModeMix {background-color: rgb(113, 113, 218);
    border: 2px solid darkblue;
    color:#fff;  
} 

#btnModeMix:hover {background-color: lightblue;
    border: 4px solid rgb(70, 70, 139);
    color: #000;
}

#explication-title {
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 9px;
} 

button {
    margin: 30px ;
    padding: 2px 20px;
    font-size: 1.2rem;
    font-weight:400; 
    border: 2px solid black;
    border-radius: 5px;
    cursor: pointer;
    width: 250px; /* Redimensionner les boutons */
    height: 85px; /* Hauteur des boutons */
}    

/* Ajout des animations fade-in et fade-out */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 1s ease-in-out forwards;
}

.fade-out {
    animation: fadeOut 1s ease-in-out forwards;
}
/* Appliquer les animations aux boutons de réponse */
button.response-button {
    margin: 30px ;
    padding: 2px 20px;
    font-size: 20px;
    font-weight:400; 
    border: 2px solid black;
    border-radius: 5px;
    cursor: pointer;
    width: 270px; /* Redimensionner les boutons */
    height: 85px; /* Hauteur des boutons */
    position: relative;
    
}

button.response-button .text {
    opacity: 1; /* Initialement visible */
    animation: fadeOut 1s ease-in-out 3s forwards; /* Animation fade-out après 4 secondes */

}

button.response-button .alt-text {
    opacity: 0; /* Initialement invisible */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: fadeIn 1s ease-in-out 3s forwards; /* Animation fade-in après 4 secondes */
}
#questionnaire div {
    opacity: 1; /*Initialement visible*/
} 

#question {
    opacity: 0; /* Initialement invisible */
    animation: fadeIn 1s ease-in-out 1.5s forwards; /* Animation fade-in après 4 secondes*/
}


button.correct {
    background-color: green;
    color: white;
    
}

button.incorrect {
    background-color: red;
    color: white;
}

/* Conteneur principal du timer */
#question-timer {
    background-color: #f8f8f8; /* Optionnel : couleur d'arrière-plan */
    position: absolute;
    height: 45px;
    top: 0px;
    left: 0px;
    right: 0px; /* Étend le conteneur sur toute la largeur */
    font-size: 25px;
    display: flex; /* Place les éléments côte à côte */
    justify-content: center;
    align-items: center; /* Centre verticalement les éléments */
    gap: 15px; /* Espace constant entre les éléments */
    z-index: 999; /* Garantit que le timer est au-dessus des autres éléments */
}
/* Texte "Temps pour la question" */
#question-time-text {
    flex: none;
    font-size: 25px;
    white-space: nowrap; /* Empêche les retours à la ligne */
}
/* Conteneur de la jauge */
#gauge-container {
    width: 150px; /* Largeur fixe pour la jauge */
    height: 10px;
    position: relative;
    flex-shrink: 0; /* Empêche le conteneur de rétrécir */
}

/* Fond de la jauge */
#btimeGauge {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background-color: lightgray;
    position: absolute;
    top: 0;
    left: 0; /* Fixe la position du fond de la jauge */
}
/* Barre dynamique (jauge verte) */
#timeGauge {
    width: 100%; /* Départ pleine largeur */
    height: 100%;
    border-radius: 10px;
    background-color: mediumseagreen;
    position: absolute; /* S'assure que la jauge diminue sans affecter les autres éléments */
    right: 0; /* Démarre à gauche */
    top: 0;
    transition: width 0.1s linear; /* Animation fluide */
}
/* Timer numérique */
#question-time {
    flex: none;
    font-size: 25px;
    text-align: center; /* Centre le texte à l'intérieur */
    width: 2ch; /* Réserve toujours l'espace nécessaire pour deux caractères */
    white-space: nowrap; /* Évite les retours à la ligne */
    margin-left: 10px; /* Ajoute un espace après la jauge */
}

#footer-container {
    display: flex; /* Utilisation de flexbox pour aligner les deux conteneurs horizontalement */
    justify-content: space-between; /* Place les éléments aux extrémités (progress à gauche et timer à droite) */
    align-items: center; /* Aligne les éléments verticalement */
    position: fixed; /* Fixé au bas de la fenêtre */
    bottom: 0px; /* Fixé en bas de la page */
    left: 0px;
    right: 0px; /* Étend le conteneur sur toute la largeur */
    height: 60px; /* Ajuste la hauteur au contenu */
    background-color: #f8f8f8; /* Optionnel : couleur d'arrière-plan */
    z-index: 10;
    padding: 0 15px; /* Ajoute un peu de marge intérieure */
    
   
}
#progress-container {
    display: flex; /* S'assure que les cercles sont en ligne */
    flex-wrap: wrap; /* Empêche le passage à une autre ligne */
    justify-content: center ; /* Aligne les cercles à gauche */
    align-items: center; /* Centre verticalement les cercles */
    gap: 7px; /* Espacement entre les cercles */
    width: auto; /* S'ajuste à la largeur des cercles */
    
    height: 100%; /* Prend toute la hauteur du footer */
    overflow: visible; /* Rend visible tout contenu qui dépasse */
}
#progress {
    display: flex; /* Affiche les cercles horizontalement */
    align-items: center; /* Centre verticalement les cercles */
    gap: 7px; /* Espace entre les cercles */
    
}

.prog {
    width: 25px;
    height: 25px;
    border: 1px solid #000;
    border-radius: 50%;
    background-color: lightgray; /* Initialement gris */
    display: flex; /* Pour aligner le texte */
    justify-content: center; /* Centre le texte horizontalement */
    align-items: center; /* Centre le texte verticalement */
    font-size: 12px; /* Ajuste la taille du texte */
    color: grey; /* Couleur initiale du texte */
    
}

#progress-label, #timer-label {
    font-size: 16px; /* Réduit légèrement la taille des labels */
    text-align: center;
    margin-right: 10px;
}

#seconde-label {
    font-size: 16px; /* Réduit légèrement la taille des labels */
    text-align: center;
    margin-right: 15px;
}

#timer {
    margin-right: 10px;
    margin-left: 10px;
    font-size: 25px; /* Ajuste la taille du texte */
    font-weight: 400;
    width: auto; /* Ajuste la largeur au contenu */
    text-align: right;
    height: 100%; /* Prend toute la hauteur du footer */
    display: flex;
    align-items: center; /* Centre verticalement */
    height: 100%;
    gap: 8px;
}



body.vert {
    background: url(BG/bg_vert_pluie.jpg) no-repeat ;
    background-size: cover;
    /*background-color: lightgreen;*/

}

body.rouge {
    background: url(BG/bg_rouge_ruby.png) no-repeat ;
    background-size: cover;
}
   /* background-color: lightcoral;}*/


@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}    
.pulse {
    animation: pulse 1s infinite; 
}
.red {
    color: red;
}

.custom-alert {
    display: none; /* Masque l'alerte au chargement */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000;
    text-align: center;
    width: 320px; /* Ajuster la largeur de la fenêtre */
    border-radius: 10px;
}

#alert-message {
    margin-bottom: 20px; /* Espace sous le message */
    font-size: 22px;
}

.alert-button-container {
    display: flex; /* Boutons alignés horizontalement */
    justify-content: space-between; /* Ajoute de l'espace entre les boutons */
    gap: 10px; /* Espace entre les boutons */
}

.alert-button-container button {
    flex: 1; /* Permet aux boutons d'avoir la même largeur */
    height: 50px; /* Hauteur des boutons */
    font-size: 16px; /* Taille du texte lisible */
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50; /* Couleur verte par défaut */
    color: white;
}
#save-score-button {
    background-color: #4CAF50; /* Couleur verte pour Enregistrer */
}

#alert-close-button {
    background-color: #f44336; /* Couleur rouge pour OK */
}

/* Petits appareils (téléphones) */
@media (max-width: 600px) {
    h1 {
        margin-top: 15px ;
        font-size: 18px
    }
    .info-conteneur {
        padding: 10px;
        font-size: 12px;
    }
    button {
        height: 70px;
        width: 150px;
        font-size: 15px;
        align-items: center;
       /* width: 100%; /* Boutons en plein écran */
        padding: 8px 10px;
    }
    .button-container {
        gap: 10px;
    }
}

/* Appareils moyens (tablettes) */
@media (max-width: 900px) {
    h1 {
        font-size: 25px;
    }
    .info-conteneur {
        padding: 12px;
        font-size: 15px;
    }
    button {
        font-size: 15px;
        padding: 10px 15px;
    }
}

@media screen and (max-width: 550px) {
    #footer-container {
        flex-wrap: wrap; /* Force tout à rester sur une ligne */
        justify-content:center;  /* Maintient un espace entre les groupes */
        height: auto; /* Ajuste la hauteur si besoin */
        padding: 5px; /* Réduit les marges intérieures */
    }

    #progress-container, #timer-container {
        gap: 5px; /* Réduit l'espace entre les éléments */
    }
    #question-time-text {
        font-size: 15px;
        white-space: wrap; /* Empêche les retours à la ligne */
    }
    #progress-label, #timer-label {
        font-size: 12px; /* Réduit la taille du texte */
    }

    .prog {
        width: 12px; /* Cercles plus petits */
        height: 12px; /* Hauteur réduite */
        flex-wrap: wrap;
        font-size: 5px; /* Texte dans les cercles plus petit */
        gap: 2px;
    }

    #timer, #question-time {
        font-size: 15px; /* Réduit la taille du timer */
        flex-wrap: wrap;
    }

    #questionnaire-container {
        max-width: 700px; /* Empêche les débordements horizontaux */
        padding: 10px;
        font-size: 15px;
        overflow-wrap: break-word; /* Coupe les textes trop longs */

    }
    button.response-button {
        margin: 30px ;
        padding: 2px 20px;
        font-size: 15px;
        font-weight:400; 
        border: 2px solid black;
        border-radius: 5px;
        cursor: pointer;
        width: 200px; /* Redimensionner les boutons */
        height: 65px; /* Hauteur des boutons */
        position: relative;
        
    }
}

  


        
    









