/* Critical CSS pour Core Web Vitals */

/* Optimisation police - réduction du layout shift */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/inter-400.woff2) format('woff2');
  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;
}

/* Dimensions fixes pour réduire CLS */
.hero-container {
  min-height: 600px;
  aspect-ratio: 16/9;
}

.image-container {
  position: relative;
  overflow: hidden;
}

.image-container img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

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

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

/* Réduction du layout shift pour les boutons */
.btn-container {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Optimisation critique pour LCP */
.above-fold-content {
  contain: layout style paint;
  will-change: transform;
}

/* Optimisation des images critiques */
.critical-image {
  content-visibility: auto;
  contain-intrinsic-size: 1200px 600px;
}

/* Prevent layout shift pour les cartes */
.card-skeleton {
  min-height: 200px;
  border-radius: 8px;
}

/* Optimisation pour les grilles */
.grid-container {
  display: grid;
  grid-template-rows: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Performance pour les animations */
.animate-efficient {
  transform: translateZ(0);
  will-change: transform;
  animation-fill-mode: both;
}

/* Text rendering optimization */
.optimized-text {
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container queries pour responsive efficace */
@container (min-width: 768px) {
  .responsive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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