body#top .flex_cell:has(.em2-stretch-parent) {
  vertical-align: top !important;
}

body#top .flex_cell:has(.em2-stretch-parent) > .flex_cell_inner {
  height: 100% !important;
}

body#top .flex_cell:has(.em2-stretch-parent) .flex_column,
body#top .flex_cell:has(.em2-stretch-parent) .flex_column_div,
body#top .flex_cell:has(.em2-stretch-parent) .container-wrap {
  height: 100%;
  min-height: 100% !important;
}

body#top .heading-custom-em2 {
  height: 100%;
  min-height: 50vh; /* ← garde 50vh comme plancher, PAS 100% ici */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
  position: relative;
  z-index: 3;
  overflow: hidden;

  & a.mask-button,
  &::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 0.7);
    content: "";
    z-index: 2;
  }
  & a.mask-button {
    background: transparent;
    z-index: 4;
  }
  & .container-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: all 2000ms cubic-bezier(0.19, 1, 0.22, 1) !important;
    -ms-transform: scale(1, 1) !important;
    transform: scale(1, 1) !important;
  }
  & .av-subheading,
  & .av-special-heading-tag {
    z-index: 2;
    position: relative;
    color: #fff;
  }
  & .av-subheading {
    font-size: 12px;
    line-height: 24px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0;
  }
  & .av-special-heading-tag {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0;
  }
  & .stylish-line {
    padding: 32px 32px 0 32px;
    position: relative;
    display: inline-block;
    text-align: left;
    z-index: 3;
    &::before {
      width: calc(100% - 24px);
      height: 12px;
      top: 0;
      left: 0;
      border-left: 12px solid rgb(255 255 255 / 0.4);
      border-right: 12px solid rgb(255 255 255 / 0.4);
      border-top: 12px solid rgb(255 255 255 / 0.4);
      border-bottom: none;
      position: absolute;
      content: "";
      display: block;
    }
  }
  .stylish-line-ghost {
    width: 100%;
    height: 24px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
  }
  .stylish-line-ghost-middle {
    width: 0;
    height: 12px;
    top: 0;
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    left: 50%;
    position: absolute;
    transition: all 300ms cubic-bezier(0.165, 0.84, 0.44, 1);
    background-color: var(--enfold-main-color-primary);
  }
  & .stylish-line-ghost-before,
  & .stylish-line-ghost-after {
    width: 12px;
    height: 0;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--enfold-main-color-primary);
  }
  & .stylish-line-ghost-after {
    right: 0;
    left: auto;
  }
  &:hover .container-overlay {
    transition: all 5000ms cubic-bezier(0.19, 1, 0.22, 1) !important;
    -ms-transform: scale(1.15, 1.15) !important;
    transform: scale(1.15, 1.15) !important;
  }
  &:hover .stylish-line-ghost > .stylish-line-ghost-middle {
    width: 100%;
    height: 12px;
  }
  &:hover .stylish-line-ghost > .stylish-line-ghost-after,
  &:hover .stylish-line-ghost > .stylish-line-ghost-before {
    height: 24px;
    width: 12px;
    transition: all 300ms 120ms cubic-bezier(0.165, 0.84, 0.44, 1);
  }
  &.bottom .stylish-line {
    padding: 0 32px 32px 32px;
    &::before {
      bottom: 0;
      top: auto;
      border-bottom: 12px solid rgb(255 255 255 / 0.4);
      border-top: none;
    }
    & .stylish-line-ghost {
      bottom: 0;
      top: auto;
      & .stylish-line-ghost-middle {
        top: auto;
        bottom: 0;
      }
      & .stylish-line-ghost-middle {
        top: auto;
        bottom: 0;
      }
      & .stylish-line-ghost-before,
      & .stylish-line-ghost-after {
        top: auto;
        bottom: 0;
      }
    }
  }
}
