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

body {
  background-image: url("../images/canada.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-y: scroll;
}

#size {
  position: fixed;
  bottom: 16px;
  right: 16px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  color: rgb(112, 255, 191);
  z-index: 20;
  text-shadow:
    -1px -1px 0 rgb(0, 0, 0),
    1px -1px 0 rgb(0, 0, 0),
    -1px 1px 0 rgb(0, 0, 0),
    1px 1px 0 rgb(0, 0, 0);
}

.page-wrapper {
  position: relative;
}

.grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(1, 1fr);
  align-content: stretch;
  z-index: 2;
  pointer-events: none;
}

.cell {
  position: relative;
  pointer-events: none;
  border-left: 3px solid rgb(112, 255, 191);
  min-height: 0;
}

.grid > *:nth-child(3n + 1) {
  border-left: none;
}

.grid > *:nth-child(3n) {
  border-right: none;
}

.sticky-header {
  position: fixed;
  top: 0;
  z-index: 999;
  background-color: transparent;
  width: calc(100% / 3);
  pointer-events: auto;
  display: block;
  padding: 12px 16px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  color: black;
  text-decoration: none;
  cursor: pointer;
  text-shadow:
    -1px -1px 0 rgb(112, 255, 191),
    1px -1px 0 rgb(112, 255, 191),
    -1px 1px 0 rgb(112, 255, 191),
    1px 1px 0 rgb(112, 255, 191);
  border-left: 3px solid rgb(112, 255, 191);
  border-bottom: 3px solid rgb(112, 255, 191);
  border-top: none;
  border-right: none;
}

.sticky-header:nth-child(1) {
  left: 0;
  border-left: none;
}
.sticky-header:nth-child(2) {
  left: calc(100% / 3);
}
.sticky-header:nth-child(3) {
  left: auto;
  right: 0;
}
.sticky-header:hover {
  opacity: 0.6;
}

#sticky-imgs {
  position: relative;
  z-index: 1;
}

.img-wrapper {
  position: relative;
  width: 100%;
  pointer-events: none;
  height: 150px;
}

.img-wrapper img {
  position: sticky;
  bottom: 0px;
  filter: invert(1);
  opacity: 0.9;
  pointer-events: none;
  display: block;
  z-index: 1;
}

.img-wrapper img[data-big="true"] {
  width: clamp(30px, calc(800px - 55vw), 600px);
}

.img-wrapper img.placed {
  position: fixed;
  bottom: auto;
  filter: invert(1);
  opacity: 0.9;
}

.img-wrapper img.clickable {
  cursor: pointer;
  pointer-events: auto;
}

@keyframes levitate {
  0% {
    transform: rotate(var(--rot)) translateY(0px);
  }
  50% {
    transform: rotate(var(--rot)) translateY(-8px);
  }
  100% {
    transform: rotate(var(--rot)) translateY(0px);
  }
}

@keyframes halo {
  0% {
    filter: invert(1) drop-shadow(0 0 0px #00ffa2);
  }
  50% {
    filter: invert(1) drop-shadow(0 0 20px #00ffa2)
      drop-shadow(0 0 60px #00ffa2) drop-shadow(0 0 120px #00ffa2);
  }
  100% {
    filter: invert(1) drop-shadow(0 0 0px #00ffa2);
  }
}

@keyframes halo-bleu {
  0% {
    filter: invert(1) drop-shadow(0 0 0px #0000ff);
  }
  50% {
    filter: invert(1) drop-shadow(0 0 80px #0000ff);
  }
  100% {
    filter: invert(1) drop-shadow(0 0 0px #0000ff);
  }
}

.img-wrapper img.levitate {
  animation:
    levitate 3s ease-in-out infinite,
    halo 4s ease-in-out infinite;
}

.img-wrapper img.special {
  animation:
    levitate 3s ease-in-out infinite,
    halo-bleu 4s ease-in-out infinite;
  pointer-events: auto;
  cursor: pointer;
}

#center-tooltip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
  pointer-events: auto;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 60px;
  color: #00ffa2;
  max-width: 1000px;
  max-height: 80vh;
  overflow-y: auto;
  line-height: 1.25;
  text-align: center;
  text-shadow:
    -1px -1px 0 rgb(0, 0, 0),
    1px -1px 0 rgb(0, 0, 0),
    -1px 1px 0 rgb(0, 0, 0),
    1px 1px 0 rgb(0, 0, 0);
  scrollbar-width: none;
}

#center-tooltip::-webkit-scrollbar {
  display: none;
}

.page {
  display: none;
  position: fixed;
  inset: 0;
  background-image: url("../images/canada.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 500;
  overflow-y: scroll;
  padding: 40px;
}

.back {
  display: block;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  color: rgb(0, 0, 0);
  text-decoration: none;
  cursor: pointer;
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 600;
  text-shadow:
    -1px -1px 0 rgb(112, 255, 191),
    1px -1px 0 rgb(112, 255, 191),
    -1px 1px 0 rgb(112, 255, 191),
    1px 1px 0 rgb(112, 255, 191);
}

.back:hover {
  opacity: 0.6;
}

.page-content {
  position: relative;
  z-index: 510;
}

.page-content h1 {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: normal;
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 600;
  color: rgb(112, 255, 191);
  text-shadow:
    -1px -1px 0 rgb(0, 0, 0),
    1px -1px 0 rgb(0, 0, 0),
    -1px 1px 0 rgb(0, 0, 0),
    1px 1px 0 rgb(0, 0, 0);
}

.page-content p {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 60px;
  color: rgb(112, 255, 191);
  margin-bottom: 40px;
  text-align: center;
  text-shadow:
    -1px -1px 0 rgb(0, 0, 0),
    1px -1px 0 rgb(0, 0, 0),
    -1px 1px 0 rgb(0, 0, 0),
    1px 1px 0 rgb(0, 0, 0);
}

.bg-images {
  position: fixed;
  inset: 0;
  z-index: 505;
  pointer-events: none;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

.bg-img {
  position: absolute;
  filter: invert(1);
  opacity: 1;
  animation:
    levitate 3s ease-in-out infinite,
    halo 4s ease-in-out infinite;
  animation-fill-mode: both;
}

#prisme-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: auto;
  top: auto;
  z-index: 1000;
  background: none;
  border: none;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  color: rgb(0, 0, 0);
  cursor: pointer;
  text-shadow:
    -1px -1px 0 rgb(112, 255, 191),
    1px -1px 0 rgb(112, 255, 191),
    -1px 1px 0 rgb(112, 255, 191),
    1px 1px 0 rgb(112, 255, 191);
}

#prisme-btn:hover {
  opacity: 0.6;
}
