/* ========================================
   Page PROJETS
   ======================================== */
.main_autres_pages {
  margin-top: 60vh;
  width: 100%;
}

h2 {
  margin-bottom: 2rem;
}

/* Hero Section Projets */
.section-hero-projets {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60vh;  
  display: flex;
  align-items: end;
  justify-content: left;
  overflow: hidden;
  margin-top: 0;
  padding-bottom: 0;
  z-index: 100;
}

.section-hero-projets canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.section-hero-projets::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 2px
    );
  pointer-events: none;
  z-index: 1;
}

.hero-projets-content {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  width: 100%;
  padding: 0 0 50px 0;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  z-index: 2;
  text-align: left;
  color: var(--color-creme);
}

.hero-projets-content h1 {
  grid-column: 2 / span 5;
  color: var(--color-sapin);
}

.hero-projets-content p {
  color: var(--color-sapin);
  grid-column: 2 / span 6;
}

/* ========================================
   Section Projets List
   ======================================== */

.section-projets-list {
  width: 100%;
  background-color: var(--color-creme);
  position: relative;
  z-index: 500;
  padding: 75px 0;;
}
/* Wrapper transparent pour les items */
.section-projet-item {
    display: grid;
    column-gap: var(--gutter);
    width: 100%;
    position: relative;
    grid-column: 1 / -1;
}

/* Partie infos */
.projet-infos {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;
}

.projet-title-group h4 {
  text-transform: lowercase;
  line-height: 1.3;
  margin: 0;
  color: var(--color-charbon);
  cursor: pointer;
  transition: color 0.3s ease;
}

.projet-title-group h4:hover {
  color: var(--color-corail);
}

.projet-title-group p {
  margin: 0;
  padding-top: 10px;
}

.projet-infos p {
  color: var(--color-charbon);
  line-height: 1.6;
  margin: 0;
}

/* Lien projet */
.projet-link {
  color: var(--color-sapin);
  text-decoration: none;
  position: relative;
  width: fit-content;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}    

/* Soulignement au hover comme la nav */
.projet-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-sapin);
  transition: width 0.3s ease;
}

.projet-link:hover::after {
  width: 100%;
}

.projet-link img {
  width: 16px;
  height: 16px;
}

/* Partie images */
.projet-images {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.projet-images-container {
  position: relative;
  width: 100%;
  height: auto;
}

.projet-main-image {
  max-width: 100%;
  height: auto;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  z-index: 1;
  display: block;
  cursor: pointer;
  border-radius: 0 0 0 20px;
}

.projet-main-image.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.projet-parallax-image {
  position: absolute;
  width: 30%;
  left: -60px;
  bottom: 100px;
  height: auto;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  z-index: 2;
}

.projet-parallax-image.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Gestion du positionnement des projets
   ======================================== */

.section-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  width: 100%;
  position: relative;
}

.section-projet-item {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    justify-items: center;
    padding: 75px 0;
}

/* Projets A */
.section-projet-item-A  {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  align-items: stretch; /* La ligne prendra la hauteur de la plus grande colonne (l'image) */
}
.section-projet-item-A .projet-infos {
  grid-column: 3 / 6;
  text-align: right !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: 1;
}
.section-projet-item-A a {
  align-self: flex-end;
}
.section-projet-item-A .projet-subtitle {
    justify-content: end;
}

.section-projet-item-A .projet-images {
  grid-column: 7 / -1;
  order: 2;
}

/* Projets B */
.section-projet-item-B .projet-infos {
  grid-column: 8 / 11;
  order: 2;
  
}

.section-projet-item-B .projet-images {
  grid-column: 2 / 7;
  order: 1;
}

.section-projet-item-B .projet-parallax-image {
    right : -60px;
    left: auto;
}
/* Projets C */
.section-projet-item-C .projet-infos {
  grid-column: 2 / 5;
  text-align: right !important;
  align-items: right;
  order: 1;
}

.section-projet-item-C a {
  align-self: flex-end;
}

.section-projet-item-C .projet-subtitle {
    justify-content: end;
}
.section-projet-item-C .projet-images {
  grid-column: 6 / 11;
  order: 2;
}

/* ============================================================
   RESPONSIVE — Page PROJETS
   ============================================================ */

/* ── Laptop 1024–1279px ── */

@media (max-width: 1279px) {
  .hero-projets-content h1 { grid-column: 2 / span 7; }
  .hero-projets-content p  { grid-column: 2 / span 8; }

  /* Colonnes projets : réduction légère */
  .section-projet-item-A .projet-infos  { grid-column: 2 / 6; }
  .section-projet-item-A .projet-images { grid-column: 7 / -1; }
  .section-projet-item-B .projet-infos  { grid-column: 8 / 12; }
  .section-projet-item-B .projet-images { grid-column: 2 / 7; }
  .section-projet-item-C .projet-infos  { grid-column: 2 / 5; }
  .section-projet-item-C .projet-images { grid-column: 6 / 12; }
}

/* ── Tablet 768–1023px ── */

@media (max-width: 1023px) {
  .main_autres_pages   { margin-top: 50vh; }
  .section-hero-projets { height: 50vh; }

  .hero-projets-content h1 { grid-column: 2 / span 9; font-size: 2.5rem; }
  .hero-projets-content p  { grid-column: 2 / span 9; }
  .hero-projets-content    { padding: 0 0 40px; }

  /* Disposition alternée maintenue sur tablette (même principe que desktop) */
  /* A : infos gauche, image droite */
  .section-projet-item-A .projet-infos  { grid-column: 2 / span 5; text-align: right !important; order: 1; }
  .section-projet-item-A .projet-images { grid-column: 8 / span 5; order: 2; }
  .section-projet-item-A a              { align-self: flex-end; }
  .section-projet-item-A .projet-subtitle { justify-content: end; }

  /* B : image gauche, infos droite */
  .section-projet-item-B .projet-infos  { grid-column: 7 / span 5; text-align: left !important; order: 2; }
  .section-projet-item-B .projet-images { grid-column: 1 / span 5; order: 1; }

  /* C : infos gauche, image droite */
  .section-projet-item-C .projet-infos  { grid-column: 2 / span 5; text-align: right !important; order: 1; }
  .section-projet-item-C .projet-images { grid-column: 8 / span 6; order: 2; }
  .section-projet-item-C a              { align-self: flex-end; }
  .section-projet-item-C .projet-subtitle { justify-content: end; }

  .section-projets-list { padding: 50px 0; }

}

/* ── Mobile 480–767px ── */

@media (max-width: 767px) {
  .main_autres_pages    { margin-top: 45vh; }
  .section-hero-projets { height: 45vh; }

  .hero-projets-content h1 { grid-column: 2 / span 10; }
  .hero-projets-content p  { grid-column: 2 / span 10; }
  .hero-projets-content    { padding: 0 0 30px; }

  /* Empilement vertical */
  .section-projet-item-A .projet-infos,
  .section-projet-item-B .projet-infos,
  .section-projet-item-C .projet-infos {
    grid-column: 2 / span 10 !important;
    order: 2;
    text-align: left !important;
  }
  .section-projet-item-A .projet-images,
  .section-projet-item-B .projet-images,
  .section-projet-item-C .projet-images {
    grid-column: 2 / span 10 !important;
    order: 1;
    margin-bottom: 1.5rem;
  }

  .section-projet-item-A a              { align-self: flex-start; }
  .section-projet-item-B a              { align-self: flex-start; }
  .section-projet-item-C a              { align-self: flex-start; }
  .section-projet-item-A .projet-subtitle,
  .section-projet-item-C .projet-subtitle { justify-content: flex-start; }

  /* Masquer les images parallax sur mobile */
  .projet-parallax-image { display: none !important; }

  /* Espacement réduit entre projets */
  .section-projet-item   { padding: 30px 0; }
  .section-projets-list  { padding: 40px 0; }

  /* Filtres — taille augmentée et centrés */
  .section-projets-filters { padding: 40px 0 0; }
  .projets-filters          { grid-column: 1 / -1; gap: 8px; padding: 0 var(--gutter); justify-content: center; flex-wrap: wrap; }
  .filter-btn { font-size: 0.8rem; padding: 0.55rem 1.25rem; }
}

/* ── Mobile XS < 480px ── */

@media (max-width: 479px) {
  .hero-projets-content h1 { grid-column: 2 / span 10; }
  .hero-projets-content p  { grid-column: 2 / span 10; }

  .section-projet-item-A .projet-infos,
  .section-projet-item-B .projet-infos,
  .section-projet-item-C .projet-infos {
    grid-column: 1 / -1 !important;
    padding: 0 var(--gutter);
  }
  .section-projet-item-A .projet-images,
  .section-projet-item-B .projet-images,
  .section-projet-item-C .projet-images {
    grid-column: 1 / -1 !important;
  }
}

/* ========================================
   Filtres Projets
   ======================================== */

.section-projets-filters {
  background-color: var(--color-creme);
  position: relative;
  z-index: 501;
  padding: 60px 0 0;
}

.projets-filters {
  grid-column: 2 / -2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-btn {
  font-family: "Parkinsans", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  color: var(--color-charbon);
  background: transparent;
  border: 1.5px solid var(--color-charbon-light-3);
  border-radius: 0 0 0 8px;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition:
    color 0.25s var(--ease-snappy),
    background-color 0.25s var(--ease-snappy),
    border-color 0.25s var(--ease-snappy),
    transform 0.2s var(--ease-snappy),
    box-shadow 0.25s var(--ease-snappy);
}

.filter-btn:hover {
  border-color: var(--color-sapin);
  color: var(--color-sapin);
  transform: translateY(-2px);
}

.filter-btn.is-active {
  background-color: var(--color-sapin);
  border-color: var(--color-sapin);
  color: var(--color-sapin-light-1);
  transform: translateY(-2px);
  box-shadow: none;
}

.filter-btn:focus-visible {
  outline: 2px solid var(--color-corail);
  outline-offset: 3px;
}

/* Transitions hide/show des projets (filtres) */
.section-projet-item {
  transition:
    opacity 0.35s var(--ease-quart),
    transform 0.35s var(--ease-quart);
}

.section-projet-item.filter-fading {
  opacity: 0 !important;
  transform: scale(0.97) translateY(8px) !important;
  pointer-events: none;
}

.section-projet-item.filter-hidden {
  display: none !important;
}

/* Responsive filtres */
@media (max-width: 768px) {
  .section-projets-filters {
    padding: 40px 0 0;
  }

  .projets-filters {
    grid-column: 1 / -1;
    gap: 8px;
    padding: 0 var(--gutter);
    justify-content: center;
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 0.55rem 1.25rem;
  }
}

