html {
    background-color: #222;
    color:#ddd;
}

#haut {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

#haut > div > div#editeur-labyrinthe {
    display: none;
    margin-top:50px;
}

div#editeur-labyrinthe input[type='text'] {
    width:40px;
    text-align: center;
}

div#editeur-labyrinthe input#trous-editeur {
    width: 100px;
}

div#editeur-labyrinthe > div.erreur {
    text-align: center;
    font-weight: bold;
    color:#f44;
    font-size: 1.2em;
}

.labyrinthe {
    width: 300px;
    height: 300px;
    margin:auto;
    border:1px solid black;
    display: flex;
    flex-direction: column;
    background-color: #ddd;
}

#labyrinthe-editeur {
    display: none;
}

.labyrinthe > .ligne {
    width: 100%;
    flex:1;
    display: flex;
    flex-direction: row;
}

.labyrinthe > .ligne > .case {
    flex:1;
    border:1px solid black;
    color:#222;
    display: flex;
    align-items: center;
    position: relative;
}

.labyrinthe > .ligne > .case > p {
    width: 100%;
    height: 100%;
    padding: 0;
    margin:0;
}

.labyrinthe > .ligne > .case.active > p {
    background: url("../img/gandalf.webp") center no-repeat;
    background-size: contain;
    font-size: 0px;
    z-index:1;
}

.labyrinthe > .ligne > .case.rotate > p {
    animation: rotation2 0.5s alternate infinite;
}

.labyrinthe > .ligne > .case.sortie > p {
    animation: rotation3 0.5s forwards;
}

.labyrinthe > .ligne > .case.future {
    background-color: #afa;
}

.labyrinthe .case.trou.active > p {
    animation: disparition 3s forwards;
}

.labyrinthe .case.trou > p.trou {
    background: url("../img/trou2.png") center no-repeat;
    background-size: contain;
    animation: rotation 10s linear infinite;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.labyrinthe .case.arrivee {
    background: url("../img/baton.webp") center no-repeat;
    background-size: 90%;
}

.menu {
    flex:1;
    text-align: center;
}

p#new-q-value {
    display: none;
    background-color: #77f;
    width: 200px;
    margin:auto;
    padding:10px 0px;
    font-weight: bold;
    cursor:pointer;
}

div#messages-fin-partie {
    margin-top:50px;
}

div#messages-fin-partie p {
    display: none;
    font-weight: bold;
    font-size: 1.2em;
}

div#messages-fin-partie p#message-victoire {
    color:#5d5;
}

div#messages-fin-partie p#message-trou, div#messages-fin-partie p#message-sortie, div#messages-fin-partie p#message-score-mini {
    color:#f44;
}

.boutons {
    text-align: center;
    margin-top:20px;
}

.boutons input {
    font-size: 1em;
    margin:10px 10px;
    padding: 5px 20px;
    cursor: pointer;
}

.boutons input:hover {
    opacity: 0.9;
}

#bouton-jouer {
    background-color: #afa;
    border-radius: 5px;
    border:2px solid #8f8;
}

#bouton-jouer:disabled {
    background-color: #ccc;
    border-color: #aaa;
    cursor: not-allowed;
}

#bouton-jeu-auto {
    display: none;
    background: linear-gradient(gold, rgba(255, 166, 0, 0.753));
    border-radius: 5px;
    border:2px solid red;
}

#q-table > table {
    width: 95%;
    margin:auto;
    margin-top:20px;
    text-align: center;
}

#q-table tr#liste-etats > td {
    height: 60px;
}

#q-table td.state[data-current-state='1'] {
    background: url("../img/gandalf.webp") center no-repeat;
    background-size: contain;
    font-size: 0px;
}

#q-table td[data-current-state='1'] {
    background-color: #555;
}

/*
#q-table td.future {
    background-color: #afa;
    color:#222;
}

#q-table td.future input {
    color:#222;
}
*/
#q-table td.action.next {
    background-color: #afa;
    color:#222;
    font-weight: bold;
}

#q-table td.to-update {
    background-color: #77f;
}

#q-table input {
    width: 100%;
    margin:0px;
    padding: 10px 0px;
    text-align: center;
    background: none;
    border:none;
    color:#eee;
}

#q-table input:hover, #q-table input:focus {
    background-color: #777;
}

.bellman-eq {
    font-size: 1.5em;
}

input.parametre {
    width: 150px;
    border:1px solid red;
}

#score-jeu, #recompense-jeu {
    font-weight: bold;
}

span.w50 {
    display: inline-block;
    width: 50px;
    text-align: left;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

@keyframes rotation2 {
    from {
        transform: rotate(-20deg);
    }
    to {
        transform: rotate(20deg);
    }
}

@keyframes rotation3 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(45deg);
    }
}

@keyframes disparition {
    from {
        transform: rotate(0deg);
        scale: 1;
    }
    to {
        transform: rotate(720deg);
        scale: 0;
    }
}