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

:root {
  font-size: 14px;
	--color-text: rgb(140, 146, 164);
	--color-bg: #000;
	--color-link: rgb(140, 146, 164);
	--color-link-hover: #fff;
  --page-padding: 1rem;
}

#canvas {
  width: 100%;
  height: 100%;
}

#canvas-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

html, body {
  width: 100vw;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: ui-monospace,SFMono-Regular,Menlo,Roboto Mono,monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
  content: '';
  position: fixed;
  z-index: 1000;
}

.js .loading::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
}

.js .loading::after {
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  opacity: 0.4;
  background: var(--color-link);
  animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keycadres loaderAnim {
  to {
    opacity: 1;
    transform: scale3d(0.7,0.7,1);
  }
}

a {
  text-decoration: underline;
  color: var(--color-link);
  outline: none;
  cursor: pointer;
}

a:hover {
  text-decoration: none;
  color: var(--color-link-hover);
  outline: none;
}

.cadre {
	padding: var(--page-padding);
  position: fixed;
  top: 0;
  left: 0;
  display: grid;
  z-index: 1000;
  width: 100%;
  height: 100%;
  grid-row-gap: 1rem;
  grid-column-gap: 2rem;
  pointer-events: none;
  justify-items: start;
  grid-template-columns: auto auto;
  grid-template-areas: 'title' 'prev' 'back' 'sub' 'sponsor' 'actions';
}

.cadre #cdawrap {
  justify-self: start;
}

.cadre a {
  pointer-events: auto;
}

.cadre_titre {
  grid-area: title;
  font-size: inherit;
  margin: 0;
}

.cadre__back {
  grid-area: back;
  justify-self: start;
}

.cadre__prev {
  grid-area: prev;
  justify-self: start;
}

.cadre_sub {
  grid-area: sub;
}

.cadre_move {
	grid-area: actions;
	display: flex;
	gap: 1rem;
}

@media screen and (min-width: 53em) {
  body {
    --page-padding: 2rem 3rem;
  }
  .cadre {
    grid-template-columns: auto auto auto 1fr;
    grid-template-rows: auto auto;
    align-content: space-between;
    grid-template-areas: 'title prev back sponsor' 'actions actions actions sub';
  }
  .cadre #cdawrap, .cadre_sub {
    justify-self: end;
  }
}

