@charset "UTF-8";

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  width: 100vw;
  background: #ffffff;
  font-family: "Archivo Black", Arial, sans-serif;
  overflow-x: hidden;
}
h1 {
  font-size: 15rem;
  font-weight: normal;
  text-align: center;
  margin: 1em 0;
}
button {
  font-family: "Archivo Black", Arial, sans-serif;
  font-size: 1.2rem;
  padding: 0.5em 1em;
  border: none;
  border-radius: 2em;
  background-color: #0047ff;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
button:hover {
  background-color: transparent;
  border: solid 2px #0047ff;
  color: #0047ff;
}

.important {
  color: #fff;
}
#unboxing-app {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Papier bulle */
#bubble-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0; /* en dessous des plastiques */
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
#bubble-wrap img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none; /* l'interaction se fait sur le layer, pas l'image */
  user-select: none;
  position: absolute;
  top: 0;
  left: 0;
}
#bubble-wrap.removed {
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}
#bubble-wrap.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Papier de protection */
#paper-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s, transform 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
#paper-layer.removed {
  opacity: 0;
  pointer-events: none;
}
#paper-img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  position: absolute;
  top: 0;
  left: 0;
}
#carton-swipe-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s, transform 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
#carton-swipe-layer.removed {
  opacity: 0;
  pointer-events: none;
}
#carton-swipe-img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  position: absolute;
}

/* Carton pleine page avec effet 3D et lignes de pliage */
#box-flaps {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* background: #d2b48c; */
  z-index: 5;
  overflow: hidden;
  perspective: 1200px;
  transition: opacity 0.5s;
}
.carton-centre::before,
.carton-centre::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.carton-centre::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
}
.carton-centre::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

/* Rabats couvrent la base au départ, plus longs pour aspect fermé */
.rabat {
  position: absolute;
  background-image: url("../images/carton.png");
  background-image: url("../images/carton.png");
  background-size: cover; /* couvre tout, mais peut zoomer */
  background-repeat: repeat; /* répète l'image si besoin */
  background-position: center;
  border: solid 2px #000000;
  z-index: 2;
  cursor: grab;
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.18, 1), box-shadow 0.4s;
  box-shadow: 0 6px 18px rgba(176, 141, 87, 0.13);
  touch-action: none;
}

/* Haut et bas : largeur = base, hauteur = rabat (plus long) */
.rabat-haut,
.rabat-bas {
  width: 100vw;
  height: 50vh; /* Atteint le centre verticalement */
  min-height: 0;
  max-height: none;
  left: 0;
}
.rabat-haut {
  position: relative;
  top: 0;
  transform-origin: top center;
  transform: rotateX(0deg);
  z-index: 3;
}
.rabat-haut .rabat-stamp {
  margin-top: 16px;
  margin-left: 16px;
  width: 200px; /* ou la taille que tu veux */
  height: auto;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
  display: inline-block;
  vertical-align: top;
}
.rabat-haut .rabat-stamp + .rabat-stamp {
  left: 130px; /* espace entre les deux images */
}
.rabat-bas {
  position: relative;
  bottom: 0;
  transform-origin: bottom center;
  transform: rotateX(0deg);
  z-index: 3;
}

.rabat-bas .rabat-stamp-bas {
  width: 200px; /* même taille que le haut */
  height: auto;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
  display: inline-block;
  vertical-align: bottom;
  position: absolute;
  bottom: 16px;
  right: 16px;
  margin: 0;
}

/* La deuxième image est décalée vers la gauche de la largeur de la première + un espace */
.rabat-bas .rabat-stamp-bas + .rabat-stamp-bas {
  right: calc(
    16px + 200px + 16px
  ); /* marge droite + largeur image + espace entre */
}

/* Gauche et droite : hauteur = base, largeur = rabat (plus large) */
.rabat-gauche,
.rabat-droite {
  width: 16vw;
  min-width: 700px;
  max-width: 500px;
  height: 100vh;
  top: 0;
}
.rabat-gauche {
  left: 0;
  transform-origin: left center;
  transform: rotateY(0deg);
  z-index: 2;
}
.rabat-droite {
  right: 0;
  transform-origin: right center;
  transform: rotateY(0deg);
  z-index: 2;
}
.rabat-gauche .rabat-stamp,
.rabat-droite .rabat-stamp {
  width: 100px; /* ou la taille souhaitée */
  height: auto;
  margin: 16px;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
  display: inline-block;
}
.rabat-gauche .rabat-stamp {
  position: absolute;
  right: 20px; /* moitié de la largeur de l'image (100px/2) */
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: auto;
  margin: 0;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
  display: block;
}
.rabat-droite .rabat-stamp {
  position: absolute;
  left: 20px; /* moitié de la largeur de l'image (100px/2) */
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: auto;
  margin: 0;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
  display: block;
}
.rabat-gauche,
.rabat-droite {
  position: absolute;
}

/* Animation d'ouverture */
.rabat-haut.open {
  transform: rotateX(110deg);
  cursor: default;
  box-shadow: none;
}
.rabat-bas.open {
  transform: rotateX(-110deg);
  cursor: default;
  box-shadow: none;
}
.rabat-gauche.open {
  transform: rotateY(-130deg);
  cursor: default;
  box-shadow: none;
}
.rabat-droite.open {
  transform: rotateY(110deg);
  cursor: default;
  box-shadow: none;
}

@media (max-width: 600px) {
  /* Rabat haut : images côte à côte, centrées */
  .rabat-haut-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4vw;
    width: 100%;
    margin-top: 10vw;
    padding: 0;
    position: static;
    top: auto;
  }
  .rabat-haut-icons .rabat-stamp {
    width: 70vw;
    max-width: 150px;
    min-width: 0;
    margin: 0 !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: block;
  }
  /* Rabat bas : images côte à côte, collées en bas et centrées */
  .rabat-bas {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 50vh;
    position: relative;
    padding-bottom: 0;
  }
  .rabat-bas-icons {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4vw;
    margin-bottom: 10vw;
    padding: 0;
    position: absolute;
    left: 0;
    bottom: 0;
  }
  .rabat-bas-icons .rabat-stamp-bas {
    width: 70vw;
    max-width: 150px;
    min-width: 0;
    margin: 0 !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: block;
  }
  /* Flèche du haut centrée dans le rabat haut */
}
.rabat-title {
  position: absolute;
  top: 18px;
  right: 35px;
  font-family: "Archivo Black", Arial, sans-serif;
  font-size: 5vw;
  text-transform: uppercase;
  color: #000000;

  z-index: 10;
  letter-spacing: 0.03em;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 600px) {
  .rabat-title {
    position: static;
    display: block;
    width: 100%;
    text-align: center;
    font-size: 6vw;
    margin-bottom: 4vw;
    margin-top: 4vw;
    color: #000000;
    background: none;
    padding: 0;
    z-index: 10;
  }
  .rabat-haut {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }
  .rabat-haut-icons {
    margin-top: 0;
    padding-top: 0;
  }
}

/* Scotch */
#tape-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
  transition: opacity 0.4s;
}
#tape {
  position: absolute;
  left: 0;
  top: 46%;
  width: 100vw;
  height: 12vw;
  min-height: 60px;
  max-height: 100px;
  background: white;
  opacity: 0.92;
  box-shadow: 0 2px 8px #0002;
  cursor: grab;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.3s, transform 0.2s;
  pointer-events: auto;
}
#tape-text {
  width: 100%;
  white-space: nowrap;
  font-family: "Archivo Black", Arial, sans-serif;
  text-transform: uppercase;
  font-size: 7vw;
  font-size: 2rem;
  color: #000000;
  letter-spacing: 2px;
  user-select: none;
  pointer-events: none;
}
#tape.dragging {
  box-shadow: 0 8px 32px #00000088, 0 2px 8px #0002;
  filter: brightness(1.08) saturate(1.2);
  transition: none;
}
#tape.removed {
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
}

/* Media queries pour petits écrans */
@media (max-width: 600px) {
  .rabat-haut,
  .rabat-bas {
    width: 100vw;
    height: 50vh; /* Atteint le centre verticalement */
    min-height: 0;
    max-height: none;
    left: 0;
  }
  .rabat-haut {
    top: 0;
  }
  .rabat-bas {
    bottom: 0;
  }
  .rabat-gauche,
  .rabat-droite {
    width: 50vw; /* Atteint le centre horizontalement */
    min-width: 0;
    max-width: none;
    height: 100vh;
    top: 0;
  }
  .rabat-gauche {
    left: 0;
  }
  .rabat-droite {
    right: 0;
  }
  #bubble-wrap {
    gap: 1vw;
  }
  #tape {
    height: 10vw;
    min-height: 80px;
    max-height: 130px;
  }
  #tape-text {
    font-size: 5vw;
  }
}
/* Augmente la taille et l'espace du texte sur mobile */

#carton-continue-btn {
  display: inline-block; /* ou block, selon le rendu souhaité */
  margin: 2em auto 0 auto; /* espace au-dessus, centré horizontalement */
  padding: 0.7em 2em;
}
#carton-continue-btn:hover,
#carton-continue-btn:focus {
  background-color: transparent;
  border: solid 2px #0047ff;
  color: #0047ff;
}
#carton-text {
  box-sizing: border-box;
  width: 100vw;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 2vw 6vw 2vw;
  background: #fff;
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.5s;
  transform: translateY(0);
  opacity: 1;
}
#carton-text h1 {
  font-size: 30vw;
  font-weight: bold;
  margin: 0 0 2vw 0;
  line-height: 1;
  color: #0047ff;
  background: #fff;
}
#carton-text p {
  font-size: 2.2vw;
  font-weight: bold;
  color: #0047ff;
  text-align: center;
  margin: 0 0 3vw 0;
  line-height: 1.18;
  max-width: 900px;
  width: 100%;
  background: #fff;
}

#blue-circles-layer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  padding: 0;
  z-index: 1000;
  background: #fff;
}
#blue-circles-layer p {
  font-size: 2.2vw;
  font-weight: bold;
  color: #0047ff;
  text-align: center;
  margin: 0 0 3vw 0;
  line-height: 1.18;
  width: 100%;
}
#blue-circles-layer h1 {
  font-size: 20vw;
  font-weight: bold;
  margin: 0 0 2vw 0;
  line-height: 1;
  color: #0047ff;
  background: #fff;
  text-align: center;
}
.rabat.open {
  pointer-events: none;
}
.rabat.open,
#box-flaps:not(.active) {
  pointer-events: none !important;
}
#plastique-layer {
  position: relative;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 4; /* sous les rabats, au-dessus du fond, sous le texte */
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: auto;
}

#plastique-img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 1;
  pointer-events: none; /* l'interaction se fait sur le layer */
  user-select: none;
  position: absolute;
  top: 0;
  left: 0;
}
#paper-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2; /* sous bubble-wrap */
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: auto;
  touch-action: none;
}

#paper-layer.removed {
  opacity: 0;
  pointer-events: none;
}
#paper-img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  position: absolute;
  top: 0;
  left: 0;
}

#etiquette-img {
  position: absolute;
  top: 24px; /* ajuste la position verticale */
  left: 24px; /* ajuste la position horizontale */
  width: 400px; /* ajuste la taille selon ton besoin */
  pointer-events: none;
  user-select: none;
  z-index: 3;
  border-radius: 25px;
}
#etiquette-img-2 {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 350px;
  pointer-events: none;
  user-select: none;
  border-radius: 25px;
}
#etiquette-img-3 {
  position: absolute;
  top: 24px; /* ajuste la position verticale */
  left: 24px; /* ajuste la position horizontale */
  width: 320px; /* ajuste la taille selon ton besoin */
  pointer-events: none;
  user-select: none;
  z-index: 2;
  border-radius: 20px;
}
#etiquette-img-4 {
  position: absolute;
  top: 24px; /* ajuste la position verticale */
  left: 24px; /* ajuste la position horizontale */
  width: 600px; /* ajuste la taille selon ton besoin */
  z-index: 1; /* au-dessus du canvas, sous la notif */
  pointer-events: none;
  user-select: none;
  border-radius: 20px;
}
#plastique-2-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  pointer-events: none; /* Désactive l'interaction au début */
  opacity: 1;
  transition: opacity 0.6s;
  display: block;
}
#plastique-2-layer.active {
  pointer-events: auto; /* Active l'interaction après délai */
}

#plastique-layer.removed {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s, transform 0.5s;
}
#carton-text.bloque {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.7; /* optionnel : effet visuel pour montrer que c'est bloqué */
}

.skip-bubble-btn {
  position: fixed;
  left: 50%;
  bottom: 4vw;
  transform: translateX(-50%);
  z-index: 10;
  padding: 1em 2em;
  font-size: 1.2rem;
  font-family: "Archivo Black", Arial, sans-serif;
  background: #0047ff;
  color: #fff;
  border: none;
  border-radius: 2em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#bubble-wrap.visible ~ .skip-bubble-btn {
  opacity: 1;
  pointer-events: auto;
}
#blue-circles-layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

#blue-circles-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  font-size: 5rem;
  text-align: center;
  -webkit-text-stroke: 2px rgb(0, 0, 0);
  max-width: 90vw;
  padding: 0 2vw;
  box-sizing: border-box;
  margin: 0.1em 0;
  color: #ffffff;
  z-index: 1;
}

#blue-circles-canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background-position: center;
  background-image: url("../images/background-carton.png");
  background-size: cover; /* couvre tout, mais peut zoomer */
  background-repeat: repeat; /* répète l'image si besoin */
}
#blue-circles-notification {
  position: fixed;
  top: 32px;
  right: 32px;
  background: #fff;
  color: #000000;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0002;
  padding: 18px 24px 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 200;
  font-family: "Archivo Black", Arial, sans-serif;
  font-size: 0.8rem;
  animation: notif-fadein 0.5s;
}
@keyframes notif-fadein {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#notif-arrow-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  display: flex;
  align-items: center;
}
.notif-arrow {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px #0002);
}
#flap-arrows {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  pointer-events: none;
}

.flap-arrow {
  display: block;
  width: 60px;
  height: auto;
  margin: 0 auto;
  opacity: 0.8;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.arrow-up {
  top: 80%;
  animation: arrowUpAnim 1.2s infinite;
}

.arrow-down {
  top: 5%;
  animation: arrowDownAnim 1.2s infinite;
}

@keyframes arrowUpAnim {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -20px);
    opacity: 1;
  }
}

@keyframes arrowDownAnim {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, 20px);
    opacity: 1;
  }
}
@media (max-width: 600px) {
  #carton-text p,
  #blue-circles-layer p {
    font-size: 6vw;
    max-width: 98vw;
    margin-bottom: 8vw;
  }
  #carton-text {
    padding-top: 10vw;
    padding-bottom: 28vw; /* plus d'espace pour le bouton */
    min-height: 90vh;
  }
  #blue-circles-layer {
    padding-top: 10vw;
    padding-bottom: 28vw;
    min-height: 90vh;
  }
  #carton-text h1 {
    font-size: 40vw;
    margin-bottom: 6vw;
  }
}
.rabat-gauche .rabat-title,
.rabat-droite .rabat-title {
  margin-left: 1vw; /* Ajuste la valeur selon ton besoin */
}
@media (max-width: 600px) {
  #etiquette-img,
  #etiquette-img-2,
  #etiquette-img-3,
  #etiquette-img-4 {
    width: 40vw !important; /* ou ajuste selon ton besoin */
    min-width: 90vw;
    max-width: 120vw;
  }
}
@media (max-width: 600px) {
  #blue-circles-canvas {
    background-position: center;
    background-image: url("../images/background-carton-2.png");
    background-size: cover; /* couvre tout, mais peut zoomer */
    background-repeat: repeat; /* répète l'image si besoin */
  }
}
@media (max-width: 600px) {
  .arrow-up {
    top: 70%; /* rapproche la flèche du centre, ajuste selon besoin */
  }
  .arrow-down {
    top: -120%; /* rapproche la flèche du centre, ajuste selon besoin */
  }
}
