:root {
  --green-forest: #B2CD8C;
  --blue-petrol-bio: #05535C;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--green-forest);
  font-family: 'Signika', -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Roboto", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif;

  /* Pour éviter le momentum scroll sous iOS */
  overflow: hidden;
  height: 100%;
}

* {
  box-sizing: border-box;
  user-select: none;
}

input,
textarea,
button,
select,
a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

#app {
  /* width: 1280px;
  height: 761px; */
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#app-main {
  width: 200vw;
  height: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  background: url(./background.svg) no-repeat left center / auto 100% transparent;
  transition: all 450ms cubic-bezier(.31, 0, .17, 1);
  will-change: auto;
  transform: translateX(0) translateZ(2px);
}

.no-transition #app-main {
  transition:none;
}

#app-main.to-right {
  transform: translateX(-100vw) translateZ(2px);
}

#app-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

#app-slide-inner {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: 1520px;
  transform: translateX(-50%);
}

#app-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
}

.app-scrollable-area {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: auto;
  will-change: auto;
  scroll-behavior: smooth;
}





.site-logo {
  position: absolute;
  top: 37px;
  left: 60px;
  width: 100%;
  max-width: 100px;
}







.site-intro {
  position: absolute;
  top: 140px;
  left: 60px;
  width: 350px;
}

.site-intro h1 {
  font-size: 72px;
  color: white;
  margin: 0;
  line-height: 100%;
}

.site-intro h1 p {
  margin: 0;
}

.site-description {
  color: var(--blue-petrol-bio);
  font-size: 24px;
  font-weight: bold;
  margin-top: 16px;
  line-height: 120%;
}



.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 70px;
  margin-bottom: 100px;
  margin-left: 460px;
  width: 1000px;
}

.item-placeholder {
  display: none;
}

.item {
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: white;
  border-radius: 12px;
  height: 280px;
  box-shadow: 0 8px 16px rgb(11, 93, 102, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 140ms cubic-bezier(.31, 0, .17, 1);
}

.item:active {
  transform: scale(0.95);
}

.item-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 112px;
  background: rgb(0, 140, 156, 0.8);
  backdrop-filter: blur(4px);
  color: white;
  padding: 16px;
}

.item-title {
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.item-extract {
  font-size: 14px;
  margin-top: 6px;
  opacity: .8;
  height: 2.3em;
  overflow: hidden;
  text-overflow: ellipsis;
}


.slide {
  display: none;
  position: absolute;
  top: 100px;
  left: 32px;
  right: 32px;
  bottom: 32px;
  transition: all 140ms cubic-bezier(.31, 0, .17, 1);
}

.slide.visible {
  display: block;
}

.slide-image {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 640px;
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgb(11, 93, 102, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.slide-content {
  position: absolute;
  left: 700px;
  top: 0;
  bottom: 0;
  right: 24px;
  color: white;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px;
}

.slide-title {
  font-size: 52px;
  color: white;
  margin: 0;
  font-weight: bold;
  line-height: 100%;
}

.slide-description {
  font-size: 22px;
  line-height: 1.3;
  margin-top: 16px;
  opacity: .9;
}

.slide-link {
  background: #008C9C;
  padding: 16px 32px;
  border-radius: 64px;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  color: white;
  text-decoration: none;
  display: flex;
  width: fit-content;
  margin-top: 12px;
  align-items: center;
  margin-top: 24px;
  height: 56px;
}

.slide-mailto {
  background: #008C9C;
  padding: 16px 24px;
  border-radius: 64px;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  color: white;
  text-decoration: none;
  display: flex;
  width: fit-content;
  margin-top: 12px;
  align-items: center;
  gap: 6px;
  height: 56px;
}

.slide-qrcode-wrapper {
  position: absolute;
  bottom: 0;
  right: 0;
}

.slide-qrcode {
  border: solid 10px white;
  border-radius: 12px;
  background: white;
  width: 200px;
  /* height: 200px; */
  box-shadow: 0 8px 16px rgb(11, 93, 102, 0.2);
}

.slide-qrcode-label {
  text-align: center;
  padding: 8px;
  opacity: .7;
}

.slide-qrcode img {
  width: 100%;
}

#back-to-left {
  position: absolute;
  top: 32px;
  left: 32px;
  background: white;
  padding: 12px 32px;
  padding-left: 24px;
  border-radius: 64px;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  color: #008C9C;
  display: flex;
  align-items: center;
  z-index:100;
  gap: 6px;
  box-shadow: 0 8px 16px rgb(11, 93, 102, 0.1);
  transition: all 140ms cubic-bezier(.31, 0, .17, 1);
}

#back-to-left:active {
  transform: scale(0.95);
}


.iframe-visible .slide,
.mailto-visible .slide,
.iframe-visible #back-to-left,
.mailto-visible #back-to-left {
  opacity: .1;
}

#iframe {
  position: absolute;
  top: 32px;
  left: 32px;
  bottom: 32px;
  right: 32px;
  width: calc(1280px - 32px * 2);
  height: calc(761px - 32px * 2);
  background: white;
  border: solid 10px white;
  border-radius: 24px;
  box-shadow: 0 8px 16px rgb(11, 93, 102, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: scale(.95);
  transition: all 300ms cubic-bezier(.31, 0, .17, 1);
}

.iframe-visible #iframe {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

#iframe-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 60px;
  height: 60px;
  background: white;
  box-shadow: 0 8px 16px rgb(0, 0, 0, 0.1);
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #008C9C;
  opacity: 0;
  pointer-events: none;
  transform: scale(.5);
  transition: all 140ms cubic-bezier(.31, 0, .17, 1);
  z-index: 10;
}

.iframe-visible #iframe-close {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

#iframe-close:active {
  transform: scale(0.95);
}


#mailto {
  position: absolute;
  top: 50%;
  left: 50%;
  right: 32px;
  width: calc(1280px - 32px * 2);
  background: white;
  border-radius: 240px;
  box-shadow: 0 8px 16px rgb(11, 93, 102, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.95);
  transition: all 300ms cubic-bezier(.31, 0, .17, 1);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  z-index: 20;
}

.mailto-visible #mailto {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

#mailto-input {
  border: none;
  padding: 36px;
  font-size: 32px;
  display: block;
  width: auto;
  flex: 1;
  outline: none;
  text-align: center;
  color: #05535C;
}

#mailto-send,
#mailto-abort {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100px;
  color: #05535C;
}

#mailto-send svg,
#mailto-abort svg {
  width: 36px;
  height: 36px;
}

#mailto-cache {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 19;
  pointer-events: none;
}

.mailto-visible #mailto-cache {
  pointer-events: all;
}

#personnage {
  position:absolute;
  bottom: 0;
  left:0;
  width:250px;
}



@media screen and (max-width: 1520px) {
  .items {
    grid-template-columns: repeat(2, 1fr);
    width: calc(100vw - 460px - 60px);
  }
}


@media screen and (max-width: 1250px) {
  .items {
    grid-template-columns: repeat(2, 1fr);
    width: calc(100vw - 60px - 60px);
    margin-left: 60px;
    margin-top: 400px;
    margin-bottom: 300px;
  }

  .site-logo {
    left: auto;
    right: 60px;
  }

  .site-intro {
    top: 60px
  }

  .slide-image {
    width: 500px;
  }

  .slide-content {
    left: 550px;
  }

  .slide-qrcode {
    display: flex;
    flex-direction: row;
    height: 180px;
    width: auto;
    align-items: center;
  }

  .slide-qrcode img {
    width: auto;
    height: 100%;
    order: 2;
  }

  .slide-qrcode-label {
    width: 200px;
    text-align: left;
    order: 1;
  }
}

@media screen and (max-width: 1000px) {

  .slide-image {
    width: 45%;
    /* aspect-ratio: 4/3; */
  }

  .slide-content {
    left: calc(45% + 40px);
    justify-content: flex-start;
  }

  .slide-qrcode {
    height: 140px;
  }

  .slide-title {
    font-size: 42px;
  }

  .slide-description {
    font-size: 18px;
  }

  .slide-qrcode-label {
    width: 150px;
  }
}

@media screen and (max-width: 750px) {
  .items {
    grid-template-columns: repeat(2, 1fr);
    margin-left: 24px;
    width: calc(100vw - 2 * 24px);
    margin-top: 300px;
  }

  .site-intro {
    left: 24px;
    top: 24px;
  }

  .site-logo {
    top: 24px;
    right: 24px;
  }

  .slide-image {
    width: auto;
    max-width: 100%;
    aspect-ratio: 16/9;
    margin: 0 auto 24px;
    height: 200px;
    position: relative;
  }

  .slide-content {
    margin: 0;
    position: relative;
    left: 0;
    width: auto;
    text-align: center;
  }

  .slide-link {
    margin: 24px auto 0;
  }

  #back-to-left {
    top: 24px;
    left: 24px;
    z-index: 100;
    padding: 16px;
    width: 56px;
    height: 56px;
  }

  #back-to-left span {
    display: none;
  }

  .slide {
    left: 24px;
    right: 24px;
    top: 24px;
    bottom: 24px;
  }
}

@media screen and (max-width: 570px) {
  .items {
    grid-template-columns: 1fr;
    margin-top: 400px;
  }

  .site-intro {
    left: 24px;
    top: 120px;
    width: auto;
    margin-right: 24px;
  }

  .site-logo {
    top: 24px;
    left: 24px;
  }

  .slide-qrcode {
    display: none;
  }

  .slide-image {
    margin-top: 60px;
  }

  #back-to-left {
    width: 48px;
    height: 48px;
    padding:0;
    justify-content: center;
  }
}