@font-face {
  font-family: 'saira_condensedthin';
  src: url('../ui/font/sairacondensed-thin-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5FF;
}

* {
  box-sizing: border-box;
  margin: 0px;
  padding: 0;
}

:root {
  --backg: #1c1b22;
  --clr: snow;
  --backgt: rgba(28, 27, 34, .8);
  --color-text: #111;
  --color-bg: #F7F5F3;
  --color-link: #999;
  --color-link-hover: #000;
  --font-size-xxlarge: 2.5rem;
  --font-size-xlarge: 2rem;
  --font-size-large: 1.5rem;
  --font-size-medium: 1.25rem;
  --font-size-small: 1rem;
  --color-menu: #000;
  --color-menu-hover: #e93f33;
  color: var(--color-text);
  background-color: var(--color-bg);
}

body {
  background: var(--backg);
  color: var(--clr);
  font-family: 'saira_condensedthin', sans-serif;
}

main {
  overflow: hidden;
  height: 100vh;
}

section {
  height: 100vh;
}

.chapitres {
  position: absolute;
  top: 1.5em;
  right: 1.5em;
  color: var(--clr);
  padding: .8em .5em .2em;
  font-size: var(--font-size-medium);
  opacity: 1;
  pointer-events: auto;
  background: none;
  border: none;
  z-index: 2;
}

.chapitres::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  transform-origin: right center;
}

.chapitres:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
  transition-duration: 0.4s;
}

.chapitres__inactif {
  opacity: 0;
  pointer-events: none;
}

.chapitres:hover {
  cursor: pointer;
}

.bouton__fermer__pages,
.bouton__fermer__chapitres {
  position: absolute;
  top: 1.5em;
  right: 1.5em;
  color: var(--clr);
  padding: .8em .5em;
  font-size: var(--font-size-xlarge);
  opacity: 0;
  pointer-events: none;
  background: none;
  border: none;
}

.bouton__ouvrir__chapitres {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.bouton__ouvrir__pages {
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

.bouton__ouvrir__pages:hover, .bouton__ouvrir__chapitres:hover {
  cursor: pointer;
  transform: scale(1.25);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.bouton__ouvrir__pages:not(hover), .bouton__ouvrir__chapitres:not(hover) {
  cursor: pointer;
  transform: scale(.95);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.menu {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: auto auto auto;
  align-content: center;
  justify-content: center;
  counter-reset: menucounter;
  background: var(--backgt);
  color: var(--clr);
}

.active {
  opacity: 1;
  pointer-events: auto;
}

.menu__item {
  grid-column: 2;
  line-height: 1;
  display: block;
  position: relative;
}

.menu__inner {
  text-decoration: none;
  line-height: 1.25;
  margin-top: calc(-0.15 * var(--font-size-xlarge));
  font-size: var(--font-size-xlarge);
  cursor: pointer;
  position: relative;
  padding: 0 calc(0.45 * var(--font-size-xlarge));
  color: var(--clr);
}

.menu__inner::before {
  position: absolute;
  left: 0;
  top: 18%;
  text-align: right;
  counter-increment: menucounter;
  content: counters(menucounter, ".", decimal-leading-zero);
  opacity: 0;
  line-height: 1;
  padding-right: 0.5rem;
  display: grid;
  place-items: center;
  font-size: var(--font-size-small);
  color: var(--clr);
  transform: scale3d(0, 0, 0);
}

.menu__inner:hover::before {
  opacity: 1;
  transform: scale3d(1, 1, 1);
}

.contient {
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
}

.contientOuvre {
  pointer-events: auto;
  opacity: 1;
  background: var(--backgt);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100vw;
  height: 100vh;
}

.contient p {
  line-height: 1.5;
  max-width: 29ch;
  hyphens: auto;
  font-size: var(--font-size-xxlarge);
}

.ticks {
  display: flex;
  width: 100vw;
  height: 100vh;
  align-items: center;
  overflow: hidden;
  justify-content: center;
  position: fixed;
  flex-direction: column;
}

.texto__verlay {
  font-size: 2rem;
  padding: .8em;
  width: 100vw;
  height: 100vh;
  overflow-y: hidden;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--backgt);
  transition: .5s;
}

.retour_accueil {
  position: absolute;
  bottom: .8em;
  right: .8em;
  padding: .5em .8em;
  border: 1px solid var(--clr);
  border-radius: 8%;
  color: var(--clr);
}

.ticks>span {
  background: linear-gradient(165deg,
      rgba(255, 255, 255, 1) 0%,
      rgb(220, 220, 220) 40%,
      rgb(170, 170, 170) 98%,
      rgb(10, 10, 10) 100%);
  margin: 0 10px;
  position: relative;
  mix-blend-mode: plus-lighter;
}

.ticks>span:before {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  box-shadow: 0 -10px 20px 20px #ffffff40 inset,
    0 -5px 15px 10px #ffffff50 inset, 0 -2px 5px #ffffff80 inset,
    0 -3px 2px #ffffffbb inset, 0 2px 0px #ffffff, 0 2px 3px #ffffff,
    0 5px 5px #ffffff90, 0 10px 15px #ffffff60, 0 10px 20px 20px #ffffff40;
  filter: blur(3px);
}

@media only screen and (max-width:1024px) {
  section {
    height: fit-content;
    flex-flow: column wrap;
  }

  .text {
    width: fit-content;
  }
}

@media only screen and (max-width:437px) and (orientation:portrait) {

.contient p {
  font-size: var(--font-size-large);
}
}
@media only screen and (max-height:437px) and (orientation:landscape) {

.contient p, .menu__inner {
  font-size: var(--font-size-large);
}
}
