/* styles.css - Professional stylesheet for La Pastorale du Congo */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-green: #1e8449;
  --secondary-green: #d4efdd;
  --accent-red: #e74c3c;
  --text-dark: #333;
  --text-light: #666;
  --white: #ffffff;
  --shadow-light: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-heavy: 0 12px 30px rgba(0,0,0,0.15);
  --border-light: #ddd;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  background-color: var(--accent-red);
  color: var(--white);
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  font-size: 1em;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.btn:active {
  transform: translateY(0);
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  border: 4px solid var(--secondary-green);
  border-top: 4px solid var(--primary-green);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header */
header {
  background: var(--primary-green);
  color: var(--white);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 1.5em;
  font-weight: 700;
}

.cart-toggle {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.2em;
  cursor: pointer;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-red);
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

nav ul li a:hover {
  color: #f0f0f0;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  transition: var(--transition);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: var(--white);
  padding: 120px 20px 80px;
  text-align: center;
  margin-top: 70px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-img img, .page-image img {
  max-width: 450px;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: var(--shadow-heavy);
  object-fit: cover;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-green);
  font-size: 2.5rem;
  font-weight: 700;
}

.section-alt {
  background: #f8f9fa;
}

/* Products */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.product-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-green);
  font-size: 1.3rem;
}

.product-info p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* Cart Overlay */
.cart {
  position: fixed;
  top: 80px;
  right: -400px;
  width: 350px;
  max-height: 80vh;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-heavy);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 200;
  transition: right 0.3s ease;
}

.cart.show {
  right: 20px;
}

.cart h3 {
  margin-bottom: 1rem;
  color: var(--primary-green);
  font-size: 1.3rem;
  border-bottom: 2px solid var(--secondary-green);
  padding-bottom: 0.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.cart-total {
  font-weight: 700;
  font-size: 1.3rem;
  margin: 1rem 0;
  text-align: center;
  color: var(--primary-green);
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Contact */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info, .contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
}

.contact-info h3 {
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.contact-info p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 2px solid #eee;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-green);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  text-align: center;
}

.testimonial p {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-green);
}

/* Newsletter */
.newsletter {
  background: var(--primary-green);
  color: var(--white);
  text-align: center;
  padding: 3rem 2rem;
}

.newsletter h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.newsletter form {
  max-width: 400px;
  margin: 0 auto;
}

.newsletter input {
  width: 70%;
  padding: 1rem;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 1rem;
}

.newsletter .btn {
  width: 30%;
  border-radius: 0 8px 8px 0;
  padding: 1rem;
}

/* Footer */
footer {
  background: var(--primary-green);
  color: var(--white);
  text-align: center;
  padding: 2rem 0;
}

.footer-links a {
  color: #f0f0f0;
  margin: 0 1rem;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--white);
}

/* Back to Top */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-green);
  color: var(--white);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  nav ul {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--primary-green);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
  }
  
  nav ul.active {
    left: 0;
  }
  
  nav ul li {
    margin: 1rem 0;
  }
  
  .hero {
    padding: 100px 20px 60px;
    margin-top: 70px;
  }
  
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .cart {
    right: -100%;
    width: 90vw;
    max-width: 400px;
  }
  
  .cart.show {
    right: 5vw;
  }
  
  .products {
    grid-template-columns: 1fr;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .newsletter input {
    width: 60%;
  }
  
  .newsletter .btn {
    width: 40%;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .product-info {
    padding: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
