/* Texture hexagonale commune aux grands en-tetes verts, hors accueil photographie. */
#am-site .am-service-hero,
#am-site .am-maintenance-hero,
#am-site .am-advice-hero,
#am-site .am-work-hero,
#am-site .am-place-hero {
  --am-header-texture-opacity: 1;
  --am-header-texture-position: center top;
  --am-header-texture-size: 1200px 260px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Variantes : meme langage visuel, rythme et densite adaptes au contenu. */
#am-site .am-service-hero {
  --am-header-texture-opacity: .82;
  --am-header-texture-position: left top;
  --am-header-texture-size: 1320px 286px;
}

#am-site .am-maintenance-hero {
  --am-header-texture-opacity: .72;
  --am-header-texture-position: center top;
}

#am-site .am-advice-hero {
  --am-header-texture-opacity: .88;
  --am-header-texture-position: 18% top;
  --am-header-texture-size: 1120px 243px;
}

#am-site .am-work-hero {
  --am-header-texture-opacity: .78;
  --am-header-texture-position: 82% top;
  --am-header-texture-size: 1280px 277px;
}

#am-site .am-place-hero {
  --am-header-texture-opacity: .9;
  --am-header-texture-position: center top;
  --am-header-texture-size: 1160px 251px;
}

#am-site .am-service-hero::before,
#am-site .am-maintenance-hero::before,
#am-site .am-advice-hero::before,
#am-site .am-work-hero::before,
#am-site .am-place-hero::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 260'%3E%3Cdefs%3E%3Cpattern id='h' width='78.2' height='135.5' patternUnits='userSpaceOnUse'%3E%3Cpath d='M39.1 -41 74.6 -20.5 74.6 20.5 39.1 41 3.6 20.5 3.6 -20.5Z M0 26.75 35.5 47.25 35.5 88.25 0 108.75 -35.5 88.25 -35.5 47.25Z' fill='none' stroke='%23d8eadf' stroke-width='3.6' stroke-linejoin='round' stroke-opacity='.01'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='1200' height='260' fill='url(%23h)'/%3E%3Cg fill='none' stroke='%23d8eadf' stroke-width='3.6' stroke-linejoin='round'%3E%3Cpath d='M117.3 -41 152.8 -20.5 152.8 20.5 117.3 41 81.8 20.5 81.8 -20.5Z' opacity='.018'/%3E%3Cpath d='M234.6 26.75 270.1 47.25 270.1 88.25 234.6 108.75 199.1 88.25 199.1 47.25Z' opacity='.012'/%3E%3Cpath d='M78.2 162.25 113.7 182.75 113.7 223.75 78.2 244.25 42.7 223.75 42.7 182.75Z' opacity='.008'/%3E%3Cpath d='M430.1 94.5 465.6 115 465.6 156 430.1 176.5 394.6 156 394.6 115Z' opacity='.024'/%3E%3Cpath d='M625.6 26.75 661.1 47.25 661.1 88.25 625.6 108.75 590.1 88.25 590.1 47.25Z' opacity='.014'/%3E%3Cpath d='M821.1 94.5 856.6 115 856.6 156 821.1 176.5 785.6 156 785.6 115Z' opacity='.04'/%3E%3Cpath d='M860.2 162.25 895.7 182.75 895.7 223.75 860.2 244.25 824.7 223.75 824.7 182.75Z' opacity='.018'/%3E%3Cpath d='M1055.7 94.5 1091.2 115 1091.2 156 1055.7 176.5 1020.2 156 1020.2 115Z' opacity='.014'/%3E%3Cpath d='M1094.8 162.25 1130.3 182.75 1130.3 223.75 1094.8 244.25 1059.3 223.75 1059.3 182.75Z' opacity='.034'/%3E%3Cpath d='M1133.9 94.5 1169.4 115 1169.4 156 1133.9 176.5 1098.4 156 1098.4 115Z' opacity='.026'/%3E%3Cpath d='M1173 26.75 1208.5 47.25 1208.5 88.25 1173 108.75 1137.5 88.25 1137.5 47.25Z' opacity='.055'/%3E%3C/g%3E%3C/svg%3E");
  background-position: var(--am-header-texture-position);
  background-repeat: repeat;
  background-size: var(--am-header-texture-size);
  content: '';
  opacity: var(--am-header-texture-opacity);
  pointer-events: none;
}

#am-site .am-service-hero > *,
#am-site .am-maintenance-hero > *,
#am-site .am-advice-hero > *,
#am-site .am-work-hero > *,
#am-site .am-place-hero > * {
  position: relative;
  z-index: 1;
}

/* Variante editoriale alternee : l'article sur le fonctionnement ouvre par l'image. */
@media (min-width: 851px) {
  #am-site .am-work-hero {
    grid-template-columns: minmax(430px, 1.08fr) minmax(0, .92fr);
  }
}

@media (min-width: 701px) and (max-width: 850px) {
  #am-site .am-work-hero {
    grid-template-columns: 44% minmax(0, 1fr);
  }
}

@media (min-width: 701px) {
  #am-site .am-work-hero-copy {
    grid-column: 2;
    grid-row: 1;
  }

  #am-site .am-work-hero-image {
    grid-column: 1;
    grid-row: 1;
  }
}

/* Les categories gardent le gabarit compact, avec une texture cadree differemment. */
body#category.category-id-13 #am-site .am-category-hero::before {
  background-position: 82% center;
  background-size: 100% auto;
}

body#category.category-id-14 #am-site .am-category-hero::before {
  background-position: center;
  background-size: 108% auto;
}

body#category.category-id-15 #am-site .am-category-hero::before {
  background-position: 14% center;
  background-size: 116% auto;
}

body#category.category-id-16 #am-site .am-category-hero::before {
  background-position: 88% center;
  background-size: 104% auto;
}

@media (max-width: 700px) {
  /* Sur petit ecran, conserver des hexagones proches de leur taille desktop. */
  body#category #am-site .am-category-hero::before {
    background-size: auto 260px !important;
    filter: drop-shadow(0 0 0 rgba(216, 234, 223, .82));
  }

  #am-site .am-work-hero-copy {
    grid-column: 1;
    grid-row: 1;
  }

  #am-site .am-work-hero-image {
    grid-column: 1;
    grid-row: 2;
  }
}
