@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");

:root {
  --era-blue: #212b55;
  --era-light-blue: #80a8fa;
  --era-band: #a8c5f0;
  --era-orange: #ff4000;
  --era-radius: 16px;
  --era-gap: 60px;
  /* --era-card-w: clamp(140px, 15vw, 200px); */
  --era-card-w: clamp(120px, 12vw, 170px);

  --era-speed: 0.32s;
  /* --era-indent: clamp(160px, 18vw, 280px); */
  /* --era-indent: clamp(220px, 25vw, 380px); */
  --era-indent: clamp(260px, 28vw, 420px);
  /* --era-indent: clamp(300px, 32vw, 480px); */

  /* --era-arrow-space: 56px;  */
  --era-arrow-space: 70px;
}

.era-team {
  width: 100%;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   ROW = flex [header | photos] — la ligne traverse toute la rangée
═══════════════════════════════════════════════════════ */
.era-row {
  display: flex;
  align-items: flex-end; /* titre + photos alignés en bas */
  border-bottom: 2px solid var(--era-blue);
  width: 100%;
}

/* ═══════════════════════════════════════════════════════
   HEADER (colonne gauche fixe)
═══════════════════════════════════════════════════════ */
.era-header {
  flex: 0 0 var(--era-indent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 40px 0px 40px 0; /* espace entre titre et ligne */
  cursor: pointer;
  text-align: left;
}
.era-section.is-active .era-header {
  flex: 0 0 var(--era-indent);
  padding: 40px 60px 40px 0;
}
.era-header__label {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--era-blue);
  transition: color var(--era-speed);
}
.era-section.is-active .era-header__label {
  color: var(--era-light-blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.era-header__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--era-blue);
  transition: transform var(--era-speed);
}
.era-header__chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}
.era-section.is-active .era-header__chevron {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════
   PHOTOS (colonne droite flex: 1)
═══════════════════════════════════════════════════════ */
.era-photos {
  flex: 1 1 0;
  min-width: 0; /* autorise le rétrécissement */
  position: relative; /* ancre pour arrows absolute + ::before */
  padding-top: var(--era-arrow-space);
}
/* .era-section:first-child {
  margin-top: var(--era-arrow-space);
} */

/* Bande bleue continue derrière les photos */
.era-photos::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--era-arrow-space) + 45%);
  height: 22%;
  background: var(--era-band);
  z-index: 0;
  border-top-left-radius: var(--era-radius);
  border-bottom-left-radius: var(--era-radius);
  pointer-events: none;
  width: 200%;
  transform: translateX(-60px);
}

/* Flèches en haut à droite, au-dessus des photos */
.era-photos__arrows {
  position: absolute;
  top: 18px;
  right: 8px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

/* Viewport photos */
.era-photos__vp {
  position: relative;
  z-index: 1;
  overflow: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
}
.era-photos__track {
  display: flex;
  gap: var(--era-gap);
}

/* Photo card */
.era-pcard {
  flex: 0 0 var(--era-card-w);
  width: var(--era-card-w);
  scroll-snap-align: start; /* ← ajouter */
}
.era-pcard__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
}
.era-pcard__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ═══════════════════════════════════════════════════════
   INFOS ROW noms/rôles (sous la ligne)
═══════════════════════════════════════════════════════ */
.era-infos {
  margin-left: var(--era-indent);
  padding: 10px 0 20px;
}

.era-infos__vp {
  overflow: hidden;
}
.era-infos__track {
  display: flex;
  gap: var(--era-gap);
  will-change: transform; /* sync JS via translate3d */
  transition: none;
}

.era-icard {
  flex: 0 0 var(--era-card-w);
  width: var(--era-card-w);
  text-align: center;
}
.era-icard__name {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--era-blue);
  font-weight: 300;
}
.era-icard__name strong {
  font-weight: 700;
  display: block;
}
.era-icard__role {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--era-orange);
}

/* ═══════════════════════════════════════════════════════
   ARROWS
═══════════════════════════════════════════════════════ */
.era-arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  background: transparent;
  color: var(--orange);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background var(--era-speed),
    color var(--era-speed);
}
.era-arrow:hover {
  background: var(--orange);
  color: #fff;
}
.era-arrow svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   DESKTOP
═══════════════════════════════════════════════════════ */
@media (min-width: 981px) {
  .era-header__chevron {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  :root {
    --era-indent: 0px;
    --era-card-w: 110px;
    --era-arrow-space: 0px;
  }

  /* En mobile : titre au-dessus, photos en dessous (stack vertical) */
  .era-row {
    display: block;
    border-bottom: none; /* la ligne est portée par le header */
  }

  .era-header {
    flex: initial;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1.5px solid var(--era-blue);
  }
  .era-header__label {
    font-size: 14px;
  }

  .era-photos {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .era-photos::before {
    top: calc(12px + 45%);
    left: -20px;
    right: -20px;
  }

  .era-photos__arrows {
    display: none;
  }

  /* Swipe natif sur mobile */
  .era-photos__vp {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .era-photos__vp::-webkit-scrollbar {
    display: none;
  }
  .era-pcard {
    /* scroll-snap-align: start; */
  }

  .era-infos {
    margin-left: 0;
    padding: 8px 0 16px;
  }

  .era-icard__name {
    font-size: 9px;
  }
  .era-icard__role {
    font-size: 8px;
  }
  .era-pcard__img {
    aspect-ratio: 3 / 3.5;
  }
  .era-icard__name {
    font-size: 11px;
  }
  .era-icard__role {
    font-size: 10px;
  }
}

/* ═══════════════════════════════════════════════════════
   SOUS-CATÉGORIE : séparateur dans les tracks
═══════════════════════════════════════════════════════ */
.era-pcard {
  position: relative;
}

.era-subcat__label {
  position: absolute;
  bottom: 0;

  left: 0;
  /* left: 50%; */
  /* transform: translateX(-50%); */
  background: var(--era-orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0 18px 0 10px;
  line-height: 2.5;
  white-space: nowrap;
  z-index: 2;
  border-radius: 0;
  border-top-left-radius: 10px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.era-subcat__label::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 10px solid var(--era-orange);
}