/* ========================================
   🎨 STACY MAKEUP CREATIONS - MODERN DESIGN
   ======================================== */

/* Variables CSS pour le thème futuriste */
:root {
  /* Couleurs principales */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  
  /* Couleurs solides */
  --primary-color: #667eea;
  --secondary-color: #f093fb;
  --accent-color: #4facfe;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-light: #ecf0f1;
  --background-dark: #1a1a2e;
  --background-light: #16213e;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  
  /* Animations optimisées */
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Espacements */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === ACCESSIBILITÉ === */

/* Lien d'évitement pour les lecteurs d'écran */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sr-only-focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0.5rem 1rem !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  background: var(--accent-color) !important;
  color: white !important;
  text-decoration: none !important;
  z-index: 10000 !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
}

/* Focus visible amélioré */
:focus-visible {
  outline: 3px solid var(--accent-color) !important;
  outline-offset: 2px !important;
  border-radius: 2px !important;
}

/* Réduction du mouvement pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .floating {
    animation: none !important;
  }
  
  .particle {
    animation: none !important;
  }
}

/* Contraste élevé */
@media (prefers-contrast: high) {
  :root {
    --text-light: #ffffff;
    --text-primary: #000000;
    --glass-bg: rgba(0, 0, 0, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);
  }
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background animé */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  animation: backgroundFlow 20s ease-in-out infinite;
  z-index: -1;
}

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

/* Typographie moderne */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-md);
  text-align: center;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: var(--spacing-sm);
}

p {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
  opacity: 0.9;
}

/* Container moderne */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header futuriste */
.navbar {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(26, 26, 46, 0.95) !important;
  box-shadow: var(--glass-shadow);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--secondary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none !important;
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 var(--spacing-xs);
  position: relative;
  transition: var(--transition-smooth);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: var(--transition-smooth);
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
  transform: translateY(-2px);
}

/* Boutons modernes */
.btn {
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-bounce);
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: var(--secondary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-accent {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition-smooth);
}

.btn:hover::before {
  left: 100%;
}

/* Cards glassmorphism */
.card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border) !important;
  border-radius: 20px !important;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  overflow: hidden;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card:hover::before {
  opacity: 1;
}

.card-body {
  padding: var(--spacing-md) !important;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  background: var(--secondary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-text {
  color: var(--text-light);
  opacity: 0.8;
  line-height: 1.6;
}

/* Images avec effet hover */
.card img, .creation-image {
  border-radius: 15px;
  transition: var(--transition-smooth);
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.card:hover img, .creation-image:hover {
  transform: scale(1.05);
  filter: brightness(1.1) saturate(1.2);
}

/* Hero section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 1s ease-out;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero .btn {
  animation: fadeInUp 1s ease-out 0.6s both;
  margin: 0 var(--spacing-xs);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.floating {
  animation: float 6s ease-in-out infinite;
}

/* Grid des créations */
.creations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

/* Sections */
.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

/* Footer moderne */
.footer {
  background: var(--dark-gradient);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer h5 {
  color: var(--accent-color);
  margin-bottom: var(--spacing-sm);
}

.footer p, .footer a {
  color: var(--text-light);
  opacity: 0.8;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer a:hover {
  opacity: 1;
  color: var(--accent-color);
}

/* Particles d'arrière-plan */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 50%;
  opacity: 0.6;
  animation: particleFloat 10s linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Loading spinner futuriste */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

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

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

/* Responsive design */
@media (max-width: 768px) {
  :root {
    --spacing-sm: 0.75rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
  }
  
  .hero {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
  
  .creations-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .navbar-collapse {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 10px;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}