/*
 * Vorstand — design validé : cartes modernes, portraits circulaires,
 * première carte bleue et composition 5 + 4 sur grand écran.
 * Cette feuille est chargée en dernier pour isoler ce rendu.
 */
.containertree {
  position: relative;
  scroll-margin-top: 75px;
  overflow: hidden;
  padding: clamp(56px, 7vw, 84px) 5%;
  background: #f3f7fa;
}

.containertree .row {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
}

.tree-title {
  position: relative;
  width: fit-content;
  margin: 0 auto clamp(30px, 4vw, 42px);
  padding: 0 0 14px;
  color: var(--color-primary-dark);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: 0;
  text-transform: none;
}

.tree-title::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 52px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-primary);
  content: "";
  transform: translateX(-50%);
}

.tree ul {
  margin: 0;
  padding: 0;
}

.tree .top-row,
.tree .bottom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 100%;
  padding: 0;
  list-style: none;
}

.tree .bottom-row {
  margin-top: 20px;
}

.tree .board-card {
  position: relative;
  display: flex;
  overflow: hidden;
  width: clamp(190px, 16vw, 216px);
  min-height: 232px;
  padding: 22px 18px 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--color-primary-dark);
  background: #ffffff;
  border: 1px solid rgba(6, 35, 61, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(19, 34, 56, 0.08);
  text-align: center;
}

.tree .board-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: rgba(11, 111, 159, 0.72);
  content: "";
}

.tree .top-row .board-president-card:first-child {
  color: #ffffff;
  background: linear-gradient(150deg, #0b6f9f 0%, #06233d 100%) !important;
  border-color: transparent;
  box-shadow: 0 14px 32px rgba(6, 35, 61, 0.24);
}

.tree .top-row .board-president-card:first-child::before {
  background: rgba(255, 255, 255, 0.72);
}

.tree .board-card img,
.tree .board-card img.portrait-zoom-light,
.tree .board-card img.portrait-zoom-medium {
  --portrait-scale: 1;
  --portrait-hover-scale: 1.035;
  display: block;
  width: 116px;
  max-width: none;
  height: 116px;
  max-height: none;
  flex: 0 0 116px;
  margin: 0;
  object-fit: cover;
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(11, 111, 159, 0.14), 0 8px 18px rgba(19, 34, 56, 0.12);
  transform: scale(var(--portrait-scale));
}

.tree .board-card img.portrait-zoom-light {
  --portrait-scale: 1.045;
  --portrait-hover-scale: 1.07;
}

.tree .board-card img.portrait-zoom-medium {
  --portrait-scale: 1.075;
  --portrait-hover-scale: 1.1;
}

.tree .board-card span,
.tree .top-row .board-president-card:first-child span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0;
  overflow: visible;
  color: var(--color-primary-dark);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.015em;
  text-transform: none;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.tree .top-row .board-president-card:first-child span,
.tree .top-row .board-president-card:first-child:hover span {
  color: #ffffff;
}

.tree .top-row .board-president-card:first-child img {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 10px 22px rgba(0, 0, 0, 0.22);
  transform: scale(1.07);
}

.tree .board-card:hover {
  color: var(--color-primary-dark);
  background: #fff7dc !important;
  border-color: rgba(232, 199, 93, 0.72);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(19, 34, 56, 0.14);
}

.tree .board-card:hover::before {
  background: #e8c75d;
}

.tree .board-card:hover img {
  box-shadow: 0 0 0 2px rgba(232, 199, 93, 0.66), 0 8px 18px rgba(19, 34, 56, 0.12);
}

.tree .top-row .board-president-card:first-child:hover {
  color: #ffffff;
  background: linear-gradient(150deg, #0d7dad 0%, #08304f 100%) !important;
  border-color: transparent;
}

.tree .top-row .board-president-card:first-child:hover::before {
  background: #e8c75d;
}

.tree .board-card:hover img {
  transform: scale(var(--portrait-hover-scale));
}

.tree .top-row .board-president-card:first-child:hover img {
  box-shadow: 0 0 0 3px rgba(232, 199, 93, 0.72), 0 10px 22px rgba(0, 0, 0, 0.22);
  transform: scale(1.1);
}

@media (max-width: 760px) {
  .containertree {
    padding: 56px 18px;
  }

  .tree .top-row,
  .tree .bottom-row {
    gap: 14px;
  }

  .tree .bottom-row {
    margin-top: 14px;
  }

  .tree .board-card {
    width: min(210px, calc(50vw - 25px));
    min-height: 224px;
    padding: 18px 13px;
    gap: 14px;
  }

  .tree .board-card img,
  .tree .board-card img.portrait-zoom-light,
  .tree .board-card img.portrait-zoom-medium {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
  }

  .tree .board-card span,
  .tree .top-row .board-president-card:first-child span {
    min-height: 42px;
    font-size: 0.78rem;
  }
}

@media (max-width: 430px) {
  .tree .board-card {
    width: min(100%, 280px);
    min-height: 218px;
  }
}
