/* Configuration personnalisée pour Tailwind CSS */
:root {
  --color-primary: #1193d4;
  --color-background-light: #f6f7f8;
  --color-background-dark: #101c22;
}

/* Styles de base pour le thème dark */
.dark {
  color-scheme: dark;
}

/* Styles personnalisés pour améliorer l'UX */
.smooth-transition {
  transition: all 0.3s ease-in-out;
}

/* Animation pour les cards au hover */
.chain-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chain-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(17, 147, 212, 0.15), 0 10px 10px -5px rgba(17, 147, 212, 0.1);
}

.dark .chain-card:hover {
  box-shadow: 0 20px 25px -5px rgba(17, 147, 212, 0.25), 0 10px 10px -5px rgba(17, 147, 212, 0.15);
}

/* Effet de lumière persistant au hover - Version améliorée */
.chain-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, 
    rgba(17, 147, 212, 0.4) 0%, 
    rgba(17, 147, 212, 0.2) 30%,
    rgba(17, 147, 212, 0.1) 60%, 
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
  border-radius: 0.75rem;
  blur: 4px;
}

.chain-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(17, 147, 212, 0.08) 0%, 
    rgba(17, 147, 212, 0.04) 50%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

.chain-card:hover::before,
.chain-card:hover::after {
  opacity: 1;
}

/* Effet de lumière plus intense en mode sombre */
.dark .chain-card::before {
  background: linear-gradient(135deg, 
    rgba(17, 147, 212, 0.6) 0%, 
    rgba(17, 147, 212, 0.3) 30%,
    rgba(17, 147, 212, 0.15) 60%, 
    transparent 100%);
}

.dark .chain-card::after {
  background: linear-gradient(135deg, 
    rgba(17, 147, 212, 0.15) 0%, 
    rgba(17, 147, 212, 0.08) 50%,
    transparent 100%);
}

/* S'assurer que le contenu reste au-dessus de l'overlay */
.chain-card > * {
  position: relative;
  z-index: 3;
}

/* Alternative avec box-shadow pour plus de compatibilité */
.chain-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.chain-card:hover {
  background-color: rgba(17, 147, 212, 0.05);
  box-shadow: 
    0 20px 25px -5px rgba(17, 147, 212, 0.15), 
    0 10px 10px -5px rgba(17, 147, 212, 0.1),
    0 0 0 1px rgba(17, 147, 212, 0.1),
    inset 0 1px 0 rgba(17, 147, 212, 0.1);
}

.dark .chain-card:hover {
  background-color: rgba(17, 147, 212, 0.08);
  box-shadow: 
    0 20px 25px -5px rgba(17, 147, 212, 0.25), 
    0 10px 10px -5px rgba(17, 147, 212, 0.15),
    0 0 0 1px rgba(17, 147, 212, 0.2),
    inset 0 1px 0 rgba(17, 147, 212, 0.15);
}

/* Animation pour les boutons */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover:before {
  left: 100%;
}

/* Styles pour les icônes de feature */
.feature-icon {
  transition: transform 0.3s ease, color 0.3s ease;
}

.feature-icon:hover {
  transform: scale(1.1);
}

/* Gradient overlay pour le hero */
.hero-gradient {
  background: linear-gradient(135deg, var(--color-background-dark) 0%, #1e293b  50%, var(--color-background-dark) 100%);
}

/* Animation de fade-in */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Styles pour les liens du footer */
.footer-link {
  position: relative;
  transition: color 0.3s ease;
}

.footer-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.footer-link:hover:after {
  width: 100%;
}

/* Styles pour les liens de navigation */
.nav-link {
  position: relative;
  padding: 0.75rem 1rem;
  transition: color 0.3s ease;
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .chain-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .container-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Amélioration de l'accessibilité */
.focus-ring {
  focus: outline-none;
  focus-visible: ring-2 ring-primary/50 ring-offset-2;
}

.dark .focus-ring {
  focus-visible: ring-offset-background-dark;
}

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
