/*
 Theme Name:   Hello Elementor Child
 Description:  Hello Elementor Child Theme for L'Art Grave
 Author:       Antigravity
 Template:     hello-elementor
 Version:      1.0.21
*/

:root {
    --color-base: #F2E7DF; /* Crème - Arrière-plan */
    --color-text: #2E2520; /* Brun Ébène - Texte principal */
    --color-accent: #B85B3F; /* Terracotta Chaleureux - Boutons, prix, survol */
    --color-secondary: #7C8973; /* Vert Sauge Doux - Bordures, pastilles, secondaire */
}

/* Application globale des couleurs de base */
body, html {
    background-color: var(--color-base);
    color: var(--color-text);
    font-family: 'Inter', sans-serif; /* Remplacement générique en attendant les polices du constructeur */
}

/* Surcharge de liens génériques */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ==========================================================================
   Harmonisation des grilles de produits (Boutique, Catégories, Accueil)
   ========================================================================== */
ul.products {
    align-items: stretch !important;
}

ul.products:not(.elementor-grid) {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

@media (max-width: 992px) {
    ul.products:not(.elementor-grid) {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 768px) {
    ul.products:not(.elementor-grid) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important; /* Petit espace entre les blocs sur mobile */
    }
}

ul.products:not(.elementor-grid)::before,
ul.products:not(.elementor-grid)::after {
    display: none !important;
}

ul.products:not(.elementor-grid) li.product {
    width: 100% !important;
    margin: 0 !important;
}

ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important; /* Laisse le Grid/Flex étirer l'élément */
    align-self: stretch !important;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    padding-bottom: 15px; /* Espace en bas pour le bouton */
    text-align: center;
}

ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Lien de l'image et du titre */
ul.products li.product > a.woocommerce-LoopProduct-link {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Titre du produit */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin: 15px 10px 10px !important;
    line-height: 1.3 !important;
    flex-grow: 1 !important; /* Pousse le prix vers le bas */
}

/* Prix du produit */
ul.products li.product .price {
    color: #2c3e50 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-bottom: 0 !important; /* Retiré pour rapprocher du bouton */
}

/* Bouton Ajouter au panier / Personnalisable */
ul.products li.product .button,
ul.products li.product .add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important; /* Hauteur fixe pour éviter que les textes longs ne grossissent le bouton */
    width: calc(100% - 30px) !important;
    margin: 10px 15px 0 !important; /* Rapproché du prix (10px au lieu de 15px) */
    padding: 0 10px !important;
    background-color: #e5e0d8 !important; /* Beige/Gris clair par défaut */
    color: #2c3e50 !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 13px !important; /* Légèrement plus petit pour que "Personnaliser en 2D" rentre mieux */
    line-height: 1.2 !important;
    border-radius: 4px !important;
    border: none !important;
    text-transform: none !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

ul.products li.product .button:hover,
ul.products li.product .add_to_cart_button:hover {
    background-color: #d1cbc1 !important;
    color: #1a252f !important;
}

/* Si le bouton est "Personnaliser en 2D" (lien vers le produit unique) */
ul.products li.product .button[href*="product"],
ul.products li.product .button:not(.ajax_add_to_cart) {
    background-color: #f1ecdf !important; /* Un beige très clair distinct */
}

ul.products li.product .button[href*="product"]:hover,
ul.products li.product .button:not(.ajax_add_to_cart):hover {
    background-color: #e3dccb !important;
}
