/* ================================
   SUDOKU - Styles spécifiques
   ================================ */

body.page-jeux { background: #faf8f0; }

/* CONTAINER */
.container-sudoku {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 15px;
    align-items: start;
    position: relative;
}

/* SCORES COULEURS */
#box-score    { background: #4a90d9; }
#box-meilleur { background: #edcf72; color: #232526; }
#box-erreurs  { background: #e53935; }
#box-indices  { background: #764ba2; }

.scores-sudoku {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
}

/* BOUTON INDICE */
.btn-indice {
    background: #764ba2;
    color: white;
    border: none;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85em;
    width: 100%;
}

.btn-indice:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* MODE SAISIE */
.mode-saisie {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.btn-mode {
    background: #eee;
    color: #555;
    border: none;
    padding: 7px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85em;
}

.btn-mode.actif {
    background: #4a90d9;
    color: white;
}

/* GRILLE SUDOKU */
.grille-sudoku {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    border: 3px solid #232526;
    border-radius: 4px;
    overflow: hidden;
    width: min(52vh, 400px);
    aspect-ratio: 1;
    box-sizing: border-box;
}

.pave-numerique {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 5px;
    width: min(52vh, 400px);
}

.case-sudoku {
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: clamp(0.7em, 2.5vh, 1.3em);
    font-weight: 600;
    background: white;
    position: relative;
    transition: background 0.1s;
    user-select: none;
    aspect-ratio: 1;
}

.case-sudoku[data-col="3"],
.case-sudoku[data-col="6"] { border-left: 2px solid #232526; }

.case-sudoku[data-row="3"],
.case-sudoku[data-row="6"] { border-top: 2px solid #232526; }

.case-sudoku.fixe        { background: #f0f0f0; color: #232526; cursor: default; }
.case-sudoku.selectionnee { background: #bbdefb; }
.case-sudoku.surlignee   { background: #e3f2fd; }
.case-sudoku.meme-chiffre { background: #c8e6c9; }
.case-sudoku.erreur      { color: #e53935; }
.case-sudoku.correcte    { color: #4a90d9; }

/* NOTES BROUILLON */
.notes-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    padding: 1px;
    box-sizing: border-box;
}

.note {
    font-size: clamp(0.3em, 1vh, 0.55em);
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    line-height: 1;
}

/* PAVÉ NUMÉRIQUE */

.btn-chiffre {
    background: white;
    color: #232526;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    transition: all 0.1s;
}

.btn-chiffre:hover {
    background: #4a90d9;
    color: white;
    border-color: #4a90d9;
}

.btn-chiffre.complet {
    opacity: 0.3;
    pointer-events: none;
}

/* MESSAGE FIN - couleur Sudoku */
.message-contenu button { background: #4a90d9; }