/* ==========================================================================
   Page Team (/our-team/) — cartes de profils + section contact
   Cartes horizontales du prototype de Jeremie (02/10/2026), bio toujours
   visible. Charte et variables : assets/css/site.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section equipe
   -------------------------------------------------------------------------- */

.team-section {
  padding: 48px 0 20px 0;
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 36px;
}

/* --------------------------------------------------------------------------
   Carte de profil - cadre du prototype de Jeremie (02/10/2026) : carte
   horizontale, photo sur un tiers (5/4) qui alterne gauche/droite, texte sur
   les deux autres tiers ; fond papier, filet bleu, rayon 24px, ombre basse.
   Mobile : photo au-dessus (4/3, cadree sur le visage), texte dessous.
   Textes, roles et liens LinkedIn d'origine conserves.
   -------------------------------------------------------------------------- */

.team-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 0 20px;
  background: #f4faf8;
  border: 1px solid rgba(0, 1, 144, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 70px -48px rgba(0, 1, 144, 0.42);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Une carte sur deux : photo a droite. */
.team-card:nth-child(even) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.team-card:nth-child(even) .team-photo { order: 2; }

@media (hover: hover) {
  .team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px -40px rgba(0, 1, 144, 0.5);
  }
  .team-card:hover .team-photo img { transform: scale(1.04); }
}

.team-photo {
  position: relative;
  align-self: stretch;
  aspect-ratio: 5 / 4;
  overflow: hidden;
}

/* Voile bleu tres leger en pied de photo, comme le prototype. */
.team-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 1, 144, 0.1), transparent 45%);
  pointer-events: none;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  display: block;
  transition: transform 0.5s ease-out;
}

/* Jeremie - cadrage specifique (jpeg d'origine, visage plus haut) */
.team-photo img.photo-jeremie {
  object-position: 50% 35%;
}

.team-body {
  padding: 28px 32px;
}

.team-name {
  font-family: var(--font-titres);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--bleu);
  margin: 0;
}

.team-role {
  display: flex;
  align-items: flex-start;
  line-height: 1.5;
  gap: 8px;
  font-family: var(--font-titres);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--turquoise); /* charte : turquoise, jamais de vert (proprietaire, 03/10/2026) */
  margin: 12px 0 0 0;
}

.team-role::before {
  content: "";
  flex-shrink: 0;
  margin-top: calc(0.75em - 3px); /* centre sur la PREMIERE ligne si le role passe sur deux */
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--turquoise);
}

.team-bio {
  font-family: var(--font-corps);
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(0, 1, 144, 0.75);
  max-width: 672px;
  margin: 12px 0 18px 0;
}

/* --------------------------------------------------------------------------
   Icone LinkedIn — or, comme sur le site d'origine
   -------------------------------------------------------------------------- */

.team-linkedin {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(135deg, var(--or), #FFC000);
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.35);
  color: var(--bleu);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  flex-shrink: 0;
}

.team-linkedin:hover {
  background: linear-gradient(135deg, #FFC000, #FFB000);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.45);
  transform: translateY(-2px) scale(1.06);
}

.team-linkedin svg { display: block; }

/* --------------------------------------------------------------------------
   Section contact — bandeau bleu degrade, mail bien visible
   -------------------------------------------------------------------------- */

.team-contact {
  padding: 30px 0 10px 0;
}

/* Bloc unique : la plaque 3D du m a gauche, les infos contact a droite, sur un seul fond bleu nuit */
.team-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  background: var(--bleu-degrade);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 1, 144, 0.22);
}

.team-office {
  margin: 0;
}

/* Plaque 3D : elle pivote avec le defilement. Le logo SVG sert d'image
   d'attente / de repli sans WebGL. */
.team-m3d {
  position: relative;
  height: 280px;
  touch-action: pan-y;                /* partout ailleurs, la page defile normalement */
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Zone de saisie : un cadre serre autour de la plaque (elle occupe ~0,71 x 0,36 de la hauteur de la scene).
   Seul un doigt pose ici prend le controle du logo ; a cote, on fait defiler la page. */
.team-m3d-grab {
  position: absolute;
  left: 50%;
  top: 51%;
  height: 48%;
  aspect-ratio: 1.75 / 1;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}

.team-m3d.drag .team-m3d-grab { cursor: grabbing; }

.team-m3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
}

/* image d attente : rendu de la plaque a sa pose de REPOS (statique, plus d entree animee, voir m3d.js), meme taille et meme position que la 3D */
.team-m3d-still {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
}

.team-m3d.is-ready canvas { opacity: 1; }

/* Texte contact : meme langage que la plaque (verre, filet turquoise, acier) */
.team-contact-title {
  font-family: var(--font-titres);
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 22px 0;
  color: #ffffff;
}

.team-contact-title em {
  font-style: italic;
  font-weight: 700;
  color: var(--turquoise);
}

.team-contact-card {
  position: relative;
  padding: 36px 44px;
  text-align: left;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* filet vertical fin entre la plaque et le texte */
.team-contact-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(180deg, rgba(43, 216, 194, 0) 0%, rgba(43, 216, 194, 0.7) 50%, rgba(43, 216, 194, 0) 100%);
}

.team-contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-titres);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.team-contact-email:hover {
  background: rgba(43, 216, 194, 0.16);
  border-color: var(--turquoise);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 22px rgba(0, 0, 60, 0.35);
}

.team-contact-email:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 3px;
}

.team-contact-email svg {
  flex-shrink: 0;
  color: var(--turquoise);
}

/* bouton copier */
button.team-contact-email {
  cursor: pointer;
}

.team-contact-email .icon-check { display: none; }
.team-contact-email.copied {
  background: rgba(43, 216, 194, 0.16);
  border-color: var(--turquoise);
}
.team-contact-email.copied .icon-copy { display: none; }
.team-contact-email.copied .icon-check { display: block; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .team-name { font-size: 1.6rem; }
  .team-body { padding: 24px; }
}

@media (max-width: 700px) {
  .team-section { padding-top: 32px; }

  .team-grid { gap: 20px; margin-top: 28px; }

  /* Photo au-dessus du texte, quelle que soit la carte. */
  .team-card,
  .team-card:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .team-card:nth-child(even) .team-photo { order: 0; }

  .team-photo { aspect-ratio: 4 / 3; }
  .team-photo img { object-position: 50% 25%; }
  .team-photo img.photo-jeremie { object-position: 50% 30%; }

  .team-body { padding: 22px 20px 24px 20px; }
  .team-name { font-size: 1.5rem; }
  .team-role { letter-spacing: 0.16em; }

  .team-contact-layout {
    grid-template-columns: 1fr;
  }
  .team-m3d { height: 220px; }
  /* la zone vide autour de la plaque est rognee : l'ombre au sol vient toucher le filet degrade du bloc contact */
  .team-office { margin: -30px 0 -22px; }
  .team-contact-card { padding: 24px 22px 32px; align-items: center; text-align: center; }
  .team-contact-card::before {
    left: 18%; right: 18%; top: 0; bottom: auto; width: auto; height: 1px;
    background: linear-gradient(90deg, rgba(43, 216, 194, 0) 0%, rgba(43, 216, 194, 0.7) 50%, rgba(43, 216, 194, 0) 100%);
  }

  .team-contact-email {
    font-size: 0.95rem;
    padding: 13px 20px;
    max-width: 100%;
  }
}
