
#moves {
    margin-top: 5px;
    font-weight: bold;
    font-size: 1.1em;
}

#game {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
}

#game.won .tile {
    pointer-events: none;
}

.tile {
    position: relative; /* nécessaire pour les translations */
    background: #3498DB;
    color: white;
    font-size: 1.6em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.5s ease;
    user-select: none;
}

.tile.empty {
    background: none;
    cursor: default;
}

.tile.hint {
    outline: 3px solid orange;
    box-shadow: 0 0 10px rgba(255,165,0,0.8);
    animation: pulse 1s infinite;
}

.tile.target {
    outline: 3px dashed green;
}

@keyframes pulse {
    0% { box-shadow: 0 0 5px rgba(255,165,0,0.4); }
    50% { box-shadow: 0 0 15px rgba(255,165,0,0.8); }
    100% { box-shadow: 0 0 5px rgba(255,165,0,0.4); }
}

.controls {
    margin-top: 15px;
}

#preview {
    margin: 10px auto;
    text-align: center;
}

#preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #ccc;
    border-radius: 6px;
}

.hidden {
    display: none;
}


#toggleImage {
	margin-top: -10px;
	margin-bottom: 10px;
}


#message {
    margin: 15px auto;
    padding: 10px;
    width: 240px;
    text-align: center;
    font-weight: bold;
    border-radius: 6px;
    display: none;  /* caché par défaut */
}

#message.win {
    background-color: #B9D5FF;
    color: #000000;
}

#message.info {
    background-color: #444444;
    color: #FFFFFF;
}

#undo, #newGame, #toggleImage, #solutionBtn {
	width: auto;
	height: auto;
	margin-top: 0px;
    padding: 14px 12px !important;
	border-radius: 8px;
	border: 2px solid #2B7CFF;
	background: linear-gradient(#FFFFFF,#EEF6FF);
    cursor: pointer;
	font-weight: 600;
}

button {
    font-size: 1em;
    margin: 10px;
    cursor: pointer;
}

.arrows {
    font-size: 1.6em;
}

.arrows button {
    width: 34px;
    height: 34px;
	
    padding: 0px;
	margin: 5px;
	
    text-align: center;
    line-height: 24px;
	
	box-sizing: border-box;

	border-radius: 8px;
	border: 2px solid #2B7CFF;
	background: linear-gradient(#FFFFFF,#EEF6FF);

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.arrows-horizontal button:first-child {
    margin-right: 20px;
}

.arrows-horizontal button:last-child {
    margin-left: 20px;
}

.help {
    margin-top: 10px;
    color: #555;
}

/* mobile */
@media only screen and (max-width:700px){
	#undo, #newGame, #toggleImage, #solutionBtn {
	padding: 16px 12px !important;
  }
	.colonnemilieu {
	width: 99.9999%;
	margin-left: 0px;
	margin-right: 0px;
	padding-left: 0px;
	padding-right: 0px;
  }
}
