@font-face {
  font-family: "Poppins";
  src: url(../../assets/fonts/Poppins-Medium.ttf);
}

*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Poppins, Helvetica, sans-serif;
  background-color: gray;
  color: whitesmoke;
}

header {
  width: 100%;
  padding: 20px 50px;
}

main,
section {
  width: 100%;
  padding: 10px 50px;
}

h1 {
  font-size: 2rem;
  text-align: center;
}

h2 {
  font-size: 1.8rem;
  text-align: center;
}

p,
li {
  font-size: 1rem;
  max-width: 900px;
  margin: 0 20px;
}

.container {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 20px auto;
  background-color: #111;
  border: 1px solid white;
}

.box {
  font-size: 1rem;
  text-align: center;
  background-color: crimson;
  cursor: pointer;
  transition: translate 1s ease-in-out;
}

.b1 {
  width: 100px;
  height: 100px;
}
.b2 {
  width: 100px;
  height: 50px;
}

.container-anim {
  width: 100%;
  height: 350px;
  background-color: #111;
  border: 1px solid white;
}

.box-anim {
  width: 100px;
  height: 100px;
  background-color: green;
  cursor: pointer;
  margin: 50px;
}

.moved:hover {
  translate: 100px;
}
.moved2:hover {
  translate: 100px 50px;
}

/* Classes de TRANSFORMATION *********************** */
.rotate:hover {
  rotate: 45deg;
}
.rotatey:hover {
  rotate: y 45deg;
}

.small:hover {
  scale: 0.5;
}
.large:hover {
  scale: 1.5;
}
.scalexy:hover {
  scale: 1 2;
}

/* Classes d'ANIMATION *********************** */
.animated {
  animation: scale 1s infinite, tourne 500ms 1s infinite;
}

@keyframes scale {
  from {
    scale: 1;
  }
  to {
    scale: 1.5;
  }
}
@keyframes tourne {
  from {
    rotate: 0deg;
  }
  to {
    rotate: 180deg;
  }
}

.active {
  animation: with-new-props 3s ease-out infinite;
}

/* Détails de l'ANIMATION : 
- de O à 42% translation de O à 200px
- de 24 à 63% rotation de 0 à 90deg
- de 55 à 100% translation de 200 à 365px */
@keyframes with-new-props {
  0% {
    translate: 0px;
  }
  42%,
  55% {
    translate: 200px;
  }
  100% {
    translate: 365px;
  }

  0%,
  24% {
    rotate: 0deg;
  }
  63%,
  100% {
    rotate: 90deg;
  }
}
