/* ========================================
   ALSAGASCAR - Épices & Artisanat de Madagascar
   Style CSS
   ======================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs */
    --primary: #BC542A;
    --primary-light: #d4693f;
    --accent: #D4AF37;
    --background: #FAF9F6;
    --foreground: #1A1A1A;
    --muted: #6B6B6B;
    --border: #E5E2DC;
    
    /* Typographie */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', system-ui, sans-serif;
    
    /* Espacement */
    --section-padding: 6rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 500;
    line-height: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== NAVIGATION ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.3s ease, transform 0.3s ease;
}

#navbar.hidden {
    transform: translateY(-100%);
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.logo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: white;
    transition: color 0.3s ease;
    justify-self: start;
    height: 50px;
}

.logo img {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    height: 100px;
    width: auto;
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease, height 0.3s ease;
}

.logo span {
    opacity: 1;
    transition: opacity 0.3s ease;
}

#navbar.scrolled .logo {
    height: 40px;
}

#navbar.scrolled .logo img {
    opacity: 1;
    top: -15px;
    height: 70px;
}

#navbar.scrolled .logo span {
    opacity: 0;
}

.hero-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    margin-top: 10rem;
}

.hero-logo img {
    height: 300px;
    width: auto;
    margin-top: -5rem;
    margin-bottom: 0rem;
    
}

#navbar.scrolled .logo {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    justify-content: center;
    justify-self: center;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: white;
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-links a {
    color: var(--foreground);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-self: end;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    color: white;
    transition: color 0.3s ease;
}

#navbar.scrolled .cart-icon {
    color: var(--foreground);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

#navbar.scrolled .mobile-menu-btn span {
    background: var(--foreground);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent, rgba(0,0,0,0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 900px;
}

.hero-location {
    font-size: 0.85rem;
    font-weight: 1000;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease forwards;
    will-change: transform, opacity;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.1s forwards;
    opacity: 0;
    will-change: transform, opacity;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto 0.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
    margin-bottom: 2rem;
    will-change: transform, opacity;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid white;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.4s ease;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
    will-change: transform, opacity;
}

.hero-btn:hover {
    background: white;
    color: var(--foreground);
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    animation: bounce 2s infinite;
    will-change: transform;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    animation: scroll 2s infinite;
    will-change: transform, opacity;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-padding) 2rem;
    background-image: url('img/table1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('img/table1.png');
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-label-large {
    font-weight: bold;
    font-size: 1.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.section-title.light {
    color: white;
}

.about-paragraph {
    color: white;
    text-shadow: 1px 1px 2px black;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-paragraph strong {
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.value-item {
    text-align: center;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.value-icon {
    width: 48px;
    height: 48px;
    background: rgba(188, 84, 42, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--primary);
}

.value-item h4 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.value-item p {
    font-size: 0.7rem;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.about-badge {
    position: absolute;
    bottom: -24px;
    left: -24px;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(188, 84, 42, 0.3);
}

.badge-number {
    display: block;
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 600;
}

.badge-text {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.badge-text-bold {
    font-weight: bold;
    font-size: 0.85rem;
}

/* ===== PRODUCTS SECTION ===== */
.products {
    padding: var(--section-padding) 2rem;
    background: linear-gradient(135deg, #f0c585 0%, #ecb17c 50%, #e69955 100%);
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
}

.products-header {
    text-align: center;
    margin-bottom: 3rem;
}

.title-underline {
    width: 80px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto 1rem;
}

.products-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: white;
}

.ecommerce-banner {
    max-width: 100%;
    margin: 0 auto 3rem;
    background: rgba(255, 233, 160, 0.87);
    border: 1px solid rgb(202, 166, 48);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 10px;
}

.ecommerce-banner svg {
    color: #8B7355;
    flex-shrink: 0;
}

.ecommerce-banner p {
    font-size: 0.85rem;
    color: white;
    text-shadow: 1px 1px 2px black;
    font-style: italic;
    padding: 0 1.5rem;
    white-space: nowrap;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.product-card {
    cursor: pointer;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: #f0ede8;
    border-radius: 10px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding-top: 1.25rem;
}

.product-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.85rem;
    color: white;
    text-shadow: 1px 1px 2px black;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: var(--primary);
    font-weight: 600;
}

.product-price span {
    font-size: 0.75rem;
    color:white;
    text-shadow: 1px 1px 2px black;
    font-weight: 400;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--section-padding) 2rem;
    background: var(--foreground);
    color: white;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-bottom: 2.5rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(188, 84, 42, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.contact-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.map-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

@media (max-width: 768px) {
    .map-container {
        padding-bottom: 75%;
    }
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(1) contrast(1.1);
}

/* Contact Form */
.contact-form-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
}

.contact-form-container h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: none;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    border: none;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--accent);
    color: var(--foreground);
}

/* ===== FOOTER ===== */
.footer {
    padding: 3rem 2rem;
    background: #121212;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-badge {
        bottom: auto;
        top: -24px;
        left: auto;
        right: 24px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem;
    }
    
    .nav-container {
        grid-template-columns: 1fr auto;
        padding: 0 1rem;
    }
    
    .logo {
        justify-self: start;
        font-size: 1.2rem;
        height: 35px;
    }
    
    .logo img {
        height: 50px;
        top: -10px;
    }
    
    #navbar.scrolled .logo {
        height: 30px;
    }
    
    #navbar.scrolled .logo img {
        height: 45px;
        top: -10px;
    }
    
    .hero-logo {
        margin-top: 5rem;
    }
    
    .hero-logo img {
        height: 150px;
        margin-top: -3rem;
    }
    
    .hero-location {
        font-size: 0.7rem;
        letter-spacing: 0.2em;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .ecommerce-banner {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .ecommerce-banner p {
        white-space: normal;
        text-align: center;
        padding: 0;
        font-size: 0.8rem;
    }
    
    .about-image img {
        height: 400px;
    }
    
    .about-badge {
        padding: 1rem;
    }
    
    .badge-number {
        font-size: 1.5rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(250, 249, 246, 0.98);
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        color: var(--foreground) !important;
    }
    
    .nav-links a:hover {
        background: #f0ede8;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}