/* =======================
   🎯 STRUCTURE GÉNÉRALE
========================== */

#game-container-parent {
    position: relative;
    overflow: hidden; /* Cache les débordements pendant les transitions */
}

#game-container-wrapper {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform, opacity;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 1;
}

#game-container {
    position: relative;
    min-height: 300px; /* Hauteur minimale pour éviter les sauts de layout */
}


/* =======================
   🖼️ CONTENEUR IMAGE + BOUTON
========================== */

.image-container {
    text-align: center;
    margin-bottom: 20px;
}

.btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}


/* =======================
   🔘 BOUTONS
========================== */

.mon-btn {
    font-size: clamp(0.8rem, 3vw, 1.2rem);
    font-weight: bold;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5em 1em;
    min-width: 50px;
    max-width: 100%;
    width: 100%;
}

.mon-btn.correct {
    background-color: limegreen;
    color: white;
}

.mon-btn.incorrect {
    background-color: red;
    color: white;
    animation: shake 0.5s;
}


/* =======================
   ✨ FEEDBACK
========================== */

.feed {
    background-color: limegreen;
    border: 1px solid transparent;
    padding: 5px;
    margin: 15px;
}


/* =======================
   🎞️ ANIMATIONS
========================== */

/* Secousse bouton incorrect */
@keyframes shake {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-5px); }
    50%  { transform: translateX(5px); }
    75%  { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Pulsation image pendant la lecture */
.playing {
    animation: pulse 0.5s;
}

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}


/* =======================
   📽️ TRANSITIONS / SLIDES
========================== */

/* Entrée depuis la droite avec fondu progressif */
.slide-in {
    transform: translateX(100%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Position d'arrivée : à sa place, visible */
.slide-in.visible {
    transform: translateX(0);
    opacity: 1;
}

/* Sortie vers la gauche avec disparition */
.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}


