/* ========================================
   BANKSHETIFY CENTRALIZED CSS
   Tailwind CSS + Custom Components
   ======================================== */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* ========================================
   FONTS & TYPOGRAPHY
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.logo-terminal {
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
}

/* ========================================
   DESIGN SYSTEM COMPONENTS
   ======================================== */
@layer components {
  
  /* ========================================
     HERO SECTION
     ======================================== */
  .hero-gradient {
    @apply min-h-screen flex items-center relative overflow-hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  }

  .hero-title {
    @apply text-4xl md:text-5xl lg:text-6xl font-bold leading-tight mb-6 font-mono;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.6);
  }

  .hero-subtitle {
    @apply text-xl md:text-2xl leading-relaxed mb-8;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.6);
  }

  /* ========================================
     NAVIGATION
     ======================================== */
  .nav-link {
    @apply text-white font-medium px-4 py-2 rounded-lg transition-all duration-300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
    color: #ffffff !important;
  }

  .nav-link:hover {
    @apply bg-white/30;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
  }

  .nav-btn-primary {
    @apply bg-white text-primary-600 font-semibold px-6 py-2 rounded-lg hover:bg-primary-50 transition-all duration-300;
    text-shadow: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  /* ========================================
     BUTTONS
     ======================================== */
  .btn-primary {
    @apply text-white font-semibold py-3 px-6 rounded-lg shadow-lg hover:shadow-xl transform hover:-translate-y-1 transition-all duration-300;
    background: var(--primary) !important;
  }
  
  .btn-primary:hover {
    background: var(--primary-dark) !important;
  }

  .btn-primary-urgent {
    @apply text-xl px-8 py-4 font-semibold rounded-lg transition-all duration-300;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    border: none !important;
  }

  .btn-secondary {
    @apply bg-white font-semibold py-3 px-6 rounded-lg transition-all duration-300;
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
  }
  
  .btn-secondary:hover {
    background: var(--primary-light) !important;
    color: white !important;
  }

  .btn-outline {
    @apply text-white border-2 border-white transition-all duration-300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  }
  
  .btn-outline:hover {
    background: white !important;
    color: var(--primary) !important;
  }

  /* ========================================
     ORANGE HARMONIEUX
     ======================================== */
  .btn-orange {
    @apply text-white font-semibold py-3 px-6 rounded-lg shadow-lg hover:shadow-xl transform hover:-translate-y-1 transition-all duration-300;
    background: var(--orange) !important;
  }
  
  .btn-orange:hover {
    background: var(--orange-dark) !important;
  }
  
  .bg-orange-harmony {
    background-color: var(--orange) !important;
  }
  
  .text-orange-harmony {
    color: var(--orange) !important;
  }

  /* ========================================
     CARDS
     ======================================== */
  .card {
    @apply bg-white rounded-xl shadow-lg border border-gray-100 hover:shadow-xl transition-all duration-300;
  }

  .card-hover {
    @apply hover:-translate-y-2 hover:shadow-2xl;
  }

  .feature-card {
    @apply card card-hover group cursor-pointer h-full flex flex-col;
  }

  .pricing-card {
    @apply bg-white rounded-xl shadow-lg border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 relative overflow-hidden;
  }

  /* ========================================
     ICONS
     ======================================== */
  .feature-icon {
    @apply w-16 h-16 mx-auto mb-4 rounded-full flex items-center justify-center text-white text-2xl shadow-lg group-hover:scale-110 transition-transform duration-300;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
  }

  .additional-feature-icon {
    @apply w-16 h-16 mx-auto mb-4 rounded-full flex items-center justify-center text-white text-2xl shadow-lg;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    opacity: 1 !important;
    filter: none !important;
  }

  /* ========================================
     PRICING TOGGLE
     ======================================== */
  .pricing-toggle {
    @apply bg-gray-100 rounded-lg p-1 flex;
  }

  .pricing-toggle button {
    @apply px-6 py-2 rounded-md font-semibold transition-all duration-300;
  }

  .pricing-toggle button.active {
    @apply bg-white text-primary-600 shadow-sm;
  }

  .pricing-toggle button:not(.active) {
    @apply text-gray-600 hover:text-gray-800;
  }

  .pricing-toggle button:hover:not(.active) {
    @apply bg-gray-50;
  }

  /* ========================================
     TEXT VISIBILITY
     ======================================== */
  .text-visible {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
  }

  .cta-title {
    @apply text-4xl md:text-5xl font-bold text-white mb-6;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
  }

  .cta-subtitle {
    @apply text-xl text-white mb-8;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
  }

  .trust-signals {
    @apply text-white text-sm;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
  }

  /* ========================================
     RESPONSIVE GRID
     ======================================== */
  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    grid-auto-rows: 1fr;
  }

  @media (min-width: 768px) {
    .features-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (min-width: 1024px) {
    .features-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }
}

/* ========================================
   UTILITIES
   ======================================== */
@layer utilities {
  
  /* Remove red line artifacts */
  .red-line-artifact,
  .hero-gradient hr,
  .hero-gradient .red-line,
  .hero-gradient::before {
    display: none !important;
  }

  /* Ensure no red elements appear */
  *[style*="red"],
  *[style*="#ff0000"],
  *[style*="#f00"] {
    display: none !important;
  }

  /* Force white text on gradient backgrounds */
  .hero-gradient h1,
  .hero-gradient h2,
  .hero-gradient h3,
  .hero-gradient p,
  .hero-gradient span,
  .hero-gradient div {
    color: #ffffff !important;
  }

  .hero-gradient a:not(.btn-primary) {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
  }

  /* Text balance for better readability */
  .text-balance {
    text-wrap: balance;
  }

  /* Hide scrollbars */
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  
  .nav-link {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
  }
  
  .feature-icon,
  .additional-feature-icon {
    width: 3rem !important;
    height: 3rem !important;
    font-size: 1.2rem !important;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.animate-blink {
  animation: blink 1s infinite;
}

/* ========================================
   HERO SECTION ENHANCEMENTS
   ======================================== */
.hero-gradient::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  z-index: 1;
}

/* ========================================
   PRICING CARD ENHANCEMENTS
   ======================================== */
.pricing-card::before {
  @apply content-[''] absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary-500 to-accent-500 transform scale-x-0 transition-transform duration-300;
}

.pricing-card:hover::before {
  @apply scale-x-100;
}

/* ========================================
   UX MICRO-INTERACTIONS & ANIMATIONS
   ======================================== */

/* Bounce animations */
.animate-bounce-slow {
  animation: bounce 2s infinite;
}

.animate-pulse-slow {
  animation: pulse 3s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
  to { box-shadow: 0 0 30px rgba(59, 130, 246, 0.8); }
}

/* Enhanced hover effects */
.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* Button hover animations */
.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease-out;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease-out;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Progress indicators */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Success animations */
.success-checkmark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--secondary);
  stroke-miterlimit: 10;
  margin: 0 auto;
  box-shadow: inset 0px 0px 0px var(--secondary);
  animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

@keyframes fill {
  100% { box-shadow: inset 0px 0px 0px 30px var(--secondary); }
}

@keyframes scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Mobile-first responsive improvements */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  
  .feature-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  .pricing-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
}

/* ========================================
   LAYOUT FIXES & IMPROVEMENTS
   ======================================== */

/* Problem/Solution section improvements */
.problem-solution-section {
  min-height: 600px;
}

.problem-solution-section .grid {
  align-items: flex-start;
}

.problem-solution-section h2 {
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.problem-solution-section .space-y-4 > div {
  margin-bottom: 1rem;
}

/* Testimonial cards improvements */
.testimonial-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.testimonial-card .flex {
  flex-shrink: 0;
}

.testimonial-card p {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

/* Hero section responsive fixes */
@media (max-width: 1024px) {
  .hero-gradient h1 {
    font-size: 3rem !important;
  }
  
  .hero-gradient .text-xl {
    font-size: 1.1rem !important;
  }
  
  .hero-gradient .text-2xl {
    font-size: 1.3rem !important;
  }
}

@media (max-width: 768px) {
  .hero-gradient h1 {
    font-size: 2.5rem !important;
  }
  
  .hero-gradient .grid {
    gap: 1rem !important;
  }
  
  .hero-gradient .grid > div {
    padding: 1rem !important;
  }
}

/* Grid layout improvements */
.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    gap: 1rem;
  }
}

/* Text alignment fixes */
.text-center.lg\:text-left {
  text-align: center;
}

@media (min-width: 1024px) {
  .text-center.lg\:text-left {
    text-align: left;
  }
}

/* Flex alignment improvements */
.justify-center.lg\:justify-start {
  justify-content: center;
}

@media (min-width: 1024px) {
  .justify-center.lg\:justify-start {
    justify-content: flex-start;
  }
}

/* Container max-width fixes */
.max-w-6xl {
  max-width: 72rem;
}

.max-w-7xl {
  max-width: 80rem;
}

/* ========================================
   HERO SECTION MARGIN FIXES
   ======================================== */
.hero-gradient {
  margin: 0 !important;
  min-height: 80vh;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 640px) {
  .hero-gradient {
    min-height: 85vh;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media (min-width: 768px) {
  .hero-gradient {
    min-height: 90vh;
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1024px) {
  .hero-gradient {
    min-height: 95vh;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* ========================================
   RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 640px) {
  .hero-gradient {
    padding: 2rem 1rem !important;
    margin: 0 !important;
    min-height: 75vh;
  }
  
  .step-card {
    padding: 1.5rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .pricing-card {
    padding: 1.5rem;
  }
  
  /* Section spacing */
  .py-20 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  /* Grid improvements */
  .grid {
    gap: 1.5rem;
  }
}

/* Tablet specific improvements */
@media (min-width: 641px) and (max-width: 768px) {
  .hero-gradient h1 {
    font-size: 3rem !important;
  }
  
  .py-20 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media (max-width: 480px) {
  .hero-gradient {
    min-height: 70vh;
    padding: 1.5rem 0.5rem !important;
    margin: 0 !important;
  }
  
  .hero-gradient h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-gradient .text-lg {
    font-size: 1rem !important;
  }
  
  .btn-primary, .btn-secondary {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .grid {
    gap: 1rem;
  }
  
  /* Sections spacing */
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  /* Cards padding */
  .bg-white {
    padding: 1rem !important;
  }
  
  /* Text sizes */
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  /* Trust signals */
  .flex.flex-col {
    gap: 0.5rem;
  }
}

/* Section padding improvements */
.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Gap improvements */
.gap-12 {
  gap: 3rem;
}

.gap-16 {
  gap: 4rem;
}

@media (max-width: 768px) {
  .gap-12 {
    gap: 2rem;
  }
  
  .gap-16 {
    gap: 2.5rem;
  }
}

/* ========================================
   CLASSES UTILITAIRES POUR NAVIGATION
   ======================================== */
.nav-text {
    color: var(--gray-900) !important;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-text:hover {
    color: var(--primary) !important;
}

/* Override spécifique pour Tailwind dans la navigation */
.navbar .nav-text {
    color: var(--gray-900) !important;
}

.navbar .nav-text:hover {
    color: var(--primary) !important;
}

