/* =========================================================================
   Energiehof Vahle – styles front (page d'accueil, panier flottant, footer)
   Palette bois/feu, neutre et sobre. Variables surchargeables.
   ========================================================================= */
:root{
	--ehvc-ink:#2a2017;
	--ehvc-ember:#c0491f;        /* braise */
	--ehvc-ember-dark:#9a3a16;
	--ehvc-bark:#5b4636;         /* écorce */
	--ehvc-sand:#f6f1ea;
	--ehvc-line:#e4dccf;
	--ehvc-gold:#d9a441;
	/* Image de héros : remplacer par l'URL d'une image de la médiathèque si souhaité.
	   Laisser 'none' pour le dégradé bois par défaut. */
	--ehvc-hero-img:none;
}

.ehvc-home{color:var(--ehvc-ink)}

/* ---------- Héros ---------- */
.ehvc-hero{
	position:relative;
	min-height:460px;
	display:flex;align-items:center;
	background:
		linear-gradient(120deg, rgba(42,32,23,.78) 0%, rgba(42,32,23,.35) 60%, rgba(42,32,23,.15) 100%),
		var(--ehvc-hero-img),
		linear-gradient(135deg,#6e4b2a 0%,#8a5a2c 35%,#b06a2b 70%,#c0491f 100%);
	background-size:cover;background-position:center;
}
.ehvc-hero-inner{position:relative;z-index:2;max-width:1180px;margin:0 auto;padding:60px 24px;color:#fff}
.ehvc-hero-kicker{letter-spacing:.14em;text-transform:uppercase;font-size:.8rem;font-weight:700;opacity:.9;margin:0 0 10px}
.ehvc-hero-title{font-size:clamp(1.8rem,4vw,3rem);line-height:1.12;margin:0 0 14px;max-width:16ch;text-shadow:0 2px 14px rgba(0,0,0,.35)}
.ehvc-hero-sub{font-size:clamp(1rem,1.6vw,1.2rem);max-width:52ch;opacity:.95;margin:0 0 26px;text-shadow:0 1px 8px rgba(0,0,0,.3)}
.ehvc-btn{
	display:inline-block;background:var(--ehvc-ember);color:#fff;font-weight:700;
	padding:14px 30px;border-radius:40px;text-decoration:none;transition:background .2s,transform .2s;
	box-shadow:0 8px 22px rgba(192,73,31,.4)
}
.ehvc-btn:hover{background:var(--ehvc-ember-dark);transform:translateY(-1px);color:#fff}

/* ---------- Barre promo ---------- */
.ehvc-promo{
	display:flex;flex-wrap:wrap;gap:8px 28px;justify-content:center;
	background:var(--ehvc-bark);color:#fff;padding:14px 20px;font-size:.95rem
}
.ehvc-promo-item span{margin-right:6px}

/* ---------- Sections ---------- */
.ehvc-section{max-width:1180px;margin:0 auto;padding:56px 24px}
.ehvc-section-alt{background:var(--ehvc-sand);max-width:none}
.ehvc-section-alt > *{max-width:1180px;margin-left:auto;margin-right:auto}
.ehvc-h2{font-size:clamp(1.4rem,2.6vw,2rem);margin:0 0 26px;color:var(--ehvc-ink);text-align:center}
.ehvc-empty{text-align:center;color:#8a7f72;padding:20px}

/* ---------- Catégories ---------- */
.ehvc-cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:18px}
.ehvc-cat{
	display:flex;flex-direction:column;text-decoration:none;color:var(--ehvc-ink);
	background:#fff;border:1px solid var(--ehvc-line);border-radius:12px;overflow:hidden;
	transition:box-shadow .2s,transform .2s
}
.ehvc-cat:hover{box-shadow:0 12px 26px rgba(42,32,23,.12);transform:translateY(-3px)}
.ehvc-cat-img{
	display:block;height:140px;background:#efe7db center/cover no-repeat;
	background-image:linear-gradient(135deg,#efe7db,#e0d2bd)
}
.ehvc-cat-name{font-weight:700;padding:12px 14px 2px}
.ehvc-cat-count{padding:0 14px 14px;font-size:.85rem;color:#8a7f72}

/* ---------- Produits (grille WooCommerce réutilisée) ---------- */
.ehvc-products.products{display:grid !important;grid-template-columns:repeat(4,1fr);gap:22px;margin:0;padding:0;list-style:none}
.ehvc-products.products li.product{margin:0 !important;width:auto !important;float:none !important}
@media(max-width:900px){.ehvc-products.products{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.ehvc-products.products{grid-template-columns:1fr 1fr;gap:14px}}

/* ---------- Icône panier flottante ---------- */
.ehvc-fab{
	position:fixed;right:18px;bottom:18px;z-index:9990;
	width:56px;height:56px;border-radius:50%;
	background:var(--ehvc-ember);color:#fff;display:flex;align-items:center;justify-content:center;
	box-shadow:0 10px 26px rgba(192,73,31,.45);text-decoration:none;transition:transform .2s,background .2s
}
.ehvc-fab:hover{background:var(--ehvc-ember-dark);transform:translateY(-2px);color:#fff}
.ehvc-fab.ehvc-pulse{animation:ehvc-pulse .5s ease}
@keyframes ehvc-pulse{0%{transform:scale(1)}40%{transform:scale(1.18)}100%{transform:scale(1)}}
.ehvc-fab-count{
	position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;
	background:var(--ehvc-gold);color:#2a2017;border-radius:12px;
	font-size:.72rem;font-weight:800;line-height:20px;text-align:center
}
.ehvc-fab-count[data-count="0"]{display:none}

/* ---------- Toast ---------- */
.ehvc-toast{
	position:fixed;left:50%;bottom:88px;transform:translateX(-50%) translateY(20px);
	background:#2a2017;color:#fff;padding:12px 20px;border-radius:30px;z-index:9991;
	font-size:.95rem;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;
	box-shadow:0 10px 30px rgba(0,0,0,.3)
}
.ehvc-toast.ehvc-show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ---------- Footer pro (remplace le footer Blocksy) ---------- */
/* Masque le footer natif de Blocksy ; notre footer est rendu via wp_footer. */
.ct-footer{display:none !important}
.ehvc-footer{background:var(--ehvc-ink);color:#e9e2d7}
.ehvc-footer-inner{
	max-width:1180px;margin:0 auto;padding:48px 24px 28px;
	display:grid;grid-template-columns:repeat(4,1fr);gap:28px
}
.ehvc-fcol h4{color:#fff;margin:0 0 14px;font-size:1.05rem}
.ehvc-fcol p{line-height:1.6;color:#c6bcac;margin:0 0 10px}
.ehvc-fcol ul{list-style:none;margin:0;padding:0}
.ehvc-fcol li{margin:7px 0}
.ehvc-fcol a{color:#e9e2d7;text-decoration:none}
.ehvc-fcol a:hover{color:var(--ehvc-gold)}
.ehvc-badges{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.ehvc-badge{background:#3a2d20;border:1px solid #4a3a28;color:#e9e2d7;padding:5px 12px;border-radius:6px;font-size:.82rem}
.ehvc-trust{font-size:.85rem;color:#c6bcac}
.ehvc-footer-bar{
	border-top:1px solid #3a2d20;max-width:1180px;margin:0 auto;padding:16px 24px;
	display:flex;flex-wrap:wrap;gap:10px 18px;justify-content:space-between;align-items:center;
	font-size:.85rem;color:#c6bcac
}
.ehvc-legal-links a{color:#c6bcac;text-decoration:none;margin-left:16px}
.ehvc-legal-links a:first-child{margin-left:0}
.ehvc-legal-links a:hover{color:#fff}

@media(max-width:860px){
	.ehvc-footer-inner{grid-template-columns:1fr 1fr}
	.ehvc-cats{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
}
@media(max-width:520px){
	.ehvc-hero{min-height:380px}
	.ehvc-footer-inner{grid-template-columns:1fr}
	.ehvc-footer-bar{flex-direction:column;align-items:flex-start}
	.ehvc-legal-links a:first-child{margin-left:0}
}

/* =========================================================================
   APPLIQUÉ À TOUT LE SITE (pas seulement l'accueil)
   Objectif : couleurs bois/braise de l'accueil + grille produits alignée.
   ========================================================================= */

/* ---- 1. Palette Blocksy forcée sur la charte bois/braise ----
   Blocksy pilote liens/boutons/accents via --theme-palette-color-1/2.
   On remplace l'accent bleu par la braise, et le survol par la braise foncée. */
:root{
	--theme-palette-color-1:#c0491f;   /* accent principal (liens, boutons) */
	--theme-palette-color-2:#9a3a16;   /* accent survol / secondaire */
	--theme-link-initial-color:#2a2017;
	--theme-link-hover-color:#c0491f;
	--paletteColor1:#c0491f;
	--paletteColor2:#9a3a16;
}

/* ---- 2. Boutons WooCommerce / blocs : braise, lisibles ---- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce .single_add_to_cart_button,
.wc-block-components-button,
.wp-block-button__link,
.ehvc-btn{
	background-color:var(--ehvc-ember) !important;
	border-color:var(--ehvc-ember) !important;
	color:#fff !important;
	border-radius:8px !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover,
.wc-block-components-button:hover,
.wp-block-button__link:hover{
	background-color:var(--ehvc-ember-dark) !important;
	border-color:var(--ehvc-ember-dark) !important;
	color:#fff !important;
}

/* Titres de produits : encre (plus de bleu), survol braise */
.woocommerce ul.products li.product a.woocommerce-loop-product__link,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title{
	color:var(--ehvc-ink) !important;
}
.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title{
	color:var(--ehvc-ember) !important;
}
/* Prix en braise foncée pour rester dans la charte */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price{
	color:var(--ehvc-ember-dark);
}

/* ---- 3. Grille produits responsive : 4 (desktop) / 3 / 2 (mobile) ----
   S'applique à la boutique, aux catégories ET à l'accueil. */
.woocommerce ul.products,
.woocommerce-page ul.products,
ul.products.ehvc-products{
	display:grid !important;
	grid-template-columns:repeat(4,1fr) !important;
	gap:24px !important;
	margin:0 !important;
	padding:0 !important;
	list-style:none !important;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after{content:none !important;display:none !important}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products.ehvc-products li.product{
	width:auto !important;
	min-width:0 !important;
	margin:0 !important;
	padding:0 !important;
	float:none !important;
	clear:none !important;
}
.woocommerce ul.products li.product img,
ul.products li.product img{
	width:100% !important;
	height:auto !important;
	display:block;
}

@media(max-width:1024px){
	.woocommerce ul.products,
	.woocommerce-page ul.products,
	ul.products.ehvc-products{grid-template-columns:repeat(3,1fr) !important}
}
@media(max-width:640px){
	.woocommerce ul.products,
	.woocommerce-page ul.products,
	ul.products.ehvc-products{grid-template-columns:repeat(2,1fr) !important;gap:14px !important}
}

/* ---- 4. Héros : titre bien blanc et lisible sur le fond bois ---- */
.ehvc-hero .ehvc-hero-title,
.ehvc-hero .ehvc-hero-kicker,
.ehvc-hero .ehvc-hero-sub{color:#fff !important}

/* ---- 5. Empêche tout débordement horizontal sur mobile ---- */
.ehvc-home,.woocommerce{overflow-x:hidden}

/* =========================================================================
   v1.2 — En-tête (logo), couleurs renforcées partout, nouvelles sections
   ========================================================================= */

/* ---- En-tête : masquer le titre texte du site, agrandir le logo ---- */
.ct-header .site-title,
.site-header .site-title,
header .site-title,
.site-title,
.site-description,
.ct-logo-container .site-title,
[data-id="logo"] .site-title,
.ct-logo-text{
	display:none !important;
}
.ct-logo-container img,
.site-logo-container img,
header .site-branding img,
[data-id="logo"] img,
.ct-logo-container a img{
	max-height:78px !important;
	width:auto !important;
	height:auto !important;
}
@media(max-width:782px){
	.ct-logo-container img,
	.site-logo-container img,
	header .site-branding img,
	[data-id="logo"] img{ max-height:58px !important; }
}

/* ---- Couleurs de la charte forcées sur tout le site ----
   Posées sur body pour passer devant les variables inline de Blocksy (:root). */
body{
	--theme-palette-color-1:#c0491f;
	--theme-palette-color-2:#9a3a16;
	--theme-link-initial-color:#2a2017;
	--theme-link-hover-color:#c0491f;
	--paletteColor1:#c0491f;
	--paletteColor2:#9a3a16;
}
/* Titres de produits : plus de bleu, encre + survol braise (haute spécificité) */
body .woocommerce ul.products li.product a,
body .woocommerce ul.products li.product a:visited,
body .woocommerce ul.products li.product h2,
body .woocommerce ul.products li.product .woocommerce-loop-product__title,
body ul.products li.product a .woocommerce-loop-product__title{
	color:var(--ehvc-ink) !important;
}
body .woocommerce ul.products li.product a:hover .woocommerce-loop-product__title,
body .woocommerce ul.products li.product a:hover{
	color:var(--ehvc-ember) !important;
}

/* ---- Héros : CTA secondaire + bouton fantôme ---- */
.ehvc-hero-cta{display:flex;flex-wrap:wrap;gap:12px}
.ehvc-btn-ghost{
	background:transparent !important;border:2px solid rgba(255,255,255,.85) !important;color:#fff !important;
	box-shadow:none !important
}
.ehvc-btn-ghost:hover{background:rgba(255,255,255,.14) !important;border-color:#fff !important}

/* ---- Section Vorteile ---- */
.ehvc-benefits{
	max-width:1180px;margin:0 auto;padding:40px 24px;
	display:grid;grid-template-columns:repeat(3,1fr);gap:22px
}
.ehvc-benefit{
	background:#fff;border:1px solid var(--ehvc-line);border-radius:14px;padding:26px 22px;text-align:center
}
.ehvc-benefit-ico{
	display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:50%;
	background:rgba(192,73,31,.1);color:var(--ehvc-ember);margin-bottom:14px
}
.ehvc-benefit h3{margin:0 0 8px;font-size:1.1rem;color:var(--ehvc-ink)}
.ehvc-benefit p{margin:0;color:#6c6155;line-height:1.55}

/* ---- Intro de section ---- */
.ehvc-lead{text-align:center;color:#6c6155;max-width:56ch;margin:-14px auto 28px}

/* ---- Catégories (corps enveloppé) ---- */
.ehvc-cat-body{display:block;padding:12px 14px}
.ehvc-cat-name{display:block;font-weight:700;padding:0}
.ehvc-cat-count{display:block;padding:0;margin-top:2px;font-size:.85rem;color:#8a7f72}

/* ---- Bouton centré ---- */
.ehvc-center{text-align:center;margin-top:30px}

/* ---- Bande CTA ---- */
.ehvc-cta{background:linear-gradient(135deg,var(--ehvc-ember) 0%,var(--ehvc-ember-dark) 100%);color:#fff}
.ehvc-cta-inner{max-width:900px;margin:0 auto;padding:54px 24px;text-align:center}
.ehvc-cta-inner h2{color:#fff;font-size:clamp(1.5rem,3vw,2.1rem);margin:0 0 10px}
.ehvc-cta-inner p{color:rgba(255,255,255,.92);margin:0 0 24px;font-size:1.05rem}
.ehvc-btn-light{background:#fff !important;color:var(--ehvc-ember-dark) !important;box-shadow:0 8px 22px rgba(0,0,0,.18) !important}
.ehvc-btn-light:hover{background:#f4ece2 !important;color:var(--ehvc-ember-dark) !important}

@media(max-width:860px){
	.ehvc-benefits{grid-template-columns:1fr;gap:14px}
}

/* =========================================================================
   v1.3 — Image de fond du héros + police des titres produits
   ========================================================================= */

/* Image de fond du héros (desktop par défaut, version allégée sur mobile). */
.ehvc-hero{ --ehvc-hero-img:url('../img/hero.jpg'); }
@media(max-width:640px){
	.ehvc-hero{ --ehvc-hero-img:url('../img/hero-mobile.jpg'); min-height:420px; }
}
/* Renfort d'overlay pour garder le texte parfaitement lisible sur la photo. */
.ehvc-hero{
	background:
		linear-gradient(120deg, rgba(30,22,15,.82) 0%, rgba(30,22,15,.45) 55%, rgba(30,22,15,.25) 100%),
		var(--ehvc-hero-img),
		linear-gradient(135deg,#6e4b2a 0%,#8a5a2c 35%,#b06a2b 70%,#c0491f 100%) !important;
	background-size:cover !important;
	background-position:center !important;
}

/* Titres de produits : plus petits, interligne serré, césure allemande propre. */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product h3,
ul.products li.product .woocommerce-loop-product__title{
	font-size:0.98rem !important;
	line-height:1.3 !important;
	font-weight:600 !important;
	margin:.45em 0 .35em !important;
	hyphens:auto;
	-webkit-hyphens:auto;
	-ms-hyphens:auto;
	overflow-wrap:anywhere;
	word-break:normal;
}
@media(max-width:640px){
	.woocommerce ul.products li.product .woocommerce-loop-product__title,
	ul.products li.product .woocommerce-loop-product__title{ font-size:0.9rem !important; }
}

/* Bouton d'ajout au panier : s'adapte à la largeur de la carte (plus de coupure). */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button{
	font-size:0.85rem !important;
	padding:.6em .9em !important;
	white-space:normal !important;
	line-height:1.2 !important;
	text-align:center;
}
/* Prix lisible et compact */
.woocommerce ul.products li.product .price{
	font-size:1rem !important;
	margin:.2em 0 .5em !important;
}

/* =========================================================================
   v1.4 — Cartes produits : hauteur égale, boutons alignés en bas, animations
   ========================================================================= */

/* Cartes de hauteur égale : la carte devient une colonne flex,
   le bouton est poussé tout en bas → tous les boutons au même niveau. */
.woocommerce ul.products li.product,
ul.products.ehvc-products li.product{
	display:flex !important;
	flex-direction:column !important;
	height:100%;
	background:#fff;
	border:1px solid var(--ehvc-line);
	border-radius:12px;
	padding:12px 12px 16px !important;
	transition:transform .25s ease, box-shadow .25s ease;
}
/* Le bouton (dernier élément) colle au bas de la carte */
.woocommerce ul.products li.product > a.button,
.woocommerce ul.products li.product > .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product > .wc-block-grid__product-add-to-cart,
ul.products.ehvc-products li.product > a.button,
ul.products.ehvc-products li.product .add_to_cart_button{
	margin-top:auto !important;
	width:100%;
}
/* Le lien produit (image+titre+prix) prend l'espace disponible au-dessus */
.woocommerce ul.products li.product > a:first-child,
ul.products.ehvc-products li.product > a:first-child{
	display:block;
}

/* Survol : léger relèvement + ombre (effet pro) */
.woocommerce ul.products li.product:hover,
ul.products.ehvc-products li.product:hover{
	transform:translateY(-5px);
	box-shadow:0 16px 32px rgba(42,32,23,.14);
	border-color:#d9cdbb;
}
/* Zoom discret de l'image au survol */
.woocommerce ul.products li.product a img,
ul.products li.product a img{ transition:transform .4s ease; }
.woocommerce ul.products li.product:hover a img,
ul.products li.product:hover a img{ transform:scale(1.04); }

/* Animation d'apparition : fondu + léger relèvement, en cascade */
@keyframes ehvcFadeUp{
	from{opacity:0;transform:translateY(16px)}
	to{opacity:1;transform:translateY(0)}
}
.woocommerce ul.products li.product,
ul.products.ehvc-products li.product{
	animation:ehvcFadeUp .55s cubic-bezier(.2,.7,.3,1) backwards;
}
.woocommerce ul.products li.product:nth-child(1){animation-delay:.04s}
.woocommerce ul.products li.product:nth-child(2){animation-delay:.10s}
.woocommerce ul.products li.product:nth-child(3){animation-delay:.16s}
.woocommerce ul.products li.product:nth-child(4){animation-delay:.22s}
.woocommerce ul.products li.product:nth-child(5){animation-delay:.28s}
.woocommerce ul.products li.product:nth-child(6){animation-delay:.34s}
.woocommerce ul.products li.product:nth-child(7){animation-delay:.40s}
.woocommerce ul.products li.product:nth-child(8){animation-delay:.46s}

/* Accessibilité : pas d'animation si l'utilisateur la désactive */
@media (prefers-reduced-motion: reduce){
	.woocommerce ul.products li.product,
	ul.products.ehvc-products li.product{opacity:1 !important;animation:none !important;transform:none !important}
	.woocommerce ul.products li.product a img{transition:none}
}

/* =========================================================================
   v1.5 — Alignement strict des boutons : cartes d'égale hauteur par ligne
   ========================================================================= */

/* La grille étire chaque carte à la hauteur de la plus haute de sa ligne. */
.woocommerce ul.products,
.woocommerce-page ul.products,
ul.products.ehvc-products{
	align-items:stretch !important;
}

/* La carte remplit toute la hauteur de sa cellule de grille. */
.woocommerce ul.products li.product,
ul.products.ehvc-products li.product{
	height:auto !important;
	align-self:stretch !important;
	justify-content:flex-start;
}

/* Le bouton (ou le dernier bloc de la carte) est collé au bas → même niveau. */
.woocommerce ul.products li.product > a.button,
.woocommerce ul.products li.product > .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product > *:last-child,
ul.products.ehvc-products li.product > a.button,
ul.products.ehvc-products li.product .add_to_cart_button,
ul.products.ehvc-products li.product > *:last-child{
	margin-top:auto !important;
}
/* Mais le lien image+titre+prix ne doit PAS être poussé en bas s'il est dernier. */
.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link:last-child,
.woocommerce ul.products li.product > a.woocommerce-loop-product__link:last-child{
	margin-top:0 !important;
}
