/**
 * LLA Marketplace Design System
 * Version: 2.0.0
 * 
 * Design system unifié pour toutes les extensions LLA
 * Priorité absolue sur WooCommerce et Elementor
 * 
 * Basé sur l'identité visuelle: https://le-local-des-artisans.com/
 */

/* ============================================
   DESIGN TOKENS - Identité Le Local des Artisans
   ============================================ */

:root {
  /* Brand Colors - Or Artisan + Brun */
  --lla-primary: #D79942;
  --lla-primary-hover: #C88835;
  --lla-primary-light: #E7D5C8;
  --lla-primary-dark: #A87530;
  
  --lla-secondary: #30251D;
  --lla-secondary-hover: #483A2E;
  --lla-secondary-light: #5C4D41;
  
  /* Neutral Scale - Tons chauds */
  --lla-white: #FFFFFF;
  --lla-cream-50: #FDFCFB;
  --lla-cream-100: #F7F5F3;
  --lla-cream-200: #F0EBE6;
  --lla-beige-300: #E5DDD5;
  --lla-beige-400: #D4C9BD;
  --lla-brown-500: #A89985;
  --lla-brown-600: #7A6F5D;
  --lla-brown-700: #5C5245;
  --lla-brown-800: #3E372F;
  --lla-brown-900: #30251D;
  
  /* Semantic Colors */
  --lla-success: #10B981;
  --lla-success-light: #D1FAE5;
  --lla-warning: #F59E0B;
  --lla-warning-light: #FEF3C7;
  --lla-error: #EF4444;
  --lla-error-light: #FEE2E2;
  --lla-info: #3B82F6;
  --lla-info-light: #DBEAFE;
  
  /* Typography Scale */
  --lla-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --lla-font-serif: Georgia, 'Times New Roman', serif;
  
  --lla-text-xs: 0.75rem;      /* 12px */
  --lla-text-sm: 0.875rem;     /* 14px */
  --lla-text-base: 1rem;       /* 16px */
  --lla-text-lg: 1.125rem;     /* 18px */
  --lla-text-xl: 1.25rem;      /* 20px */
  --lla-text-2xl: 1.5rem;      /* 24px */
  --lla-text-3xl: 1.875rem;    /* 30px */
  --lla-text-4xl: 2.25rem;     /* 36px */
  
  --lla-font-normal: 400;
  --lla-font-medium: 500;
  --lla-font-semibold: 600;
  --lla-font-bold: 700;
  
  --lla-leading-tight: 1.25;
  --lla-leading-normal: 1.5;
  --lla-leading-relaxed: 1.75;
  
  /* Spacing Scale - 4px base */
  --lla-space-0: 0;
  --lla-space-1: 0.25rem;      /* 4px */
  --lla-space-2: 0.5rem;       /* 8px */
  --lla-space-3: 0.75rem;      /* 12px */
  --lla-space-4: 1rem;         /* 16px */
  --lla-space-5: 1.25rem;      /* 20px */
  --lla-space-6: 1.5rem;       /* 24px */
  --lla-space-8: 2rem;         /* 32px */
  --lla-space-10: 2.5rem;      /* 40px */
  --lla-space-12: 3rem;        /* 48px */
  --lla-space-16: 4rem;        /* 64px */
  --lla-space-20: 5rem;        /* 80px */
  
  /* Border Radius */
  --lla-radius-none: 0;
  --lla-radius-sm: 0.25rem;    /* 4px */
  --lla-radius-md: 0.375rem;   /* 6px */
  --lla-radius-lg: 0.5rem;     /* 8px */
  --lla-radius-xl: 0.75rem;    /* 12px */
  --lla-radius-2xl: 1rem;      /* 16px */
  --lla-radius-full: 9999px;
  
  /* Shadows - Subtiles et élégantes */
  --lla-shadow-xs: 0 1px 2px 0 rgba(48, 37, 29, 0.05);
  --lla-shadow-sm: 0 1px 3px 0 rgba(48, 37, 29, 0.08), 0 1px 2px 0 rgba(48, 37, 29, 0.04);
  --lla-shadow-md: 0 4px 6px -1px rgba(48, 37, 29, 0.08), 0 2px 4px -1px rgba(48, 37, 29, 0.04);
  --lla-shadow-lg: 0 10px 15px -3px rgba(48, 37, 29, 0.08), 0 4px 6px -2px rgba(48, 37, 29, 0.04);
  --lla-shadow-xl: 0 20px 25px -5px rgba(48, 37, 29, 0.08), 0 10px 10px -5px rgba(48, 37, 29, 0.03);
  
  /* Transitions */
  --lla-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --lla-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --lla-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --lla-z-base: 0;
  --lla-z-dropdown: 1000;
  --lla-z-sticky: 1020;
  --lla-z-fixed: 1030;
  --lla-z-overlay: 1040;
  --lla-z-modal: 1050;
  --lla-z-popover: 1060;
  --lla-z-tooltip: 1070;
}

/* ============================================
   RESET - Anti WooCommerce/Elementor
   ============================================ */

/* Scope global LLA - Force notre design */
.lla-marketplace,
.lla-marketplace *,
[class*="lla-"],
[class*="wcvm-"],
[class*="cvs-"],
[class*="wcapl-"] {
  box-sizing: border-box !important;
}

/* Reset WooCommerce buttons */
.lla-marketplace .button,
.lla-marketplace button,
.lla-marketplace input[type="submit"],
.lla-marketplace .woocommerce-button {
  all: unset;
  box-sizing: border-box !important;
}

/* Reset Elementor widgets */
.lla-marketplace .elementor-widget,
.lla-marketplace .elementor-element {
  margin: 0 !important;
}

/* Force notre font family */
.lla-marketplace,
.lla-marketplace * {
  font-family: var(--lla-font-sans) !important;
}

/* ============================================
   BASE STYLES
   ============================================ */

.lla-marketplace {
  color: var(--lla-brown-900);
  background-color: var(--lla-cream-100);
  line-height: var(--lla-leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.lla-marketplace a {
  color: inherit;
  text-decoration: none;
  transition: color var(--lla-transition-base);
}

.lla-marketplace img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */

.lla-text-xs { font-size: var(--lla-text-xs) !important; }
.lla-text-sm { font-size: var(--lla-text-sm) !important; }
.lla-text-base { font-size: var(--lla-text-base) !important; }
.lla-text-lg { font-size: var(--lla-text-lg) !important; }
.lla-text-xl { font-size: var(--lla-text-xl) !important; }
.lla-text-2xl { font-size: var(--lla-text-2xl) !important; }
.lla-text-3xl { font-size: var(--lla-text-3xl) !important; }

.lla-font-normal { font-weight: var(--lla-font-normal) !important; }
.lla-font-medium { font-weight: var(--lla-font-medium) !important; }
.lla-font-semibold { font-weight: var(--lla-font-semibold) !important; }
.lla-font-bold { font-weight: var(--lla-font-bold) !important; }

.lla-text-primary { color: var(--lla-primary) !important; }
.lla-text-secondary { color: var(--lla-secondary) !important; }
.lla-text-brown-700 { color: var(--lla-brown-700) !important; }
.lla-text-brown-600 { color: var(--lla-brown-600) !important; }

/* ============================================
   SPACING UTILITIES
   ============================================ */

.lla-m-0 { margin: var(--lla-space-0) !important; }
.lla-m-2 { margin: var(--lla-space-2) !important; }
.lla-m-4 { margin: var(--lla-space-4) !important; }
.lla-m-6 { margin: var(--lla-space-6) !important; }
.lla-m-8 { margin: var(--lla-space-8) !important; }

.lla-mt-4 { margin-top: var(--lla-space-4) !important; }
.lla-mb-4 { margin-bottom: var(--lla-space-4) !important; }
.lla-mb-6 { margin-bottom: var(--lla-space-6) !important; }

.lla-p-0 { padding: var(--lla-space-0) !important; }
.lla-p-2 { padding: var(--lla-space-2) !important; }
.lla-p-4 { padding: var(--lla-space-4) !important; }
.lla-p-6 { padding: var(--lla-space-6) !important; }
.lla-p-8 { padding: var(--lla-space-8) !important; }

.lla-gap-2 { gap: var(--lla-space-2) !important; }
.lla-gap-4 { gap: var(--lla-space-4) !important; }
.lla-gap-6 { gap: var(--lla-space-6) !important; }

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.lla-flex { display: flex !important; }
.lla-inline-flex { display: inline-flex !important; }
.lla-grid { display: grid !important; }
.lla-block { display: block !important; }
.lla-inline-block { display: inline-block !important; }
.lla-hidden { display: none !important; }

.lla-flex-col { flex-direction: column !important; }
.lla-flex-row { flex-direction: row !important; }
.lla-flex-wrap { flex-wrap: wrap !important; }

.lla-items-center { align-items: center !important; }
.lla-items-start { align-items: flex-start !important; }
.lla-justify-center { justify-content: center !important; }
.lla-justify-between { justify-content: space-between !important; }

.lla-w-full { width: 100% !important; }
.lla-h-full { height: 100% !important; }

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

.lla-transition { transition: all var(--lla-transition-base) !important; }
.lla-transition-fast { transition: all var(--lla-transition-fast) !important; }
.lla-transition-slow { transition: all var(--lla-transition-slow) !important; }

@keyframes lla-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lla-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes lla-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.lla-animate-fade-in {
  animation: lla-fade-in 0.3s ease-out;
}

.lla-animate-spin {
  animation: lla-spin 1s linear infinite;
}

.lla-animate-pulse {
  animation: lla-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Mobile First - Breakpoints cohérents */
/* sm: 640px - md: 768px - lg: 1024px - xl: 1280px - 2xl: 1536px */

@media (max-width: 639px) {
  .lla-hidden-mobile { display: none !important; }
}

@media (min-width: 640px) {
  .lla-hidden-sm-up { display: none !important; }
}

@media (min-width: 768px) {
  .lla-hidden-md-up { display: none !important; }
}

@media (min-width: 1024px) {
  .lla-hidden-lg-up { display: none !important; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus visible pour navigation clavier */
.lla-marketplace *:focus-visible {
  outline: 2px solid var(--lla-primary) !important;
  outline-offset: 2px !important;
}

/* Skip link pour accessibilité */
.lla-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--lla-secondary);
  color: var(--lla-white);
  padding: var(--lla-space-2) var(--lla-space-4);
  text-decoration: none;
  z-index: var(--lla-z-tooltip);
}

.lla-skip-link:focus {
  top: 0;
}

/* Screen reader only */
.lla-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
