/* Variables globales */
:root {
    --color-turquoise: rgb(64, 224, 208);
    --color-coquelicot: rgb(255, 69, 0);
    --color-background: rgba(50, 50, 100, 1);
    --color-text: #fff;
    --color-gold: gold;
    --color-red: red;
    --font-primary: "Kalam-reg", sans-serif;
    --popup-height: 9vh;
}

.cercle-actif { fill: white; }
.cercle-vrai { fill: var(--color-turquoise); }
.cercle-faux { fill: var(--color-coquelicot); }

/* Styles pour les polices */
@font-face {
    font-family: "Kalam";
    src: url('kalam.bold.ttf');
}

@font-face {
    font-family: "Kalam-reg";
    src: url('kalam.regular.ttf');
}

/* Styles de la popup informative en haut */
.popup {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: var(--popup-height);
    overflow: hidden;
    background-color: var(--color-background);
    justify-content: center;
    align-items: center;
}

.popup-text {
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: calc(var(--popup-height) * 0.27);
    text-align: center;
    margin: 0 7rem;
    line-height: 1.5;
}

.popup-text span {
    line-height: normal; /* ou la valeur spécifique souhaitée */
}

.numero-question {
    display: inline-block;
    background-color: white;
    color: var(--color-background);
    border-radius: 50%;
    padding: 5px;
    font-weight: bold;
    margin-right: 8px;
    text-align: center;
    min-width: 30px;
}

/* Style pour la mise en évidence des systèmes de pensée */
.ref-syst {
    /* text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: rgba(255, 255, 255, .5);
    transition: all 0.2s ease; */
    color: var(--color-gold);
  }

#nombre-questions {
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

.options-container {
    margin: 1rem 0;
}


/* Styles pour les scores */
#scoreRight, #scoreLeft {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#scoreRight {
    right: 10px;
}

#scoreLeft {
    left: 10px;
}

#compteurBonnesReponses, #compteurMauvaisesReponses {
    font-size: calc(var(--popup-height) * 0.4);
    font-weight: bold;
    font-family: var(--font-primary);
}

#compteurBonnesReponses {
    color: var(--color-gold);
    margin-right: 5px;
}

#compteurMauvaisesReponses {
    color: var(--color-red);
}

#tropheeIcon {
    font-size: calc(var(--popup-height) * 0.4);
    transform: translateY(-2px);
}

#croixIcon {
    font-size: calc(var(--popup-height) * 0.4);
    margin-right: 5px;
    transform: translateY(-2px);
}

/* Styles pour les boutons du quiz */
#buttonReset {
    cursor: pointer;
}

.button-disabled {
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    transition: opacity 0.3s ease;
}

.button-enabled {
    cursor: pointer !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}

.button-enabled:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Styles pour l'effet de pulsation */
.pulse-circle {
    fill: none;
    stroke: white;
    stroke-width: 2;
    opacity: 0;
}

.animation-pulse {
    animation: pulse 1.6s ease-out;
}

@keyframes pulse {
    0% { opacity: 0; stroke-width: 1px; }
    40% { opacity: 0.8; stroke-width: 3px; }
    100% { opacity: 0; stroke-width: 1px; }
}

/* Styles pour le flottant */
.floating-element {
    position: fixed;
    z-index: 9999;
    font-size: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.animation-float-appear {
    animation: floatAppear 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.animation-float-move {
    animation: floatMove 0.7s ease-out forwards;
}

@keyframes floatAppear {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    40% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes floatMove {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(0.1); }
}

/* Popup modale générique */
.modal-popup {
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--color-background);
    color: var(--color-text);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-family: var(--font-primary);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    max-width: 90%;
    width: 400px;
}

.modal-popup h2 {
    font-size: 28px;
    margin-bottom: 1rem;
    color: var(--color-gold);
}

.modal-popup p {
    font-size: 18px;
    margin: 0.5rem 0;
}

.modal-popup p span {
    font-size: 18px; /* Taille de police réduite */
    margin-bottom: 0rem;
}

.modal-popup p.reset-warning {
    margin-bottom: 1.5rem; /* Espace vertical plus important sous ce paragraphe */
}

.radio-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.modal-button {
    padding: 0.8rem 1.5rem;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: background-color 0.2s ease;
}

.button-primary {
    background-color: var(--color-turquoise);
    color: var(--color-background);
}

.button-secondary {
    background-color: #999;
    color: white;
}

.button-warning {
    background-color: var(--color-coquelicot);
    color: white;
}

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

.radio-option input[type="radio"] {
    margin-bottom: 5px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-option label {
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
}

/* Style pour l'option sélectionnée */
.radio-option input[type="radio"]:checked + label {
    color: var(--color-gold);
}

/* Maintenir la compatibilité avec l'ancien code pour le récapitulatif */
.recapitulatif {
    position: fixed;
    z-index: 9999;
    top: 50%;
    background-color: var(--color-background);
    color: var(--color-text);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-family: var(--font-primary);
    opacity: 0;
}

/* Position à droite si spécifiée */
.recapitulatif.position-right {
    left: auto;
    right: 2rem;
    transform: translateY(-50%);
    animation: fadeInRight 0.5s ease forwards;
}

/* Position au centre par défaut */
.recapitulatif:not(.position-right) {
    left: 50%;
    transform: translate(-50%, -50%);
    animation: fadeIn 0.5s ease forwards;
}

#restartQuiz {
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 18px;
    background-color: var(--color-turquoise);
    color: var(--color-background);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: background-color 0.2s ease;
}

/* Animations pour les différentes positions */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateY(-50%) translateX(50px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

@keyframes moveToTarget {
    from { transform: translate(-50%, -50%) scale(1); }
    to { transform: translate(-50%, -50%) scale(0.1); }
}

.animation-move-to-target {
    animation: moveToTarget 0.7s ease-out forwards;
}

/* -------------- Responsive ---------------------- */

@media (max-height: 901px) {
    :root {
        --popup-height: 15vh;
    }
    .popup-text {
        font-size: calc(var(--popup-height) * 0.18);
    }
    #compteurBonnesReponses, #compteurMauvaisesReponses {
        font-size: calc(var(--popup-height) * 0.27);
    }
    
    #tropheeIcon, #croixIcon {
        font-size: calc(var(--popup-height) * 0.27);
    }
}

