/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.dld-hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 2560px;
}

.dld-hero video {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 1;
}

.dld-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18vh;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--main-bg-color) 100%);
  z-index: 2;
  pointer-events: none;
}

.dld-title {
  position: relative;
  z-index: 3;
  color: #fff;
  font-family: "Libre Baskerville", serif;
  text-align: center;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.dld-title h2 {
  font-size: 3vw;
  margin: 0;
  padding: 0 3vw;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ==========================================================================
   2. CONTENT SECTIONS (PRESENTATION & REMERCIEMENTS)
   ========================================================================== */

.dld-presentation {
  max-width: 1500px;
  padding: 5vw;
}

.dld-presentation h2 {
 padding: 0 0 0.9vw 0;
 font-size: clamp(1.8rem, 2.5vw, 2.5rem); 
}

.dld-remerciements {
  width: 90vw;
  max-width: 1100px;
  margin: 5vh auto 0vh auto;
  color: #fff;
  text-align: center;
  font-family: "Figtree", sans-serif;
}

.dld-remerciements h2 {
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  margin-bottom: 0.5em;
  font-family: "Libre Baskerville", serif;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.dld-remerciements p {
  text-align: justify;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  font-weight: 400;
  opacity: 0.85;
  margin: 0;
  line-height: 1.6;
}

#last-paragraph {
  margin-bottom: 5vh;
}

/* ==========================================================================
   3. TEAM GRID
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5vw;
  width: 90vw;
  max-width: 1400px;
  margin: 5vh auto 0 auto;
  min-height: 80vh;
}

.team-member {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--main-bg-color);
  border: 1px solid #fff;
  cursor: pointer;
  transition: box-shadow 0.3s;
}

.team-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  backface-visibility: hidden;
  transition: opacity 0.5s;
  font-family: "Figtree", sans-serif;
  font-size: 1.2em;
  padding: 10%;
}

.team-photo {
  background-size: cover;
  background-position: center;
  z-index: 1;
  opacity: 1;
  border: 0;
  transition: opacity 0.5s;
  background-color: #fff;
}

.team-info {
  position: relative;
  background: none;
  color: #fff;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s;
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10%;
  box-sizing: border-box;
}

/* --- Team Member States --- */

.team-member.show-photo .team-photo,
.team-member.show-info .team-info,
.team-member.show-photo:hover .team-info,
.team-member.show-info:hover .team-info {
  opacity: 1;
}

.team-member.show-photo .team-info,
.team-member.show-info .team-photo,
.team-member.show-photo:hover .team-photo,
.team-member.show-info:hover .team-photo {
  opacity: 0;
}

/* --- Team Member Content --- */

.team-name {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: bold;
  margin-bottom: 0.5em;
  letter-spacing: 0.02em;
}

.team-role {
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  opacity: 0.85;
  line-height: 1.3;
}

.team-portfolio {
  position: absolute;
  right: 10%;
  bottom: 10%;
  display: inline-block;
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  opacity: 0.85;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.team-portfolio::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s;
  border-radius: 2px;
}

.team-member:hover .team-portfolio::after {
  width: 100%;
}

.team-member:hover .team-portfolio {
  color: #ddd;
}

/* ==========================================================================
   4. RESPONSIVE DESIGN
   ========================================================================== */

/* --- Tablets --- */
@media (max-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5vw;
  }
  .team-member {
    min-width: 160px;
  }
  .team-face, .team-info {
    padding: 8%;
  }
  .team-role {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
  }
  .team-portfolio {
    right: 8%;
    bottom: 8%;
  }
}

/* --- Mobile Phones --- */
@media (max-width: 576px) {
  .dld-title h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
  }
  .dld-remerciements h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }
  .dld-remerciements p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  }
  
  .team-grid {
    gap: 20px;
  }
  .team-member {
    min-width: 150px;
  }
  .team-face, .team-info {
    padding: 15px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  }
  .team-name {
    font-size: clamp(1rem, 2.8vw, 1.3rem);
  }
  .team-role {
    font-size: clamp(0.8rem, 2.2vw, 1rem);
  }
  .team-portfolio {
    font-size: clamp(0.8rem, 2.2vw, 1rem);
    right: 15px;
    bottom: 15px;
  }
}