
#sudoku {
    display: grid;
    grid-template-columns: repeat(9, 36px);
    grid-template-rows: repeat(9, 36px);
    gap: 0px;
    width: max-content;
	margin-left: auto;
	margin-right: auto;
/*    margin: auto;*/
	border: 2px solid black;/**/
}

.cell {
    position: relative;
}

input {
    width: 36px;
    height: 36px;
    font-size: 18px;
    text-align: center;
    border: 1px solid #999;
	font-weight: 550;
/*	color: #660099;*/
}

#sudoku input:not(:disabled) {
    color: #6600CC; /*#660099 */
}

input.fixed {
    background: #eee;
    font-weight: bold;
    color: #666666; /*#555; /* ajouté le 02_02_26 11h00 */
}

input.error {
    background-color: #F1B9B9; /*#ffd6d6; /* rouge clair */
    color: #A00000;
}

#unefois, #tout, #nouveau {
	width: auto;
	height: auto;
	margin-bottom: 10px;
    padding: 14px 12px !important;
	border-radius: 8px;
	border: 2px solid #2B7CFF;
	background: linear-gradient(#FFFFFF,#EEF6FF);
    cursor: pointer;
	font-weight: 550;
}

#message {
	margin-top: 10px;
}

/* Réduire la taille de la checkbox */
#showCandidatesLabel input[type="checkbox"] {
    width: 18px;    /* largeur réduite */
    height: 18px;   /* hauteur réduite */
    vertical-align: middle; /* alignement vertical avec le texte */
    margin-right: 5px; /* espace entre la checkbox et le texte */
}

.cell input.error {
    color: #c00000;        /* rouge bien visible */
    font-weight: bold;
}

.cell:nth-child(n+1) {
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
}

/* Bordures plus épaisses pour les blocs 3x3 */
.cell:nth-child(3n) input { /**/
    border-right: 2px solid #000; /* droite des blocs */
}

/* colonnes 3 et 6 */
.cell:nth-child(9n + 3),
.cell:nth-child(9n + 6) {
    border-right: 2px solid #000;
}

/* lignes 3 et 6 */
.cell:nth-child(n+19):nth-child(-n+27) input, /**/
.cell:nth-child(n+46):nth-child(-n+54) input { /**/
    border-bottom: 2px solid #000; /* bas des blocs */
}

.cell:nth-child(n+73):nth-child(-n+81) input { /**/
    border-bottom: none;
}

/* Supprimer bordure droite des cellules de la dernière colonne */
.cell:nth-child(9n) input {
    border-right: none;
}

/* Supprimer bordure bas de la dernière ligne */
.cell:nth-last-child(-n+9) input {
    border-bottom: none;
}

.candidates {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    color: #0066FF; /*#666*/
}

#difficulty {
	font-size: 14px;
	font-weight: bold;
	padding: 5px;
	outline: none;                 /* supprime le contour noir */
    border-color: #0066CC;
    box-shadow: 0px 0px 0px 0.5px #0066CC;  /* contour bleu visible partout */
	border-radius: 3px;
}

#difficulty:hover {
	background-color: #F0F0F0;
	color: #FF0000;
}

.devinernum {
	margin-left: 0px;
	margin-right: 0px;
	margin-top: -10px;
	margin-bottom: -10px;
}

.txtmobile {
display: none;
}

.txtnormal {
	display: block;
}

#mobileHint {
	display: none;
    font-weight: bold;
}

@media only screen and (max-width: 700px) {
	#unefois, #tout {
	padding: 16px 12px !important;
  }
    #sudoku {
    grid-template-columns: repeat(9, 32px);
    grid-template-rows: repeat(9, 32px);
  }
    input {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
	input.error {
    background-color: #F1B9B9;
    color: #A00000;
  }
    input.fixed {
        color: #444;
  }
    .candidates {
        font-size: 8px; 
  }
    .cell:nth-child(9n + 3),
    .cell:nth-child(9n + 6),
    .cell:nth-child(n + 19):nth-child(-n + 27),
    .cell:nth-child(n + 46):nth-child(-n + 54) {
    border-color: #000;
  }
	.colonnemilieu {
	width: 99.9999%;
	margin-left: 0px;
	margin-right: 0px;
	padding-left: 0px;
	padding-right: 0px;
  }
	.txtmobile {
	display: block;
  }
	.txtnormal {
	display: none;
  }
	#mobileHint {
	display: block;
	font-weight: bold;
  }
}

@media only screen and (min-width: 701px) and (max-width: 900px) {
    .cell:nth-child(9n + 3),
    .cell:nth-child(9n + 6),
    .cell:nth-child(n + 19):nth-child(-n + 27),
    .cell:nth-child(n + 46):nth-child(-n + 54) {
    border-color: #000;
  }
	.txtmobile {
	display: block;
  }
	.txtnormal {
	display: none;
  }
	#mobileHint {
	display: block;
	font-weight: bold;
  }
    input.fixed {
        color: #444;
  }
	input.error {
    background-color: #F1B9B9;
    color: #A00000;
  }
}