:root {
  --projet-layout-max-height: 90vh;
}

.projet-hero {
  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.projet-hero__content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 4rem;
}

.projet-hero__headings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.projet-hero__title {
  font: var(--f-display-h2);
  color: var(--white);
}
.projet-hero__description {
  font: var(--f-text-xl);
  color: var(--neutral-300);
  max-width: 40ch;
}

.projet-hero__button {
  color: var(--neutral-950);
  background-color: var(--white);
  border-radius: 100vmax;
  font: var(--f-label-m);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  transition: var(--t300);
  height: fit-content;
  width: fit-content;
}

.projet-hero__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.projet-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) saturate(1.3);
}

.projet-description {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4rem;
  padding: 4rem;
  background-color: var(--neutral-100);
}
.projet-description-info-left {
  display: flex;
  flex-direction: row;
  gap: 4rem;
}
.projet-description-info {
  display: flex;
  flex-direction: row;
  gap: 4rem;
}

.projet-description-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.projet-description-column__title {
  font: var(--f-label-s);
  color: var(--neutral-600);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.projet-description-column__item {
  font: var(--f-text-m);
  color: var(--neutral-950);
  text-wrap: nowrap;
}

.projet-description-column__about {
  font: var(--f-heading-h6);
  color: var(--neutral-950);
  max-width: 45ch;
}

.projet-layout-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 4rem;
}

.layout-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 1rem;
  display: block;
}

.layout {
  width: 100%;
  height: 100%;
  min-height: var(--projet-layout-max-height);
  display: grid;
}

.layout-large {
  grid-template-columns: 1fr;
}
.layout-large > .layout-image {
  width: 100%;
  height: var(--projet-layout-max-height);
  border-radius: 1rem;
  object-fit: cover;
  object-position: center;
  display: block;
}

.layout-dual {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  height: 100%;
}
.layout-dual > .layout-image {
  height: var(--projet-layout-max-height);
}

.layout-triple {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  height: 100%;
  min-height: var(--projet-layout-max-height);
  overflow: hidden;
}
.layout-triple > .layout-image {
  height: 100%;
}
.layout-triple > :first-child {
  grid-row: 1 / span 2;
  grid-column: 1 / 2;
}
.layout-triple > :nth-child(2),
.layout-triple > :nth-child(3) {
  grid-column: 2 / 3;
}
.layout-triple > :nth-child(2) {
  grid-row: 1 / 2;
}
.layout-triple > :nth-child(3) {
  grid-row: 2 / 3;
}

.layout-triple-reverse {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  height: 100%;
  min-height: var(--projet-layout-max-height);
  overflow: hidden;
}
.layout-triple-reverse > .layout-image {
  height: 100%;
}
.layout-triple-reverse > :first-child {
  grid-row: 1 / span 2;
  grid-column: 2 / 3;
}
.layout-triple-reverse > :nth-child(2),
.layout-triple-reverse > :nth-child(3) {
  grid-column: 1 / 2;
}
.layout-triple-reverse > :nth-child(2) {
  grid-row: 1 / 2;
}
.layout-triple-reverse > :nth-child(3) {
  grid-row: 2 / 3;
}

.layout-quad {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  min-height: var(--projet-layout-max-height);
}

/* ===== Responsive Layouts regroupées et optimisées ===== */
@media (max-width: 1024px) {
  :root {
    --projet-layout-max-height: 55vh;
  }
  .projet-hero__content {
    padding: 4rem;
    gap: 1rem;
  }
  .projet-description-info-left {
    flex-direction: column;
    gap: 2rem;
  }
  .projet-hero__title {
    font: var(--f-display-h4);
  }
  .projet-hero__description {
    font: var(--f-text-l);
    max-width: 30ch;
  }
  .projet-layout-content {
    padding: 4rem;
    gap: 1rem;
  }
  .projet-description-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --projet-layout-max-height: 35vh;
  }
  .projet-hero {
    height: 90vh;
  }

  .projet-hero__content {
    padding: 2rem;
    gap: 1rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
  .projet-description {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    padding: 2rem;
  }
  .projet-description-column {
    max-width: 100%;
  }
  .projet-description-column--about {
    order: -1;
  }
  .projet-description-column__about {
    font: var(--f-heading-h6);
    font-size: 1.25rem;
    max-width: 100%;
  }
  .projet-layout-content {
    padding: 2rem;
    gap: 1rem;
  }
  .layout-image,
  .layout-large > .layout-image {
    /* height: var(--projet-layout-max-height); */
    height: 100%;
    min-height: 180px;
    /* max-height: var(--projet-layout-max-height); */
  }
  .layout-dual {
    grid-template-columns: 1fr 1fr;
    height: var(--projet-layout-max-height);
  }
  .layout-dual > .layout-image {
    height: 100%;
    min-height: 0;
    max-height: none;
  }
  /* .layout-triple,
  .layout-triple-reverse {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    min-height: var(--projet-layout-max-height);
    height: auto;
  }
  .layout-triple > .layout-image,
  .layout-triple-reverse > .layout-image {
    grid-column: auto !important;
    grid-row: auto !important;
    height: var(--projet-layout-max-height);
    min-height: 180px;
    max-height: var(--projet-layout-max-height);
  } */
  .layout-quad {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    min-height: var(--projet-layout-max-height);
    height: auto;
  }
}

@media (max-width: 480px) {
  :root {
    --projet-layout-max-height: 25vh;
  }
  .projet-description {
    padding: 2rem;
    gap: 1rem;
  }

  .projet-description-info-left {
    flex-direction: column;
    gap: 2rem;
  }

  .projet-description-column__about {
    font-size: 1.2rem;
    max-width: 100%;
  }
  .projet-layout-content {
    padding: 2rem;
    gap: 1rem;
  }

  /* Layouts : flex, colonne, gap, height, width */
  .layout,
  .layout-large,
  .layout-dual,
  .layout-triple,
  .layout-triple-reverse,
  .layout-quad {
    display: flex;
    flex-direction: column;
    gap: 1rem ;
    width: 100% ;
    height: unset ;
  }

  /* Images dans les layouts */
  .layout-image,
  .layout-large > .layout-image,
  .layout-dual > .layout-image,
  .layout-triple > .layout-image,
  .layout-triple-reverse > .layout-image,
  .layout-quad > .layout-image {
    /* height: 100% !important; */
    height: 280px;
    width: 100%;
    object-fit: cover;
  }

  .layout-triple > .layout-image:nth-child(2),
  .layout-triple > .layout-image:nth-child(3){
    height: 230px;
  }

  .layout-triple-reverse > .layout-image:nth-child(2),
  .layout-triple-reverse > .layout-image:nth-child(3){
    height: 230px;
  }
}
