/* Variables CSS - Palette harmonisée */
:root {
  /* Couleurs principales */
  --primary-color: #374F29;
  --primary-light: #4a6235;
  --primary-dark: #2d3e1f;
  --secondary-color: #8b5a3c;
  --accent-color: #d4af37;
  --accent-light: #f4e4a6;
  
  /* Couleurs de texte */
  --text-dark: #1f2937;
  --text-medium: #4b5563;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  
  /* Couleurs de fond */
  --bg-white: #ffffff;
  --bg-cream: #fefcf7;
  --bg-light: #f8f6f0;
  --bg-sage: #f0f2ed;
  --bg-dark: #1a1a1a;
  --bg-overlay: rgba(45, 62, 31, 0.85);
  
  /* Couleurs de bordure et ombres */
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Typographie */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* Tailles de police */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Espacement */
  --border-radius-sm: 4px;
  --border-radius: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: all 0.15s ease-in-out;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1060;
}

/* Reset et base améliorés */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Sélection de texte */
::selection {
  background-color: var(--accent-light);
  color: var(--text-dark);
}

::-moz-selection {
  background-color: var(--accent-light);
  color: var(--text-dark);
}

/* Images optimisées */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius-sm);
}

/* Liens avec animation */
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
}

a:hover {
  color: var(--primary-color);
}

/* Container responsive amélioré */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}

/* Navigation améliorée */
.topbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.topbar.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.98);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.025em;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.02);
  color: var(--primary-light);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-menu a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: var(--text-base);
  padding: 8px 4px;
  position: relative;
  letter-spacing: -0.01em;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: var(--transition);
  border-radius: 1px;
}

.nav-menu a:hover::after {
  width: 100%;
}

.cart-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.cart-btn:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cart-btn:active {
  transform: translateY(0);
}

/* Hero Section avec parallax */
.hero {
  background: linear-gradient(135deg, rgba(55, 79, 41, 0.85), rgba(139, 90, 60, 0.3)),
              url('/assets/images/hero.jpg') center/cover no-repeat fixed;
  color: var(--text-white);
  padding: 160px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: var(--text-xl);
  margin-bottom: 40px;
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  line-height: 1.7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--accent-color), #b8941f);
  color: var(--text-dark);
  padding: 18px 36px;
  border-radius: var(--border-radius-xl);
  font-weight: 700;
  font-size: var(--text-lg);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  letter-spacing: -0.01em;
  text-shadow: none;
}

.cta-button:hover {
  background: linear-gradient(135deg, #b8941f, var(--accent-color));
  transform: translateY(-4px);
  box-shadow: 0 25px 35px -5px rgba(212, 175, 55, 0.3), 0 10px 10px -5px rgba(212, 175, 55, 0.2);
}

/* Sections avec espacement amélioré */
.section {
  padding: 100px 0;
}

.section:nth-child(even) {
  background: var(--bg-light);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  line-height: 1.2;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-light));
  margin: 20px auto;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  font-size: var(--text-xl);
  color: var(--text-medium);
  margin-bottom: 80px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  line-height: 1.7;
}

/* Grille produits avec animations */
.products-section {
  background: var(--bg-sage);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-slow);
  position: relative;
  border: 1px solid var(--border-light);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(212, 175, 55, 0.05));
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
  pointer-events: none;
}

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

.product-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: var(--transition);
  border-radius: 0;
}

.product-card:hover img {
  transform: scale(1.05);
}

.card-body {
  padding: 32px;
  position: relative;
  z-index: 2;
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  margin-bottom: 12px;
  color: var(--primary-color);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card-desc {
  color: var(--text-medium);
  margin-bottom: 24px;
  line-height: 1.7;
  font-size: var(--text-base);
}

.card-price {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 24px;
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.buy-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
  padding: 16px 24px;
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

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

.buy-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.buy-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Section Histoire avec mise en page améliorée */
.story-section {
  padding: 120px 0;
  background: var(--bg-cream);
}

.story-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  margin-bottom: 60px;
  box-shadow: var(--shadow-lg);
}

.story-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.story-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  margin-bottom: 40px;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.story-text {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--text-medium);
  margin-bottom: 60px;
  text-align: left;
}

.story-text p {
  margin-bottom: 24px;
}

.story-text p:last-child {
  margin-bottom: 0;
}

.story-text em {
  font-style: italic;
  color: var(--primary-color);
  font-weight: 500;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  margin-top: 80px;
}

.value-item {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.value-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.value-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

.value-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: 16px;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.value-desc {
  color: var(--text-medium);
  line-height: 1.6;
  font-size: var(--text-base);
}

/* Sections huiles avec cartes améliorées */
.oils-section {
  background: var(--bg-light);
}

.oils-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
}

.oil-card {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.oil-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-light));
  transition: var(--transition-slow);
}

.oil-card:hover::before {
  left: 0;
}

.oil-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.oil-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: 20px;
  color: var(--primary-color);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.oil-card p {
  color: var(--text-medium);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: var(--text-base);
}

.oil-card p:last-child {
  margin-bottom: 0;
}

/* Section Contact avec mise en page moderne */
.contact-section {
  padding: 120px 0;
  background: var(--bg-sage);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 50px;
  margin-bottom: 80px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: 8px;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.contact-info p {
  color: var(--text-medium);
  line-height: 1.6;
  font-size: var(--text-base);
}

.contact-info a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: var(--transition);
}

.contact-info a:hover {
  text-decoration-color: var(--primary-color);
  color: var(--primary-light);
}

/* Footer moderne */
.footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  color: var(--text-white);
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.footer-links a {
  color: var(--text-white);
  opacity: 0.9;
  transition: var(--transition);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
}

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

.aop-badge {
  background: linear-gradient(135deg, var(--accent-color), #b8941f);
  color: var(--text-dark);
  padding: 12px 20px;
  border-radius: var(--border-radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: var(--shadow-md);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Responsive amélioré */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
  }
  
  .oils-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 80px 0;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .hero {
    padding: 120px 0 80px;
  }
  
  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .hero p {
    font-size: var(--text-lg);
  }
  
  .section-title {
    font-size: clamp(1.875rem, 6vw, 2.5rem);
  }
  
  .values-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 20px;
  }
  
  .story-text {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .card-body,
  .oil-card,
  .contact-item {
    padding: 24px;
  }
  
  .hero {
    padding: 100px 0 60px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .story-section,
  .contact-section {
    padding: 80px 0;
  }
}

/* Accessibilité améliorée */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .hero {
    background-attachment: scroll;
  }
}

@media (prefers-color-scheme: dark) {
  /* Adaptation pour le mode sombre si nécessaire */
}

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

button:focus-visible,
.buy-btn:focus-visible,
.cta-button:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Animations au scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* Navigation scrolled state */
.topbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive parallax */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll !important;
  }
}
