/* === GENERAL === */

.casino-tapis {
    background: url('/tournois/sexe_mystere-tournoi/assets/img/background.jpg') center center no-repeat;
    max-width: 900px;
    border-radius: 25px;
    border: 2px solid black;
    -moz-border-radius: 10px;
    margin: 15px auto;
    box-shadow: 0 0 5px #0ff;
}
.casino-indice {
    background:#111;
    padding:12px;
    margin:15px auto 15px auto;
    border-radius:8px;
    color:#fff;
    text-align:center;
    font-weight:bold;
	max-width: 900px;
    box-shadow: 0 0 5px #0ff;	
}

/* === BOARD === */
#game-board {
    max-width: 800px;
    margin: 0 auto;
}

/* === CARD STYLE === */
.card {
    perspective: 1000px;
    display: inline-block;
}

.card-inner {
    position: relative;
    width: 120px;
    height: 160px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.card-front {
    background: url('/tournois/sexe_mystere-tournoi/assets/img/card.png') center center no-repeat;
}

.card-back {
    background-color: #fff;
    transform: rotateY(180deg);
    overflow: hidden;
    padding: 5px;
}

.card img {
    border-radius: 10px;
    object-fit: cover;
}

/* Glow si bonne carte */
.card.win-glow .card-inner {
    box-shadow: 0 0 15px 5px #FFD700;
}

/* Hover effet PC */
.card:hover .card-front {
    transform: scale(1.05);
    transition: transform 0.3s;
}

/* === MOBILE CONTROLS === */
#mobile-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

#mobile-controls button {
    font-size: 1.4em;
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    background-color: #1E90FF;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transition: 0.2s;
}

#mobile-controls button:active {
    background-color: #1C86EE;
    transform: scale(0.95);
}

/* === DOUBLE BUTTON === */
#double-button button {
    padding: 10px 20px;
    font-size: 1.1em;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg,#FFD700,#FFA500);
    color: #000;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: 0.2s;
}

#double-button button:active {
    transform: scale(0.95);
}

.gratte-result-ok,
.gratte-result-no {
    margin: 10px auto;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    max-width: 600px;
}

.gratte-result-ok {
    border: 1px dashed lightgreen;
    color: white;
}

.gratte-result-no {
    border: 1px dashed lightcoral;
    color: white;
}

/* ==========================
   Feedback overlay
========================== */
.mm-no, .mm-ok, #heist-result-error {
    max-width: 400px;
    margin: 15px auto;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
}

.mm-no {
    background-color: #FF4444;
    box-shadow: 0 0 10px #FF4444;
}

.mm-ok {
    background-color: #00FF88;
    box-shadow: 0 0 10px #0f0;
}

#heist-result-error {
    background-color: #FFA500;
    box-shadow: 0 0 10px #FFA500;
}

.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; } 

/* === RESPONSIVE === */
@media(max-width: 880px){
    #game-board {
        width: 95%;
    }
    .card-inner {
        width: 100px;
        height: 140px;
    }
    #mobile-controls button {
        font-size: 1.2em;
        padding: 10px 14px;
    }
}

@media (max-width: 600px) { 
.regles-overlay { padding: 10px; } 
.regles-popup { max-height: 92vh; padding: 10px; } 
.tournoi-info { padding: 15px !important; } 
}

@media(max-width: 600px){
    .card-inner, .card {
        width: 48px !important;
        height: 64px !important;
    }
    #mobile-controls button {
        font-size: 1.2em;
        padding: 10px 14px;
    }
}
