/* =========================================================
   HOME — SOLUTIONS
========================================================= */

.home-solutions {
  --solutions-background: var(--studio-red);
  --solutions-site-header: var(--site-header-offset, var(--header-height, 80px));

  position: relative;
  z-index: 20;
  isolation: isolate;

  overflow: clip;

  height: var(--site-section-height);
  min-height: 0;

  padding:
    clamp(24px, 3.5svh, 48px)
    0;

  background: var(--solutions-background);
  color: var(--studio-dark);
}

.home-solutions__container {
  position: relative;
  z-index: 1;

  width: min(calc(100% - 96px), 1480px);
  height: 100%;
  margin-inline: auto;

  display: grid;
  grid-template-rows: auto minmax(0, 1fr);

  gap: clamp(24px, 3.5svh, 48px);
}

/* =========================================================
   HEADER
========================================================= */

.home-solutions__header {
  min-width: 0;
  margin: 0;
}

.home-solutions__eyebrow {
  margin-bottom: clamp(14px, 1.8svh, 24px);

  display: flex;
  align-items: center;

  gap: 18px;

  color: rgba(255, 255, 255, 0.58);

  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-solutions__eyebrow-line {
  width: 42px;
  height: 1px;

  flex-shrink: 0;

  background: var(--studio-dark);
}

.home-solutions__heading {
  display: grid;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(260px, 0.55fr);

  align-items: end;

  gap: clamp(40px, 6vw, 100px);
}

.home-solutions__title {
  max-width: 900px;
  margin: 0;

  font-size: clamp(42px, 4.8vw, 78px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.home-solutions__title span {
  display: block;

  color: rgba(255, 255, 255, 0.42);
}

.home-solutions__introduction {
  max-width: 400px;
  margin: 0;

  color: rgba(255, 255, 255, 0.62);

  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.55;
}

/* =========================================================
   LAYOUT PRINCIPAL
========================================================= */

.home-solutions__layout {
  min-width: 0;
  min-height: 0;
  height: 100%;

  display: grid;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(300px, 0.55fr);

  align-items: stretch;

  gap: clamp(44px, 6vw, 100px);
}

.home-solutions__list,
.home-solutions__visual {
  min-width: 0;
  min-height: 0;
}

/* =========================================================
   LISTE
========================================================= */

.home-solutions__list {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.home-solutions__item {
  position: relative;

  min-width: 0;
  min-height: 0;

  flex: 1 1 0;

  display: flex;

  border-bottom: 1px solid rgba(255, 255, 255, 0.16);

  transition:
    flex-grow 450ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms ease,
    background-color 300ms ease;
}

.home-solutions__item.is-active {
  flex-grow: 1.5;

  border-color: rgba(255, 255, 255, 0.34);
}

.home-solutions__item::before {
  content: "";

  position: absolute;
  inset: 0 auto 0 0;

  width: 0;

  background: rgba(255, 255, 255, 0.025);

  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);

  pointer-events: none;
}

.home-solutions__item.is-active::before {
  width: 100%;
}

.home-solutions__trigger {
  position: relative;
  z-index: 1;

  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;

  padding:
    clamp(8px, 1.6svh, 18px)
    4px;

  display: grid;
  grid-template-columns:
    clamp(34px, 3.5vw, 54px)
    minmax(0, 1fr)
    clamp(28px, 2.8vw, 38px);

  align-items: center;

  gap: clamp(12px, 2vw, 30px);

  border: 0;

  background: transparent;
  color: inherit;

  font: inherit;
  text-align: left;

  cursor: pointer;
}

.home-solutions__number {
  align-self: start;

  padding-top: clamp(5px, 0.8svh, 9px);

  color: var(--studio-dark);

  font-size: clamp(10px, 0.9vw, 14px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;

  transition: color 250ms ease;
}

.home-solutions__item-main {
  min-width: 0;
  min-height: 0;

  align-self: center;
}

.home-solutions__item-title {
  display: block;

  min-width: 0;

  
  font-size: clamp(21px, 2.2vw, 38px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.04em;

  overflow-wrap: break-word;

  transition:
    color 250ms ease,
    transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-solutions__item-content {
  display: grid;
  grid-template-rows: 0fr;

  min-width: 0;

  opacity: 0;

  transition:
    grid-template-rows 450ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 300ms ease;
}

.home-solutions__description {
  max-width: 620px;
  overflow: hidden;

  color: rgba(255, 255, 255, 0.6);

  font-size: clamp(11px, 0.9vw, 15px);
  line-height: 1.45;
}

.home-solutions__description::before {
  content: "";

  display: block;

  height: clamp(7px, 1svh, 13px);
}

.home-solutions__item.is-active .home-solutions__number {
  color: rgba(255, 255, 255, 0.42);
}

.home-solutions__item.is-active .home-solutions__item-title {
  transform: translateX(8px);
  color: rgba(255, 255, 255, 0.42);
}

.home-solutions__item.is-active .home-solutions__item-content {
  grid-template-rows: 1fr;

  opacity: 1;
}

/* =========================================================
   ICÔNE
========================================================= */

.home-solutions__icon {
  position: relative;

  width: clamp(26px, 2.5vw, 34px);
  height: clamp(26px, 2.5vw, 34px);

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--studio-dark);
  border-radius: 50%;

  flex-shrink: 0;

  transition:
    border-color 250ms ease,
    transform 350ms ease;
}

.home-solutions__icon-line {
  position: absolute;

  width: 11px;
  height: 1px;

  background: currentColor;

  transition:
    background-color 250ms ease,
    transform 350ms ease;
}

.home-solutions__icon-line--vertical {
  transform: rotate(90deg);
}

.home-solutions__item.is-active .home-solutions__icon {
  border-color: rgba(255, 255, 255, 0.42);
  color: rgba(255, 255, 255, 0.42);

  transform: rotate(90deg);
}

.home-solutions__item.is-active .home-solutions__icon-line--vertical {
  transform: rotate(90deg) scaleX(0);
}

/* =========================================================
   IMAGE À DROITE
========================================================= */

.home-solutions__visual {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background: #11161c;
}

.home-solutions__visual-item {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  opacity: 0;
  visibility: hidden;

  transform: scale(1.04);

  transition:
    opacity 500ms ease,
    visibility 500ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-solutions__visual-item.is-active {
  opacity: 1;
  visibility: visible;

  transform: scale(1);
}

.home-solutions__visual-item::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to top,
      rgba(5, 8, 12, 0.72) 0%,
      rgba(5, 8, 12, 0.05) 48%,
      transparent 100%
    );

  pointer-events: none;
}

.home-solutions__visual-item img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.home-solutions__visual-link {
  position: absolute;
  right: clamp(16px, 2vw, 28px);
  bottom: clamp(16px, 2vw, 28px);
  z-index: 2;

  max-width: calc(100% - 40px);

  display: inline-flex;
  align-items: center;
  justify-content: flex-end;

  gap: 12px;

  color: var(--studio-white);

  font-size: clamp(9px, 0.8vw, 12px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;

  transition: color 200ms ease;
}

.home-solutions__visual-link span {
  color: var(--studio-red);

  font-size: 18px;
}

.home-solutions__visual-link:hover {
  color: var(--studio-red);
}

/* =========================================================
   ÉLÉMENTS MOBILES
========================================================= */

.home-solutions__mobile-image,
.home-solutions__mobile-link {
  display: none;
}

/* =========================================================
   GRANDS ÉCRANS PEU HAUTS
========================================================= */

@media (min-width: 768px) and (max-height: 850px) {
  .home-solutions {
    padding:
      18px
      0;
  }

  .home-solutions__container {
    gap: 18px;
  }

  .home-solutions__eyebrow {
    margin-bottom: 10px;

    font-size: 8px;
  }

  .home-solutions__heading {
    gap: 40px;
  }

  .home-solutions__title {
    max-width: 780px;

    font-size: clamp(36px, 4vw, 62px);
  }

  .home-solutions__introduction {
    max-width: 360px;

    font-size: 12px;
    line-height: 1.4;
  }

  .home-solutions__layout {
    gap: clamp(30px, 4vw, 60px);
  }

  .home-solutions__trigger {
    padding:
      6px
      3px;
  }

  .home-solutions__item-title {
    font-size: clamp(19px, 1.9vw, 30px);
  }

  .home-solutions__description {
    font-size: clamp(10px, 0.8vw, 13px);
    line-height: 1.35;
  }

  .home-solutions__description::before {
    height: 6px;
  }

  .home-solutions__icon {
    width: 26px;
    height: 26px;
  }
}

/* =========================================================
   ÉCRANS INTERMÉDIAIRES
========================================================= */

@media (max-width: 1300px) and (min-width: 768px) {
  .home-solutions__container {
    width: min(calc(100% - 64px), 1480px);
  }

  .home-solutions__heading {
    grid-template-columns:
      minmax(0, 1.35fr)
      minmax(240px, 0.65fr);

    gap: clamp(28px, 4vw, 60px);
  }

  .home-solutions__title {
    font-size: clamp(38px, 5vw, 68px);
  }

  .home-solutions__layout {
    grid-template-columns:
      minmax(0, 1.35fr)
      minmax(240px, 0.65fr);

    gap: clamp(28px, 4vw, 54px);
  }

  .home-solutions__trigger {
    grid-template-columns:
      38px
      minmax(0, 1fr)
      32px;

    gap: clamp(12px, 1.6vw, 22px);
  }

  .home-solutions__item-title {
    font-size: clamp(20px, 2.5vw, 34px);
  }
}

/* =========================================================
   TABLETTE PAYSAGE ET PETITS ORDINATEURS
========================================================= */

@media (max-width: 1050px) and (min-width: 768px) {
  .home-solutions {
    padding:
      18px
      0;
  }

  .home-solutions__container {
    width: min(calc(100% - 48px), 1480px);

    gap: 18px;
  }

  .home-solutions__eyebrow {
    margin-bottom: 10px;

    font-size: 8px;
  }

  .home-solutions__heading {
    grid-template-columns:
      minmax(0, 1.25fr)
      minmax(210px, 0.75fr);

    gap: 24px;
  }

  .home-solutions__title {
    font-size: clamp(34px, 4.8vw, 54px);
  }

  .home-solutions__introduction {
    font-size: 11px;
    line-height: 1.4;
  }

  .home-solutions__layout {
    grid-template-columns:
      minmax(0, 1.3fr)
      minmax(210px, 0.7fr);

    gap: 24px;
  }

  .home-solutions__trigger {
    grid-template-columns:
      32px
      minmax(0, 1fr)
      28px;

    gap: 10px;

    padding:
      6px
      2px;
  }

  .home-solutions__number {
    font-size: 10px;
  }

  .home-solutions__item-title {
    font-size: clamp(18px, 2.7vw, 27px);
  }

  .home-solutions__description {
    font-size: 10px;
    line-height: 1.3;
  }

  .home-solutions__description::before {
    height: 5px;
  }

  .home-solutions__icon {
    width: 24px;
    height: 24px;
  }

  .home-solutions__icon-line {
    width: 9px;
  }

  .home-solutions__visual-link {
    right: 14px;
    bottom: 14px;

    font-size: 8px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
  .home-solutions {
    height: auto;
    min-height: 0;

    overflow: hidden;

    padding:
      90px
      0;
  }

  .home-solutions__container {
    width: min(calc(100% - 40px), 1480px);
    height: auto;

    display: block;
  }

  .home-solutions__header {
    margin-bottom: 58px;
  }

  .home-solutions__eyebrow {
    margin-bottom: 28px;

    font-size: 12px;
  }

  .home-solutions__heading {
    display: grid;
    grid-template-columns: 1fr;

    gap: 32px;
  }

  .home-solutions__title {
    font-size: clamp(42px, 13vw, 66px);
  }

  .home-solutions__introduction {
    max-width: 620px;

    font-size: 15px;
    line-height: 1.65;
  }

  .home-solutions__layout {
    height: auto;

    display: block;
  }

  .home-solutions__list {
    height: auto;

    display: block;
  }

  .home-solutions__item,
  .home-solutions__item.is-active {
    min-height: 0;

    display: block;
  }

  .home-solutions__visual {
    display: none;
  }

  .home-solutions__trigger {
    height: auto;

    padding:
      25px
      0;

    grid-template-columns:
      32px
      minmax(0, 1fr)
      34px;

    align-items: start;

    gap: 14px;
  }

  .home-solutions__number {
    padding-top: 5px;
    padding-left: 5px;

    font-size: 12px;
  }

  .home-solutions__item-title {
    padding-right: 4px;

    font-size: clamp(22px, 6.8vw, 30px);
    line-height: 1.12;
  }

  .home-solutions__item.is-active .home-solutions__item-title {
    transform: none;
  }

  .home-solutions__description::before {
    height: 16px;
  }

  .home-solutions__description {
    padding-right: 5px;

    font-size: 14px;
    line-height: 1.65;
  }

  .home-solutions__icon {
    width: 30px;
    height: 30px;
  }

  .home-solutions__mobile-image {
    margin:
      0
      0
      22px
      46px;

    width: calc(100% - 46px);
    max-width: calc(100% - 46px);
    max-height: 0;

    aspect-ratio: 16 / 11;

    display: block;
    overflow: hidden;

    opacity: 0;

    transform: translateY(12px);

    transition:
      max-height 500ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 350ms ease,
      transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .home-solutions__mobile-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
  }

  .home-solutions__mobile-link {
    margin:
      0
      0
      28px
      46px;

    max-width: calc(100% - 46px);

    align-items: center;

    gap: 12px;

    color: var(--studio-white);

    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    opacity: 0;
  }

  .home-solutions__mobile-link span {
    color: var(--studio-red);

    font-size: 18px;
  }

  .home-solutions__item.is-active .home-solutions__mobile-image {
    max-height: 400px;

    opacity: 1;

    transform: translateY(0);
  }

  .home-solutions__item.is-active .home-solutions__mobile-link {
    display: inline-flex;

    opacity: 1;
  }
}

/* =========================================================
   TRÈS PETITS ÉCRANS
========================================================= */

@media (max-width: 420px) {
  .home-solutions__container {
    width: min(calc(100% - 28px), 1480px);
  }

  .home-solutions__trigger {
    grid-template-columns:
      28px
      minmax(0, 1fr)
      30px;

    gap: 10px;
  }

  .home-solutions__item-title {
    font-size: clamp(21px, 7vw, 27px);
  }

  .home-solutions__mobile-image {
    margin-left: 38px;

    width: calc(100% - 38px);
    max-width: calc(100% - 38px);
  }

  .home-solutions__mobile-link {
    margin-left: 38px;

    max-width: calc(100% - 38px);
  }
}

/* =========================================================
   ÉCRANS EXTRÊMEMENT PEU HAUTS
========================================================= */

@media (min-width: 768px) and (max-height: 650px) {
  .home-solutions {
    min-height: 500px;

    padding:
      12px
      0;
  }

  .home-solutions__container {
    gap: 12px;
  }

  .home-solutions__eyebrow {
    margin-bottom: 7px;
  }

  .home-solutions__title {
    font-size: clamp(32px, 3.7vw, 52px);
  }

  .home-solutions__introduction {
    font-size: 10px;
    line-height: 1.3;
  }

  .home-solutions__trigger {
    padding:
      4px
      2px;
  }

  .home-solutions__item-title {
    font-size: clamp(17px, 1.8vw, 26px);
  }

  .home-solutions__description {
    font-size: 9px;
    line-height: 1.25;
  }

  .home-solutions__description::before {
    height: 4px;
  }

  .home-solutions__icon {
    width: 22px;
    height: 22px;
  }
}

/* =========================================================
   RÉDUCTION DES ANIMATIONS
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .home-solutions *,
  .home-solutions *::before,
  .home-solutions *::after {
    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
