.piece {
    --piece-background-color: #9ad5ec;

    width: 400px;
    position: relative;
    background-color: var(--piece-background-color);

    &-menu {
        position: absolute;
        width: 150px;
        height: 50px;
        background-color: #f7f7f7;
        z-index: -1;
        top: -51px;
        left: 50%;
        transform: translateX(-50%);
        transition: transform 0.5s ease;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        border: solid black 1px;
        display: flex;
        padding: 15px 20px 15px 20px;
        justify-content: space-around;

        mat-icon {
            cursor: pointer;
            transform: scale(1.1);
        }

        mat-icon:hover {
            opacity: 0.75;
        }
    }

    &-menu.show {
        transform: translateX(-50%) translateY(0);
    }

    &-menu.hide {
        transform: translateX(-50%) translateY(100%);
    }

    &-attach {
        z-index: 1;

        &-left {
            &-top {
                border-right: solid black 1px;
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background-color: var(--background-color);
                position: absolute;
                top: 200px;
                transform: translateY(-50%);
                left: -25px;
            }

            &-bottom {
                border-top: solid black 1px;
                border-right: solid black 1px;
                border-bottom: solid black 1px;
                width: 20px;
                height: 60px;
                background-color: var(--background-color);
                position: absolute;
                top: 600px;
                transform: translateY(-50%);
                left: 0px;
            }
        }

        &-right {
            border-top: solid black 1px;
            border-right: solid black 1px;
            width: 40px;
            height: 40px;
            background-color: var(--piece-background-color);
            transform: translateY(-50%) rotate(45deg);
            position: absolute;
            right: -20px;
            top: 200px;
        }
    }

    &-form {
        height: 100%;
        padding: 0px 10px 0px 35px;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        z-index: 2;

        label {
            font-size: 20px;
            font-weight: lighter;
            margin-top: 10px;
            margin-bottom: 5px;
        }

        input {
            height: 40px;
            border-radius: 10px;
            border: none;
            padding: 5px 10px 5px 10px;
            font-size: 15px;
        }

        textarea {
            border-radius: 20px;
            padding: 10px;
            border: none;
            resize: none;
            flex-grow: 1;
            font-size: 15px;
        }

        &-title {
            margin-top: 20px;
            font-size: 25px;
            font-family: 'Glacial Indifference Bold';
        }

        &-intitule {
            display: flex;
            flex-direction: column;
            margin-top: 10px;
        }

        &-name {
            display: flex;
            flex-direction: column;
        }

        &-objective {
            height: 250px;
            margin-top: 10px;
            display: flex;
            flex-direction: column;

            textarea {
                margin-bottom: 5px;
                background-image: url("../../../assets/background-images/role.png");
                background-position: center;
                background-repeat: no-repeat;
                background-size: 30%;
            }
        }

        &-reward {
            display: flex;
            flex-direction: column;
            height: 250px;
        }

        &-personnalization {
            &-appearance {
                display: flex;
                flex-direction: column;
                height: 150px;
                textarea {
                    background-image: url("../../../assets/background-images/equipment.png");
                    background-position: center;
                    background-repeat: no-repeat;
                    background-size: 30%;
                }
            }

            &-skills {
                display: flex;
                flex-direction: column;
                height: 150px;
            }

        }

        &-ressources {
            display: flex;
            flex-direction: column;
            margin-bottom: 25px;

            &-ressource {
                margin-top: 10px;
                display: flex;
                flex-direction: column;

                div {
                    display: flex;
                    flex-direction: row;
                    margin-bottom: 5px;
                    justify-content: space-between;
                }
            }

            button {
                position: relative;
                width: 50px;
                height: 50px;
                background-color: white;
                left: 100%;
                transform: translateX(-100%);
                margin-top: 5px;
                border-radius: 10px;
                mat-icon {
                    transform: scale(1.3);
                }
            }
        }
    }
}

.piece::after {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    border: 1px solid black;
}