/* ===============================
   Team Details — Variables & Global
   =============================== */
.team-member-detail {
  --gap: 1rem;
  --radius: 16px;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #fff;
  --bg-alt: #fafafa;
  --hover: #f0f9ff;
  --text: #111827;
}

/* Cards */
.team-member-detail .card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin-bottom: 1rem;
  box-sizing: border-box;
}

/* ===============================
   Header bloc (profile section)
   =============================== */
.tm-header {
  display: grid;
  grid-template-columns: 1fr 280px; /* texte large à gauche, photo large à droite */
  gap: var(--gap);
  align-items: center;
}

.tm-id {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tm-photo-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.tm-photo {
  width: 280px;
  height: 280px;
  border-radius: 50%; /* cercle parfait */
  object-fit: cover;
  background: #f3f4f6;
  border: 2px solid var(--border);
}

.tm-title {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.2;
  color: var(--text);
}
.tm-role {
  margin: .25rem 0 0;
  color: var(--muted);
}
.tm-contacts {
  margin-top: .75rem;
  display: flex;
  gap: .4rem;               /* petit espace entre mail et tel */
  font-size: .95rem;
}

.tm-desc {
  color: var(--text);
  line-height: 1.6;
}
.section-title {
  margin: 0 0 .75rem;
  font-size: 1.15rem;
  color: var(--text);
}
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.tm-flag {
  width: 24px;
  height: 18px;
  border-radius: 2px;
  border: 1px solid var(--border);
  vertical-align: text-bottom;
}
.project-title a,
.pub-title a,
.mc-title a { text-decoration: none; }
.project-meta { color: var(--muted); font-style: italic; }

/* ===============================
   Tables — Moderne, zébré, hover
   =============================== */
.team-member-detail table,
.table-modern {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: .95rem;
}

/* Masquer les noms de colonnes */
.team-member-detail table thead,
.table-modern thead {
  display: none !important;
  visibility: hidden !important;
}
.team-member-detail table th,
.table-modern th {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

/* Cellules */
.team-member-detail table tbody td,
.table-modern tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
  color: var(--text);
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Zébrage + hover */
.team-member-detail table tbody tr:nth-child(odd),
.table-modern tbody tr:nth-child(odd) { background-color: var(--bg-alt); }
.team-member-detail table tbody tr:nth-child(even),
.table-modern tbody tr:nth-child(even) { background-color: var(--bg); }
.team-member-detail table tbody tr:hover,
.table-modern tbody tr:hover { background-color: var(--hover); transition: background .2s ease; }

/* Coins arrondis */
.team-member-detail table tbody tr:last-child td:first-child,
.table-modern tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.team-member-detail table tbody tr:last-child td:last-child,
.table-modern tbody tr:last-child td:last-child { border-bottom-right-radius: 12px; }

/* Première colonne en gras */
.team-member-detail table tbody td:first-child,
.table-modern tbody td:first-child { font-weight: 600; }

/* ===============================
   Projects table
   =============================== */
.table-projects { table-layout: fixed; width: 100%; }
.table-projects td:nth-child(1){ width:25%; }
.table-projects td:nth-child(2){ width:55%; }
.table-projects td:nth-child(3){ width:20%; text-align:right; }
.table-projects td:nth-child(2),
.table-projects .project-slogan {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto;
  line-height: 1.4;
}
.table-projects .project-title {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ===============================
   Publications & Media
   =============================== */
.table-publications tbody td:nth-child(4), /* Year */
.table-media       tbody td:nth-child(2), /* Date */
.table-media       tbody td:nth-child(5)  /* Type */
{ white-space: nowrap }

.table-media { table-layout: fixed; width: 100%; }
.table-media td:nth-child(1){ width:25%; } /* Media */
.table-media td:nth-child(2){ width:15%; } /* Date */
.table-media td:nth-child(3){ width:10%; } /* Country */
.table-media td:nth-child(4){ width:35%; } /* Title */
.table-media td:nth-child(5){ width:15%; } /* Type */

/* ===============================
   Wrapper optionnel
   =============================== */
.table-responsive { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.table-responsive table { width:100%; }

/* ===============================
   Responsive
   =============================== */
@media (max-width:900px){
  .tm-header {
    grid-template-columns: 1fr; /* pile en colonne */
    text-align: center;
  }
  .tm-photo {
    width: 180px;
    height: 180px;
    margin: 1rem auto 0;
  }
}

@media (max-width:640px){
  .team-member-detail table,
  .table-modern { font-size:.93rem; }
  .team-member-detail table tbody td,
  .table-modern tbody td { padding:.75rem .85rem; }
}
