/**
 * Lot 007 - slider Smart Slider 3 de l'accueil, uniquement sur mobile.
 */

@media only screen and (max-width: 690px) {
  body.home {
    --moliner-home-hero-height: max(260px, 34vh);
    --moliner-home-hero-height: max(260px, 34svh);
  }

  /* La première rangée ne doit plus reprendre la hauteur plein écran. */
  body.home
    #ajax-content-wrap
    .container.main-content
    > .row
    > .wpb_row:first-child,
  body.home
    #ajax-content-wrap
    .container.main-content
    > .row
    > .wpb_row:first-child
    > .row_col_wrap_12,
  body.home
    #ajax-content-wrap
    .container.main-content
    > .row
    > .wpb_row:first-child
    > .row_col_wrap_12
    > .wpb_column,
  body.home
    #ajax-content-wrap
    .container.main-content
    > .row
    > .wpb_row:first-child
    .vc_column-inner,
  body.home
    #ajax-content-wrap
    .container.main-content
    > .row
    > .wpb_row:first-child
    .wpb_wrapper,
  body.home
    #ajax-content-wrap
    .container.main-content
    > .row
    > .wpb_row:first-child
    .wpb_raw_code,
  body.home #n2-ss-5-align,
  body.home #n2-ss-5-align > .n2-padding,
  body.home #n2-ss-5,
  body.home #n2-ss-5 .n2-ss-slider-wrapper-inside,
  body.home #n2-ss-5 .n2-ss-slider-1,
  body.home #n2-ss-5 .n2-ss-slider-2,
  body.home #n2-ss-5 .n2-ss-slider-3,
  body.home #n2-ss-5 .n2-ss-slide-backgrounds,
  body.home #n2-ss-5 .n2-ss-slide-background,
  body.home #n2-ss-5 .n2-ss-slides,
  body.home #n2-ss-5 .n2-ss-slide,
  body.home #n2-ss-5 .n2-ss-layers-container,
  body.home ss3-force-full-width,
  body.home ss3-fullpage {
    height: var(--moliner-home-hero-height) !important;
    min-height: 0 !important;
    max-height: var(--moliner-home-hero-height) !important;
  }

  body.home
    #ajax-content-wrap
    .container.main-content
    > .row
    > .wpb_row:first-child
    .vc_column-inner {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  /* Dégradé bas vers le haut, entre la photo et les textes. */
  body.home #n2-ss-5 .n2-ss-slide-background::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.52) 45%,
      rgba(0, 0, 0, 0.08) 76%,
      rgba(0, 0, 0, 0) 100%
    );
    content: "";
    pointer-events: none;
  }

  /* Carte compacte placée en bas du visuel. */
  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer--block.n2-ss-has-self-align {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 5vw 14px !important;
    align-self: flex-end !important;
    box-sizing: border-box !important;
  }

  body.home #n2-ss-5 .n2-ss-slide .n2-ss-layer-row,
  body.home #n2-ss-5 .n2-ss-slide .n2-ss-layer-row-inner,
  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer-col.n2-ss-layer-with-background {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }

  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer-col.n2-ss-layer-with-background {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 8px 0 0 !important;
  }

  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer-col.n2-ss-layer-with-background
    > .n2-ss-layer {
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 5px !important;
    padding: 0 !important;
  }

  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer-col.n2-ss-layer-with-background
    > .n2-ss-layer:last-child {
    margin-top: 5px !important;
    margin-bottom: 0 !important;
  }

  /* Tous les textes du slider deviennent blancs sur la photo. */
  body.home #n2-ss-5 .n2-ss-item-content.n2-ss-text,
  body.home #n2-ss-5 .n2-ss-item-content.n2-ss-text *,
  body.home #n2-ss-5 .n2-ss-slide p,
  body.home #n2-ss-5 .n2-ss-slide h1,
  body.home #n2-ss-5 .n2-ss-slide h2,
  body.home #n2-ss-5 .n2-ss-slide h3 {
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.62);
  }

  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer-col.n2-ss-layer-with-background
    > .n2-ss-layer:nth-child(1)
    .n2-ss-text {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer-col.n2-ss-layer-with-background
    > .n2-ss-layer:nth-child(2)
    .n2-ss-text {
    font-size: clamp(19px, 5.4vw, 24px) !important;
    line-height: 1.04 !important;
  }

  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer-col.n2-ss-layer-with-background
    > .n2-ss-layer:nth-child(3)
    .n2-ss-text {
    font-size: clamp(11px, 3vw, 14px) !important;
    line-height: 1.3 !important;
  }

  body.home #n2-ss-5 .n2-ss-button-container a {
    min-height: 36px;
    padding: 10px 18px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
}

/* MOLINER HOME MOBILE HERO POSITION - LOT 009 START */
@media only screen and (max-width: 690px) {
  body.home {
    --moliner-home-hero-height: 45vh;
    --moliner-home-hero-height: 45svh;
  }

  /* Retire uniquement le retrait bas de 50px defini dans Smart Slider. */
  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layers-container
    > .n2-ss-layer {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Groupe de contenus compact, ancre dans l'angle inferieur droit. */
  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer--block.n2-ss-has-self-align {
    width: min(92%, 400px) !important;
    max-width: 400px !important;
    margin: auto 0 0 auto !important;
    padding: 0 5vw 16px 0 !important;
    align-self: end !important;
    justify-self: end !important;
    box-sizing: border-box !important;
  }

  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer--block.n2-ss-has-self-align
    .n2-ss-layer-row,
  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer--block.n2-ss-has-self-align
    .n2-ss-layer-row-inner,
  body.home
    #n2-ss-5
    .n2-ss-slide
    .n2-ss-layer--block.n2-ss-has-self-align
    .n2-ss-layer-col.n2-ss-layer-with-background {
    text-align: left !important;
  }

  /* Evite le cumul min-height + padding et centre le libelle du bouton. */
  body.home #n2-ss-5 .n2-ss-button-container a {
    display: inline-flex !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 10px 18px !important;
    align-items: center;
    justify-content: center;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }
}
/* MOLINER HOME MOBILE HERO POSITION - LOT 009 END */
