/*
Theme Name: Astra Child Flocon
Theme URI: https://www.flocondelaine.com/
Description: Thème enfant pour Flocon de Laine – Bannière pleine largeur + grille 3x2
Author: ****
Template: astra
Version: 1.1
*/

/* =============================================
   RESET ET BASE
   ============================================= */
:root {
    --primary-color: #8B4513;
    --secondary-color: #ff8c42;
    --light-bg: #f8f4f0;
    --text-color: #5a3e2b;
    --border-color: #e0d5c7;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
}

/* =============================================
   MENU DESKTOP
   ============================================= */
.site-header {
    background-color: var(--light-bg);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.site-logo {
    flex: 0 0 auto;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 150px;
}

.main-navigation {
    flex: 1;
    text-align: center;
}

.menu-list {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.menu-item {
    position: relative;
}

.menu-list a {
    text-decoration: none;
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

.menu-list a:hover,
.menu-list .current-menu-item a {
    color: var(--primary-color);
}

.menu-list a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.menu-list a:hover:after,
.menu-list .current-menu-item a:after {
    width: 100%;
}

.header-icons {
    flex: 0 0 auto;
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icons a {
    color: var(--text-color);
    font-size: 18px;
    position: relative;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   MENU MOBILE (version CSS-only)
   ============================================= */
/* Cache le menu mobile par défaut */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 350px;
    height: 100%;
    background-color: var(--light-bg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99999;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

/* Bouton hamburger */
.menu-toggle {
    display: none;
}

.hamburger-button {
    display: none;
    flex: 0 0 auto;
    cursor: pointer;
    padding: 10px;
    margin-left: 10px;
    z-index: 9999;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Overlay pour fermer le menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

/* Quand la checkbox est cochée */
.menu-toggle:checked ~ .mobile-menu {
    transform: translateX(0);
}

.menu-toggle:checked ~ .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* Style du menu mobile */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-logo {
    flex: 1;
}

.mobile-logo img {
    height: 40px;
}

.mobile-menu-list {
    list-style: none;
    padding: 20px;
    margin: 0;
}

.mobile-menu-item {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.mobile-menu-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mobile-menu-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    transition: color 0.3s;
}

.mobile-menu-item a:hover {
    color: var(--primary-color);
}

.mobile-menu-item i {
    font-size: 16px;
}

.mobile-cart-count {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 992px) {
    .main-navigation {
        display: none;
    }

    .hamburger-button {
        display: block;
    }

    .header-icons {
        gap: 15px;
    }
}


/* =============================================
   STYLES UNIFORMISES POUR COHÉRENCE AVEC LE BOUTON
   ============================================= */

/* Police et couleur pour tous les titres de section */
.section-title {
    font-family: 'Pacifico', cursive !important;
    color: #3B5C324F !important; /* Même couleur que le bouton */
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

/* Trait sous les titres de section (même couleur que le bouton) */
.section-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: #3B5C324F !important; /* Même couleur que le bouton */
    margin: 10px auto;
}

/* Style des cartes produit (uniformisé) */
.product-card h3 {
    font-family: 'Montserrat', sans-serif !important;
    color: #3B5C324F !important; /* Même couleur que le bouton */
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    padding: 15px 15px 5px;
}

.product-card .price {
    font-family: 'Montserrat', sans-serif !important;
    color: #3B5C324F !important; /* Même couleur que le bouton */
    font-weight: 600;
    font-size: 1.1em;
    padding: 0 15px 15px;
}

/* Style des cartes catégorie (uniformisé) */
.category-card h3 {
    font-family: 'Montserrat', sans-serif !important;
    color: #3B5C324F !important; /* Même couleur que le bouton */
    font-size: 1em;
    font-weight: 600;
    margin: 0;
    padding: 12px;
    text-align: center;
}

/* Style des liens dans les cartes produit */
.product-card a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Badge "Coup de cœur" */
.product-featured:before {
    content: "Coup de cœur";
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #3B5C324F;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    z-index: 10;
}

/* =============================================
   BOUTON "DÉCOUVRIR NOS PRODUITS" (référence)
   ============================================= */
.banner-cta .btn {
    background-color: #3B5C324F;
    color: white;
    font-family: 'Pacifico', cursive;
    border: 2px solid #3B5C324F;
}

.banner-cta .btn:hover {
    background-color: transparent;
    color: #3B5C324F;
}


/* Conteneur principal avec menu */
.home-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Bannières Canva (haut et bas) */
.banner-top, .banner-bottom {
    width: 100%;
    margin-bottom: 30px;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Structure |image|texte|image| - IDENTIQUE sur mobile et desktop */
.banner-structure {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    min-width: max-content; /* Empêche le retour à la ligne */
}

.banner-image {
    flex: 0 0 100px; /* Largeur fixe */
}

.structure-img {
    width: 100%;
    height: 150px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    object-fit: cover;
}

.banner-text {
    flex: 0 0 200px; /* Largeur fixe pour le texte */
    text-align: center;
}

.banner-text h1 {
    font-family: 'Pacifico', cursive;
    font-size: 1.6em;
    color: #3B5C324F;
    margin: 0;
    line-height: 1.2;
}

/* 1. Changement de couleur du bouton */
.banner-cta .btn {
    background-color: #3B5C324F; /* Vert sauge (ajustez cette valeur) */
    border-color: #3B5C324F;
}

/* Hover effect pour le bouton */
.banner-cta .btn:hover {
    background-color: transparent;
    color: #3B5C324F;
}

/* 2. Espace entre catégories et bannière bas */
.product-categories {
    margin-bottom: 50px; /* Espace augmenté (initialement 30px) */
}



/* Bouton et description */
.banner-cta {
    text-align: center;
    margin: 20px auto 40px;
    max-width: 300px;
}

.banner-cta .btn {
    display: inline-block;
    background-color: #3B5C324F;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.banner-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Conteneur des produits coup de cœur */
.featured-products-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Titre de section */
.section-title {
    text-align: center;
    font-family: 'Pacifico', cursive;
    font-size: 2em;
    color: #8B4513;
    margin-bottom: 30px;
    position: relative;
}

.section-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: #8B4513;
    margin: 10px auto;
}

/* Grille 3×2 sur desktop / 2×3 sur mobile */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes sur desktop */
    gap: 25px;
}

/* Carte produit */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px 15px 5px;
    color: #8B4513;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    margin: 0;
    text-align: center;
}

.product-card .price {
    padding: 0 15px 15px;
    color: #8B4513;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-align: center;
}

/* Message si aucun produit */
.no-products {
    text-align: center;
    grid-column: 1 / -1;
    padding: 20px;
    color: #666;
}

/* RESPONSIVE - 2 colonnes sur mobile */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur mobile */
    }
}

/* Catégories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-align: center;
}

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

.category-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.category-card h3 {
    padding: 12px;
    color: #5a3e2b;
}

/* Responsive - MÊME DISPOSITION sur mobile */
@media (max-width: 768px) {
    .home-page-container {
        padding: 10px;
    }

    .banner-structure {
        transform: scale(0.9); /* Réduit légèrement si nécessaire */
        margin-left: -10px; /* Centre visuellement */
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes sur écrans moyens */
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur mobile */
    }
}

