/* ===== BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  background-color: #080811;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  overflow-x: hidden;
}

/* ===== THREE.JS CANVAS ===== */
#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #040409;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition:
    opacity 1.2s ease,
    visibility 1.2s ease;
}
.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}
.loading-spinner {
  width: 70px;
  height: 70px;
  border: 2px solid rgba(224, 170, 255, 0.1);
  border-top-color: rgba(224, 170, 255, 0.9);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 2rem;
  box-shadow: 0 0 35px rgba(123, 44, 191, 0.4);
}
.loading-text {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.7);
  animation: pulse 2s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(224, 170, 255, 0.6);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ===== VIGNETTE & FILM GRAIN ===== */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(4, 4, 10, 0.75) 100%
  );
}

/* ===== GLASSMORPHISM ===== */
.glass-nav {
  background: rgba(12, 13, 26, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-card {
  background: rgba(18, 19, 36, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.glass-modal {
  background: rgba(15, 16, 30, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== CAROUSEL 3D ===== */
.carousel-perspective {
  perspective: 1200px;
  perspective-origin: 50% 50%;
}
.carousel-card {
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}
.card-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(8, 9, 20, 0.6) 50%,
    rgba(8, 9, 20, 0.95) 100%
  );
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 8, 17, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(224, 170, 255, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 170, 255, 0.5);
}

/* Breakpoint plus fin pour mobile très petit */
@media (max-width: 640px) {
  .carousel-card {
    width: 210px !important;
  }
}

/* Réduire la taille des images sur mobile pour performance */
@media (max-width: 768px) {
  #canvas-container {
    opacity: 0.6; /* Réduit la charge GPU */
  }
}

/* Augmenter le temps du loader sur mobile */
@media (max-width: 768px) {
  .loading-screen {
    transition: opacity 1s ease;
  }
}