html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
    overflow: hidden;
    touch-action: manipulation;
}

body {
    color: #f4f4f4;
    background-color: #111;
}

img {
    image-rendering: pixelated;
}

.page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: fixed;
}

.hidden {
    display: none;
}

/* ELEMENTS FIXES */

#menu {
    position: fixed;
    top: 10vh;
    left: 0;
    padding: 5px;
    background-color: #222;
    border-radius: 0 20px 20px 0;
    display: flex;
    flex-direction: column;

    img {
        padding: 5px;
        margin: 5px;
        width: 48px;
        height: 48px;
        cursor: pointer;
        border-radius: 10px;
    }

    img:hover {
        background-color: #555;
    }

    img:active {
        background-color: #777;
    }

    .active-nav {
        background-color: #444;
    }
}

#acknowledgements:hover {
    text-decoration: underline;
}

#acknowledgements {
    position:fixed;
    top: 10px;
    right: 10px;
    font-size: 12px;
    text-align: right;
    color:#555;
    text-decoration: none;
}

/* PAGE CLIQUE MONSIEUR */

#monsieur {
    width: 600px;
    height: 600px;
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
}

#compte-monsieur {
    position: fixed;
    bottom: 0;
    font-size: 36px;
    text-align: center;
}

/* PAGE DESSINE MONSIEUR */

#dessine-monsieur {
    display: flex;
    flex-direction: row;
}

#dessine-canvas {
    width: 600px;
    height: 600px;
    object-fit: contain;
    image-rendering: pixelated;
    border: 1px solid #f4f4f4;
    background-image: url("assets/background.png");
}

#dessine-tools {
    display: flex;
    flex-direction: column;
    position: absolute;
    transform: translate(602px, 0);
    transform-origin: 0 0;

    div {
        background-color: #333;
        padding: 5px;
    }

    .dessine-tool, .dessine-tool-disabled {
        padding: 3px;
    }

    .dessine-tool {
        cursor: pointer;
    }

    .dessine-tool:hover {
        background-color: #555;
    }

    .dessine-tool:active {
        background-color: #777;
    }

    .active-tool {
        background-color: #444;
    }

    .dessine-tool-disabled {
        opacity: 0.25;
        pointer-events: none;
    }
}

#dessine-monsieur-description {
    position: fixed;
    bottom: 0;
    font-size: 36px;
    text-align: center;
}

/* ANIMATIONS */

.shake {
    animation: shake 0.2s;
}

@keyframes shake {
    0% { transform: translate(0); }
    25% { transform: translate(-4px, 3px); }
    50% { transform: translate(3px, -2px); }
    75% { transform: translate(-3px, -4px); }
    100% { transform: translate(0); }
}

/* SMARTPHONE */

@media (max-width: 780px) {
    #menu {
        padding: 3px;
        border-radius: 0 10px 10px 0;

        img {
            padding: 3px;
            margin: 3px;
            width: 24px;
            height: 24px;
            border-radius: 5px;
        }
    }

    #compte-monsieur, #dessine-monsieur-description {
        font-size: 20px;
    }

    #dessine-canvas {
        width: 200px;
        height: 200px;
    }

    #dessine-tools {
        transform: translate(202px, 0);
    }
}

@media (max-width: 350px) {
    #dessine-tools {
        flex-direction: row;
        transform: translate(0, 202px);
    }
}
