html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.home-choice-page {
  overflow: hidden;
}

html:has(body.site-page),
body.site-page {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

#silh-choice-widget,
#silh-choice-widget * {
  box-sizing: border-box;
}

#silh-choice-widget {
  --silh-purple: #5b00ff;
  --silh-purple-hover: #721dff;

  position: relative;
  left: 50%;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  margin-left: -50vw;
  overflow: hidden;
  font-family: inherit;
}

#silh-choice-widget .silh-choice {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#silh-choice-widget .silh-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: clamp(25px, 5vh, 60px) 5vw;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}

#silh-choice-widget .silh-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.015);
  transition:
    transform 0.8s cubic-bezier(.2, .8, .2, 1),
    filter 0.5s ease;
}

#silh-choice-widget .silh-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

#silh-choice-widget .silh-panel--shop::before {
  background-image: url("../images/home/boutique-background.webp");
  filter: grayscale(1) contrast(1.1) brightness(0.5);
}

#silh-choice-widget .silh-panel--shop::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.76)
  );
}

#silh-choice-widget .silh-panel--services {
  color: #111;
}

#silh-choice-widget .silh-panel--services::before {
  background-image: url("../images/home/services-background.webp");
  filter: grayscale(1) contrast(0.9) brightness(1.25);
}

#silh-choice-widget .silh-panel--services::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.68),
    rgba(255, 255, 255, 0.88)
  );
}

#silh-choice-widget .silh-panel:hover::before,
#silh-choice-widget .silh-panel:focus-visible::before {
  transform: scale(1.065);
}

#silh-choice-widget .silh-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vh, 34px);
  width: min(100%, 470px, 56vh);
  max-height: 100%;
  text-align: center;
}

#silh-choice-widget .silh-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.5s cubic-bezier(.2, .8, .2, 1),
    border-color 0.5s ease;
}

#silh-choice-widget .silh-panel--services .silh-frame {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.88);
}

#silh-choice-widget .silh-frame img {
  display: block;
  width: 100%;
  height: 100%;
  padding: clamp(15px, 2.5vw, 38px);
  object-fit: contain;
  object-position: center;
  filter: grayscale(1);
}

#silh-choice-widget .silh-panel:hover .silh-frame,
#silh-choice-widget .silh-panel:focus-visible .silh-frame {
  transform: translateY(-8px);
  border-color: var(--silh-purple);
}

#silh-choice-widget .silh-button {
  display: inline-grid;
  place-items: center;
  min-width: 174px;
  min-height: 68px;
  padding: 17px 34px;
  border-radius: 15px;
  background: var(--silh-purple);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 18px 45px rgba(91, 0, 255, 0.3);
  transition:
    transform 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

#silh-choice-widget .silh-panel:hover .silh-button,
#silh-choice-widget .silh-panel:focus-visible .silh-button {
  background: var(--silh-purple-hover);
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(91, 0, 255, 0.45);
}

#silh-choice-widget .silh-panel:focus-visible {
  outline: 3px solid var(--silh-purple);
  outline-offset: -3px;
}

#silh-choice-widget .silh-center-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(128, 128, 128, 0.18);
  /*
   * Desktop : la pointe blanche entre dans le panneau noir à gauche,
   * la pointe noire entre dans le panneau blanc à droite.
   */
  background: linear-gradient(
    45deg,
    #fff 0 50%,
    #080808 50% 100%
  );
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}

#silh-choice-widget .silh-center-dot {
  position: absolute;
  top: calc(50% + 48px);
  left: 50%;
  z-index: 6;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--silh-purple);
  box-shadow: 0 0 20px rgba(91, 0, 255, 0.85);
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 820px) {
  #silh-choice-widget .silh-panel--shop::before {
    background-image: url("../images/home/boutique-background-mobile.webp");
  }

  #silh-choice-widget .silh-panel--services::before {
    background-image: url("../images/home/services-background-mobile.webp");
  }

  #silh-choice-widget .silh-choice {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  #silh-choice-widget .silh-panel {
    height: 100%;
    min-height: 0;
    padding: clamp(12px, 2.5vh, 25px) 20px;
  }

  #silh-choice-widget .silh-content {
    flex-direction: row;
    gap: clamp(15px, 5vw, 35px);
    width: min(92vw, 650px);
    height: 100%;
  }

  #silh-choice-widget .silh-frame {
    width: min(48vw, 300px);
    max-height: 78%;
    aspect-ratio: 16 / 10;
  }

  #silh-choice-widget .silh-center-mark {
    width: 34px;
    height: 34px;
    /*
     * Mobile : panneaux superposés. Le blanc pointe vers la zone noire
     * supérieure et le noir vers la zone blanche inférieure.
     */
    background: linear-gradient(
      135deg,
      #fff 0 50%,
      #080808 50% 100%
    );
  }

  #silh-choice-widget .silh-center-dot {
    display: none;
  }
}

@media (max-width: 480px) {
  #silh-choice-widget .silh-panel {
    padding: 12px 16px;
  }

  #silh-choice-widget .silh-content {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }

  #silh-choice-widget .silh-frame {
    width: min(68vw, 240px);
    max-height: calc(50dvh - 90px);
    aspect-ratio: 16 / 9;
  }

  #silh-choice-widget .silh-frame img {
    padding: 12px;
  }

  #silh-choice-widget .silh-button {
    min-width: 145px;
    min-height: 52px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
  }
}

@media (max-height: 600px) and (min-width: 821px) {
  #silh-choice-widget .silh-content {
    width: min(100%, 330px, 55vh);
    gap: 14px;
  }

  #silh-choice-widget .silh-button {
    min-width: 145px;
    min-height: 50px;
    padding: 13px 24px;
    font-size: 14px;
  }

  #silh-choice-widget .silh-frame img {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #silh-choice-widget *,
  #silh-choice-widget *::before,
  #silh-choice-widget *::after {
    transition-duration: 0.01ms !important;
  }
}
