body {
  margin: 0;
  padding: 0;
  background-position: center;
  background-color: #aaa;
  font-family: "PT Sans", sans-serif;
  font-size: small;
  font-weight: normal;
  line-height: 1.1rem;
  color: white;
  overflow-x: hidden;
}


section#main {
  min-height: 100vh;
  margin: 0px auto;
  background: linear-gradient(0deg, #555 calc(100% - 200px), #222);
  display: flex;
  flex-direction: column;
}


section#logo {
  position: fixed;
  top: 10px;
  left: 0px;
  right: 0px;
  z-index: 10;
  display: flex;
  justify-content: center;
  animation: logo-animate;
  animation-duration: 1.0s;
  animation-timing-function: ease-out;
  pointer-events: none;
}
@keyframes logo-animate {
  0%   {transform: perspective(1000px) translate3d(0px, -75px, 0px) rotateX(75deg) scaleX(0.5);}
  100% {transform: perspective(1000px) translate3d(0px,   0px, 0px) rotateX( 0deg) scaleX(1.0);}
}

section#logo img {
  width: min(820px, 100%);
}


section#picto {
  height: calc(min(45px + 15vw, 157px));
  margin: 0px 0px 0px 0px;
  z-index: 11;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-end;
  animation: picto-animate;
  animation-duration: 1.0s;
  animation-timing-function: cubic-bezier(.75,.62,.18,1.85);
  pointer-events: none;
}
@keyframes picto-animate {
  0%   {transform: scale(0.0);}
  100% {transform: scale(1.0);}
}

section#picto img {
  width: 100%;
}

/********************************************/

section#pictos {
  margin: 20px 0px 0px 0px;
  width: 100%;
  display: flex;
  justify-content: center;
}

section#pictos ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

section#pictos ul li {
  transition-duration: 300ms;
}

section#pictos ul li:hover {
  transform: scale(1.2);
}

section#pictos img#games {
  animation-name: games-animate;
  animation-duration: 1000ms;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
@keyframes games-animate {
  0%   {transform: rotate(  0deg);}
  100% {transform: rotate(360deg);}
}

section#pictos img#drawings {
  animation-name: drawings-animate;
  animation-duration: 500ms;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-timing-function: linear;
  transform-origin: 50% 80%;
}
@keyframes drawings-animate {
  0%   {transform: rotate(-8deg);}
  100% {transform: rotate( 8deg);}
}

section#pictos img#rhb {
  animation-name: rhb-animate;
  animation-duration: 800ms;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
@keyframes rhb-animate {
  0%   {transform: translateX(-10px);}
  100% {transform: translateX( 10px);}
}

section#pictos img#bricks {
  animation-name: bricks-animate;
  animation-duration: 300ms;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
@keyframes bricks-animate {
  0%   {transform: scale(0.8);}
  100% {transform: scale(1.0);}
}

/********************************************/

section#menu {
  position: sticky;
  top: 0px;
  z-index: 9;
  margin-top: -44px;
  margin-bottom: 20px;
  width: 200px;
  padding: 0px 4px;
  border-radius: 4px;
  background: #777;
  display: flex;
  align-self: center;
  box-shadow: 0px 15px 20px 5px #0004;
}

section#home {
  display: flex;
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  transition-duration: 300ms;
}

section#home:hover {
  background-color: #999;
  transform: scale(1.2);
}

section#home a {
  padding: 10px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ddd;
}

section#home img {
  width: 20px;
}

section#floatbutton {
  display: flex;
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  transition-duration: 300ms;
}

section#floatbutton:hover {
  background-color: #999;
  transform: scale(1.2);
}

section#floatbutton a {
  padding: 10px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ddd;
}

section#floatbutton img {
  width: 20px;
}

section#push {
  flex-grow: 1;
}

/********************************************/

section#body p:nth-child(odd) {
  margin: 0px;
  flex-grow: 1;
  flex-basis: 0;
}

section#body p:nth-child(even) {
  margin: 0px;
  flex-grow: 1;
  flex-basis: 0;
  font-style: italic;
  text-align: right;
}

section#subtitle {
  text-align: center;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
  color: #eee;
  margin: 20px 0px 20px 0px;
  text-shadow: 0px 2px 12px #000;
}

@media screen and (max-width: 500px) {
  section#subtitle {
    margin: 20px 0px 0px 0px;
  }
}

section#page {
  transform-origin: center;
  display: flex;
  flex-direction: column;
  margin: 0px 10px;
  flex-grow: 5;
}


section#body {
  width: calc(100% - 20px);
  max-width: 820px;
  margin: 10px;
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-self: center;
}

/********************************************/

section#library {
  margin: 40px 0px 0px 0px;
  padding: 0px 4vw;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px 0px;
  background: repeating-linear-gradient(0deg, black 0px 2px, #442d16 2px 40px, black 40px, transparent 320px, transparent 370px);
}

section#library a {
  height: 300px;
  margin-right: -4px;
  padding-bottom: 40px;
  display: flex;
  align-items: flex-end;
  transform-origin: bottom;
  transition-duration: 300ms;
}

section#library a:hover {
  transform: scale(1.05);
  transform: perspective(1415px) rotateX(-28deg) translateY(-5px);
}

section#library-push {
  flex-grow: 1;
  background-color: #222;
}

/********************************************/

footer {
  height: 70px;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  padding: 0px 30px 0px 50px;
  background-color: #222;
  align-self: normal;
}
@media screen and (max-width: 800px) {
  footer {
    padding: 0px 10px 0px 20px;
  }
}

footer p {
  flex-grow: 1;
  flex-basis: 0;
  color: #888;
}

footer ul {
  margin: 0px;
  padding: 0px;
}

footer li {
  height: 14px;
  float: left;
  list-style-type: none;
  margin: 0px;
  padding: 10px 15px 10px 15px;
  border-radius: 20px;
  display: flex;
  flex-direction: row;
  transition-property: background-color;
  transition-duration: 300ms;
}
@media screen and (max-width: 500px) {
  footer li {
    padding: 10px 8px 10px 8px;
  }
}

footer li#sel {
  background-color: #666;
}

footer li#sel:hover {
  background-color: #444;
}

footer li:hover {
  background-color: #444;
}

footer a {
  color: #fff;
  text-decoration: none;
}