/* Animations de titre illustrant le boost et la social proof */

.title-section {
  margin-top: 2rem; /* Ajoute de l'espace en haut pour compenser la suppression du tagline */
  margin-bottom: 1rem;
  overflow: hidden;
  width: 100%;
  padding: 0 var(--spacing-sm);
}

.title {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 3.8rem; /* Taille réduite */
  line-height: 1.1;
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  width: 100%;
  color: #000B10;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .title {
    font-size: 3.2rem;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2.8rem;
  }
}

/* Animation de chaque mot avec un effet d'apparition dynamique */
.title span {
  display: inline-block;
  margin-right: 0.8rem;
  margin-bottom: 0.5rem;
  position: relative;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  animation: wordBoost 0.6s cubic-bezier(0.17, 0.89, 0.32, 1.49) forwards; /* Effet rebondissant */
}

/* Timing des mots pour créer un effet de vague ascendante */
.word-1 { animation-delay: 0.1s; }
.word-2 { animation-delay: 0.2s; }
.word-3 { animation-delay: 0.3s; }
.word-4 { animation-delay: 0.4s; }
.word-5 { animation-delay: 0.5s; }
.word-6 { animation-delay: 0.6s; }
.word-7 { animation-delay: 0.7s; }

/* Mise en évidence des mots clés avec animation de commentaires */
.word-3, .word-4 { /* social proof */
  color: var(--primary-color);
  position: relative;
  z-index: 1;
  display: inline-block;
}

/* Effet spécial pour "social" avec petites bulles */
.word-3 {
  position: relative;
  animation: socialBubbleEffect 1s cubic-bezier(0.17, 0.89, 0.32, 1.5) forwards;
  animation-delay: 0.4s;
}

/* Petites bulles de commentaires autour de "social" */
.word-3::before, .word-3::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #7C89FF;
  border-radius: 50%;
  opacity: 0;
}

.word-3::before {
  top: -10px;
  right: 10px;
  animation: bubblePop 0.6s ease-out forwards;
  animation-delay: 0.7s;
}

.word-3::after {
  bottom: -6px;
  right: 5px;
  width: 6px;
  height: 6px;
  animation: bubblePop 0.6s ease-out forwards;
  animation-delay: 0.8s;
}

/* Style pour le mot "tout" */
.word-4 {
  font-weight: 800;
  animation: fadeInUp 0.8s cubic-bezier(0.17, 0.89, 0.32, 1.5) forwards;
  animation-delay: 0.5s;
}

/* Animation spéciale pour "publicités" qui est le point culminant */
.word-7 {
  animation: publiciteEffect 0.8s cubic-bezier(0.17, 0.89, 0.32, 1.75) forwards;
  animation-delay: 0.8s;
  position: relative;
  font-weight: 700;
}

/* Animation spéciale pour le mot ROAS - effet de boost graphique */
.highlight-word {
  position: relative;
  color: transparent;
  background: linear-gradient(120deg, var(--primary-color), #9b89ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  transform: translateY(40px) scale(0.7);
  opacity: 0;
  animation: roasBoost 0.8s cubic-bezier(0.12, 0.89, 0.32, 1.65) forwards, /* Effet propulsé */
             gradientAnim 2s linear infinite;
  animation-delay: 1.2s, 1.2s;
}

/* Graphique de croissance sous le ROAS */
.highlight-word::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background: rgba(124, 137, 255, 0.3);
  bottom: 0;
  left: 0;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: graphGrowth 1s var(--easing) forwards;
  animation-delay: 1.6s;
}

/* Indicateurs de croissance sur le graphique */
.highlight-word::before {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg,
    rgba(124, 137, 255, 0) 0%,
    rgba(124, 137, 255, 0) 30%,
    rgba(124, 137, 255, 0.4) 30%,
    rgba(124, 137, 255, 0.4) 50%,
    rgba(124, 137, 255, 0.6) 50%,
    rgba(124, 137, 255, 0.6) 75%,
    rgba(124, 137, 255, 0.8) 75%,
    rgba(124, 137, 255, 0.8) 90%,
    rgba(124, 137, 255, 1) 90%);
  z-index: 5;
  transform: scaleX(0);
  transform-origin: left;
  animation: graphIndicators 1.5s ease-in-out forwards;
  animation-delay: 1.7s;
  border-radius: 2px;
}

/* Animations */
@keyframes waveUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes wordBoost {
  0% {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
  }
  50% {
    transform: translateY(-5px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes boosterWordEffect {
  0% {
    transform: translateY(40px) scale(0.7);
    opacity: 0;
  }
  40% {
    transform: translateY(-15px) scale(1.2);
    opacity: 1;
  }
  70% {
    transform: translateY(5px) scale(0.95);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes roasBoost {
  0% {
    transform: translateY(40px) scale(0.7);
    opacity: 0;
  }
  50% {
    transform: translateY(-20px) scale(1.15);
    opacity: 1;
  }
  75% {
    transform: translateY(5px) scale(0.95);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(124, 137, 255, 0.5));
  }
}

@keyframes gradientAnim {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes graphGrowth {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes graphIndicators {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  40% {
    opacity: 0.7;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes dataBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes proofEffect {
  0% {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
  }
  50% {
    transform: translateY(-5px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes publiciteEffect {
  0% {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
  }
  60% {
    transform: translateY(-3px) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Animation pour les petites bulles autour de "social" */
@keyframes bubblePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animation spéciale pour le mot "social" */
@keyframes socialBubbleEffect {
  0% {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
  }
  60% {
    transform: translateY(-3px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    text-shadow: 0 0 8px rgba(124, 137, 255, 0.3);
  }
}

/* Animation de la bulle de commentaire sous "proof" */
@keyframes commentBubbleGrow {
  0% {
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
  }
}

/* Animation pour l'icône de chat */
@keyframes chatIconPop {
  0% {
    transform: scale(0) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.2) rotate(5deg);
    opacity: 0.9;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 0.8;
  }
}

/* Responsive design */
@media screen and (max-width: 768px) {
  .modern-title {
    font-size: 2.8rem;
  }
}

@media screen and (max-width: 480px) {
  .modern-title {
    font-size: 2.2rem;
  }
  
  .title-line {
    margin-bottom: 0.1rem;
  }
  
  .word {
    margin-right: 0.3rem;
  }
}

/* Effet 3D subtil sur le titre */
.modern-title {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.modern-title .title-line {
  transform-style: preserve-3d;
}

.highlight-word {
  position: relative;
  transform: translateZ(10px);
  transition: transform 0.3s ease;
}

.highlight-word:hover {
  transform: translateZ(20px) scale(1.05);
}
