/* Page /jeu : zone de jeu en canvas (cf. assets/js/game.js) */
.game-frame {
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .25);
    border: 3px solid #343f4f;
    background: #e9e4d6;
}

#gameCanvas {
    display: block;
    width: 100%;
    aspect-ratio: 10 / 3;
    cursor: pointer;
    /* Un appui sur le jeu ne doit ni zoomer ni faire défiler la page */
    touch-action: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#gameCanvas:focus-visible {
    outline: 3px solid #f0b429;
    outline-offset: -3px;
}

.game-fire {
    min-width: 7rem;
    font-weight: 600;
    /* Appuis répétés rapides : pas de zoom ni de sélection */
    touch-action: manipulation;
    user-select: none;
}

.game-help li + li {
    margin-top: .25rem;
}

/* Célébrations plein écran (cf. assets/js/celebrate.js) */
.celebrate-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2000;
}

.celebrate-banner {
    position: fixed;
    top: 22vh;
    left: 50%;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(90vw, 34rem);
    padding: .9rem 1.6rem;
    border-radius: .75rem;
    text-align: center;
    color: #f5efe0;
    background: rgba(52, 63, 79, .92);
    border: 2px solid #f0b429;
    box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .35);
    pointer-events: none;
    transform: translateX(-50%);
    animation: celebrate-pop .5s cubic-bezier(.2, 1.6, .4, 1) both;
    transition: opacity .6s, transform .6s;
}

.celebrate-banner strong {
    font-size: 1.6rem;
    line-height: 1.2;
}

.celebrate-banner .bi {
    font-size: 1.8rem;
    color: #f0b429;
}

.celebrate-banner--confetti {
    border-color: #8fa35a;
}

.celebrate-banner--confetti .bi {
    color: #c9d98f;
}

.celebrate-detail {
    margin-top: .25rem;
    font-size: .95rem;
    color: #d9d2c0;
}

.celebrate-banner.is-leaving {
    opacity: 0;
    transform: translate(-50%, -1rem);
}

@keyframes celebrate-pop {
    from {
        opacity: 0;
        transform: translate(-50%, 1rem) scale(.6);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .celebrate-banner {
        animation: none;
        transition: opacity .6s;
    }
}
