/**
 * Styles pour le widget Hero (HB – Hero)
 * 
 * Fournit les styles de base pour l'affichage du widget Hero.
 * Les styles peuvent être surchargés via les contrôles Elementor.
 *
 * @package Hugo_Blocks_For_Elementor
 * @since 1.0.0
 */

/* ========================================
   SECTION HERO
   ======================================== */

.hb-hero {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Layouts spécifiques */
.hb-hero--columns {
  align-items: stretch;
}

.hb-hero--columns_reverse {
  align-items: stretch;
}

.hb-hero--three_columns {
  align-items: stretch;
}

.hb-hero--grid {
  align-items: stretch;
}

/* Overlay sombre pour améliorer la lisibilité du texte */
.hb-hero--has-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* ========================================
   WRAPPER INTERNE
   ======================================== */

.hb-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 80px 20px;
}

/* Layout en colonnes */
.hb-hero__inner--columns {
  display: flex;
  align-items: center;
  gap: 40px;
  text-align: left;
  padding: 60px 20px;
}

.hb-hero__inner--three-columns {
  display: flex;
  align-items: center;
  gap: 30px;
  text-align: left;
  padding: 60px 20px;
}

.hb-hero__inner--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  text-align: center;
  padding: 60px 20px;
}

/* Colonnes */
.hb-hero__column {
  flex: 1;
}

.hb-hero__column--content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hb-hero__column--spacer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.hb-hero__column--cta {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grille */
.hb-hero__grid-item--spacer {
  order: 1;
  min-height: 200px;
}

.hb-hero__grid-item--content {
  order: 2;
}

/* ========================================
   TITRE PRINCIPAL
   ======================================== */

.hb-hero__title {
  margin: 0 0 20px 0;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

/* ========================================
   SOUS-TITRE
   ======================================== */

.hb-hero__subtitle {
  margin: 0 0 25px 0;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.4;
  color: #f0f0f0;
}

/* ========================================
   CONTENU
   ======================================== */

.hb-hero__content {
  margin: 0 auto 30px auto;
  max-width: 800px;
  font-size: 1rem;
  line-height: 1.6;
  color: #e0e0e0;
}

.hb-hero__content p {
  margin-bottom: 1em;
}

.hb-hero__content p:last-child {
  margin-bottom: 0;
}

/* ========================================
   BOUTON CTA
   ======================================== */

.hb-hero__cta {
  display: inline-block;
  padding: 15px 35px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background-color: #0073aa;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.hb-hero__cta:hover {
  background-color: #005177;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #ffffff;
  text-decoration: none;
}

.hb-hero__cta:active {
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE - TABLETTES
   ======================================== */

@media screen and (max-width: 1024px) {
  .hb-hero {
    min-height: 400px;
  }

  .hb-hero__inner {
    padding: 60px 20px;
  }

  .hb-hero__inner--columns,
  .hb-hero__inner--three-columns {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .hb-hero__inner--grid {
    gap: 20px;
  }

  .hb-hero__title {
    font-size: 2.5rem;
  }

  .hb-hero__subtitle {
    font-size: 1.25rem;
  }
}

/* ========================================
   RESPONSIVE - MOBILES
   ======================================== */

@media screen and (max-width: 768px) {
  .hb-hero {
    min-height: 350px;
  }

  .hb-hero__inner {
    padding: 40px 15px;
  }

  .hb-hero__title {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .hb-hero__subtitle {
    font-size: 1.1rem;
    margin-bottom: 20px;
  }

  .hb-hero__content {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  .hb-hero__cta {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
}

/* ========================================
   PARALLAX AVANCÉ
   ======================================== */

/* Conteneur parallax */
.hb-hero--parallax {
  overflow: hidden;
}

/* Image de fond avec parallax */
.hb-hero--parallax .hb-hero__bg {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform;
}

/* Contenu avec parallax */
.hb-hero--parallax .hb-hero__inner {
  position: relative;
  z-index: 2;
  will-change: transform;
}

/* Parallax vertical */
.hb-hero--parallax[data-parallax-direction="vertical"] .hb-hero__bg,
.hb-hero--parallax[data-parallax-direction="both"] .hb-hero__bg {
  transform: translateY(var(--parallax-bg-y, 0));
}

.hb-hero--parallax[data-parallax-direction="vertical"] .hb-hero__inner,
.hb-hero--parallax[data-parallax-direction="both"] .hb-hero__inner {
  transform: translateY(var(--parallax-content-y, 0));
}

/* Parallax horizontal */
.hb-hero--parallax[data-parallax-direction="horizontal"] .hb-hero__bg,
.hb-hero--parallax[data-parallax-direction="both"] .hb-hero__bg {
  transform: translateX(var(--parallax-bg-x, 0));
}

.hb-hero--parallax[data-parallax-direction="horizontal"] .hb-hero__inner,
.hb-hero--parallax[data-parallax-direction="both"] .hb-hero__inner {
  transform: translateX(var(--parallax-content-x, 0));
}

/* Parallax les deux directions */
.hb-hero--parallax[data-parallax-direction="both"] .hb-hero__bg {
  transform: translate(var(--parallax-bg-x, 0), var(--parallax-bg-y, 0));
}

.hb-hero--parallax[data-parallax-direction="both"] .hb-hero__inner {
  transform: translate(
    var(--parallax-content-x, 0),
    var(--parallax-content-y, 0)
  );
}

/* ========================================
   EFFET DE TYPING
   ======================================== */

/* Conteneur typing */
.hb-hero--typing .hb-hero__title {
  position: relative;
}

/* Texte en cours de frappe */
.hb-hero__typing-text {
  display: inline-block;
}

/* Curseur clignotant */
.hb-hero__typing-cursor {
  display: inline-block;
  animation: typing-cursor-blink 1s infinite;
  margin-left: 2px;
}

@keyframes typing-cursor-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Animation de frappe */
.hb-hero--typing .hb-hero__typing-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid transparent;
}

/* ========================================
   PARTICULES FLOTTANTES
   ======================================== */

/* Conteneur des particules */
.hb-hero--particles {
  position: relative;
  overflow: hidden;
}

/* Canvas des particules */
.hb-hero__particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Particules individuelles */
.hb-hero__particle {
  position: absolute;
  pointer-events: none;
  z-index: 10;
}

/* Formes des particules */
.hb-hero__particle--circle {
  border-radius: 50%;
}

.hb-hero__particle--square {
  border-radius: 0;
}

.hb-hero__particle--triangle {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid currentColor;
  background: none;
}

.hb-hero__particle--star {
  background: none;
  position: relative;
}

.hb-hero__particle--star::before,
.hb-hero__particle--star::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: currentColor;
  transform: rotate(45deg);
}

.hb-hero__particle--star::after {
  transform: rotate(-45deg);
}

/* Animation des particules */
@keyframes particle-float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

.hb-hero__particle {
  animation: particle-float linear infinite;
}

/* ========================================
   ANIMATIONS D'ENTRÉE
   ======================================== */

/* État initial des éléments animés */
.hb-hero--animated [data-animation] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

/* Animations spécifiques */
.hb-hero--animated [data-animation="fadeIn"] {
  opacity: 0;
  transform: none;
}

.hb-hero--animated [data-animation="slideInUp"] {
  opacity: 0;
  transform: translateY(50px);
}

.hb-hero--animated [data-animation="slideInDown"] {
  opacity: 0;
  transform: translateY(-50px);
}

.hb-hero--animated [data-animation="slideInLeft"] {
  opacity: 0;
  transform: translateX(-50px);
}

.hb-hero--animated [data-animation="slideInRight"] {
  opacity: 0;
  transform: translateX(50px);
}

.hb-hero--animated [data-animation="zoomIn"] {
  opacity: 0;
  transform: scale(0.8);
}

.hb-hero--animated [data-animation="bounceIn"] {
  opacity: 0;
  transform: scale(0.3);
}

.hb-hero--animated [data-animation="flipInX"] {
  opacity: 0;
  transform: rotateX(-90deg);
}

.hb-hero--animated [data-animation="flipInY"] {
  opacity: 0;
  transform: rotateY(-90deg);
}

/* État final des animations */
.hb-hero--animated [data-animation].hb-animated {
  opacity: 1;
  transform: none;
}

/* Animation bounce spécifique */
.hb-hero--animated [data-animation="bounceIn"].hb-animated {
  animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   RESPONSIVE - PETITS MOBILES
   ======================================== */

@media screen and (max-width: 480px) {
  .hb-hero {
    min-height: 300px;
  }

  .hb-hero__inner {
    padding: 30px 10px;
  }

  .hb-hero__title {
    font-size: 1.75rem;
    margin-bottom: 12px;
  }

  .hb-hero__subtitle {
    font-size: 1rem;
    margin-bottom: 18px;
  }

  .hb-hero__content {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .hb-hero__cta {
    padding: 10px 24px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 280px;
  }
}
