/**
 * Hello Pomelo – Bloc Enjeux
 * File: src/css/hp-enjeux.css
 *
 * Layout desktop : header gauche (tag + H2)
 *                  grille 2 col : image (457px) | items (1fr)
 *                  chaque item : H3 + description (active seulement) + barre de progression
 * Layout mobile  : colonne unique, image 100%, titre + desc actif, contrôles
 */

/* ── Section ──────────────────────────────────────────── */
.hp-enjeux {
  background: #ffffff;
}

.hp-enjeux__inner {
  padding-top: 80px;
  padding-bottom: 80px;
}

/* ── Header (gauche) ──────────────────────────────────── */
.hp-enjeux__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 72px;
}

.hp-enjeux__tag {
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--tag-font-family, "Fustat"), sans-serif;
}

.hp-enjeux__tag-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.hp-enjeux__title {
  margin: 0;
  color: var(--secondary-blue-900, #111821);
  font-family: "Archia", sans-serif;
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -2.24px;
}

/* ── Carousel container ───────────────────────────────── */
.hp-enjeux__carousel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Image column ─────────────────────────────────────── */
.hp-enjeux__image-col {
  position: relative;
  height: 280px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--greyscale-grey-50, #F8F7F6);
}

.hp-enjeux__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-enjeux__image--active {
  opacity: 1;
  transform: scale(1);
}

.hp-enjeux__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-enjeux__img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--greyscale-grey-100, #F0EFED);
}

/* ── Items column (desktop) ───────────────────────────── */
.hp-enjeux__items-col {
  display: flex;
  flex-direction: column;
  height: 552px;
}

/* Hidden on mobile */
@media (max-width: 1023px) {
  .hp-enjeux__items-col {
    display: none !important;
  }
}

/* ── Individual item ──────────────────────────────────── */
.hp-enjeux__item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  padding-top: 24px;
  cursor: pointer;
  border-bottom: 1px solid rgba(17, 24, 33, 0.1);
}

.hp-enjeux__item-title {
  margin: 0;
  color: rgba(17, 24, 33, 0.4);
  font-family: "Fustat", sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  transition: color 0.2s ease;
}

.hp-enjeux__item--active .hp-enjeux__item-title,
.hp-enjeux__mobile-content .hp-enjeux__item-title {
  color: var(--secondary-blue-900, #111821);
}

.hp-enjeux__item-desc {
  margin-top: 16px;
  color: rgba(17, 24, 33, 0.4);
  font-family: "Fustat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.1;
}

.hp-enjeux__item-desc p {
  margin: 0;
}

/* ── Progress track ───────────────────────────────────── */
.hp-enjeux__progress-track {
  height: 1px;
  margin-top: auto;
  background: transparent;
  overflow: visible;
}

.hp-enjeux__progress-fill {
  height: 3px;
  width: 0;
  background: var(--primary-pink-500, #D9306B);
  transform: translateY(-1px);
}

.hp-enjeux__progress-fill--active {
  animation: hp-enjeux-fill 5s linear forwards;
}

@keyframes hp-enjeux-fill {
  from { width: 0% }
  to   { width: 100% }
}

/* ── Mobile content ───────────────────────────────────── */
.hp-enjeux__mobile-content {
  display: block;
}

.hp-enjeux__mobile-content p {
  margin: 16px 0 0;
  color: var(--greyscale-grey-700, #3C3C3B);
  font-size: 15px;
  line-height: 1.6;
}

/* Hidden on desktop */
@media (min-width: 1024px) {
  .hp-enjeux__mobile-content,
  .hp-enjeux__mobile-controls {
    display: none !important;
  }
}

/* ── Mobile controls ──────────────────────────────────── */
.hp-enjeux__mobile-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.hp-enjeux__mobile-progress-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-enjeux__counter {
  font-size: 13px;
  font-weight: 500;
  color: var(--greyscale-grey-700, #3C3C3B);
  white-space: nowrap;
  min-width: 28px;
}

.hp-enjeux__mobile-progress-row .hp-enjeux__progress-track {
  flex: 1;
  margin-top: 0;
}

/* ── Arrows (mobile) ──────────────────────────────────── */
.hp-enjeux__arrows {
  display: flex;
  align-items: center;
  background: var(--greyscale-grey-100, #F0EFED);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.hp-enjeux__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
}

.hp-enjeux__arrow:hover {
  background: var(--greyscale-grey-200, #DDDDD9);
}

.hp-enjeux__arrow svg {
  width: 16px;
  height: 16px;
  display: block;
  color: var(--greyscale-grey-900, #090A0C);
}

/* ── Desktop grid ─────────────────────────────────────── */
@media (min-width: 1024px) {
  .hp-enjeux__carousel {
    display: grid;
    grid-template-columns: minmax(360px, 457px) minmax(0, 1fr);
    gap: 40px;
    align-items: stretch;
  }

  .hp-enjeux__image-col {
    grid-column: 1;
    grid-row: 1;
    height: 552px;
    align-self: start;
  }

  .hp-enjeux__items-col {
    grid-column: 2;
    grid-row: 1;
  }
}

/* ── Mobile responsive ────────────────────────────────── */
@media (max-width: 767px) {
  .hp-enjeux__inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hp-enjeux__header {
    gap: 8px;
    margin-bottom: 32px;
  }

  .hp-enjeux__title {
    font-size: 36px;
    letter-spacing: -1.44px;
  }

  .hp-enjeux__image-col {
    height: 220px;
  }
}
