/* =========================================================
   STYLE GALERIE - Page Galerie AFEVAG
========================================================= */

/* ===== HERO AVEC DÉCORATIONS ===== */
.hero-small {
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

/* ===== CANVAS FEUX D'ARTIFICE ===== */
#fireworks-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== DÉCORATIONS ===== */
.hero-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

.hero-decorations span {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.2;
  animation: floatDecoration 6s ease-in-out infinite;
}

.deco-star { color: #ffb703; animation-duration: 4s !important; }
.star-1 { top: 5%; left: 3%; font-size: 2rem; animation-delay: 0s; }
.star-2 { top: 10%; right: 5%; font-size: 1.6rem; animation-delay: 1.2s; }
.star-3 { bottom: 20%; left: 2%; font-size: 1.8rem; animation-delay: 2.4s; }
.star-4 { bottom: 10%; right: 4%; font-size: 2.2rem; animation-delay: 3.6s; }

.deco-diamond { color: #d7263d; animation-duration: 5s !important; }
.diamond-2 { top: 30%; right: 2%; font-size: 1.2rem; color: #1b9c66; animation-delay: 1s; }

.deco-circle { color: #ff9200; animation-duration: 4.5s !important; }
.circle-2 { bottom: 35%; left: 4%; font-size: 0.9rem; color: #ffb703; animation-delay: 2s; }

.deco-sparkle { color: #f1c40f; animation-duration: 3.5s !important; }
.sparkle-2 { top: 45%; right: 6%; font-size: 1rem; color: #d7263d; animation-delay: 1.5s; }

.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; }

.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; }
}

/* ===== CONTENU HERO - CENTRÉ ===== */
.hero-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-tagline {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  font-weight: 600;
}

/* ===== TITRE COMME LES PAGES PRESTATIONS ===== */
.intro-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 2vw, 6rem);
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0.5rem 0 1rem;
  text-shadow: 0 0 60px rgba(255, 146, 0, 0.08);
  animation: titlePulse 3s ease-in-out infinite;
  display: block;
  text-align: center;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); text-shadow: 0 0 40px rgba(255, 146, 0, 0.08); }
  50% { transform: scale(1.02); text-shadow: 0 0 80px rgba(255, 146, 0, 0.15); }
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

/* ===== DIVISEUR ===== */
.intro-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin: 0.5rem 0 0;
}

.divider-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  border-radius: 999px;
}

.divider-icon {
  color: var(--color-primary);
  font-size: 1rem;
  opacity: 0.5;
  animation: pulseDivider 2s ease-in-out infinite;
}

@keyframes pulseDivider {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.3); }
}

/* ===== SECTION HEADER AVEC TITRE ORANGE ===== */
.section-header {
  max-width: 540px;
  margin-bottom: 2rem;
}

.section-title-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 146, 0, 0.10);
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  border: 2px solid rgba(255, 146, 0, 0.15);
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

.section-title-wrapper:hover {
  background: rgba(255, 146, 0, 0.18);
  border-color: rgba(255, 146, 0, 0.30);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 146, 0, 0.10);
}

.section-icon {
  color: var(--color-primary);
  font-size: 1.2rem;
  animation: iconPulse 2s ease-in-out infinite;
}

.section-icon:first-child {
  animation-delay: 0s;
}
.section-icon:last-child {
  animation-delay: 1s;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
  50% { transform: scale(1.3) rotate(180deg); opacity: 1; }
}

.section-header h2 {
  font-size: 1.8rem;
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-heading);
  letter-spacing: 0.03em;
}

.section-header p {
  font-size: 0.96rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: 0.3rem;
}

/* =========================================================
   GALERIE GRID AVEC ANIMATIONS
========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.2rem;
}

/* Grille entreprise (3 images) */
.gallery-grid-enterprise {
  grid-template-columns: repeat(3, 1fr);
}

/* ===== GALLERY ITEM ANIMÉ ===== */
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
}

.gallery-item.gallery-item-animated.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-item::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #1b9c66, #ffb703, #d7263d, #ff9200);
  background-size: 300% 100%;
  animation: gradientMove 4s ease-in-out infinite;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(255, 146, 0, 0.15);
  border-color: rgba(255, 146, 0, 0.2);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ===== OVERLAY SUR LES IMAGES ===== */
.gallery-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: #fff;
  transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  bottom: 0;
}

.gallery-icon {
  font-size: 2rem;
  margin-bottom: 0.3rem;
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.gallery-overlay p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* ===== VIDEO GALLERY ===== */
.gallery-item-video {
  position: relative;
  background: #0a0a0a;
  overflow: hidden;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.gallery-item-video video {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #0a0a0a;
}

.gallery-item-video video::-webkit-media-controls {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.gallery-item-video .gallery-overlay {
  pointer-events: none;
}

/* =========================================================
   ABOUT STRIP
========================================================= */
.about-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.about-block {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.about-block:hover {
  border-color: rgba(255, 146, 0, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 146, 0, 0.08);
}

.about-block h2 {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.about-block h2::before {
  content: "◆";
  margin-right: 0.5rem;
  color: var(--color-primary);
  font-size: 0.8rem;
  opacity: 0.5;
}

.about-block p {
  margin: 0 0 0.5rem;
  font-size: 0.94rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.about-block .btn {
  margin-top: 0.5rem;
}

/* ===== BOUTON RETOUR ===== */
.page-bottom-cta {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.page-bottom-cta .btn {
  padding: 0.8rem 2.5rem;
  font-size: 1rem;
}

/* =========================================================
   RESPONSIVE GALERIE
========================================================= */
@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid-enterprise {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-strip {
    grid-template-columns: 1fr;
  }

  .hero-text {
    text-align: center;
    max-width: 100%;
  }

  .intro-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-header {
    text-align: center;
    max-width: 100%;
  }

  .section-title-wrapper {
    padding: 0.5rem 1.2rem;
  }

  .hero-decorations {
    display: none;
  }

  .page-bottom-cta {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
}

@media (max-width: 640px) {
  .hero-small {
    padding: 2.5rem 0 1.5rem;
    min-height: 300px;
  }

  .intro-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid-enterprise {
    grid-template-columns: 1fr;
  }

  .gallery-item img,
  .gallery-item-video video {
    height: 200px;
  }

  .about-block {
    padding: 1.2rem;
  }

  .section-title-wrapper {
    padding: 0.4rem 1rem;
    gap: 0.6rem;
  }

  .section-icon {
    font-size: 0.9rem;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  .hero-decorations {
    display: none;
  }

  .divider-line {
    width: 30px;
  }

  .page-bottom-cta {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }

  .page-bottom-cta .btn {
    padding: 0.6rem 1.8rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 460px) {
  .intro-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .section-title-wrapper {
    padding: 0.3rem 0.8rem;
    gap: 0.4rem;
  }

  .section-icon {
    font-size: 0.7rem;
  }

  .section-header h2 {
    font-size: 1.2rem;
  }

  .gallery-item img,
  .gallery-item-video video {
    height: 180px;
  }

  .gallery-overlay p {
    font-size: 0.8rem;
  }

  .gallery-icon {
    font-size: 1.5rem;
  }
}