/**
 * Sonia Modock — portfolio template.
 *
 * Section roles are deliberately class-based so a duplicated portfolio inherits
 * the layout without depending on a post ID or an Enfold section number.
 */

:is(
    .sm-pf-titre,
    .sm-pf-intro,
    .sm-pf-recit,
    .sm-pf-focus,
    .sm-pf-fiche,
    .sm-pf-acquerir,
    .sm-pf-faq,
    .sm-cta-oeuvre,
    .sm-pf-contact
  ) {
  --sm-accent-accessible: #b51cc2;
}

.sm-pf-intro :is(.avia_textblock, .avia_textblock p),
.sm-pf-recit .av-special-heading-tag,
.sm-pf-fiche .av-special-heading-tag,
.sm-pf-faq .av-special-heading-tag,
.sm-pf-contact :is(.avia_textblock.h3, a) {
  color: var(--sm-accent-accessible) !important;
}

:is(.sm-pf-intro, .sm-pf-focus, .sm-pf-fiche, .sm-pf-acquerir) .avia_textblock {
  max-width: 72ch;
  margin-right: auto;
  margin-left: auto;
}

:is(
    .sm-pf-titre,
    .sm-pf-intro,
    .sm-pf-recit,
    .sm-pf-focus,
    .sm-pf-fiche,
    .sm-pf-acquerir,
    .sm-pf-faq,
    .sm-cta-oeuvre,
    .sm-pf-contact
  ) .avia-button {
  min-width: 44px;
  min-height: 44px;
}

:is(
    .sm-pf-titre,
    .sm-pf-intro,
    .sm-pf-recit,
    .sm-pf-focus,
    .sm-pf-fiche,
    .sm-pf-acquerir,
    .sm-pf-faq,
    .sm-cta-oeuvre,
    .sm-pf-contact
  ) .avia-button.avia-color-theme-color {
  color: #fff !important;
  background-color: var(--sm-accent-accessible) !important;
  border-color: var(--sm-accent-accessible) !important;
}

.sm-pf-contact.footer_color a {
  color: #6d1b75;
}

.sm-pf-focus .box-icon-dark .iconbox_icon {
  color: var(--sm-accent-accessible) !important;
}

/*
 * Artwork CTA
 * The same top overhang is shared by every size. Only the artwork's real-world
 * scale category changes its displayed height.
 */
.sm-cta-oeuvre {
  --sm-cta-art-height: 320px;
  --sm-cta-art-inset: clamp(80px, calc(40px + 3.9vw), 104px);
  --sm-cta-overhang: 72px;
  --sm-cta-foot-inset: 32px;
  overflow: visible !important;
}

.sm-cta-oeuvre--petite {
  --sm-cta-art-height: 240px;
}

.sm-cta-oeuvre--moyenne {
  --sm-cta-art-height: 320px;
}

.sm-cta-oeuvre--monumentale {
  --sm-cta-art-height: 440px;
}

.sm-cta-oeuvre.info-contact .entry-content-wrapper,
.sm-bg-violet-gradient .entry-content-wrapper,
.sm-pf-fiche .box-icon-dark,
#top.home .nxt-regalia-feature-grid-link__item {
  background:
    radial-gradient(
      ellipse 45% 140% at 18% 50%,
      rgba(234, 51, 247, 0.14),
      transparent 70%
    ),
    radial-gradient(
      ellipse 95% 170% at 58% 50%,
      #43334c 0%,
      #251c2c 82%
    ) !important;
}

@media (min-width: 990px) {
  .sm-cta-oeuvre.info-contact :is(.container, .content, .entry-content-wrapper) {
    overflow: visible;
  }

  .sm-cta-oeuvre.info-contact .content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .sm-cta-oeuvre.info-contact .entry-content-wrapper {
    padding: 0 !important;
  }

  .sm-cta-oeuvre.info-contact
    .entry-content-wrapper > .flex_column_table > .flex_column:last-child {
    box-sizing: border-box;
    padding-right: clamp(24px, 2vw, 36px) !important;
  }

  .sm-cta-oeuvre--silhouette-large.info-contact
    .entry-content-wrapper > .flex_column_table > .av_one_half {
    box-sizing: border-box;
    padding-left: clamp(24px, calc(152px - 6.5vw), 84px) !important;
  }

  .sm-cta-oeuvre.info-contact .entry-content-wrapper > .flex_column_table {
    min-height: calc(
      var(--sm-cta-art-height) - var(--sm-cta-overhang) + var(--sm-cta-foot-inset)
    );
  }

  .sm-cta-oeuvre.info-contact .info-contact-img {
    position: relative;
    min-height: calc(
      var(--sm-cta-art-height) - var(--sm-cta-overhang) + var(--sm-cta-foot-inset)
    );
    overflow: visible !important;
    z-index: 3;
  }

  .sm-cta-oeuvre.info-contact .info-contact-img .avia-image-container {
    position: absolute;
    top: calc(-1 * var(--sm-cta-overhang));
    left: var(--sm-cta-art-inset) !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    transform: none !important;
  }

  .sm-cta-oeuvre.info-contact .info-contact-img :is(
      .avia-image-container-inner,
      .avia-image-overlay-wrap
    ) {
    display: block;
    width: 100%;
  }

  .sm-cta-oeuvre.info-contact .info-contact-img .avia-image-container img {
    display: block;
    width: auto !important;
    height: var(--sm-cta-art-height) !important;
    max-width: 100% !important;
    margin: 0;
    object-fit: contain;
    object-position: left bottom;
    transform: none !important;
    transform-origin: left bottom !important;
  }
}

@media (min-width: 990px) and (max-width: 1279px) {
  .sm-cta-oeuvre {
    --sm-cta-overhang: 48px;
    --sm-cta-foot-inset: 24px;
  }

  .sm-cta-oeuvre--petite {
    --sm-cta-art-height: 200px;
  }

  .sm-cta-oeuvre--moyenne {
    --sm-cta-art-height: 260px;
  }

  .sm-cta-oeuvre--monumentale {
    --sm-cta-art-height: 360px;
  }
}

@media (max-width: 989px) {
  .sm-pf-titre .content {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  .sm-pf-titre h1 {
    max-width: 94%;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(1.85rem, 6vw, 2.45rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }

  .sm-pf-intro .avia_textblock p {
    font-size: 1.18rem !important;
    line-height: 1.45 !important;
  }

  :is(.sm-pf-recit, .sm-pf-fiche, .sm-pf-faq, .sm-cta-oeuvre) .content {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .sm-pf-acquerir .content {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }

  .sm-cta-oeuvre.info-contact .info-contact-img {
    display: none !important;
  }
}
