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-width: 350px;
  min-height: 100vh;
  margin: 0px auto;
  background: linear-gradient(180deg, #4d0108, #e2021a 90px);
  display: flex;
  flex-direction: column;
}
@media screen and (max-width: 800px) {
  section#main {
    background: linear-gradient(180deg, #4d0108, #e2021a 50px);
  }
}

section#main-tiles {
  min-height: 100vh;
  margin: 0px auto;
  background: linear-gradient(180deg, #4d0108, #e2021a 90px);
  display: flex;
  flex-direction: column;

}
@media screen and (max-width: 800px) {
  section#main-tiles {
    background: linear-gradient(180deg, #4d0108, #e2021a 50px);
  }
}


section#header-home {
  margin: 10px 0px 0px 0px;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

section#header-home a {
  animation: header-home-animate;
  animation-duration: 1.0s;
  animation-timing-function: ease-out;
  transition-duration: 300ms;
}
@keyframes header-home-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#header-home a:hover {
  transform: scale(1.05);
}

section#header-home img {
  width: 100%;
}


section#header {
  margin: 10px 0px 0px 0px;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

section#header img {
  width: 100%;
}

section#header a {
  transition-duration: 300ms;
}

section#header a:hover {
  transform: scale(1.05);
}


section#picto-animate-home {
  position: absolute;
  width: 100%;
  bottom: -13px;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
}
@media screen and (max-width: 700px) {
  section#picto-animate-home {
    bottom: -11px;
  }
}

section#picto-animate-home img {
  height: 100px;
  animation-name: picto-animate-home;
  animation-duration: 140s;
  animation-timing-function: cubic-bezier(0.6, 0.0, 0.6, 1.0);
  animation-iteration-count: infinite;
}
@media screen and (max-width: 700px) {
  section#picto-animate-home img {
    height: 70px;
    animation-duration: 100s;
  }
}
@keyframes picto-animate-home {
  0%    {transform: translateX(-100px);}
  0.8%  {transform: translateX(-50px);}
  1%    {transform: translateX(-100px);}
  2%    {transform: translateX(-100px);}
  2.8%  {transform: translateX(-10px);}
  4%    {transform: translateX(-10px);}
  4.2%  {transform: translateX(-100px);}
  5%    {transform: translateX(-100px);}
  6%    {transform: translateX(20vw);}
  7%    {transform: translateX(30vw);}
  8%    {transform: translateX(60vw);}
  9%    {transform: translateX(60vw);}
  15%   {transform: translateX(-100px);}
  15.8% {transform: translateX(-50px);}
  16%   {transform: translateX(-100px);}
  18%   {transform: translateX(-100px);}
  22%   {transform: translateX(65vw);}
  24%   {transform: translateX(65vw);}
  26%   {transform: translateX(100vw);}
  26.5% {transform: translateX(95vw);}
  27%   {transform: translateX(100vw);}
  29%   {transform: translateX(85vw);}
  30%   {transform: translateX(85vw);}
  33%   {transform: translateX(95vw);}
  39%   {transform: translateX(55vw);}
  40%   {transform: translateX(55vw);}
  46%   {transform: translateX(-50px);}
  47%   {transform: translateX(10vw);}
  48%   {transform: translateX(10vw);}
  51%   {transform: translateX(35vw);}
  52%   {transform: translateX(35vw);}
  58%   {transform: translateX(95vw);}
  60%   {transform: translateX(95vw);}
  64%   {transform: translateX(45vw);}
  66%   {transform: translateX(45vw);}
  66%   {transform: translateX(100vw);}
  75%   {transform: translateX(-100px);}
  76%   {transform: translateX(10vw);}
  77%   {transform: translateX(10vw);}
  80%   {transform: translateX(40vw);}
  81%   {transform: translateX(40vw);}
  86%   {transform: translateX(90vw);}
  87%   {transform: translateX(90vw);}
  91%   {transform: translateX(50vw);}
  92%   {transform: translateX(50vw);}
  93%   {transform: translateX(60vw);}
  95%   {transform: translateX(60vw);}
  100%  {transform: translateX(-100px);}
}


section#picto-animate-other {
  position: fixed;
  width: 100%;
  bottom: -13px;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
}
@media screen and (max-width: 700px) {
  section#picto-animate-other {
    bottom: -11px;
  }
}

section#picto-animate-other img {
  height: 100px;
  animation-name: picto-animate-other;
  animation-duration: 50s;
  animation-timing-function: cubic-bezier(0.6, 0.0, 0.6, 1.0);
  animation-iteration-count: infinite;
}
@media screen and (max-width: 700px) {
  section#picto-animate-other img {
    height: 70px;
  }
}
@keyframes picto-animate-other {
  0%    {transform: translateX(-100px);}
  50%   {transform: translateX(-100px);}
  67%   {transform: translateX(50vw);}
  70%   {transform: translateX(50vw);}
  75%   {transform: translateX(5px);}
  80%   {transform: translateX(30px);}
  86%   {transform: translateX(5px);}
  88%   {transform: translateX(-50px);}
  90%   {transform: translateX(5px);}
  96%   {transform: translateX(5px);}
  98%   {transform: translateX(10vw);}
  100%  {transform: translateX(-100px);}
}

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

.home-rhb::before {
  content: "RhB\00a0MODEL\00a0TRAIN";
  text-transform: none;
  padding-left: 10px;
}
@media screen and (max-width: 900px) {
  .home-rhb::before {
    content: "RhB";
    text-transform: none;
    padding-left: 0px;
  }
}

nav#menu {
  position: sticky;
  top: 0px;
  z-index: 9;
  height: auto;
  margin: 0px 0px 0px 0px;
  padding-top: 5px;
  border-radius: 0px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  background: #e2021a;
  border-bottom: solid 2px #000;
  box-shadow: 0px 10px 0px 0px #555;
}

nav#menu ul {
  position: relative;
  height: auto;
  margin: 0px;
  padding: 0px 60px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
}
@media screen and (max-width: 900px) {
  nav#menu ul {
    padding: 0px 50px;
  }
}

nav#menu li {
  height: 40px;
  margin: 0px 0px -2px 0px;
  display: flex;
  flex-direction: row;
  align-items: center;
  border-radius: 10px 10px 0px 0px;
  border-left: solid 2px transparent;
  border-top: solid 2px transparent;
  border-right: solid 2px transparent;
  transition-property: background-color;
  transition-duration: 300ms;
}

nav#menu a {
  margin-right: 1px;
  padding: 10px 10px 7px 10px;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  display: flex;
  flex-direction: row;
}
@media screen and (max-width: 800px) {
  nav#menu a {
    margin-right: 0px;
    margin-bottom: 0px;
  }
}

nav#menu li#sel {
  z-index: 11;
  background: #555;
  border-left: solid 2px #000;
  border-top: solid 2px #000;
  border-right: solid 2px #000;
}

nav#menu li#desel {
  background: linear-gradient(180deg, #b30213 0px 38px, transparent 38px);
}
@media screen and (max-width: 800px) {
  nav#menu li#desel {
    border-radius: 0px;
    background: linear-gradient(180deg, #b30213 0px calc(100% - 2px), transparent calc(100% - 2px));
  }
}

nav#menu li#desel:hover {
  background: linear-gradient(180deg, #8c010f 0px 38px, transparent 38px);
}

nav#menu li#sel:hover {
  background: #444;
  color: #fff;
}

nav#menu li:hover {
  background: linear-gradient(180deg, #b30213 0px 38px, transparent 38px);
  color: #fff;
}

nav#menu li#bricks {
  position: absolute;
  top: -2px;
  left: 0px;
  margin: 0px;
  border-radius: 0px;
}

nav#menu li#floatbutton {
  position: absolute;
  top: -2px;
  right: 0px;
  margin: 0px;
  border-radius: 0px;
}

nav#menu li#bricks:hover {
  background: none;
  background-color: #999;
  color: #fff;
}

nav#menu li#floatbutton:hover {
  background: none;
  background-color: #999;
  color: #fff;
}

nav#menu li#space {
  padding: 0px;
  width: 10px;
  background: transparent;
}
@media screen and (max-width: 800px) {
  nav#menu li#space {
    margin: 0px;
    width: 0px;
  }
}

nav#menu ul li a img {
  height: 16px;
}

nav#menu ul li#bricks a img {
  margin: -5px 0px;
  height: 24px;
}

nav#menu ul li#floatbutton a img {
  margin: -5px 0px;
  height: 24px;
}

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

nav#submenu {
  position: absolute;
  bottom: -50px;
  left: 0px;
  right: 0px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

nav#submenu subul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: center;
}

nav#submenu subul subli {
  white-space: nowrap;
  height: 20px;
  padding: 6px 10px 4px 10px;
  border: 2px solid #000;
  border-radius: 20px;
  background-color: #555;
  cursor: pointer;
  transition-duration: 300ms;
}

nav#submenu subul subli:hover {
  transform: scale(1.1);
}
@media (hover: none) {
  nav#submenu subul subli:hover{
    transform: scale(1.0);
  }
}
@media (pointer: coarse) {
  nav#submenu subul subli:hover{
    transform: scale(1.0);
  }
}

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


p {
  margin: 0px;
}


section#background {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #555;
}

@media screen and (max-width: 800px) {
  section#background {
    padding-top: 0px;
  }
}


section#subtitle {
  text-align: center;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
  color: #e2021a;
}

section#subtitle-left {
  margin-left: 10px;
  padding-left: 40px;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
  color: #e2021a;
}

section#subtitle-center {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 20px 0px;
  padding: 0px;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
  color: #e2021a;
}

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


section#contact-image {
  margin: 10px 0px;
  text-align: center;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
  color: #eee;
}

section#contact-image img {
  width: 100%;
  max-width: 400px;
}


section#bilingual-title {
  max-width: 840px;
  width: 100%;
  margin: 30px 0px 0px 0px;
  display: flex;
  align-self: center;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
}
@media screen and (max-width: 700px) {
  section#bilingual-title {
    margin: 30px 0px 10px 0px;
  }
}

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

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

section#bilingual-title a {
  color: #e2021a;
  text-decoration: none;
  transition-duration: 300ms;
}

section#bilingual-title a:hover {
  text-decoration: underline;
}



section#bilingual-subtitle {
  width: 100%;
  margin: 0px;
  padding: 0px;
  display: flex;
  justify-content: center;
  align-self: center;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
  background: linear-gradient(180deg, transparent 10px, #000 10px 12px, #a60212 12px, #e2021a 50% calc(100% - 2px), #000 calc(100% - 2px) 100%);
}
@media screen and (max-width: 700px) {
  section#bilingual-subtitle {
    margin: 0px 0px 10px 0px;
  }
}

section#bilingual-subtitle-texts {
  max-width: 840px;
  width: 100%;
  display: flex;
  gap: 10px;
  align-self: center;
  font-size: x-large;
  font-weight: bold;
  line-height: normal;
}

section#bilingual-subtitle p:nth-child(odd) {
  margin: 24px 0px 10px 10px;
  flex-grow: 1;
  flex-basis: 0;
}
@media screen and (max-width: 700px) {
  section#bilingual-subtitle p:nth-child(odd) {
    margin: 20px 0px 10px 10px;
  }
}

section#bilingual-subtitle p:nth-child(even) {
  margin: 24px 10px 10px 0px;
  flex-grow: 1;
  flex-basis: 0;
  font-style: italic;
  text-align: right;
}
@media screen and (max-width: 700px) {
  section#bilingual-subtitle p:nth-child(even) {
    margin: 20px 10px 10px 0px;
  }
}





section#samples-tiles {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 20px;
  justify-content: center;
}
@media screen and (max-width: 700px) {
  section#samples-tiles {
    gap: 10px;
    margin: 0px 0px;
  }
}

section#samples {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

section#samples img {
  max-width: 806px;
  width: calc(100% - 20px);
  margin: 0px 0px 10px 0px;
  padding: 8px;
  background-color: #ccc;
  box-shadow: 0px 10px 15px #333;
}
@media screen and (max-width: 800px) {
  section#samples img {
    padding: 3px;
  }
}

section#samples video {
  max-width: 806px;
  width: calc(100% - 20px);
  margin: 20px 0px 10px 0px;
  padding: 8px;
  background-color: #ccc;
  box-shadow: 0px 10px 15px #333;
}


section#samples a {
  display: flex;
  justify-content: center;
  transition-duration: 300ms;
}

section#samples a:hover {
  transform: scale(1.03);
}

section#samples a img {
  max-width: 816px;
  width: calc(100% - 10px);
  padding: 4px;
  box-shadow: 0px 10px 15px #333;
  background: #222;
  transition-property: all;
  transition-duration: 300ms;
}
@media screen and (max-width: 800px) {
  section#samples a img {
    width: calc(100% - 20px);
  }
}

section#samples a img:hover {
  background: #e2021a;
}


section#panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

section#panel img {
  max-width: 806px;
  width: calc(100% - 20px);
  margin: 20px 0px 10px 0px;
  padding: 8px;
  background: #ccc;
  box-shadow: 0px 10px 15px #333;
}
@media screen and (max-width: 800px) {
  section#panel img {
    padding: 3px;
  }
}

section#over {
  position: absolute;
  bottom: 22px;
  width: calc(100% - 30px);
  max-width: 786px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0px 3px 10px #000;
  text-transform: uppercase;
  color: #ccc;
  pointer-events: none;
}
@media screen and (max-width: 800px) {
  section#over {
    bottom: 16px;
    font-size: 15px;
    font-weight: 900;
    text-shadow: 0px 2px 8px #000;
  }
}

section#over p:nth-child(odd) {
  border-radius: 10px;
  background-color: #0006;
  box-shadow: 0px 0px 8px 3px #0006;
}

@media screen and (max-width: 800px) {
  section#over p:nth-child(odd) {
    box-shadow: 0px 0px 4px 2px #0006;
  }
}

section#over p:nth-child(even) {
  font-style: italic;
  border-radius: 10px;
  background-color: #0006;
  box-shadow: 0px 0px 8px 3px #0006;
}

@media screen and (max-width: 800px) {
  section#over p:nth-child(even) {
    box-shadow: 0px 0px 4px 2px #0006;
  }
}


section#key {
  max-width: 820px;
  width: calc(100% - 20px);
  display: flex;
  gap: 10px;
  margin: 0px 0px 20px 0px;
}

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

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

section#key p a {
  display: initial;
  color: #fff;
  text-decoration: none;
  background-color: #e2021a;
  border-radius: 5px;
  padding: 2px 5px;
  transition-property: background-color;
  transition-duration: 300ms;
}

section#key a:hover {
  background-color: #222;
}


section#locos {
  max-width: 820px;
  width: calc(100% - 20px);
  margin: -20px 0px 20px 0px;
}

section#locos ul {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

section#locos ul li a {
  color: #fff;
  text-decoration: none;
  background-color: #e2021a;
  border-radius: 5px;
  padding: 2px 5px;
  transition-property: background-color;
  transition-duration: 300ms;
}

section#locos ul li a:hover {
  background-color: #222;
}


section#texts {
  width: 100%;
  max-width: 840px;
  margin: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-self: center;
}


section#texts p {
  margin: 0px 0px 0px 10px;
  flex-grow: 1;
  flex-basis: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

section#texts p:nth-child(even) {
  margin: 0px 10px 0px 0px;
  font-style: italic;
  text-align: right;
}

section#texts li {
  list-style-type: none;
}

section#texts a {
  color: #fff;
  text-decoration: none;
  background-color: #e2021a;
  border-radius: 5px;
  padding: 2px 5px;
  transition-property: background-color;
  transition-duration: 300ms;
}

section#texts a:hover {
  background-color: #222;
}


section#tiles {
  width: calc(100% - 20px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: center;
  margin-top: 30px;
  margin-bottom: 30px;
  justify-content: center;
}

section#tiles a {
  color: #bbb;
  text-decoration: none;
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: center;
  transition-property: color;
  transition-duration: 300ms;
}

section#tiles a:hover {
  color: #fff;
}

section#tile {
  padding: 15px;
  background-color: #2a2a2a;
  border-color: transparent;
  border-style: solid;
  border-width: 5px;
  border-radius: 5px;
  box-sizing: border-box;
  position: relative;
  width: 402px;
  align-content: center;
  transition-property: background-color, border-color;
  transition-duration: 300ms;
}

section#tile:hover {
  background-color: #222;
  border-color: #e2021a;
}


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

footer {
  height: 70px;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  padding: 0px 30px 0px 50px;
  background-color: #222222;
}

@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;
}