/* ===== VARIABLES ET RESET ===== */
:root {
    --couleur-fond: #F9F6F2;
    --couleur-accent: #E47C25; /* Orange du logo */
    --couleur-texte: #2A4365; /* Bleu foncé du logo */
    --couleur-blanc: #FFFFFF;
    --couleur-ombre: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--couleur-fond);
    color: var(--couleur-texte);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--couleur-accent);
    color: var(--couleur-blanc);
    border: none;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn:hover {
    background-color: #d36c1d;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--couleur-ombre);
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    font-size: 2.2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--couleur-accent);
}

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--couleur-blanc);
    box-shadow: 0 2px 10px var(--couleur-ombre);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo img {
    height: 150px; /* Ajuster la hauteur du logo */
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--couleur-texte);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--couleur-accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--couleur-accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--couleur-accent);
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none; /* Caché par défaut, affiché par JS */
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--couleur-texte);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 90vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/fond-hero.webp') no-repeat center center/cover;
    color: var(--couleur-blanc);
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ===== CATÉGORIES ===== */
.categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--couleur-texte);
    border-radius: 30px;
    color: var(--couleur-texte);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover, .category-btn.active {
    background: var(--couleur-accent);
    color: var(--couleur-blanc);
    border-color: var(--couleur-accent);
    transform: scale(1.05);
}

/* ===== PRODUITS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--couleur-blanc);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--couleur-ombre);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 300px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    flex-grow: 1;
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--couleur-accent);
    margin-bottom: 15px;
}

.product-card .btn {
    width: 100%;
}

/* ===== NOUVEAUX STYLES POUR LA PAGE DÉTAIL PRODUIT ===== */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    gap: 30px;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1.2fr 1fr; /* Deux colonnes sur ordinateur */
        gap: 50px;
    }
}

.product-info-column h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--couleur-accent);
    margin: 10px 0 20px 0;
}

.delivery-info-box {
    background: #f1f1f1;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    font-size: 0.9rem;
}

.delivery-info-box h4 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.product-long-description {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.product-long-description h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Styles pour Swiper.js */
.swiper-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    aspect-ratio: 1 / 1.1; /* Ratio pour un format légèrement vertical */
}
.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}
.swiper-button-next, .swiper-button-prev {
    color: var(--couleur-accent) !important;
    --swiper-navigation-size: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 18px !important;
}
.swiper-pagination-bullet-active {
    background: var(--couleur-accent) !important;
}

/* ===== À PROPOS ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    color: var(--couleur-accent);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item {
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--couleur-ombre);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.1);
}

.gallery-item:nth-child(3) {
    grid-column: span 2;
    height: 280px;
}

/* ===== CONTACT ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    font-size: 1.8rem;
    color: var(--couleur-accent);
    min-width: 35px;
    margin-top: 5px;
}

.contact-form {
    background: var(--couleur-blanc);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 25px var(--couleur-ombre);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--couleur-accent);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* ===== LOADER ===== */
.loader {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--couleur-blanc);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loader-content {
    text-align: center;
}

.bobine {
    width: 60px;
    height: 60px;
    border: 5px solid var(--couleur-fond);
    border-top: 5px solid var(--couleur-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--couleur-texte);
    color: var(--couleur-blanc);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--couleur-blanc);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--couleur-accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--couleur-accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--couleur-blanc);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--couleur-accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* ===== PANIER COULISSANT (SIDEBAR) ===== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%; /* Commence en dehors de l'écran */
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: var(--couleur-blanc);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease-in-out;
}

.cart-sidebar.active {
    right: 0; /* Glisse vers l'intérieur */
}

.cart-sidebar .cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-sidebar .cart-header h3 {
    margin-bottom: 0;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--couleur-texte);
    line-height: 1;
}

.cart-sidebar .cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.item-info {
    font-weight: 500;
}

.item-price {
    font-weight: 600;
    color: var(--couleur-accent);
}

.item-quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    background: var(--couleur-fond);
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.quantity-value {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    color: #ff6b6b;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-sidebar .cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

.cart-summary {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.summary-total {
    font-weight: 700;
    font-size: 1.2rem;
    border-top: 2px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn i {
    margin-right: 10px;
    font-size: 1.3rem;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; /* Se positionne juste en dessous de la nav */
        left: 0;
        width: 100%;
        background: var(--couleur-blanc);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px var(--couleur-ombre);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories {
        gap: 10px;
    }
    .category-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-item:nth-child(n) {
        grid-column: 1;
        height: 200px;
    }
    
    .cart-sidebar {
        max-width: 90%;
    }
}
