/* ===================================
   TEAM SECTION - ÉQUIPE
   Section de présentation de l'équipe
   =================================== */

.team-section {
  background: #F9F4ED;
  padding: 48px 8% 48px !important;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.team-section .container-width {
  padding: 0 !important;
}

/* ========== GRILLE RESPONSIVE ========== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
}

/* ========== PHRASE DE CLÔTURE ========== */
.team-closing {
  text-align: center;
  font-size: 1.2rem;
  color: #4a4a4a;
  margin-top: 50px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ========== CARTE MEMBRE ========== */
.team-card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.04),
    0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, opacity 0.6s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(184, 144, 81, 0.12);
  opacity: 0;
  transform: translateY(30px);
}

.team-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.team-card:nth-child(1).revealed {
  transition-delay: 0.1s;
}

.team-card:nth-child(2).revealed {
  transition-delay: 0.2s;
}

.team-card:nth-child(3).revealed {
  transition-delay: 0.3s;
}

.team-card:nth-child(4).revealed {
  transition-delay: 0.4s;
}

.team-card.revealed:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(184, 144, 81, 0.2);
  border-color: #B89051;
}

/* ========== PHOTO ========== */
.team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, #F9F4ED 0%, #E8DCC9 100%);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.team-card:hover .team-photo img {
  transform: scale(1.05);
}

/* ========== INFO MEMBRE ========== */
.team-info {
  padding: 32px 28px;
  text-align: left;
  background: #FFFFFF;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-info h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.team-info p {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #4a4a4a;
  margin: 0;
  letter-spacing: 0.2px;
}

/* Truncate bio text */
.team-bio {
  position: relative;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.team-bio.expanded {
  max-height: none;
}

.team-bio::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #FFFFFF);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.team-bio.expanded::after {
  opacity: 0;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #B89051;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 0;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  color: #A67E44;
  gap: 8px;
}

.read-more-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.read-more-btn.expanded svg {
  transform: rotate(180deg);
}

/* ========== SHOW ALL TEAM BUTTON (HIDDEN ON DESKTOP) ========== */
.team-show-all-wrapper {
  display: none;
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
  .team-section {
    padding: 32px 5% 32px !important;
  }
  
  .team-section .container-width {
    padding: 0 !important;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 10px;
  }

  /* Hide team members 2, 3 & 4 on mobile by default */
  .team-card:nth-child(2),
  .team-card:nth-child(3),
  .team-card:nth-child(4) {
    display: none;
  }

  /* Show all members when expanded */
  .team-grid.expanded .team-card {
    display: flex;
  }

  .team-card {
    border-radius: 16px;
  }

  /* Show all team button (mobile only) */
  .team-show-all-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0 20px;
  }

  .team-show-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #B89051 0%, #A67E44 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(184, 144, 81, 0.4);
  }

  .team-show-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 144, 81, 0.5);
  }

  .team-show-all-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
  }

  .team-show-all-btn.expanded svg {
    transform: rotate(180deg);
  }

  /* Hide button when expanded */
  .team-show-all-wrapper.hidden {
    display: none;
  }

  .team-photo {
    aspect-ratio: 1;
  }

  .team-info {
    padding: 24px 20px;
    gap: 12px;
  }

  .team-info h3 {
    font-size: 1.2rem;
  }

  .team-info p {
    font-size: 0.95rem;
    line-height: 1.65;
  }
}

/* ========== RESPONSIVE TABLETTE ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .team-section {
    padding: 40px 6% 40px !important;
  }
  
  .team-section .container-width {
    padding: 0 !important;
  }

  .team-grid {
    gap: 36px;
  }

  .team-info {
    padding: 28px 24px;
  }

  .team-info h3 {
    font-size: 1.25rem;
  }

  .team-info p {
    font-size: 0.97rem;
  }
}
