.memory-cell{
    background:#1E90FF;
    color:#FFF;
    font-weight:bold;
    font-size:20px;
    text-align:center;
    line-height:70px;
    cursor:pointer;
    border-radius:8px;
    user-select:none;
}
.memory-cell.matched{
    background:#FFD700;
    cursor:default;
}
.overlay-mines{
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    background:rgba(0,0,0,0.9);
    color:#FFF;
    padding:40px 60px;
    border-radius:20px;
    text-align:center;
    z-index:9999;
    font-size:1.5em;
    display:none;
}

.memory-grid{
    display:grid;
    grid-template-columns:repeat(4,75px);
    gap:10px;
    justify-content:center;
    margin-top:25px;
}

.memory-cell{
    width:75px;
    height:75px;
    background:#1E90FF;
    color:#FFF;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    border-radius:12px;
    cursor:pointer;
    transition:0.25s;
    user-select:none;
}

.memory-cell img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    pointer-events: none;
}

.memory-cell:hover{
    transform:scale(1.05);
}

.memory-cell.matched{
    background:#2ecc71;
    cursor:default;
}

.block-regles{
    width:90%;
    margin:35px auto;
    padding:25px;
    background:#1F1F1F;
    color:#FFF;
    border-radius:15px;
}

.regles-grid{
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    justify-content:center;
    margin-top:15px;
}

.regles-grid div{
    background:#1E90FF;
    padding:12px 18px;
    border-radius:10px;
    font-weight:bold;
}

.note{
    text-align:center;
    color:#AAA;
    margin-top:15px;
}

.regles-overlay { display: none; position: fixed; z-index: 99999; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.80); align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; } 
.regles-overlay.active { display: flex; }
.regles-popup { position: relative; width: 100%; max-width: 740px; max-height: 90vh; overflow-y: auto; background: #111; border: 1px solid gold; border-radius: 15px; padding: 20px; box-sizing: border-box; box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 25px rgba(255,215,0,0.15); } 
.regles-close { position: absolute; top: 10px; right: 10px; width: 35px; height: 35px; border: none; border-radius: 50%; background: #333; color: white; font-size: 20px; font-weight: bold; cursor: pointer; z-index: 2; } 
.regles-close:hover { background: #ff4444; } 

@media (max-width: 600px) { 
.regles-overlay { padding: 10px; } 
.regles-popup { max-height: 92vh; padding: 10px; } 
.tournoi-info { padding: 15px !important; } 
}

/* ===========================
   Mobile
=========================== */
@media(max-width:600px){
.overlay-mines{
font-size:1.2rem;
}	
}

