/* Calibration live des sections sur le viewport réellement disponible. */
.ub-home > p:not(:has(*)) {
  display: none !important;
  margin: 0 !important;
}

@media (min-width: 1024px) {
  .ub-home {
    --ub-hero-header-height: 247px;
    --ub-sticky-header-height: 61px;
    --ub-hero-height: calc(100svh - var(--ub-hero-header-height));
    --ub-section-height: calc(100svh - var(--ub-sticky-header-height));
  }

  .ub-home .hero {
    height: calc(100svh - var(--ub-hero-header-height));
    min-height: var(--ub-hero-height);
    max-height: var(--ub-hero-height);
    container-type: size;
    overflow: visible;
  }

  .ub-home .hero-scene {
    height: 88%;
    min-height: 0;
    padding-block: clamp(.5rem, 2cqh, 1rem);
    gap: clamp(1rem, 3vw, 2rem);
  }

  .ub-home .hero-texte {
    min-width: 0;
  }

  .ub-home .hero-texte h1 {
    font-size: clamp(2rem, 9cqh, 3.15rem);
    line-height: 1.08;
  }

  .ub-home .hero-surtitre {
    font-size: clamp(.66rem, 2.7cqh, .8rem);
    padding: clamp(.2rem, .8cqh, .35rem) clamp(.7rem, 2cqh, 1rem);
    margin-bottom: clamp(.35rem, 1.6cqh, .75rem);
  }

  .ub-home .hero-accroche {
    max-width: 580px;
    font-size: clamp(.86rem, 3cqh, 1.02rem);
    line-height: 1.45;
    margin: clamp(.35rem, 1.5cqh, .75rem) 0 clamp(.45rem, 2cqh, 1rem);
  }

  .ub-home .hero-actions {
    gap: clamp(.45rem, 1.5cqh, .75rem);
  }

  .ub-home .hero .btn {
    font-size: clamp(.72rem, 2.6cqh, .9rem);
    padding: clamp(.42rem, 1.5cqh, .68rem) clamp(.9rem, 2vw, 1.4rem);
  }

  .ub-home .hero-note {
    margin-top: clamp(.35rem, 1.6cqh, .7rem);
    font-size: clamp(.7rem, 2.4cqh, .84rem);
  }

  .ub-home .hero-visuel {
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ub-home .hero-miroir {
    width: auto;
    height: min(86cqh, 420px);
    max-width: 100%;
    border-width: clamp(6px, 1.7cqh, 10px);
  }

  .ub-home .section {
    height: calc(100svh - var(--ub-sticky-header-height));
    min-height: var(--ub-section-height);
    max-height: var(--ub-section-height);
    padding-block: clamp(1rem, 3svh, 2.4rem);
    overflow: visible;
  }

  .ub-home .section:not(.portants, .final) > .conteneur {
    min-height: 82%;
  }

  .ub-home .moodboard > .conteneur,
  .ub-home .favoris > .conteneur,
  .ub-home .avis > .conteneur,
  .ub-home .service > .conteneur,
  .ub-home .carnet > .conteneur {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .ub-home .portants .rail,
  .ub-home .moodboard .collage {
    min-height: clamp(360px, 60svh, 650px);
  }

  .ub-home .portants .rail {
    display: flex;
    align-items: center;
  }

  .ub-home .portants .rail-liste {
    align-items: center;
  }

  .ub-home .moodboard .collage {
    align-items: stretch;
  }

  .ub-home .moodboard .carte-idee {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .ub-home .moodboard .produit-placeholder.has-product {
    --ub-product-image-height: clamp(150px, 24svh, 250px);
  }

  .ub-home .moodboard .produit-placeholder.has-product .ub-product-caption {
    min-height: clamp(5.5rem, 14svh, 8.75rem);
  }

  .ub-home .avis-liste,
  .ub-home .grille-service,
  .ub-home .faq-liste {
    min-height: clamp(320px, 58svh, 630px);
    align-items: stretch;
  }

  .ub-home .avis-liste,
  .ub-home .grille-service {
    grid-auto-rows: 1fr;
  }

  .ub-home .fiche-avis,
  .ub-home .carte-service {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .ub-home .faq-liste {
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  .ub-home .faq-item summary {
    height: 100%;
    display: flex;
    align-items: center;
  }

  .ub-home .final-contenu {
    min-height: 82%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (min-width: 1024px) and (min-height: 850px) {
  .ub-home h2 {
    font-size: clamp(2rem, 3.8svh, 2.8rem);
  }

  .ub-home .intro {
    max-width: 900px;
    font-size: clamp(.95rem, 1.8svh, 1.08rem);
  }

  .ub-home .cintre-carte {
    width: clamp(175px, 12vw, 225px);
  }

  .ub-home .cintre-visuel {
    height: clamp(100px, 14svh, 160px);
  }

  .ub-home .grille-favoris {
    min-height: clamp(430px, 55svh, 590px);
    align-items: stretch;
  }

  .ub-home .carte-favori {
    height: 100%;
  }

  .ub-home .grille-favoris .produit-placeholder.has-product {
    --ub-product-image-height: clamp(125px, 15svh, 155px);
  }
}

@media (max-width: 1023px) {
  .ub-home .hero,
  .ub-home .section {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
}
