/*
 Theme Name: lwf-child-theme
 Theme URI: https://lawoufactory.local
 Description: Custom child theme for lawoufactory website
 Author: Votre Nom
 Author URI: https://lawoufactory.local
 Template:Divi
 Version: 1.0.0
*/


/*^ ---------------------------------------------------------------------------------------------------------
/*= SECTIONS
/* *** PADDING DES SECTIONS *** */
/* (Utile pour retirer le padding supérieur par défaut des sections) */
.et_pb_section {
	padding-top: 0;
}



/*^ ---------------------------------------------------------------------------------------------------------
/*= FOOTER
/* *** LIENS DU FOOTER *** */
.legal-links {
	color: #ffffff;
	text-decoration: underline;
}

.legal-links:hover {
	text-decoration: none;
}



/*^ ---------------------------------------------------------------------------------------------------------
/*= TITRES
/* *** TITRES H1 À H6 GLOBAUX *** */
.general-subtitles {
    color: #70510b;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: left;
}

.category-custom-title-one {
	color: #b88609;
	font-size: 30px;
	font-weight: bold !important;
	text-align: center;
}

.category-custom-title-two { /* ATTENTION : code dupliqué pour les h2 d'une page Produit (niveau 3) */
	font-weight: bold !important;
	font-size: 22px;
	color: #70510b;
}

/* *** TITRES DES CARTES *** */
.card-title-two {
	font-size: 22px;
	line-height: 1.2em;
	height: 3em;
	overflow: hidden;
	color: #333333;
	text-align: center;
	letter-spacing: 3px;
}



/*^ ---------------------------------------------------------------------------------------------------------
/*= TEXTES
/* *** PARAGRAPHES *** */
.description-text { /* ATTENTION : code dupliqué pour les paragraphes d'une page Produit (niveau 3) */
	text-align: justify;
	font-size: 20px;
}

p.description-text.intro {
    font-style: italic;
    font-size: 16px;
}

.description-text a {
    color: #b45f10;
    text-decoration: underline;
}

.description-text a:hover {
    text-decoration: none;
}

.dial {
    font-style: italic;
}


/*^ ---------------------------------------------------------------------------------------------------------
/*= BALISES PARTICULIÈRES
/* *** PARAGRAPHES *** */

/* SEO */
strong {
	color: #b88609;
}



/*^ ---------------------------------------------------------------------------------------------------------
/*= BOUTONS
/* *** Boutons règles communes *** */
.lwf-cta-button:hover {
    text-decoration: underline;
}



/*^ ---------------------------------------------------------------------------------------------------------
/*= HOMEPAGE DISPOSITION DE LA GRILLE DES CARTES */
/* *** Disposition grille des cartes avec media queries *** */
/* On force le conteneur Divi à se comporter comme une Grille */
.grid-univers-fix .et_pb_column {
    display: grid !important;
    column-gap: 50px !important; /* Espace latéral entre les cartes */
    row-gap: 20px !important;    /* Espace vertical entre les lignes */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Sécurité pour que les modules Blurb de Divi ne cassent pas la grille */
.grid-univers-fix .et_pb_module {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* 🖥️ DESKTOP : À partir de 1051px inclus */
@media (min-width: 1051px) {
    .grid-univers-fix .et_pb_column {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* 📑 TABLET : Entre 761px inclus et 1050px inclus */
@media (min-width: 761px) and (max-width: 1050px) {
    .grid-univers-fix .et_pb_column {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 📱 MOBILE : Jusqu'à 760px inclus */
@media (max-width: 760px) {
    .grid-univers-fix .et_pb_column {
        grid-template-columns: 1fr !important;
    }
}




/*^ ---------------------------------------------------------------------------------------------------------
/*= IMAGE D'ILLUSTRATION SUR HOMEPAGE */
.homepage-card {
    display: flex;
    flex-direction: column !important;
    justify-content: flex-start !important; /* Centre verticalement */
    align-items: center !important;     /* Centre horizontalement */
    text-align: center !important;
}

/* Ciblage spécifique des éléments internes du Blurb Divi */
.homepage-card .et_pb_blurb_content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important; /* Centre le texte et l'image verticalement */
    width: 100% !important;
    height: 100% !important; /* Important pour que le centrage s'opère sur toute la hauteur */
}

/* Ajustement pour l'image/icône pour éviter qu'elle ne se décale */
.homepage-card .et_pb_main_blurb_image {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 15px !important;
}

.homepage-card img {
    border-radius: 8px;
    position: relative !important; /* la carte devient la référence de positionnement */
    height: 256px;
}

.homepage-card a {
    /* suppression du style par défaut d'un lien */
    text-decoration: none !important;
    color: inherit !important;
    pointer-events: auto;
}

.homepage-card a::after {
    /* et on crée un pseudo-élément sur le lien pour qu'il couvre toute la carte */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}




/*^ ---------------------------------------------------------------------------------------------------------
/*= IMAGE D'ILLUSTRATION SUR PAGE ARCHIVES N1 ET N2 eet PRODUITS
/* *** PAGE ARCHIVE ET SOUS-CATÉGORIE : IMAGE EN FLOAT SUR LA GAUCHE DU TEXTE *** */
.image-flottante-lwf {
	float: left;
	max-width: 400px;	
	height: auto;
	border-radius: 8px;	
	margin-right: 30px; 
}

/* Règle pour s'assurer que l'image reste dans le flux du conteneur parent */
.et_pb_text_inner:after,
.et_pb_text_inner::after {
	content: "";
	display: table;
	clear: both;
}

/* Image dans le résumé produit */
.lwf-product-summary-item .description-text img {
    border-radius: 8px;
    box-shadow: 3px 3px 6px #333333;
}


/*^ ---------------------------------------------------------------------------------------------------------
/*= ESPACEMENT CARTES N1 ET N2
/* *** ESPACEMENTS/STYLES POUR LES CARTES N1 ET N2 *** */
/* Correction des marges/espacements Divi par défaut */
.et_pb_image_container,
.et_pb_post .entry-featured-image-url {
	margin-bottom: 0 !important;
}

.et_pb_post .entry-title {
	margin-top: 1.5em;
	margin-bottom: 1em;
}

/* Effet de survol sur les cartes produits */
.et_pb_blog_grid .et_pb_post, .lwf-product-card {
	transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.et_pb_blog_grid .et_pb_post:hover, .lwf-product-card:hover {
	transform: scale(1.02);	
}



/*^ ---------------------------------------------------------------------------------------------------------
/*= CARTES ARCHIVES N1 ET N2 partiellement
/* *** N1 = CARTES DES SOUS-CATÉGORIES *** */
/* A. Conteneur de la Grille (lwf-subcat-grid) */
.lwf-subcat-grid, .lwf-product-grid-container {
	display: flex;
	flex-wrap: wrap;	
	gap: 30px;	
	justify-content: space-evenly;
	align-items: stretch; /* Les cartes sont situées à la même hauteur */
	margin-bottom: 10px; 
	margin-top: 30px;
	padding-bottom: 10px !important;
}

/* B. Style de la Carte Individuelle */
/* Réinitialisation générale pour le conteneur de carte */
.lwf-subcat-card a {
	display: flex;	
	flex-direction: column;	
	height: 100%;
	text-decoration: none;
	color: inherit;
	position: relative;
}

.lwf-subcat-card, .lwf-product-card {
    width: 300px;
	flex: 0 0 calc(33.333% - 20px); /* 3 cartes par ligne si >= 1050px */
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
	border-radius: 10px;
	overflow: hidden;	
	background-color: #fff;
	transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.lwf-subcat-card:hover, .lwf-product-card:hover {
	transform: translateY(-5px);	
	box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* C. Éléments à l'intérieur de la carte */
/* Titre */
.lwf-subcat-title {
	padding: 15px 15px 10px;
	order: 1; 
	margin: 0;
}

/* Image */
.lwf-subcat-img {
	width: 100%;
	height: 180px;	
	object-fit: contain; 
	order: 2;
	padding: 10px;
}

/* Bouton Découvrir */
.lwf-subcat-footer {
	padding: 15px;
	text-align: center;
	margin-top: auto; 
	padding-bottom: 20px;
	order: 3;
}

.lwf-subcat-card .lwf-subcat-button {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 10px 20px;
	background-color: #b88609;	
	color: #FFFFFF;
	border-radius: 5px;
	font-weight: bold;
	text-transform: uppercase;
	font-size: 13px;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.3s ease;
}

.lwf-subcat-card .lwf-subcat-button:hover {
	background-color: #cc9933;
    text-decoration: underline;
}

/*< --- --- --- --- --- --- --- --- ---
/*<MEDIA QUERIES CARTES ARCHIVES N1 */
@media (max-width: 1050px) {
	.lwf-subcat-card, .lwf-product-card {
		flex: 0 0 calc(50% - 15px);
	}
}
@media (max-width: 760px) {
	.lwf-subcat-card, .lwf-product-card {
		flex: 0 0 100%;
	}
}



/*^ ---------------------------------------------------------------------------------------------------------
/*= GRILLE DE CARTES ARCHIVE N2 */
.lwf-product-card {
		display: flex;
		flex-direction: column;
		align-items: center;
	 	align-self: stretch;
}

/* 3. Ajustement du contenu pour centrer et aligner le bas */
.lwf-card-link-overlay {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lwf-product-card .lwf-card-image {
		width: 100%;
		height: 200px;
		overflow: hidden;
		margin-bottom: 15px;
}

.lwf-product-card .lwf-card-image img {
		width: 100%;
		height: 100%;
		display: block;
		object-fit: cover;
}

.lwf-product-card .lwf-card-content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	width: 100%;
	text-align: center;
	padding: 0 15px;
}

.lwf-product-card .entry-title {
    order: 1;
		flex-grow: 1;
    padding: 20px 2px !important;
    margin-top: 0;
		margin-bottom: 5px;
		font-size: 22px !important;
		color: #333333;
}

.lwf-product-card .lwf-subtitle {
	order: 2;
	padding: 0 10px;
	margin-bottom: 5px;
	text-align: center;
	color: #333333;
}

.lwf-read-more-link {
	order: 3;
	display: inline-block;
	margin-top: 15px !important;
	width: 100%;
	color: #333333;
	text-decoration: underline;
}

.lwf-read-more-link:hover {
	color: #b88609;
	text-decoration: none;
}

.lwf-product-card .lwf-cta-wrapper {
		order: 4;
		margin-bottom: 15px !important;
		padding: 15px; 
}

.lwf-product-card .lwf-cta-wrapper .lwf-cta-button{
    margin-top: auto;
		margin-bottom: 15px;	
}

.lwf-product-card .lwf-cta-wrapper:hover {
    text-decoration: underline #ffffff;
}


/*^ ---------------------------------------------------------------------------------------------------------
/*= CARTES PRODUITS + GRILLE, DANS UNE PAGE N2 */
/* Grille */
.lwf-comparison-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* La Carte */
.lwf-premium-card {
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #fff;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lwf-premium-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Bandeau Titre */
.lwf-card-header {
    background-color: #70510b; /* Marron/Doré */
    padding: 15px;
    color: #fff;
}

.lwf-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff !important;
    text-transform: uppercase;
}

.lwf-card-subtitle {
    font-size: 13px;
    margin: 5px 0 0;
    opacity: 0.9;
}

/* Corps de carte */
.lwf-card-body { padding: 20px; }

.lwf-card-image img {
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.lwf-card-features {
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0;
    text-align: left;
}

.lwf-card-features li::before {
    content: "👍";
    margin-right: 8px;
}

/* Bouton Achat */
.lwf-buy-btn {
    background: #e5a524 !important;
    color: #fff !important;
    border: none !important;
    display: block !important;
    width: 100%;
}

.lwf-anchor-link {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    text-decoration: underline;
    color: #666;
}


/* SECTION RÉSUMÉS PRODUITS */
.lwf-product-summary-item.lwf-summary-content.description-text {
    font-size: 18px !important;
}

/* État caché par défaut */
.lwf-lazy-summary {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    visibility: hidden;
}

/* État visible (activé par JS) */
.lwf-lazy-summary.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* On affiche quand même si l'utilisateur clique sur le lien d'ancre */
.lwf-lazy-summary:target {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}


/*^ ---------------------------------------------------------------------------------------------------------
/*= BOUTONS N2 RETOUR VERS N1
/* *** BOUTON RETOUR SUR LES PAGES SOUS-CATÉGORIES (donc retour vers catégories) (Module Code) *** */
.go-back-button {
    background-color: transparent !important;
    color: #333 !important;
    border: 1px solid #b88609 !important;
    padding: 8px 15px !important;
    font-size: 14px !important;
    display: inline-block;
}

.go-back-button:hover {
    background-color: #333333 !important;
    color: #ffffff !important;
	border: 1px solid #333333 !important;
}