/***********************************************
EXERCICES 1
***********************************************/

.forms-box {
    display: flex;
    width: 20%;
    justify-content: center;
}

.square {
    width: 100px;
    height: 100px;
    background-color: rgb(255, 0, 0);
    margin: 10px;
}

.round {
    width: 100px;
    height: 100px;
    background-color: rgb(0, 0, 255);
    border-radius: 50%;
    margin: 10px;
}

/***********************************************
EXERCICES 2
***********************************************/

.rectangle {
    width: 300px;
    height: 200px;
    background-color: rgb(255, 255, 255);
    position: relative;
    border: solid;
}

.rectangle::before {
    content: "";
    width: 100px;
    height: 200px;
    background-color: rgb(0, 0, 255);
    position: absolute;
    z-index: 2;
}

.rectangle::after {
    content: "";
    width: 100px;
    height: 200px;
    background-color: rgb(255, 0, 0);
    position: absolute;
    z-index: 2;
    transform: translate(-100%, 0);
    left: 100%;
}

/***********************************************
EXERCICES 3
***********************************************/

.heart {
    width: 100px;
    height: 100px;
    background-color: rgb(255, 0, 0);
    transform: rotate(45deg);
    position: relative;
    margin: 30px;
}

.heart::before {
    content: "";
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgb(255, 0, 0);
    position: absolute;
    transform: translate(-50%, -50%);
    left: -6%;
    top: 50%;
}

.heart::after {
    content: "";
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgb(255, 0, 0);
    position: absolute;
    transform: translate(-50%, -50%);
    left: 50%;
    top: -6%;
}

/***********************************************
EXERCICES 4
***********************************************/

.head {
    width: 200px;
    height: 200px;
    background-color: rgb(255, 255, 0);
    border-radius: 50%;
    position: relative;
}

.eyes::before {
    content: "";
    width: 30px;
    height: 30px;
    background-color: rgb(0, 0, 0);
    border-radius: 50%;
    position: absolute;
    top: 35%;
    left: 30%;
    transform: translate(-50%, -50%);
}

.eyes::after {
    content: "";
    width: 30px;
    height: 30px;
    background-color: rgb(0, 0, 0);
    border-radius: 50%;
    position: absolute;
    top: 35%;
    left: 70%;
    transform: translate(-50%, -50%);
}

.mouth {
  width: 60px;
  height: 20px;
  background-color: rgb(255, 0, 0);
  border-radius: 0 0 50% 50%;
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/***********************************************
EXERCICES 5
***********************************************/

.house {
    position: relative;
    margin: 100px 0 10px 0;
}

.roof {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 105px;
    border-color: transparent transparent rgb(201, 101, 61) transparent;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
}

.body {
    width: 200px;
    height: 150px;
    background-color: rgb(255, 255, 150);
}

.door {
    width: 50px;
    height: 80px;
    background-color: rgb(65, 34, 5);
    position: absolute;
    transform: translate(-50%, -100%);
    top: 100%;
    left: 50%;
}

/***********************************************
EXERCICES 6
***********************************************/

.crazy-square {
    width: 200px;
    height: 200px;
    animation: changer 3s linear infinite;
    margin: 30px 0 20px 0;
}

@keyframes changer {
    0% {
        background-color: rgb(0, 0, 255);
    }

    50% {
        background-color: rgb(0, 255, 0);
        transform: rotate(45deg);
    }

    100% {
        background-color: rgb(255, 0, 0);
        transform: rotate(80deg);
    }
}

/***********************************************
EXERCICES 7
***********************************************/

.cat-head {
    width: 200px;
    height: 200px;
    background-color: rgb(255, 187, 0);
    margin: 60px;
    position: relative;
    border-radius: 0 0 50px 50px;
}

.cat-head::before {
    content: "";
    width: 0px;
    height: 0px;
    border-style: solid;
    border-width: 50px;
    border-color: transparent transparent transparent rgb(255, 187, 0);
    position: absolute;
    top: -50px;
    left: 0%;
}

.cat-head::after {
    content: "";
    width: 0px;
    height: 0px;
    border-style: solid;
    border-width: 50px;
    border-color: transparent rgb(255, 187, 0) transparent transparent;
    position: absolute;
    top: -50px;
    left: 100px;
}

.cat-eyes::before {
    content: "";
    width: 30px;
    height: 40px;
    background-color: rgb(0, 0, 0);
    border-radius: 50%;
    position: absolute;
    top: 35%;
    left: 30%;
    transform: translate(-50%, -50%);
}

.cat-eyes::after {
    content: "";
    width: 30px;
    height: 40px;
    background-color: rgb(0, 0, 0);
    border-radius: 50%;
    position: absolute;
    top: 35%;
    left: 70%;
    transform: translate(-50%, -50%);
}

.cat-nose {
    width: 0px;
    height: 0px;
    border-style: solid;
    border-width: 20px 10px;
    border-color: rgb(26, 19, 19) transparent transparent transparent;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cat-mouth {
  width: 50px;
  height: 10px;
  background-color: rgb(26, 19, 19);
  border-radius: 0 0 50% 50%;
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
}