/* ======================================================================
   TEAM SECTION – cartes membres
   ----------------------------------------------------------------------
   :root variables            – couleurs / rayons / ombres
   .team-section              – wrapper (fond gris clair)
   .team-title                – titre centré
   .team-cards                – grille responsive
   .team-card                 – carte (header + body repliable)
   .team-card__header         – entête cliquable
   .team-card__name           – nom du membre
   .team-card__toggle         – “+ / ×” (bouton)
   .team-card__body           – contenu collapsible
   .team-card.is-open         – état déplié
   ====================================================================== */

/* ----- Variables ----------------------------------------------------- */
:root {
  --team-bg: #f5f9fe; /* section background            */
  --team-card-bg: #ffffff; /* fond des cartes               */
  --team-primary: #527887; /* bleu principal                */
  --team-radius: 0.75rem;
  --team-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  --team-transition: 250ms ease;
}

/* ----- Section ------------------------------------------------------- */
.team-section {
  background: var(--team-bg);
  padding: 30px 60px 60px;
}

.team-title {
  text-align: center;
  font-size: 42px;
  color: var(--team-primary);
  margin-bottom: 2.5rem;
}

/* ----- Cards container ---------------------------------------------- */
.team-cards {
  display: grid;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* ----- Card ---------------------------------------------------------- */
.team-card {
  background: var(--team-card-bg);
  border-radius: var(--team-radius);
  box-shadow: var(--team-shadow);
  overflow: hidden;
  transition: box-shadow var(--team-transition);
}

.team-card:hover {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
}

/* ----- Header -------------------------------------------------------- */
.team-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
}

.team-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--team-primary);
  margin: 0;
}

.team-card__toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--team-primary);
  transition: transform var(--team-transition);
}

.team-card.is-open .team-card__toggle {
  transform: rotate(45deg); /* “+” devient “×” */
}

/* ----- Body (collapsible part) -------------------------------------- */
.team-card__body {
  max-height: 0;
  padding: 0 1.5rem;
  overflow: hidden;
  transition: max-height var(--team-transition), padding var(--team-transition);
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.55;
}

.team-card__body p {
  margin: 0 0 1rem;
  text-align: justify;
}

.team-card.is-open .team-card__body {
  padding: 1rem 2rem 2rem;
  max-height: 1200px;
}

/* ======================================================================
   RESPONSIVE DESIGN
   ---------------------------------------------------------------------- */

/* === Tablette (≤ 992px) === */
@media (max-width: 992px) {
  .team-section {
    padding: 0px 40px 50px;
  }
  .team-title {
    margin-bottom: 2rem;
  }
  .team-cards {
    gap: 1.2rem;
  }
  .team-card__name {
    font-size: 1rem;
  }
}

/* === Mobile (≤ 768px) === */
@media (max-width: 768px) {
  .team-section {
    padding: 0px 30px 40px;
  }
  .team-cards {
    grid-template-columns: 1fr; /* 1 colonne */
    max-width: 100%;
  }
  .team-card__header {
    padding: 1rem 1.2rem;
  }
  .team-card__name {
    font-size: 0.95rem;
  }
  .team-card__body {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

/* === Très petit écran (≤ 480px) === */
@media (max-width: 480px) {
  .team-section {
    padding: 00px 20px 30px;
  }
  .team-title {
    font-size: 26px;
  }
  .team-card__toggle {
    font-size: 1.3rem;
  }
}
