/* =====================================================
   MADOU NAKA — Animations & Effets visuels
   Développé par W2K-Digital | contact@w2k-digital.com
   ===================================================== */

/* =====================================================
   AUTO-SCROLL — Défilement lent entre sections
   ===================================================== */

/* Indicateur de scroll animé dans le héro */
.scroll-indicateur {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.scroll-indicateur span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scroll-souris {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
}

.scroll-souris::before {
  content: '';
  width: 4px;
  height: 8px;
  background: var(--jaune-secondaire);
  border-radius: 2px;
  position: absolute;
  top: 5px;
  animation: scrollSouris 1.8s infinite;
}

@keyframes scrollSouris {
  0%   { transform: translateY(0); opacity: 1; }
  80%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* =====================================================
   BARRE DE PROGRESSION — Auto-scroll
   ===================================================== */
#barre-progression {
  position: fixed;
  top: 72px;
  left: 0;
  height: 3px;
  background: var(--jaune-secondaire);
  z-index: 999;
  width: 0%;
  transition: width 0.2s ease;
}

/* =====================================================
   HERO SLIDES — Fondu entre images
   ===================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-slide.entrant { animation: fadeIn 1.2s ease; }

/* Ken Burns léger */
.hero-slide.actif img {
  animation: kenBurns 8s ease infinite alternate;
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* =====================================================
   BULLES INTERACTIVES — Pages légales
   Canvas JavaScript — keyframes support
   ===================================================== */

/* Overlay gradient pour le canevas des bulles */
.bandeau-bulles::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,71,137,0.4) 0%,
    transparent 60%
  );
  z-index: 1;
  pointer-events: none;
}

/* =====================================================
   CARROUSEL TÉMOIGNAGES — Transition
   ===================================================== */
.carrousel-piste {
  will-change: transform;
}

/* =====================================================
   EFFETS HOVER CARTES — Shimmer
   ===================================================== */
.carte-service,
.carte-categorie,
.carte-avantage {
  will-change: transform;
}

/* Shimmer sur les images de catégories au hover */
.carte-categorie::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.06) 50%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.carte-categorie:hover::after { opacity: 1; }

/* =====================================================
   ANIMATION BADGE HERO — Pulsation légère
   ===================================================== */
.hero-badge {
  animation: poulseBadge 3s ease infinite;
}

@keyframes poulseBadge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* =====================================================
   CHIFFRES STATS — Compteur (déclenché par JS)
   ===================================================== */
.stat-nombre {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* =====================================================
   NOTIFICATION CHATBOT — Point clignotant
   ===================================================== */
.chatbot-notif {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  background: var(--jaune-secondaire);
  border-radius: 50%;
  border: 2px solid var(--blanc);
  animation: clignote 1.5s infinite;
}

@keyframes clignote {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* =====================================================
   ICÔNES SVG — Rotation hover
   ===================================================== */
.icone-service svg {
  transition: transform 0.4s ease;
}

.carte-service:hover .icone-service svg {
  transform: rotate(10deg) scale(1.1);
}

/* =====================================================
   SECTION REVEAL — Entrée depuis le bas
   Nécessite html.js — progressive enhancement
   ===================================================== */
html.js .reveal-groupe > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal-groupe.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
html.js .reveal-groupe.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
html.js .reveal-groupe.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.24s; }
html.js .reveal-groupe.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.36s; }

/* =====================================================
   TRAIT ANIMÉ — Filet jaune
   ===================================================== */
.filet-jaune-anime {
  display: block;
  height: 4px;
  background: var(--jaune-secondaire);
  border-radius: 2px;
  margin: 12px auto 24px;
  width: 0;
  transition: width 0.8s ease 0.3s;
}

.filet-jaune-anime.visible { width: 56px; }

/* =====================================================
   LOADER PAGE — Fondu entrée
   ===================================================== */
body {
  animation: chargementPage 0.4s ease;
}

@keyframes chargementPage {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =====================================================
   RESPONSIVE — Désactiver Ken Burns sur mobile
   ===================================================== */
@media (max-width: 768px) {
  .hero-slide.actif img {
    animation: none;
  }
}

/* =====================================================
   MEDIA — Reduced Motion (accessibilité)
   On arrête les animations décoratives mais on garde
   les transitions fonctionnelles (carrousel, menus)
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  /* Animations décoratives uniquement */
  .hero-slide.actif img,
  .hero-badge,
  .scroll-souris::before,
  .chatbot-notif,
  #btn-whatsapp {
    animation: none !important;
  }

  /* Réduction des transitions longues */
  html.js .anim-entree,
  html.js .reveal-groupe > * {
    transition-duration: 0.01ms !important;
  }
}
