/* ============================================================
   HISOW TIMELINE — Slider vertical Slick
   Utilise les variables et polices définies dans style.css
   Structure source : .hisow-timeline > .wp-block-columns
   ============================================================ */

/* ── Wrapper ── */
.hisow-timeline {
  --ht-slide-h: 160px;

  position: relative;
  max-width: var(--hysow-content);
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Ligne verticale centrale */
.hisow-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hysow-color-navy);
  transform: translateX(-50%);
  border-radius: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Conteneur Slick ── */
.hisow-timeline__track {
  position: relative;
  z-index: 1;
}

.hisow-timeline__track .slick-list {
  height: calc(4 * var(--ht-slide-h)) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.hisow-timeline__track .slick-track {
  display: flex !important;
  flex-direction: column !important;
}

/* ── Slide ── */
.hisow-timeline__slide {
  position: relative !important;
  display: flex !important;
  align-items: center !important;

  height: var(--ht-slide-h) !important;
  min-height: var(--ht-slide-h) !important;
  max-height: var(--ht-slide-h) !important;

  opacity: .4;
  cursor: pointer;
  transition: opacity .4s ease;
  box-sizing: border-box;
}

.hisow-timeline__slide.slick-center,
.hisow-timeline__slide.slick-current {
  opacity: 1;
  cursor: default;
}

/* ── Année — colonne gauche ── */
.hisow-timeline__year-wrap {
  position: absolute;
  right: calc(50% + 20px);
  width: calc(50% - 32px);
  text-align: right;
}

.hisow-timeline__year {
  display: block;

  font-size: clamp(1.5rem, 1.8vw, 2.5rem);
  font-weight: 500;
  line-height: 1.14;

  color: var(--hysow-color-navy);

  transition: font-size .4s ease;
  user-select: none;
}

.hisow-timeline__slide.slick-center .hisow-timeline__year,
.hisow-timeline__slide.slick-current .hisow-timeline__year {
  font-size: clamp(1.9rem, 2.65vw, 3.125rem);
  font-weight: 800;
}

/* ── Dot central ── */
.hisow-timeline__dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  width: 10px;
  height: 10px;

  border-radius: 50%;
  background: var(--hysow-color-navy);
  border: 2px solid var(--ht-line);

  z-index: 2;
  flex-shrink: 0;

  transition:
    width .4s ease,
    height .4s ease,
    background .3s ease,
    border-color .3s ease;
}

.hisow-timeline__slide.slick-center .hisow-timeline__dot,
.hisow-timeline__slide.slick-current .hisow-timeline__dot {
  width: 16px;
  height: 16px;

  background: var(--hysow-color-navy);
  border-color: var(--hysow-color-cyan);

  animation: ht-pulse 1.6s ease-out infinite;
}

@keyframes ht-pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(24 186 217 / .5);
  }

  70% {
    box-shadow: 0 0 0 10px rgb(24 186 217 / 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgb(24 186 217 / 0);
  }
}

/* ── Colonne droite : image + description ── */
.hisow-timeline__desc-wrap {
  position: absolute;
  left: calc(50% + 20px);

  width: calc(50% - 32px);

  display: flex;
  align-items: center;
  gap: 16px;

  opacity: 0;
  transform: translateX(8px);

  transition:
    opacity .35s ease .1s,
    transform .35s ease .1s;

  pointer-events: none;
}

.hisow-timeline__slide.slick-center .hisow-timeline__desc-wrap,
.hisow-timeline__slide.slick-current .hisow-timeline__desc-wrap {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* ── Image optionnelle ── */
.hisow-timeline__img-wrap {
  width: 150px;
  height: 150px;

  flex: 0 0 150px;
  overflow: hidden;
}

.hisow-timeline__img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  border-radius: 0 !important;
}

/* ── Wrapper texte badge + description ── */
.hisow-timeline__desc-text {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

/* ── Texte description ── */
.hisow-timeline__desc {
  display: block;

  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;

  color: var(--hysow-color-navy);
}

/* ── Badge "En cours" ── */
.hisow-timeline__badge {
  display: block;
  width: fit-content;

  background: linear-gradient(
    108deg,
    var(--hysow-color-cyan) 0%,
    var(--hysow-color-cyan-dark) 45%,
    var(--hysow-color-navy) 100%
  );

  color: var(--hysow-color-white);

  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;

  padding: 3px 12px;
  margin-bottom: 5px;

  border-radius: 999px;
}

/* ── Navigation ── */
.hisow-timeline__nav {
  /* position: relative; */
  z-index: 10;
}

/* ── Flèches ── */
.ht-arrow {
  position: absolute;
  right: 0;

  z-index: 10;

  width: 2rem;
  height: 2rem;

  border-radius: 999px;
  border: 1px solid var(--hysow-color-navy);

  background: transparent;
  color: var(--hysow-color-navy);

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: .8rem;
  line-height: 1;
  font-weight: 800;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.ht-arrow:hover {
  background-color: var(--hysow-color-cyan-dark);

  transform: translateY(-2px);

  box-shadow:
    0 .5rem 1.25rem var(--hysow-color-navy-soft);
}

.ht-prev {
  top: calc(50% - 44px);
}

.ht-next {
  top: calc(50% + 12px);
}

/* Masque les flèches natives Slick */
.hisow-timeline__track .slick-prev,
.hisow-timeline__track .slick-next {
  display: none !important;
}

/* ============================================================
   TABLETTE / MOBILE
   ============================================================ */

@media (max-width: 781px) {

  .hisow-timeline {
    --ht-slide-h: 100px;
  }

  .hisow-timeline__track .slick-list {
    height: calc(4 * var(--ht-slide-h)) !important;
  }

  /* Ligne à gauche */
  .hisow-timeline::before {
    left: 18px;
    transform: none;
  }

  /* Année */
  .hisow-timeline__year-wrap {
    right: auto;
    left: 34px;

    width: calc(100% - 50px);

    text-align: left;
  }

  .hisow-timeline__year {
    font-size: clamp(1.15rem, 4vw, 1.5rem);
  }

  .hisow-timeline__slide.slick-center .hisow-timeline__year,
  .hisow-timeline__slide.slick-current .hisow-timeline__year {
    font-size: clamp(1.3rem, 5vw, 1.9rem);
  }

  /* Dot */
  .hisow-timeline__dot {
    left: 18px;
  }

  /* Description masquée */
  .hisow-timeline__desc-wrap {
    display: none;
  }

  /* Navigation */
  .ht-arrow {
    right: 8px;
  }
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  .hisow-timeline__slide,
  .hisow-timeline__year,
  .hisow-timeline__dot,
  .hisow-timeline__desc-wrap,
  .ht-arrow {
    transition-duration: .01ms !important;
    animation: none !important;
  }
}