/* Ajustements propres à la page Agences partenaires.
   Chargés après style.css afin de ne pas être neutralisés par les règles historiques. */

@media only screen and (min-width: 768px) {
  .agencies-page .agencies-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .agencies-page .agencies-logos .a-client {
    min-height: 180px !important;
    padding: 12px !important;
  }

  .agencies-page .agencies-logos .a-client img {
    width: 100% !important;
    max-width: 295px !important;
    height: 130px !important;
    object-fit: contain !important;
  }
}

@media only screen and (max-width: 767px) {
  body.agencies-page .agencies-logos {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    column-gap: 12px !important;
    row-gap: 12px !important;
    width: calc(100vw - 40px) !important;
    max-width: none !important;
    margin: 28px calc(50% - 50vw + 20px) 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  .agencies-page .agencies-logos .a-client {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 108px !important;
    min-height: 108px !important;
    margin: 0 !important;
    padding: 12px !important;
    float: none !important;
  }

  .agencies-page .agencies-logos .a-client img {
    width: 92% !important;
    max-width: 175px !important;
    height: 80px !important;
    object-fit: contain !important;
  }
}

/* Bloc « Projet suivant » identique aux autres pages projets dédiées. */
.agencies-page .next-project-section {
  margin-top: clamp(64px, 8vw, 120px) !important;
  background: #f2f5f8 !important;
}

.agencies-page .next-project-section > a {
  display: block;
  padding-top: clamp(62px, 7vw, 100px) !important;
  padding-bottom: clamp(62px, 7vw, 100px) !important;
}

.agencies-page .next-project-section .next-project-wrap > span {
  color: #eb5b6a !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase;
}

.agencies-page .next-project-section .next-project-wrap > div[style*="display: flex"] {
  position: relative;
  width: min(100%, 760px) !important;
  gap: 18px !important;
}

.agencies-page .next-project-section .next-project-wrap > div[style*="display: flex"] > img {
  width: 78px !important;
  height: 78px !important;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}

.agencies-page .next-project-section .next-project-title {
  position: relative;
  flex: 1 1 auto;
  padding-right: 64px !important;
  color: #2d3a60 !important;
  font-size: clamp(38px, 4.4vw, 64px) !important;
  line-height: 1.02 !important;
}

.agencies-page .next-project-section .next-project-title::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #2d3a60;
  color: #ffffff;
  font-size: 23px;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .agencies-page .next-project-section:hover .next-project-title {
    color: #fccc85 !important;
  }

  .agencies-page .next-project-section:hover .next-project-title::after {
    transform: translate(4px, -50%);
  }

  .agencies-page .next-project-section:hover .next-project-wrap > div[style*="display: flex"] > img {
    transform: scale(1.035);
  }
}

@media only screen and (max-width: 767px) {
  .agencies-page .next-project-section .next-project-wrap > div[style*="display: flex"] > img {
    width: 66px !important;
    height: 66px !important;
  }

  .agencies-page .next-project-section .next-project-title {
    padding-right: 48px !important;
    font-size: clamp(31px, 9vw, 43px) !important;
  }

  .agencies-page .next-project-section .next-project-title::after {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agencies-page .next-project-section .next-project-title::after,
  .agencies-page .next-project-section .next-project-wrap > div[style*="display: flex"] > img {
    transition: none !important;
  }
}
