/**
 * ================================================
 * AURA DESIGN SYSTEM — CSS Global Premium
 * ================================================
 * Ne pas modifier les variables --color-primary etc.
 * Ces tokens sont partagés avec style.css et les CSS marketplace
 */

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

/* ================================================
   TOKENS ENRICHIS
   ================================================ */
:root {
  /* Palette Aura (inchangée) */
  --aura-primary:    #253337;
  --aura-secondary:  #5C6C73;
  --aura-tertiary:   #9DB5C0;
  --aura-surface:    #C2E0E3;
  --aura-accent:     #E0FCFC;
  --aura-white:      #FFFFFF;

  /* Couleurs fonctionnelles */
  --aura-success:    #22c55e;
  --aura-warning:    #f59e0b;
  --aura-error:      #ef4444;
  --aura-info:       #3b82f6;

  /* Couleurs dérivées (enrichies) */
  --aura-primary-deep:    #1a2428;
  --aura-primary-light:   #2e4148;
  --aura-accent-warm:     #d1f5f5;
  --aura-surface-light:   #f0f8f9;
  --aura-overlay:         rgba(37, 51, 55, 0.75);

  /* Ombres premium */
  --shadow-xs:  0 1px 2px rgba(37,51,55,0.06);
  --shadow-sm:  0 2px 8px rgba(37,51,55,0.08);
  --shadow-md:  0 4px 16px rgba(37,51,55,0.12);
  --shadow-lg:  0 8px 32px rgba(37,51,55,0.16);
  --shadow-xl:  0 16px 48px rgba(37,51,55,0.20);
  --shadow-2xl: 0 24px 64px rgba(37,51,55,0.25);
  --shadow-glow: 0 0 24px rgba(224,252,252,0.35);
  --shadow-card-hover: 0 20px 40px rgba(37,51,55,0.18), 0 4px 12px rgba(37,51,55,0.10);

  /* Rayons */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-fast:    0.15s ease;
  --ease-smooth:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:  0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-elastic: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Typographie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Espacements */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-navbar:   1000;
  --z-sidebar:  1000;
  --z-modal:    2000;
  --z-toast:    3000;
}

/* ================================================
   BASE & RESET ADDITIONNEL
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Appliquer Inter globalement */
body {
  font-family: var(--font-sans);
}

img {
  max-width: 100%;
  height: auto;
}

/* Supprime le focus outline par défaut et ajoute un focus premium */
:focus-visible {
  outline: 2px solid var(--aura-surface);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ================================================
   GLASSMORPHISM UTILITIES
   ================================================ */
.glass {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.18);
}

.glass-dark {
  background: rgba(37,51,55,0.75);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.10);
}

.glass-surface {
  background: rgba(224,252,252,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(194,224,227,0.4);
}

/* ================================================
   GRADIENTS UTILITAIRES
   ================================================ */
.gradient-primary {
  background: linear-gradient(135deg, var(--aura-primary) 0%, var(--aura-secondary) 100%);
}

.gradient-accent {
  background: linear-gradient(135deg, var(--aura-accent) 0%, var(--aura-surface) 100%);
}

.gradient-hero {
  background: linear-gradient(135deg, var(--aura-primary-deep) 0%, var(--aura-primary) 40%, var(--aura-secondary) 100%);
}

.gradient-surface {
  background: linear-gradient(180deg, var(--aura-surface-light) 0%, var(--aura-accent) 100%);
}

.text-gradient {
  background: linear-gradient(135deg, var(--aura-accent) 0%, var(--aura-surface) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================================
   SKELETON LOADERS
   ================================================ */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--aura-surface) 25%,
    var(--aura-accent) 50%,
    var(--aura-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  border-radius: var(--radius-full);
}

.skeleton-title {
  height: 24px;
  border-radius: var(--radius-full);
}

.skeleton-img {
  width: 100%;
  padding-top: 75%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.skeleton-card {
  background: var(--aura-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ================================================
   ANIMATIONS REVEAL (Scroll)
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Délais en cascade */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ================================================
   ANIMATIONS KEYFRAMES
   ================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224,252,252,0.5); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 12px rgba(224,252,252,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224,252,252,0); }
}

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

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes particle-float {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translate(var(--tx, 50px), var(--ty, -80px)) rotate(360deg); opacity: 0; }
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes counter-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================
   COMPOSANTS PREMIUM — BADGES
   ================================================ */
.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge-popular {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  box-shadow: 0 2px 8px rgba(255,107,53,0.35);
}

.badge-new {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 2px 8px rgba(34,197,94,0.35);
}

.badge-sale {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,0.35);
}

.badge-verified {
  background: linear-gradient(135deg, var(--aura-secondary), var(--aura-tertiary));
  color: white;
  box-shadow: 0 2px 6px rgba(92,108,115,0.3);
}

/* ================================================
   COMPOSANTS PREMIUM — BOUTONS
   ================================================ */

/* Bouton avec effet ripple */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.3);
  pointer-events: none;
  animation: ripple-effect 0.6s linear;
}

/* Bouton gradient Aura */
.btn-aura {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary));
  color: var(--aura-white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--ease-smooth);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn-aura::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--aura-secondary), var(--aura-primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-aura:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--aura-white);
}

.btn-aura:hover::before {
  opacity: 1;
}

.btn-aura span,
.btn-aura svg {
  position: relative;
  z-index: 1;
}

/* Bouton outline premium */
.btn-aura-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 23px;
  background: transparent;
  color: var(--aura-primary);
  border: 2px solid var(--aura-tertiary);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--ease-smooth);
}

.btn-aura-outline:hover {
  background: var(--aura-primary);
  border-color: var(--aura-primary);
  color: var(--aura-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ================================================
   COMPOSANTS PREMIUM — CARTES
   ================================================ */
.card-premium {
  background: var(--aura-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(194,224,227,0.4);
  transition: transform var(--ease-smooth), box-shadow var(--ease-smooth);
  overflow: hidden;
}

.card-premium:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

/* ================================================
   COMPOSANTS PREMIUM — INPUTS
   ================================================ */
.input-premium {
  width: 100%;
  padding: 12px 16px;
  background: var(--aura-white);
  border: 2px solid var(--aura-surface);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--aura-primary);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
  outline: none;
}

.input-premium:focus {
  border-color: var(--aura-secondary);
  box-shadow: 0 0 0 4px rgba(92,108,115,0.12);
}

.input-premium::placeholder {
  color: var(--aura-tertiary);
}

/* ================================================
   COMPOSANTS — SECTION HEADERS
   ================================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--aura-secondary);
  margin-bottom: 12px;
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--aura-surface);
  min-width: 20px;
}

/* ================================================
   COMPOSANTS — SPINNER / LOADER
   ================================================ */
.spinner-aura {
  width: 40px;
  height: 40px;
  border: 3px solid var(--aura-surface);
  border-top-color: var(--aura-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* ================================================
   COMPOSANTS — DIVIDERS
   ================================================ */
.divider-premium {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--aura-surface), transparent);
  border: none;
  margin: 24px 0;
}

/* ================================================
   COMPOSANTS — FLOATING ACTIONS (amélioré)
   ================================================ */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: var(--z-sticky);
}

.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--ease-bounce), box-shadow var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.fab-btn:hover {
  transform: scale(1.12) translateY(-2px);
}

.fab-btn-primary {
  background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary));
  color: var(--aura-white);
  box-shadow: 0 4px 16px rgba(37,51,55,0.35);
}

.fab-btn-secondary {
  background: var(--aura-white);
  color: var(--aura-secondary);
  border: 2px solid var(--aura-surface);
  box-shadow: 0 4px 12px rgba(37,51,55,0.12);
}

/* Tooltip FAB */
.fab-btn::before {
  content: attr(title);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--aura-primary);
  color: var(--aura-white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-fast);
}

.fab-btn:hover::before {
  opacity: 1;
}

/* ================================================
   COMPOSANTS — EMPTY STATE
   ================================================ */
.empty-state-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.empty-state-premium .empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--aura-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--aura-secondary);
}

.empty-state-premium .empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--aura-primary);
  margin-bottom: 8px;
}

.empty-state-premium .empty-text {
  font-size: 14px;
  color: var(--aura-secondary);
  max-width: 320px;
  line-height: 1.6;
}

/* ================================================
   COMPOSANTS — RATING STARS
   ================================================ */
.stars-display {
  display: inline-flex;
  gap: 2px;
  color: #f59e0b;
}

.stars-display svg {
  fill: currentColor;
}

.stars-empty {
  color: #e5e7eb;
}

/* ================================================
   UTILITIES
   ================================================ */
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.truncate-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.w-full { width: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ================================================
   RESPONSIVE UTILITIES
   ================================================ */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

@media (max-width: 480px) {
  .fab-container {
    bottom: 16px;
    right: 16px;
  }

  .fab-btn {
    width: 46px;
    height: 46px;
  }
}

/* ================================================
   AMÉLIORATION SCROLL BAR
   ================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--aura-tertiary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--aura-secondary);
}

/* ================================================
   SÉLECTION TEXTE
   ================================================ */
::selection {
  background: var(--aura-surface);
  color: var(--aura-primary);
}

/* ================================================
   PRINT — Réinitialisation animations
   ================================================ */
@media print {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fab-container { display: none !important; }
}
