/* Configuration Tailwind CSS personnalisée pour Digital.Africa */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables CSS personnalisées */
:root {
  --font-family-poppins: 'Poppins', sans-serif;
  
  /* Palette de couleurs neutres */
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  
  /* Accent rouge discret */
  --accent-red: #C30100;
  --accent-red-light: rgba(195, 1, 0, 0.1);
  --accent-red-medium: rgba(195, 1, 0, 0.3);
  --accent-red-hover: rgba(195, 1, 0, 0.8);
}

/* Configuration de base */
body {
  font-family: var(--font-family-poppins);
  background-color: white;
  color: var(--neutral-800);
  line-height: 1.625;
}

/* Classes utilitaires personnalisées */
.font-poppins {
  font-family: var(--font-family-poppins);
}

/* Couleurs neutres personnalisées pour Tailwind */
.text-neutral-50 { color: var(--neutral-50); }
.text-neutral-100 { color: var(--neutral-100); }
.text-neutral-200 { color: var(--neutral-200); }
.text-neutral-300 { color: var(--neutral-300); }
.text-neutral-400 { color: var(--neutral-400); }
.text-neutral-500 { color: var(--neutral-500); }
.text-neutral-600 { color: var(--neutral-600); }
.text-neutral-700 { color: var(--neutral-700); }
.text-neutral-800 { color: var(--neutral-800); }
.text-neutral-900 { color: var(--neutral-900); }

.bg-neutral-50 { background-color: var(--neutral-50); }
.bg-neutral-100 { background-color: var(--neutral-100); }
.bg-neutral-200 { background-color: var(--neutral-200); }
.bg-neutral-300 { background-color: var(--neutral-300); }
.bg-neutral-400 { background-color: var(--neutral-400); }
.bg-neutral-500 { background-color: var(--neutral-500); }
.bg-neutral-600 { background-color: var(--neutral-600); }
.bg-neutral-700 { background-color: var(--neutral-700); }
.bg-neutral-800 { background-color: var(--neutral-800); }
.bg-neutral-900 { background-color: var(--neutral-900); }

.border-neutral-200 { border-color: var(--neutral-200); }
.border-neutral-800 { border-color: var(--neutral-800); }
.border-neutral-900 { border-color: var(--neutral-900); }

/* Classes pour l'accent rouge */
.text-accent-red { color: var(--accent-red); }
.bg-accent-red { background-color: var(--accent-red); }
.bg-accent-red-light { background-color: var(--accent-red-light); }
.border-accent-red { border-color: var(--accent-red); }

/* Accents subtils au hover */
.hover\:text-accent-red:hover { color: var(--accent-red); }
.hover\:border-accent-red:hover { border-color: var(--accent-red); }
.hover\:bg-accent-red-light:hover { background-color: var(--accent-red-light); }

/* Améliorations UI Header */
.backdrop-blur-sm {
  backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
  backdrop-filter: blur(20px);
}

/* Animation du menu mobile */
#mobile-menu {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Effet de focus amélioré pour l'accessibilité */
.focus\:ring-accent-red:focus {
  box-shadow: 0 0 0 3px rgba(195, 1, 0, 0.1);
}

/* Animation de l'icône burger */
#mobile-menu-button svg {
  transition: transform 0.3s ease;
}

/* Survol des liens de navigation */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--accent-red);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::before {
  width: 100%;
}

/* Transitions et animations personnalisées */
.transition-colors {
  transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.transition-shadow {
  transition: box-shadow 0.2s ease-in-out;
}

.hover\:shadow-md:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Effets de gradient */
.gradient-overlay {
  background: linear-gradient(to bottom right, rgba(250, 250, 250, 0.9), rgba(245, 245, 245, 0.9));
}

/* Menu mobile */
.mobile-menu {
  background-color: white;
  border-top: 1px solid var(--neutral-200);
  padding: 1rem;
  display: none;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  color: var(--neutral-600);
  font-weight: 500;
  margin-bottom: 1rem;
  transition: color 0.2s ease-in-out;
}

.mobile-menu a:hover {
  color: var(--neutral-900);
}

/* Scroll smooth pour tous les liens d'ancre */
html {
  scroll-behavior: smooth;
}

/* Optimisations pour les images */
img {
  max-width: 100%;
  height: auto;
}

/* Styles pour les liens */
a {
  text-decoration: none;
}

/* Focus states pour l'accessibilité */
button:focus,
a:focus {
  outline: 2px solid var(--neutral-400);
  outline-offset: 2px;
}

/* Responsive breakpoints documentation */
/*
  sm: 640px
  md: 768px
  lg: 1024px
  xl: 1280px
  2xl: 1536px
*/

/* ====================================
   🎭 ANIMATIONS SCROLL REVEAL
   ==================================== */

/* État initial des éléments avant révélation */
.reveal-element {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* État révélé des éléments */
.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Animations différées pour effet cascade */
.reveal-delay-100 {
  transition-delay: 0.1s;
}

.reveal-delay-200 {
  transition-delay: 0.2s;
}

.reveal-delay-300 {
  transition-delay: 0.3s;
}

.reveal-delay-400 {
  transition-delay: 0.4s;
}

.reveal-delay-500 {
  transition-delay: 0.5s;
}

/* Animation spéciale pour les cartes */
.reveal-card {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-card.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Animation pour les titres */
.reveal-title {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-title.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Animation pour les images */
.reveal-image {
  opacity: 0;
  transform: scale(1.1);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-image.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Performance : Réduction des animations sur les appareils à faible performance */
@media (prefers-reduced-motion: reduce) {
  .reveal-element,
  .reveal-card,
  .reveal-title,
  .reveal-image {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Optimisation pour mobile : animations plus légères */
@media (max-width: 768px) {
  .reveal-element,
  .reveal-card,
  .reveal-title {
    transform: translateY(20px);
    transition-duration: 0.6s;
  }
  
  .reveal-element.revealed,
  .reveal-card.revealed,
  .reveal-title.revealed {
    transform: translateY(0);
  }
}

/* ====================================
   ⬆️ BACK TO TOP BUTTON
   ==================================== */

/* Bouton back to top - État initial (masqué) */
#back-to-top {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  will-change: opacity, visibility, transform;
}

/* État visible du bouton */
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Effet hover avancé */
#back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(195, 1, 0, 0.3);
}

/* Animation de pulsation subtile */
#back-to-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(195, 1, 0, 0.1);
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#back-to-top:hover::before {
  transform: scale(1.2);
}

/* Focus state pour l'accessibilité */
#back-to-top:focus {
  outline: 3px solid var(--accent-red);
  outline-offset: 3px;
}

/* Optimisation mobile */
@media (max-width: 768px) {
  #back-to-top {
    bottom: 6px;
    right: 6px;
    padding: 12px;
    width: 48px;
    height: 48px;
  }
  
  #back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* Amélioration pour écrans tactiles */
@media (hover: none) and (pointer: coarse) {
  #back-to-top:hover {
    transform: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }
  
  #back-to-top:active {
    transform: scale(0.95);
  }
}

/* Animation d'entrée */
@keyframes backToTopFadeIn {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
}

/* Animation de sortie */
@keyframes backToTopFadeOut {
  from {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
  }
}

#back-to-top.fade-in {
  animation: backToTopFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#back-to-top.fade-out {
  animation: backToTopFadeOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
} 