/* ================= LEVEL SELECTION ================= */
#level-select {
    display: block;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

#level-select h3 {
    display: block;
    margin: 20px 0;
}

.mot-code {
    width: fit-content;
    margin: 20px auto 20px auto;
    background: #232323;
    padding: 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
	box-shadow: 0 0 20px #0ff;
}

/* ================= KEYPAD INDICATIF ================= */
#keypad {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

#keypad div {
    width: 60px;
    padding: 10px 0;
    text-align: center;
    background-color: #1F1F1F;
    color: #fff;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

#keypad div strong {
    display: block;
    font-size: 18px;
}

#keypad div span {
    display: block;
    font-size: 12px;
    color: #AAA;
    margin-top: 4px;
}

/* ================= INTERACTIVE KEYBOARD ================= */
#keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

#keyboard button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
    justify-content: center;
    display: flex;
}

#keyboard .bouton-rouge {
    background-color: #FF4500;
}

#keyboard button:hover {
    transform: scale(1.1);
}

/* ================= INPUT & VALIDATE ================= */
#answerInput {
    display: block;
    margin: 10px auto;
    padding: 8px 12px;
    max-width: 600px !important;
    border-radius: 10px;
    border: 2px solid #00FF88;
    background: #1F1F1F;
    color: #fff;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    width: 90% !important;
}

/* ================= RESULT MESSAGES ================= */
.gratte-result-ok,
.gratte-result-no {
    margin: 10px auto;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
    max-width: 400px;
    font-size: 16px;
}

.gratte-result-ok {
    border: 1px dashed lightgreen;
    color: lime;
    background: rgba(0, 128, 0, 0.2);
}

.gratte-result-no {
    border: 1px dashed lightcoral;
    color: red;
    background: rgba(255, 0, 0, 0.2);
}

/* ================= TIMER ================= */
#timer {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    font-size: 18px;
    color: #1E90FF;
}

/* ================= INFO SESSION ================= */
.info-session {
    text-align: center;
    margin: 15px 0;
    color: #fff;
    font-weight: bold;
}

.info-session strong {
    color: #1E90FF;
}

/* Overlay WIN */
#phrase-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;
}

#phrase-win-overlay.show {
    opacity: 1;
    pointer-events: all;
}

#phrase-win-overlay h1 {
    font-size: 5rem;
    color: gold;
    text-shadow: 0 0 20px #fff, 0 0 40px gold;
    animation: scalePulse 1s infinite alternate;
}

@keyframes scalePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.3); }
}

.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; } 
}
