@import "./import/const.css";
@import "./import/reset.css";

@media print {
  /* All your print styles go here */
  header,
  footer,
  nav,
  #rangement,
  #clavier,
  .no-print,
  .button-container {
    display: none !important;
  }

  .print {
    display: block !important;
  }
}

@media not print {
  .print {
    display: none;
  }
}

#content {
  flex: 1 0 auto;
  margin: auto;
  width: 100%;
  max-width: var(--max-width);
  color: #000;
}

header {
  text-align: center;

  & h1 {
    padding-top: 1em;
    font-size: 2em;
    color: var(--color-01);
  }
}

.img-wrapper {
  width: 100%;

  &.border {
    border: 1px solid gray;
  }

  & > div {
    position: relative;

    & img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
    }
  }
}

.close {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(45deg);
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;

  &:before,
  &:after {
    content: "";
    display: block;
    position: absolute;
    background: #fff;
  }

  &:before {
    width: 6px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
  }

  &:after {
    width: 100%;
    height: 6px;
    top: 50%;
    transform: translateY(-50%);
  }

  @media (hover: hover) {
    &:hover {
      transform: rotate(405deg);

      &:before,
      &:after {
        background: #000;
      }
    }
  }
}

#clavier {
  position: relative;

  & .img-wrapper {
    max-width: min(90vw, 1200px);
    width: 150%;
    align-self: center;

    .marker {
      font-size: 1em;
      position: absolute;
      display: none;
      align-items: center;
      border-radius: 5px;
      background-color: var(--color-02);
      font-weight: bold;
      padding-left: 0.3%;

      &.show {
        display: flex;
      }

      @media screen and (max-width: 1200px) {
        font-size: 0.8em;
      }

      @media screen and (max-width: 1050px) {
        font-size: 0.7em;
      }
    }

    .details {
      position: absolute;
      padding: 1em;
      padding-bottom: 2em;
      background: rgba(255, 255, 255, 0.97);
      border-radius: 10px;
      border: 4px solid #808080;
      display: none;
      height: fit-content;
      max-height: 80%;
      overflow: hidden;

      &.show {
        display: block;
      }

      h1 {
        font-size: 1.2em;
        font-weight: bold;
        text-align: center;
      }

      p {
        max-width: 700px;
        margin-inline: auto;

        &:first-of-type {
          margin-top: 0.7em;
        }
      }

      .close {
        width: 40px;
        height: 40px;
        position: absolute;
        top: 0.5em;
        right: 0.5em;

        &:before,
        &:after {
          background: #808080;
        }
      }
    }
  }
}

.alert {
  padding: 1.5em 5em;
  color: #8c0303;
  background: #d3d3d3;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  border: 2px solid #8c0303;

  p {
    text-align: center !important;
  }
}

.link-img {
  display: flex;
  flex-direction: row;
  border: 2px solid var(--color-01);
  padding: 0.5em;
  gap: 1em;
  border-radius: 10px;
  align-content: center;
  align-items: center;
  margin-top: 3em;
  transition: all 0.2s;

  &:nth-child(even) {
    flex-direction: row-reverse;
  }

  .link-img-text {
    flex: 1;
    padding: 1em;

    &::first-letter {
      font-size: 3.5em;
      font-weight: bold;
    }
  }

  @media (hover: hover) {
    &:hover {
      border-color: var(--color-02);
      box-shadow: 2px 2px 5px var(--color-02);

      .link-img-text::first-letter {
        color: var(--color-02);
      }
    }
  }
}

#liens_badges {
  .link-img {
    width: 80%;

    &:nth-child(even) {
      margin-left: auto;
    }

    .img-wrapper {
      width: 30%;

      & > div {
        padding-top: 66.66%;
      }
    }

    .link-img-text {
      flex: 1;
      padding: 1em;

      &::first-letter {
        display: inline-block;
        vertical-align: -0.1em;
        line-height: 1;
      }
    }
  }
}

#liens_jeux {
  .link-img {
    transform: translateX(2em);

    &:nth-child(even) {
      transform: translateX(-2em);
    }

    .img-wrapper {
      width: 40%;

      & > div {
        padding-top: 62.5%;
      }
    }

    .link-img-text:first-letter {
      float: left;
      line-height: 0.6;
    }
  }
}

.page {
  padding-top: 3rem;
  max-width: 1200px;
  width: 90%;
  margin-inline: auto;

  h1 {
    font-size: 2em;
    font-weight: bold;
  }

  h2 {
    font-size: 1.5em;
    font-weight: bold;

    &:before,
    &:after {
      content: "";
      display: inline-block;
      width: 0.5em;
      height: 0.5em;
      border-radius: 50%;
      background-color: var(--color-01);
      vertical-align: 0.05em;
    }

    &:before {
      margin-right: 0.2em;
    }

    &:after {
      margin-left: 0.2em;
    }
  }

  h3 {
    font-size: 1.2em;
    font-weight: bold;

    &:before {
      content: "";
      display: inline-block;
      width: 0.5em;
      height: 0.5em;
      border-radius: 50%;
      background-color: var(--color-02);
      vertical-align: 0.1em;
      margin-right: 0.2em;
    }
  }

  section {
    max-width: 800px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
  }

  p {
    text-align: justify;
  }
}

.button-container {
  display: flex;
  gap: 20px;
  width: fit-content;
  margin-inline: auto;
  text-align: center;

  a {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
    color: var(--color-bg);
    font-weight: bold;
    background: var(--color-01);
    border: 3px solid var(--color-01);
    border-radius: 5px;
    cursor: pointer;
    transition:
      color 0.4s,
      border-color 0.4s,
      background-color 0.4s;

    &.active {
      pointer-events: none;
      border-color: var(--color-02);
    }

    @media (hover: hover) {
      &:hover {
        background: var(--color-02);
        border-color: var(--color-02);
        color: #444;
      }
    }
  }

  &.download {
    a {
      width: 130px;
    }
  }

  &.clavier {
    a {
      padding: 0.5em;
      width: 40px;
      aspect-ratio: 1 / 1;

      &[href="close"] {
        position: absolute;
        right: 0;

        &.hide {
          visibility: hidden;
        }
      }
    }
  }
}

section {
  padding-top: 5rem;
}

article {
  padding-top: 2em;
}

p.exemple {
  padding-left: 1em;
}

footer {
  flex-shrink: 0;
  margin-top: 100px;
  text-align: center;
  font-size: 1.5em;
  font-style: italic;
  position: relative;
  height: 70px;

  & div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: auto;
    border-top: 2px solid var(--color-01);
    padding: 10px 50px;
  }
}

#up {
  position: fixed;
  display: flex;
  bottom: -54px;
  right: 10px;
  width: 50px;
  height: 50px;
  background: var(--color-bg);
  border: 2px solid var(--color-01);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.4s;

  &:after {
    content: "";
    display: block;
    margin: auto;
    transform: translateY(-4px);
    border-right: 17px solid transparent;
    border-bottom: 29px solid var(--color-01);
    border-left: 17px solid transparent;
  }

  &.show {
    transform: translateY(-120%);

    @media screen and (max-width: 650px) {
      transform: translateY(-250%);
    }
  }
}

.no-hyphens {
  hyphens: none;
}

.inline {
  display: inline;
}

.inline-block {
  display: inline-block;
}

.block {
  display: block;
}

.rel {
  position: relative;
}

.italic {
  font-style: italic;
}

.underline {
  text-decoration: underline;
}

.bold {
  font-weight: bold;
}

.sc {
  font-variant: all-small-caps;
}

.left {
  text-align: left;
}

.center {
  text-align: center !important;
}

.right {
  text-align: right;
}

.clear {
  clear: both;
}

.line-height-0-8 {
  line-height: 0.8;
}

.line-height-1-0 {
  line-height: 1;
}

.font-0-75 {
  font-size: 0.75em;
}

.font-0-85 {
  font-size: 0.85em;
}

.font-0-9 {
  font-size: 0.9em;
}

.font-0-95 {
  font-size: 0.95em;
}

.font-1-2 {
  font-size: 1.2em;
}

.font-1-5 {
  font-size: 1.5em;
}

.font-1-8 {
  font-size: 1.8em;
}

.font-2 {
  font-size: 2em;
}

.gray {
  color: #666;
}

.wfc {
  width: fit-content;
}

.mw-400 {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.mw-600 {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.mw-800 {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.mw-1000 {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.mha {
  margin-left: auto;
  margin-right: auto;
}

.mt-2pc {
  margin-top: 2%;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-12 {
  margin-top: 3rem;
}

.mt-16 {
  margin-top: 4rem;
}

.mt-20 {
  margin-top: 5rem;
}

.mt-24 {
  margin-top: 6rem;
}

.mt-28 {
  margin-top: 7rem;
}

.mt-32 {
  margin-top: 8rem;
}

.mt-36 {
  margin-top: 9rem;
}

.mt-40 {
  margin-top: 10rem;
}

.p-0-5 {
  padding: 0.5em;
}

.p-1-0 {
  padding: 1em;
}

.p-1-5 {
  padding: 1.5em;
}

.hidden {
  display: none;
}
