body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #101820, #243447);
    color: white;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 30px;
    text-align: center;
}

h1 {
    color: #ffcc00;
    font-size: 42px;
    margin-bottom: 5px;
}

.subtitle {
    color: #ddd;
    margin-bottom: 30px;
}

.game-layout {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.grille {
    display: grid;
    gap: 3px;
    background: #111;
    padding: 10px;
    border: 4px solid #ffcc00;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.4);
}

.case {
    width: 38px;
    height: 38px;
    background: white;
    position: relative;
    border-radius: 4px;
}

.case.noire {
    background: #111;
}

.case input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    background: transparent;
    outline: none;
}

.numero {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 10px;
    color: #333;
    font-weight: bold;
}

.definitions {
    width: 360px;
    background: white;
    color: #222;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.definitions h2 {
    color: #111;
    text-align: center;
}

.definitions h3 {
    color: #d19a00;
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 5px;
}

.definitions li {
    margin-bottom: 10px;
    line-height: 1.4;
}

button {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: none;
    border-radius: 8px;
    background: #ffcc00;
    color: #111;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #ffd633;
}

#resultat {
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
}

.correct {
    background: #c8f7c5 !important;
}

.incorrect {
    background: #ffb3b3 !important;
}
@media (max-width: 900px) {

    * {
        box-sizing: border-box;
    }

    html,
    body {
        width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .container,
    .game-layout {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .game-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .grille {
        width: calc(100% - 20px);
        max-width: 430px;
        margin: 0 auto;
        padding: 6px;
        overflow-x: auto;
    }

    .definitions {
        width: calc(100% - 50px);
        max-width: 390px;
        margin: 0 auto;
        padding: 14px;
        font-size: 1.05rem;
    }

    .cell,
    .grille input {
        width: clamp(34px, 10vw, 44px);
        height: clamp(34px, 10vw, 44px);
        font-size: clamp(17px, 5vw, 22px);
    }
}
