:root {
  --primary: #2D5016;
  --secondary: #8BC34A;
  --accent: #FF6B35;
  --dark: #1a1a1a;
  --light: #f5f5f5;
  --gray: #666666;
  --border: #e0e0e0;
  --success: #4CAF50;
  --warning: #ff9800;
  --error: #f44336;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark);
  background-color: #fff;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray);
}

/* Header & Navigation */
header {
  background-color: #fff;
  border-bottom: 2px solid var(--secondary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  background-color: var(--secondary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 1.25rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  font-weight: 600;
  color: var(--primary);
  transition: color 0.3s;
}

nav a:hover {
  color: var(--secondary);
}

.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--primary);
  transition: color 0.3s;
}

.cart-icon:hover {
  color: var(--secondary);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  background-color: #e55a2b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #7cb342;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(139, 195, 74, 0.3);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Scrolling Banner */
.banner-strip {
  background-color: var(--secondary);
  color: white;
  padding: 1rem 2rem;
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
}

.banner-content {
  animation: scroll 15s linear infinite;
  display: inline-block;
  padding-right: 2rem;
}

@keyframes scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.banner-content::after {
  content: "🌿 Biosourcé • 💶 Hard Discount • 🚚 Livraison Occitanie • ✅ Certifié PEFC";
  margin-left: 2rem;
}

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.category-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.category-card h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

/* Product Cards */
.products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  background-color: var(--light);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.product-image svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.product-price-ht {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

.product-description {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.btn-add-cart {
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background-color: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 200;
  transition: right 0.3s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  background-color: var(--primary);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--secondary);
}

.cart-header h2 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
}

.cart-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  padding: 1.5rem;
}

.cart-item {
  background-color: var(--light);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
}

.cart-item-info p {
  margin: 0;
  color: var(--gray);
  font-size: 0.9rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.25rem;
}

.cart-empty {
  text-align: center;
  padding: 2rem;
  color: var(--gray);
}

.cart-footer {
  background-color: var(--light);
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.cart-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: right;
}

.cart-footer .btn-primary {
  width: 100%;
}

/* Values Section */
.values-section {
  background-color: var(--light);
  padding: 4rem 2rem;
  margin: 4rem 0;
}

.values-container {
  max-width: 1200px;
  margin: 0 auto;
}

.values-title {
  text-align: center;
  margin-bottom: 3rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.value-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.value-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.value-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 300;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  color: var(--primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
}

.modal-body {
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
}

.modal-footer button {
  flex: 1;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: white;
  padding: 3rem 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--secondary);
  margin-bottom: 1rem;
}

.footer-section p, .footer-section a {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* FAQ Section */
.faq-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.faq-title {
  text-align: center;
  margin-bottom: 2rem;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.faq-question {
  padding: 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

.faq-question:hover {
  background-color: var(--light);
}

.faq-toggle {
  font-size: 1.25rem;
  transition: transform 0.3s;
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s;
  padding: 0 1.5rem;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer p {
  margin: 0;
  color: var(--gray);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out;
  z-index: 400;
}

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

.toast.error {
  background-color: var(--error);
}

.toast.warning {
  background-color: var(--warning);
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1rem 2rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.breadcrumb a {
  color: var(--primary);
  margin: 0 0.5rem;
}

/* Sidebar */
.products-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.sidebar {
  background: white;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  height: fit-content;
}

.sidebar h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 0.5rem;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group label {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
  margin-right: 0.75rem;
  cursor: pointer;
}

.sort-select {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 2rem;
  width: 100%;
}

/* Promo Banner */
.promo-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #ff5722 100%);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  margin: 3rem auto;
  max-width: 1200px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.promo-banner h3 {
  color: white;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.promo-banner p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

/* Contact Details */
.contact-details {
  background: white;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 2rem 0;
}

.contact-details h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  margin-bottom: 1rem;
  gap: 1rem;
}

.contact-item strong {
  color: var(--primary);
  min-width: 100px;
}

.contact-item p {
  margin: 0;
}

/* Map Placeholder */
.map-placeholder {
  width: 100%;
  height: 400px;
  background-color: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-weight: 600;
  margin: 2rem 0;
}

/* Newsletter */
.newsletter-section {
  background-color: var(--secondary);
  color: white;
  padding: 3rem 2rem;
  border-radius: 8px;
  margin: 3rem auto;
  max-width: 1200px;
  text-align: center;
}

.newsletter-section h3 {
  color: white;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
}

.newsletter-form button {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.newsletter-form button:hover {
  background-color: #e55a2b;
}

/* Certifications Grid */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.certification-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  border: 2px solid var(--border);
  text-align: center;
}

.certification-card h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.certification-card p {
  color: var(--gray);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  nav ul {
    gap: 1rem;
    flex-basis: 100%;
    order: 3;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .products-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .cart-sidebar.open {
    right: 0;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 1rem;
  }

  nav ul {
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    display: block;
    width: 100%;
  }

  .toast {
    right: 1rem;
    left: 1rem;
  }

  .modal-content {
    width: 95%;
  }
}
