/**
 * CSS critique pour Betterfly Solutions
 * Contient uniquement les styles nécessaires au rendu initial de la page
 * Chargé en priorité pour améliorer les performances
 */

/* Reset minimal */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables de base */
:root {
  --betterfly-blue: #3b82f6;
  --betterfly-indigo: #6366f1;
  --betterfly-light: #f3f4f6;
  --betterfly-dark: #1f2937;
  --font-sans: var(--font-inter), var(--font-poppins), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Styles de base */
html, body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  background-color: #ffffff;
  color: var(--betterfly-dark);
}

body {
  min-height: 100vh;
  line-height: 1.5;
}

/* CSS critique pour le chargement initial */
/* Chargement prioritaire des styles essentiels */

/* Reset minimal pour éviter le FOUC */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Styles critiques pour le hero section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation critique */
.nav-container {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/* Skeleton loaders pour améliorer la perception */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* Optimisation des polices critiques */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/inter-var.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Styles pour le header et la navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: all 0.3s ease;
}

/* Styles pour les conteneurs principaux */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

/* Styles pour les liens */
a {
  color: var(--betterfly-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--betterfly-indigo);
}

/* Styles pour les boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--betterfly-blue);
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: var(--betterfly-indigo);
  color: white;
}

/* Animations de base */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Styles pour le chargement progressif des images */
.blur-up {
  filter: blur(5px);
  transition: filter 0.3s ease-in-out;
}

.blur-up.lazyloaded {
  filter: blur(0);
}

/* Styles pour les placeholders de contenu */
.placeholder {
  background-color: #f3f4f6;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}
