:root {
    --cell-size: 40px;
}

.demineur-grid{
    display: grid;
    grid-template-rows: repeat(var(--rows), var(--cell-size));
    grid-template-columns: repeat(var(--cols), var(--cell-size));
    gap: 2px;
    margin: 20px auto;
    width: fit-content;
    max-width: 100vw;
    overflow: hidden;
}
.cell{
    width: var(--cell-size);
    height: var(--cell-size);
    background: #1F1F1F;
    color: #EEE;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    user-select: none;
    font-size: calc(var(--cell-size) * 0.45);
}
.cell.revealed{
    background:#555;
    cursor:default;
}
.cell.flag{
    background:#1E90FF;
}

.poker-result-ok, .poker-result-no {
    margin:10px 0;
    padding:10px;
    border-radius:10px;
}

.poker-result-ok { border: dashed lightgreen; color: white; max-width: 600px; margin: 10px auto 0 auto; }
.poker-result-no { border: dashed lightcoral; color: white; max-width: 600px; margin: 10px auto 0 auto; }

/* Overlay WIN */
#bingo-win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

#bingo-win-overlay.show {
    opacity: 1;
    pointer-events: all;
}

#bingo-win-overlay h1 {
    font-size: 5rem;
    color: gold;
    text-shadow: 0 0 20px #fff, 0 0 40px gold;
    animation: scalePulse 1s infinite alternate;
}

/* Overlay BOOM */
#bingo-boom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(50,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

#bingo-boom-overlay.show {
    opacity: 1;
    pointer-events: all;
}

#bingo-boom-overlay h1 {
    font-size: 5rem;
    color: red;
    text-shadow: 0 0 20px #fff, 0 0 40px red;
    animation: scalePulse 1s infinite alternate;
}

/* Animation pulsante */
@keyframes scalePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.3); }
}

/* Explosion des cellules */
.cell.explode {
    animation: explodeCell 1s forwards;
}

@keyframes explodeCell {
    0% { transform: scale(1) translate(0,0) rotate(0deg); opacity: 1; }
    100% { 
        transform: scale(2) translate(calc(50vw - 50%), calc(50vh - 50%)) rotate(720deg); 
        opacity: 0; 
    }
}

.game-tip{
    text-align:center;
    color:#AAA;
    font-size:0.9em;
    margin-top:10px;
}

@media (max-width: 900px) {
    :root {
        --cell-size: 32px;
    }
}
@media (max-width: 600px) {
    :root {
        --cell-size: 26px;
    }

    .demineur-grid {
        margin: 10px auto;
    }
	
#bingo-win-overlay h1{
font-size:2.4rem;
}

#bingo-boom-overlay h1{
font-size:2.4rem;
}	
}
@media (max-width: 380px) {
    :root {
        --cell-size: 22px;
    }
}


