/* FICHIER : dangote-group/assets/css/animations.css */
/* Keyframes, transitions, animations — Dangote Group */

/* ══════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ══════════════════════════════════════════
   GRADIENT DORÉ ANIMÉ
   ══════════════════════════════════════════ */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gold-gradient-animated {
  background: linear-gradient(
    135deg,
    var(--color-gold-dark),
    var(--color-gold),
    var(--color-gold-light),
    var(--color-gold),
    var(--color-gold-dark)
  );
  background-size: 300% 300%;
  animation: gradient-shift 4s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Divider lumineux animé */
.gold-line-animated {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-gold-dark) 20%,
    var(--color-gold) 50%,
    var(--color-gold-dark) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: gradient-shift 3s ease infinite;
}

/* ══════════════════════════════════════════
   BORDURE ACTIVE (top gold glow)
   ══════════════════════════════════════════ */
@keyframes border-glow {
  0%, 100% { box-shadow: 0 -2px 8px rgba(200,151,42,0.2); }
  50%       { box-shadow: 0 -2px 16px rgba(200,151,42,0.5); }
}

.border-glow-active {
  animation: border-glow 2s ease-in-out infinite;
}

/* ══════════════════════════════════════════
   PARTICULES (Canvas — cf. JS)
   ══════════════════════════════════════════ */
/* Le canvas est géré par particles.js */

/* ══════════════════════════════════════════
   LOADER / SPINNER
   ══════════════════════════════════════════ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-dark-3);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ══════════════════════════════════════════
   PULSE INDICATOR
   ══════════════════════════════════════════ */
@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(200,151,42,0.4); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 8px rgba(200,151,42,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(200,151,42,0); }
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--color-gold);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
  display: inline-block;
}

.pulse-dot--green {
  background: var(--color-success);
  box-shadow: 0 0 0 0 rgba(39,174,96,0.4);
}

/* ══════════════════════════════════════════
   IMAGE SCALE HOVER
   ══════════════════════════════════════════ */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform var(--transition-slow);
}

.img-hover-zoom:hover img {
  transform: scale(1.06);
}

/* ══════════════════════════════════════════
   PROGRESS BAR (ESG, KPI)
   ══════════════════════════════════════════ */
.progress-bar {
  height: 3px;
  background: var(--color-dark-3);
  overflow: hidden;
  position: relative;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold));
  width: 0%;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-bar__fill.animated {
  /* Width définie inline via JS */
}

/* ══════════════════════════════════════════
   FLOATING GOLD BACKGROUND DECORATION
   ══════════════════════════════════════════ */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.06; }
  50%       { transform: translateY(-20px) rotate(3deg); opacity: 0.1; }
}

.bg-decoration {
  position: absolute;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--color-gold);
  animation: float-slow 8s ease-in-out infinite;
}

/* ══════════════════════════════════════════
   TYPEWRITER (hero)
   ══════════════════════════════════════════ */
@keyframes blink-cursor {
  0%, 100% { border-right-color: var(--color-gold); }
  50%       { border-right-color: transparent; }
}

.typewriter-cursor {
  border-right: 2px solid var(--color-gold);
  animation: blink-cursor 0.75s step-end infinite;
  padding-right: 2px;
}

/* ══════════════════════════════════════════
   REVEAL STAGGER (enfants)
   ══════════════════════════════════════════ */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.revealed > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.0s; }
.stagger-children.revealed > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.6s; }
.stagger-children.revealed > *:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.7s; }
.stagger-children.revealed > *:nth-child(9) { opacity: 1; transform: none; transition-delay: 0.8s; }
.stagger-children.revealed > *:nth-child(n+10) { opacity: 1; transform: none; transition-delay: 0.9s; }

/* ══════════════════════════════════════════
   COUNTUP (valeur chiffrée animée)
   ══════════════════════════════════════════ */
.countup-value {
  display: inline-block;
  transition: color 0.3s ease;
}

/* ══════════════════════════════════════════
   HOVER UNDERLINE GOLD
   ══════════════════════════════════════════ */
.hover-underline-gold {
  position: relative;
  text-decoration: none;
}

.hover-underline-gold::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition-base);
}

.hover-underline-gold:hover::after {
  width: 100%;
}

/* ══════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════ */
@keyframes lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lightbox-img-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,5,0.95);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightbox-in 0.2s ease;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  animation: lightbox-img-in 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: 1px solid var(--color-dark-3);
  color: var(--color-text-dim);
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  border-color: var(--color-gold-dark);
  color: var(--color-gold);
}

/* ══════════════════════════════════════════
   MAP AFRICA (SVG interactive)
   ══════════════════════════════════════════ */
.africa-map-country {
  fill: var(--color-dark-3);
  stroke: var(--color-dark-2);
  stroke-width: 0.5;
  cursor: default;
  transition: fill var(--transition-fast);
}

.africa-map-country.active {
  fill: rgba(200,151,42,0.25);
  stroke: var(--color-gold-dark);
  cursor: pointer;
}

.africa-map-country.active:hover {
  fill: rgba(200,151,42,0.45);
  stroke: var(--color-gold);
}

.map-popup {
  position: absolute;
  background: var(--color-dark-2);
  border: 1px solid var(--color-gold-dark);
  border-top: 2px solid var(--color-gold);
  padding: 14px 18px;
  pointer-events: none;
  z-index: 10;
  min-width: 180px;
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.2s ease;
}

.map-popup__country {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-ivory);
  margin-bottom: 6px;
}

.map-popup__info {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-dim);
  line-height: 1.6;
  letter-spacing: 0.5px;
}

.map-popup__info span {
  color: var(--color-gold);
}
