/* Variables CSS personnalisées pour With You */
:root {
  --primary: #34A7B9;
  --secondary: #B9AFA1;
  --background: #fefefe;
  --foreground: #2a2520;
  --muted: #f5f3f0;
  --muted-foreground: #6b645c;
  --border: #e8e4e0;
  --card: #ffffff;
  --accent: #e8e4e0;
}

.dark {
  --primary: #52c4d4;
  --secondary: #d4c8bb;
  --background: #1a1815;
  --foreground: #f5f3f0;
  --muted: #2a2520;
  --muted-foreground: #a39a91;
  --border: #2a2520;
  --card: #1a1815;
  --accent: #2a2520;
}

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

/* Classes utilitaires pour les animations */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animations de chargement */
.loading-pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

/* Effets de hover spéciaux */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(52, 167, 185, 0.1);
}

/* Gradient text helper */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Boutons avec effets spéciaux */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  border-radius: 9999px;
  color: white;
  font-weight: 700;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.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%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(52, 167, 185, 0.3);
}

/* Cards avec effets de bordure animée */
.card-animated {
  position: relative;
  background: var(--card);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

.card-animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-animated:hover::before {
  opacity: 0.1;
}

/* Navigation fixe avec backdrop blur */
.nav-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Responsive helpers */
@media (max-width: 768px) {
  .text-responsive {
    font-size: clamp(2rem, 5vw, 4rem);
  }
  
  .text-responsive-large {
    font-size: clamp(3rem, 8vw, 6rem);
  }
}

/* Accessibilité - Mode de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Dark mode transitions */
.theme-transition * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Focus styles pour l'accessibilité */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Loading screen specifique */
#loading-screen {
  background: var(--background);
  transition: opacity 0.5s ease;
}

#progress-bar {
  transition: width 1.5s ease;
}

/* Menu mobile overlay */
#mobile-menu {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Form styles améliorés */
input[type="text"],
input[type="email"],
textarea,
select {
  background: var(--muted);
  border: 1px solid var(--border);
  color: var(--foreground);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(52, 167, 185, 0.1);
}

/* Testimonials specifiques */
.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Stats counter animation */
.stat-number {
  font-variant-numeric: tabular-nums;
  animation: countUp 2s ease-out;
}

@keyframes countUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Hero section spécifique */
.hero-gradient {
  background: linear-gradient(135deg, var(--background) 0%, var(--muted) 100%);
}

/* Services grid responsive */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Certifications layout */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Timeline pour le processus */
.timeline-item {
  position: relative;
  padding-left: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 1rem;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--background);
}

/* Contact form animations */
.form-group {
  position: relative;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.5rem) scale(0.8);
  color: var(--primary);
}

/* Footer styles */
footer {
  background: var(--muted);
  border-top: 1px solid var(--border);
}

/* Utilities pour les espacements */
.section-padding {
  padding: 8rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Print styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .no-print {
    display: none !important;
  }
}