/* ===============================
   PAGE HEADER (ALIGN WITH GRID)
================================ */

.page-team .page-header {
  max-width: 1100px;   /* identique à .team-grid */
  margin: 2.5rem auto 3.5rem;
  padding: 0 2rem;     /* identique à .team-grid */
}

.page-team .page-intro {
  max-width: 720px;
  color: #555;
}


/* ===============================
   PAGE & GRID
================================ */

.team-grid {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem;
}

/* ===============================
   CARD
================================ */

.team-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

/* ===============================
   PHOTO
================================ */

.team-photo {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}

.team-photo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%);
}

/* ===============================
   CONTENT
================================ */

.team-content {
  padding: 1.2rem 1.5rem 1.6rem;
  text-align: center;
}

.team-name {
  margin: 1rem 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.team-role {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: #666;
}

/* ===============================
   LINKS
================================ */

.team-links {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.team-links a {
  font-size: 0.85rem;
  color: #555;
  text-decoration: underline;
}

/* ===============================
   BIO PREVIEW
================================ */

.team-bio-preview {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.45;
}

/* ===============================
   FLOATING BIO PANEL (STABLE)
================================ */

.team-expand-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(10px);

  /* toujours vers le bas, recouvre la vignette */
  top: calc(100% - 7.5rem);

  width: clamp(380px, 55vw, 720px);
  max-height: 70vh;

  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.18);
  padding: 1.6rem;

  overflow-y: auto;
  z-index: 100;

  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

/* Masquer le teaser quand actif */
.team-card.is-active .team-bio-preview {
  visibility: hidden;
}

/* Affichage fluide */
.team-card.is-active .team-expand-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ===============================
   MOBILE
================================ */

@media (max-width: 900px) {

  .team-expand-panel {
    position: static;
    transform: none;
    width: auto;
    max-height: none;
    margin-top: 1rem;
    display: block;
    box-shadow: none;
    background: #fafafa;
  }

  .team-bio-preview {
    display: none;
  }
}


/* Space to allow panels to open near bottom */
.team-grid {
  padding-bottom: 25vh;
}

/* ===============================
   TEAM – NAME COLOR STATES
================================ */

.team-name {
  color: rgba(0, 58, 143, 0.35);
  transition: color 0.3s ease;
}

.team-card:hover .team-name {
  color: #003A8F;
}
