/*
Theme Name: Mouma Crafts
Theme URI: https://moumacrafts.com
Author: Mouma Crafts
Author URI: https://moumacrafts.com
Description: Un thème WordPress moderne et chaleureux pour boutique de crafts en laine avec WooCommerce
Version: 1.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mouma-crafts
Tags: e-commerce, woocommerce, artisan, handmade, responsive
*/

/* ============================================
   DESIGN SYSTEM - Variables CSS
   ============================================ */
:root {
  /* Palette chaleureuse et naturelle */
  --color-primary: #D4957D;          /* Terracotta doux */
  --color-secondary: #A67C6F;        /* Brun rosé */
  --color-accent: #E8B298;           /* Pêche chaleureux */
  --color-dark: #4A3933;             /* Brun foncé */
  --color-light: #FFF8F3;            /* Crème chaud */
  --color-cream: #FAF3EE;            /* Beige très clair */
  --color-text: #3D2E28;             /* Brun pour le texte */
  --color-text-light: #7A6A63;      /* Brun clair */
  
  /* Typographie distinctive */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Commissioner', sans-serif;
  --font-accent: 'Caveat', cursive;
  
  /* Espacements harmonieux */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* Transitions fluides */
  --transition-quick: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-light);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Texture de fond subtile */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(212, 149, 125, 0.02) 2px,
      rgba(212, 149, 125, 0.02) 4px
    );
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-dark);
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: var(--space-sm);
}

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

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

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 248, 243, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 149, 125, 0.2);
  padding: var(--space-sm) 0;
  z-index: 1000;
  animation: slideDown 0.6s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: fadeInLeft 0.8s ease;
}

.site-logo img {
  height: 60px;
  width: auto;
  transition: var(--transition-smooth);
}

.site-logo:hover img {
  transform: scale(1.05) rotate(-2deg);
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-dark);
  font-weight: 600;
}

/* Navigation */
.main-navigation {
  animation: fadeInRight 0.8s ease;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.main-navigation a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--color-text);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: var(--transition-smooth);
  position: relative;
}

.main-navigation a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.main-navigation a:hover {
  color: var(--color-primary);
  background: rgba(212, 149, 125, 0.1);
}

.main-navigation a:hover::before {
  width: 40px;
}

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

.cart-icon:hover {
  transform: scale(1.2);
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-light) 100%);
  padding: var(--space-xl) var(--space-md);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 178, 152, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, 20px) rotate(5deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 1s ease;
}

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

.hero-content h1 {
  margin-bottom: var(--space-md);
  animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-subtitle {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 1s ease 0.6s backwards;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 50px;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(212, 149, 125, 0.3);
  animation: fadeInUp 1s ease 0.8s backwards;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(212, 149, 125, 0.4);
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.products-section {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease;
}

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  border-radius: 2px;
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.6s ease backwards;
  position: relative;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 40px rgba(212, 149, 125, 0.2);
}

.product-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-cream);
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--color-accent);
  color: var(--color-dark);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-accent);
  z-index: 2;
}

.product-content {
  padding: var(--space-md);
}

.product-title {
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
  color: var(--color-dark);
}

.product-description {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-md);
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-primary);
  font-weight: 600;
}

.add-to-cart-btn {
  background: var(--color-primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.add-to-cart-btn:hover {
  background: var(--color-secondary);
  transform: scale(1.05);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xl) var(--space-md) var(--space-md);
  margin-top: var(--space-xl);
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h3 {
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  font-size: 1.3rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--space-xs);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-quick);
}

.footer-section a:hover {
  color: var(--color-accent);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    min-height: 50vh;
    padding: var(--space-lg) var(--space-sm);
  }
  
  h1 {
    font-size: 2rem;
  }
}

/* ============================================
   ANIMATIONS SUPPLÉMENTAIRES
   ============================================ */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Effet de chargement */
.loading {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

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

/* Hover effects pour les images */
.image-hover-effect {
  position: relative;
  overflow: hidden;
}

.image-hover-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition-smooth);
}

.image-hover-effect:hover::after {
  left: 100%;
}
