@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --brand-blue: #1D0FA0;
  --brand-cyan: #38BDF8;
  --brand-orange: #FF6B00;
  --brand-dark: #1E293B;
}

* { font-family: 'Inter', 'Roboto', system-ui, sans-serif; }

.animate-fade-in { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skeleton { background: linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.product-zoom-container { overflow: hidden; cursor: zoom-in; }
.product-zoom-container img { transition: transform .25s ease; }
.product-zoom-container:hover img { transform: scale(1.5); }

/* ===================== HERO ANIMÉ ===================== */
.hero-anim {
  background: linear-gradient(120deg, #1E293B, #1D0FA0, #3730A3, #38BDF8, #1D0FA0);
  background-size: 300% 300%;
  animation: heroGradient 16s ease infinite;
}
@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-hex {
  position: absolute;
  background: rgba(255, 255, 255, .10);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  animation: heroFloat 9s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-26px) rotate(10deg); }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide.active [data-anim] { animation: heroFadeUp .55s ease both; }
.hero-slide.active [data-anim="1"] { animation-delay: .05s; }
.hero-slide.active [data-anim="2"] { animation-delay: .15s; }
.hero-slide.active [data-anim="3"] { animation-delay: .25s; }
.hero-slide.active [data-anim="4"] { animation-delay: .35s; }
.hero-slide.active [data-anim="5"] { animation-delay: .45s; }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-float { animation: heroFloatImg 5s ease-in-out infinite; }
@keyframes heroFloatImg {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}

.hero-dot {
  width: 10px; height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .4);
  transition: all .3s ease;
  cursor: pointer;
}
.hero-dot:hover { background: rgba(255, 255, 255, .7); }
.hero-dot.active { background: #fff; width: 30px; }

/* Fond « PC gaming » du hero : images en fondu (rempli par hero.js), sous le contenu.
   Voile sombre dégradé pour garder le texte blanc lisible. */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(2,6,23,.82), rgba(2,6,23,.30) 55%, rgba(2,6,23,.62));
}
.hero-bg-img {
  position: absolute; inset: 0; z-index: 1;
  background-position: center; background-size: cover;
  opacity: 0; transition: opacity 1.2s ease; transform: scale(1.06);
}
.hero-bg-img.active { opacity: 1; animation: heroBgZoom 20s ease-in-out infinite alternate; }
@keyframes heroBgZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-anim, .hero-hex, .hero-float, .hero-slide.active [data-anim] { animation: none; }
  .hero-bg-img { transition: none; }
  .hero-bg-img.active { animation: none; }
}

/* ===================================================================
   BANDE DE MARQUES DÉFILANTE (marquee)
   =================================================================== */
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: marqueeScroll 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ===================================================================
   MONTAGE PC AU SCROLL — le PC s'assemble pièce par pièce
   =================================================================== */
.pc-build-wrap { height: 320vh; }
.pc-build-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  gap: 1rem; padding: 1rem;
}
.pcb-stage { position: relative; width: min(90vw, 560px); height: min(48vh, 400px); }
.pcb-stage img {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%; object-fit: contain;
  opacity: 0; transform: translateY(34px) scale(.92);
  transition: opacity .45s ease, transform .45s ease;
}
.pcb-stage img.active { opacity: 1; transform: none; }
.pcb-dots { display: flex; gap: .5rem; }
.pcb-dot { width: 10px; height: 10px; border-radius: 9999px; background: #cbd5e1; transition: background .3s; }
.pcb-dot.active { background: #1D0FA0; }
#pc-build-cta { opacity: 0; pointer-events: none; transition: opacity .4s ease; }
#pc-build-cta.show { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .pcb-stage img { transition: none; }
}
