/* =========================================================
   STYLE INDEX - Page d'accueil AFEVAG
========================================================= */

.hero-home {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 1.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero-home::before {
  content: "";
  position: absolute;
  top: 8%;
  right: -6%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ffb703, #d7263d, #1b9c66, #ffb703);
  filter: blur(60px);
  opacity: 0.08;
  animation: pulseGlow 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.06; }
  50% { transform: scale(1.12); opacity: 0.12; }
}

/* =========================================================
   ÉLÉMENTS ANIMÉS JOYEUX
========================================================= */
.hero-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.hero-decorations span {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.25;
  animation: floatDecoration 6s ease-in-out infinite;
}

/* Étoiles */
.deco-star {
  color: #ffb703;
  animation-duration: 4s !important;
}

.star-1 { top: 5%; left: 3%; font-size: 2rem; animation-delay: 0s; }
.star-2 { top: 12%; right: 5%; font-size: 1.6rem; animation-delay: 1.2s; }
.star-3 { bottom: 25%; left: 2%; font-size: 1.8rem; animation-delay: 2.4s; }
.star-4 { bottom: 10%; right: 4%; font-size: 2.2rem; animation-delay: 3.6s; }

/* Diamants */
.deco-diamond {
  color: #d7263d;
  animation-duration: 5s !important;
}
.diamond-2 {
  top: 30%; right: 2%; font-size: 1.2rem;
  color: #1b9c66;
  animation-delay: 1s;
}

/* Cercles */
.deco-circle {
  color: #ff9200;
  animation-duration: 4.5s !important;
}
.circle-2 {
  bottom: 35%; left: 4%; font-size: 0.9rem;
  color: #ffb703;
  animation-delay: 2s;
}

/* Étincelles */
.deco-sparkle {
  color: #f1c40f;
  animation-duration: 3.5s !important;
}
.sparkle-2 {
  top: 45%; right: 6%; font-size: 1rem;
  color: #d7263d;
  animation-delay: 1.5s;
}

/* Cœurs */
.deco-heart {
  color: #ff6b6b;
  animation-duration: 5.5s !important;
}
.heart-2 {
  bottom: 15%; right: 3%; font-size: 1.1rem;
  color: #ffb703;
  animation-delay: 2.5s;
}

/* Triangles */
.deco-triangle {
  color: #1b9c66;
  animation-duration: 4.8s !important;
}
.triangle-2 {
  top: 55%; left: 1%; font-size: 1rem;
  color: #ff9200;
  animation-delay: 1.8s;
}

@keyframes floatDecoration {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.15;
  }
  25% {
    transform: translateY(-20px) rotate(15deg) scale(1.3);
    opacity: 0.4;
  }
  50% {
    transform: translateY(15px) rotate(-15deg) scale(0.8);
    opacity: 0.2;
  }
  75% {
    transform: translateY(-10px) rotate(8deg) scale(1.1);
    opacity: 0.35;
  }
}

/* ===== TOP : BIENVENUE ===== */
.hero-top {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  padding: 0.5rem 0;
}

/* ===== TEXTE ANIMÉ EN HAUT - TRÈS GRAND + ORANGE ===== */
.animated-title {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 1.05;
  text-align: center;
  position: relative;
  min-height: 120px;
  color: #ff9200;
  font-weight: 800;
  font-family: var(--font-heading);
  text-shadow: 0 0 60px rgba(255, 146, 0, 0.08);
}

.animated-title .highlight-text {
  color: var(--color-primary);
}

/* ===== MIDDLE : IMAGES + TEXTE CENTRAL ===== */
.hero-middle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
  z-index: 1;
  padding: 0.5rem 0;
}

.home-image {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.5rem;
  flex: 0 0 auto;
}

.home-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.08));
}

.home-image-left img {
  max-width: 320px;
  animation: floatBottom 4s ease-in-out infinite;
}

.home-image-right img {
  max-width: 480px;
  animation: floatRight 4s ease-in-out infinite;
}

@keyframes floatRight {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes floatBottom {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(15px) rotate(-2deg); }
}

/* ===== TEXTE CENTRAL - DÉGRADÉ NOIR ET ORANGE ===== */
.hero-center-text {
  text-align: center;
  padding: 0 1rem;
  flex: 0 0 auto;
  max-width: 500px;
}

.hero-center-text h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  line-height: 1.15;
  font-family: var(--font-heading);
  font-weight: 700;
  
  /* Dégradé noir → orange */
  background: linear-gradient(135deg, #1a1a1a 0%, #1a1a1a 30%, #ff9200 65%, #ffb703 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  
  /* Effet de brillance sur le dégradé */
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Version avec b pour les mots en gras */
.hero-center-text h2 b {
  background: linear-gradient(135deg, #1a1a1a 0%, #1a1a1a 30%, #ff9200 65%, #ffb703 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* ===== TEXTE MACHINE A ECRIRE ===== */
.typewriter-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typingLine 2s steps(30, end) forwards;
}

.typewriter-line:nth-child(1) { animation-delay: 0s; }
.typewriter-line:nth-child(2) { animation-delay: 2s; }
.typewriter-line:nth-child(3) { animation-delay: 4s; }

@keyframes typingLine {
  from { width: 0; }
  to { width: 100%; }
}

/* ===== FADE TEXT ===== */
.fade-text {
  opacity: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeInOut 12s infinite;
  white-space: nowrap;
  color: #ff9200;
  text-shadow: 0 0 40px rgba(255, 146, 0, 0.1);
}

.fade-text:nth-child(1) { animation-delay: 0s; }
.fade-text:nth-child(2) { animation-delay: 3s; }
.fade-text:nth-child(3) { animation-delay: 6s; }
.fade-text:nth-child(4) { animation-delay: 9s; }

@keyframes fadeInOut {
  0%, 18%, 34%, 50%, 100% { 
    opacity: 0; 
    transform: translateX(-50%) scale(0.9); 
  }
  8%, 25% { 
    opacity: 1; 
    transform: translateX(-50%) scale(1); 
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 960px) {
  .hero-middle {
    flex-direction: column;
    gap: 1.5rem;
  }

  .home-image-left img {
    max-width: 240px;
  }

  .home-image-right img {
    max-width: 280px;
  }

  .hero-center-text {
    max-width: 100%;
    padding: 0.5rem 0;
  }

  .hero-center-text h2 {
    font-size: 2.8rem;
  }

  .animated-title {
    font-size: clamp(3rem, 8vw, 5rem);
    min-height: 80px;
  }

  .fade-text {
    white-space: normal;
  }

  .hero-decorations {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-home {
    min-height: auto;
    padding: 1rem 0 2rem;
  }

  .animated-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    min-height: 60px;
  }

  .hero-top {
    margin-bottom: 0.8rem;
  }

  .home-image-left img {
    max-width: 180px;
  }

  .home-image-right img {
    max-width: 200px;
  }

  .hero-center-text h2 {
    font-size: 2rem;
  }

  .fade-text {
    white-space: normal;
  }

  .hero-decorations {
    display: none;
  }
}

@media (max-width: 460px) {
  .animated-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    min-height: 50px;
  }

  .home-image-left img {
    max-width: 140px;
  }

  .home-image-right img {
    max-width: 160px;
  }

  .hero-center-text h2 {
    font-size: 1.6rem;
  }

  .hero-middle {
    gap: 0.8rem;
  }

  .hero-decorations {
    display: none;
  }
}