/* Composant carrousel — toutes les règles sont scopées sous .hlc-carousel
   pour ne pas entrer en conflit avec le CSS existant du portfolio. */

.hlc-carousel {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.hlc-stage {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hlc-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  padding-bottom: 90px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.hlc-slide.hlc-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.hlc-glow::before {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  width: 65%;
  height: 65%;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(to right bottom, rgba(182, 213, 255, 0.35), transparent 60%);
}

.hlc-media {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.hlc-anim {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  transform: scale(1.2);
  transform-origin: center;
}

.hlc-copy {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2.5rem 2rem 1rem;
  text-align: left;
  box-sizing: border-box;
}

.hlc-copy h2 {
  margin: 0 0 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
}

.hlc-copy p {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.625;
  color: #555;
}

@media (max-width: 560px) {
  .hlc-slide {
    flex-direction: column;
    overflow-y: auto;
  }

  .hlc-media,
  .hlc-copy {
    width: 100%;
  }

  .hlc-copy {
    text-align: center;
    padding: 1rem 1.5rem 1.5rem;
  }
}

.hlc-buttons {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 90px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

.hlc-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.85rem 1rem;
  cursor: pointer;
  border: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  opacity: 0.55;
  transition: opacity 0.3s ease;
  font: inherit;
}

.hlc-btn:last-child {
  border-right: none;
}

.hlc-btn.hlc-active {
  opacity: 1;
}

.hlc-btn h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.hlc-btn p {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hlc-btn .hlc-progress-bar {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 0%;
  background: rgba(0, 0, 0, 0.08);
}

/* En dessous de 560px, le layout 50/50 (image | texte) + barre d'onglets
   plaquée en absolu sur le bas de la stage ne tient plus : la stage a une
   hauteur fixe (460px) pensée pour le desktop, donc le texte et les onglets
   se retrouvaient coupés / superposés sur l'image. On repasse la slide
   active en flux normal (hauteur auto, une seule slide affichée à la fois)
   et la barre d'onglets sous la stage au lieu de par-dessus.
   Placé en fin de fichier pour primer sur les règles de base ci-dessus
   (même spécificité, l'ordre dans le fichier tranche). */
@media (max-width: 560px) {
  .hlc-stage {
    height: auto;
    border-radius: 20px 20px 0 0;
  }

  .hlc-slide {
    position: relative;
    display: none;
    padding-bottom: 0;
  }

  .hlc-slide.hlc-active {
    display: flex;
  }

  .hlc-buttons {
    position: static;
    min-height: auto;
    border-radius: 0 0 20px 20px;
    grid-template-columns: 1fr;
  }

  .hlc-btn {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .hlc-btn:last-child {
    border-bottom: none;
  }
}
