/**
 * NOVA IMPACT CORPORATION - STYLES POUR LIENS & NAVIGATION DYNAMIQUE
 * Effets visuels, micro-interactions, indicateurs actifs et transitions fluides
 */

/* ==========================================================================
   1. BARRE DE CHARGEMENT SUPÉRIEURE FLUIDE (TOP PROGRESS LOADER)
   ========================================================================== */
#page-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #990e12, #D7141A, #ff4d4d, #ffffff);
  background-size: 200% 100%;
  box-shadow: 0 0 10px rgba(215, 20, 26, 0.85), 0 0 4px rgba(255, 77, 77, 0.6);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  border-radius: 0 2px 2px 0;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

#page-progress-bar.active {
  opacity: 1;
  animation: progressShine 1.5s linear infinite;
}

@keyframes progressShine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ==========================================================================
   2. TRANSITIONS DE CONTENU FLUIDES (PAGE TRANSITIONS SANS ÉCRAN BLANC)
   ========================================================================== */
#main-content {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

#main-content.page-transitioning-out {
  opacity: 0.15;
  transform: translateY(-8px);
}

#main-content.page-transitioning-in {
  animation: pageSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageSlideUp {
  from {
    opacity: 0.2;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   3. LIENS DE NAVIGATION PRINCIPALE MODERNES & DYNAMIQUES (.NAV-LINK)
   ========================================================================== */
.nav-links {
  position: relative;
  align-items: center;
}

.nav-link {
  position: relative;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gray-700);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s ease;
}

/* Pillule / Halo subtil au survol */
.nav-link:hover {
  color: var(--color-primary);
  background-color: rgba(215, 20, 26, 0.05);
  transform: translateY(-1px);
}

/* Indicateur de soulignement animé et fluide */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #D7141A, #ff4d4d);
  border-radius: 4px;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(215, 20, 26, 0.35);
  transition: width 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-link:hover::after {
  width: 65%;
}

/* État actif */
.nav-link.active {
  color: var(--color-primary);
  background-color: rgba(215, 20, 26, 0.07);
  font-weight: 700;
}

.nav-link.active::after {
  width: 75%;
}

/* Point lumineux dynamique pour la page active */
.nav-link.active::before {
  content: '';
  position: absolute;
  top: 9px;
  right: 8px;
  width: 5px;
  height: 5px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(215, 20, 26, 0.9);
  animation: pulseActiveDot 2s infinite ease-in-out;
}

@keyframes pulseActiveDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.5;
  }
}

/* ==========================================================================
   4. LIENS DU TIROIR MOBILE DYNAMIQUES (.MOBILE-NAV-LINK)
   ========================================================================== */
.mobile-nav-link:hover .link-arrow,
.mobile-nav-link:active .link-arrow {
  transform: translateX(4px) scale(1.15);
  color: var(--color-primary-light);
}

.mobile-nav-link.active .link-arrow {
  color: var(--color-primary-light);
  transform: translateX(3px);
}

/* ==========================================================================
   5. MICRO-INTERACTIONS SUR LES BOUTONS & CTA (.BTN)
   ========================================================================== */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reflet de brillance dynamique traversant le bouton */
.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn:hover::after {
  opacity: 1;
  animation: btnShine 0.85s ease forwards;
}

@keyframes btnShine {
  0% { left: -70%; }
  100% { left: 140%; }
}

/* Translation dynamique de l'icône dans les boutons */
.btn svg,
.btn span.arrow-icon {
  display: inline-block;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:hover svg,
.btn:hover span.arrow-icon {
  transform: translateX(4px);
}

/* Effet d'appui haptique */
.btn:active {
  transform: scale(0.97) translateY(0);
}

/* ==========================================================================
   6. LIENS TEXTUELS DU PIED DE PAGE & LIENS GÉNÉRAUX
   ========================================================================== */
.footer-links a,
.footer-bottom-links a {
  position: relative;
  display: inline-block;
  transition: color 0.22s ease, transform 0.22s ease;
}

.footer-links a:hover {
  color: var(--color-primary-light) !important;
  transform: translateX(4px);
}

.footer-bottom-links a:hover {
  color: var(--color-primary-light) !important;
}

/* Logo avec micro-zoom fluide au survol */
.logo {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
}

.logo:hover {
  transform: scale(1.03);
}

/* ==========================================================================
   7. BADGE COMPTEUR & LIEN ESPACE ADMINISTRATION
   ========================================================================== */
.live-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--color-gray-400);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.live-counter-badge:hover {
  background: rgba(215, 20, 26, 0.18);
  border-color: rgba(215, 20, 26, 0.45);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(215, 20, 26, 0.25);
}

.live-counter-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
  animation: pulseDotSmall 2s infinite ease-in-out;
}

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

.footer-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-gray-400);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-admin-link:hover {
  color: #ff6b6e !important;
  transform: translateY(-1px);
}
