/* ========================================
   HIMBIRI - Site E-commerce de Produits Capillaires
   Palette: Tons terreux, verts naturels, dorés
   ======================================== */

:root {
    /* Couleurs principales */
    --primary-color: #8B6F47; /* Brun terreux */
    --secondary-color: #2D5F3F; /* Vert naturel */
    --accent-gold: #D4AF37; /* Doré */
    --accent-coral: #E8956B; /* Corail doux */
    
    /* Couleurs neutres */
    --dark-brown: #3E2723;
    --light-cream: #FAF6F1;
    --warm-white: #FFF9F0;
    --text-dark: #2C2C2C;
    --text-light: #6B6B6B;
    
    /* Espacement */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typographie */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Playfair Display', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--warm-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHIE
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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

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

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
    background: linear-gradient(135deg, var(--dark-brown) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.brand-name {
    color: var(--warm-white);
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--warm-white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

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

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--warm-white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* ========================================
   BOUTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-coral) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 111, 71, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 111, 71, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #F4D03F 100%);
    color: var(--dark-brown);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    background: linear-gradient(135deg, rgba(62, 39, 35, 0.95) 0%, rgba(139, 111, 71, 0.9) 100%),
                url('https://images.unsplash.com/photo-1522337660859-02fbefca4702?w=1600') center/cover;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--warm-white);
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(62, 39, 35, 0.3) 100%);
}

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--light-cream);
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

/* ========================================
   SECTIONS COMMUNES
   ======================================== */

.section {
    padding: var(--spacing-xl) var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    color: var(--dark-brown);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

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

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* ========================================
   GRILLE DE PRODUITS
   ======================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: var(--spacing-lg);
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--warm-white) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    color: var(--dark-brown);
}

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

.product-price {
    font-size: 1.8rem;
    color: var(--accent-gold);
    font-weight: 700;
    margin: 1rem 0;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn-add-cart {
    flex: 1;
    padding: 0.8rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: var(--dark-brown);
    transform: translateY(-2px);
}

/* ========================================
   AVANTAGES
   ======================================== */

.features-section {
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--warm-white) 100%);
    padding: var(--spacing-xl) var(--spacing-md);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: var(--spacing-lg);
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.feature-title {
    font-size: 1.3rem;
    color: var(--dark-brown);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
}

/* ========================================
   TÉMOIGNAGES
   ======================================== */

.testimonials-section {
    background: var(--warm-white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: var(--spacing-lg);
}

.testimonial-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 30px;
    font-size: 6rem;
    color: var(--accent-gold);
    font-family: Georgia, serif;
    opacity: 0.3;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-coral) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.author-info h4 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.author-location {
    color: var(--text-light);
    font-size: 0.9rem;
}

.rating {
    color: var(--accent-gold);
    margin-top: 0.5rem;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: linear-gradient(135deg, var(--dark-brown) 0%, var(--primary-color) 100%);
    color: var(--warm-white);
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: var(--spacing-md);
}

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

.footer-section p {
    color: var(--light-cream);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--light-cream);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--warm-white);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-gold);
    color: var(--dark-brown);
    transform: translateY(-3px);
}

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

/* ========================================
   PANIER (SIDEBAR)
   ======================================== */

.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    padding: 1.5rem;
    background: var(--dark-brown);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--light-cream);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--light-cream);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--accent-gold);
    font-weight: 700;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: none;
    background: var(--light-cream);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

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

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--light-cream);
    background: var(--warm-white);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cart-total-amount {
    color: var(--accent-gold);
}

/* ========================================
   FORMULAIRES
   ======================================== */

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-cream);
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

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

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 968px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-brown);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 640px) {
    .section {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero {
        min-height: 70vh;
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   UTILITAIRES
   ======================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: none;
}

.overlay.active {
    display: block;
}