/*
Theme Name:   Wouly
Description:  Thème enfant coloré et joyeux pour la boutique Wouly (basé sur Storefront, le thème officiel de WooCommerce).
Template:     storefront
Version:      1.0.0
Requires PHP: 7.4
Text Domain:  wouly
License:      GPL-2.0-or-later
*/

/* ==========================================================================
   Polices auto-hébergées (aucun appel à Google Fonts => conforme RGPD)
   ========================================================================== */
@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url("assets/fonts/baloo-2-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url("assets/fonts/baloo-2-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("assets/fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-style: italic; font-display: swap; src: url("assets/fonts/nunito-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("assets/fonts/nunito-latin-700-normal.woff2") format("woff2"); }

/* ==========================================================================
   Palette — modifier ici pour changer toute la boutique
   ========================================================================== */
:root {
	--w-coral: #ff6b5b;
	--w-coral-dark: #d9432f;   /* texte/boutons : contraste AA sur blanc */
	--w-sun: #ffc93c;
	--w-mint: #2ec4a6;
	--w-sky: #4d96ff;
	--w-grape: #7b5cff;
	--w-cream: #fff8ee;
	--w-ink: #2b2140;
	--w-ink-soft: #5b5270;
	--w-line: #eadfce;
	--w-white: #ffffff;
	--w-radius: 18px;
	--w-radius-sm: 10px;
	--w-shadow: 0 6px 0 rgba(43, 33, 64, .08), 0 12px 28px rgba(43, 33, 64, .08);
	--w-font-title: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
	--w-font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
	background: var(--w-cream);
	color: var(--w-ink);
	font-family: var(--w-font-body);
	font-size: 1rem;
	line-height: 1.6;
}
h1, h2, h3, h4, h5, h6,
.site-title, .wouly-hero__title {
	font-family: var(--w-font-title);
	font-weight: 800;
	color: var(--w-ink);
	letter-spacing: -0.01em;
	line-height: 1.15;
}
a { color: var(--w-coral-dark); }
a:hover, a:focus { color: var(--w-grape); }
:focus-visible { outline: 3px solid var(--w-grape); outline-offset: 2px; }

/* Boutons */
button, input[type="button"], input[type="reset"], input[type="submit"],
.button, .added_to_cart, .wc-block-components-button:not(.is-link),
.wp-block-button__link {
	background: var(--w-coral-dark);
	color: var(--w-white);
	border: 0;
	border-radius: 999px;
	font-family: var(--w-font-title);
	font-weight: 800;
	letter-spacing: .01em;
	padding: .75em 1.5em;
	box-shadow: 0 4px 0 #a8321f;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
button:hover, input[type="submit"]:hover, .button:hover, .added_to_cart:hover,
.wc-block-components-button:not(.is-link):hover {
	background: var(--w-grape);
	color: var(--w-white);
	box-shadow: 0 4px 0 #5237c7;
	transform: translateY(-1px);
}
button:active, .button:active { transform: translateY(2px); box-shadow: 0 2px 0 #a8321f; }
.button.alt, button.alt, .single_add_to_cart_button {
	background: var(--w-grape) !important;
	box-shadow: 0 4px 0 #5237c7 !important;
}
.button.alt:hover, .single_add_to_cart_button:hover { background: var(--w-coral-dark) !important; box-shadow: 0 4px 0 #a8321f !important; }

input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
input[type="number"], input[type="password"], textarea, select, .select2-container .select2-selection {
	background: var(--w-white);
	border: 2px solid var(--w-line);
	border-radius: var(--w-radius-sm);
	box-shadow: none;
	color: var(--w-ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--w-grape); }

/* ==========================================================================
   En-tête
   ========================================================================== */
.wouly-topbar {
	background: var(--w-ink);
	color: var(--w-white);
	font-size: .875rem;
	text-align: center;
	padding: .5em 1em;
}
.wouly-topbar a { color: var(--w-sun); }
.site-header {
	background: var(--w-white);
	border-bottom: 4px solid transparent;
	border-image: linear-gradient(90deg, var(--w-coral), var(--w-sun), var(--w-mint), var(--w-sky), var(--w-grape)) 1;
	padding-top: 1.5em;
}
.site-branding .site-title a {
	color: var(--w-coral-dark);
	font-size: 2.2rem;
}
.site-branding .site-description { color: var(--w-ink-soft); }
.main-navigation ul li a, .site-header-cart .cart-contents { color: var(--w-ink); font-weight: 700; }
.main-navigation ul li a:hover, .main-navigation ul li.current-menu-item > a { color: var(--w-coral-dark); }
.site-header .widget_product_search form input[type="search"] { border-radius: 999px; }
.storefront-primary-navigation { background: transparent; }
@media (min-width: 768px) {
	.main-navigation ul.menu > li > a, .main-navigation ul.nav-menu > li > a { padding: 1em .65em; }
	.main-navigation ul.menu > li:first-child > a { padding-left: 0; }
}

/* ==========================================================================
   Accueil
   ========================================================================== */
.wouly-home .site-main { margin-bottom: 0; }
.wouly-section { margin: 0 0 3.5rem; }
.wouly-section__head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
	margin-bottom: 1.25rem;
}
.wouly-section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.wouly-section__link { font-weight: 700; text-decoration: none; }

.wouly-hero {
	position: relative;
	overflow: hidden;
	border-radius: calc(var(--w-radius) * 1.5);
	background: var(--w-sun);
	padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem);
	margin: 0 0 3.5rem;
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 2rem;
	align-items: center;
}
.wouly-hero::before, .wouly-hero::after {
	content: ""; position: absolute; border-radius: 50%; z-index: 0;
}
.wouly-hero::before { width: 320px; height: 320px; background: var(--w-coral); right: -80px; top: -90px; opacity: .9; }
.wouly-hero::after  { width: 200px; height: 200px; background: var(--w-mint); right: 18%; bottom: -80px; opacity: .9; }
.wouly-hero > * { position: relative; z-index: 1; }
.wouly-hero__eyebrow {
	display: inline-block; background: var(--w-white); color: var(--w-ink);
	border-radius: 999px; padding: .3em .9em; font-weight: 700; font-size: .875rem; margin-bottom: 1rem;
}
.wouly-hero__title { font-size: clamp(2.2rem, 5.5vw, 3.8rem); margin: 0 0 .75rem; }
.wouly-hero__text { font-size: 1.15rem; max-width: 34em; margin-bottom: 1.5rem; color: var(--w-ink); }
.wouly-hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.wouly-hero__actions .button.is-ghost {
	background: var(--w-white); color: var(--w-ink); box-shadow: 0 4px 0 rgba(43,33,64,.18);
}
.wouly-hero__art { display: flex; justify-content: center; }
.wouly-hero__art img { max-height: 380px; width: auto; border-radius: var(--w-radius); box-shadow: var(--w-shadow); }
.wouly-blob {
	width: min(100%, 320px); aspect-ratio: 1; border-radius: 42% 58% 55% 45% / 45% 40% 60% 55%;
	background: var(--w-grape); display: grid; place-items: center;
	color: var(--w-white); font-family: var(--w-font-title); font-weight: 800; font-size: clamp(3rem, 8vw, 5rem);
	box-shadow: var(--w-shadow); transform: rotate(-6deg);
}

/* Catégories */
.wouly-cats {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.wouly-cat {
	--cat-bg: var(--w-sky);
	display: flex; flex-direction: column; justify-content: flex-end;
	min-height: 150px; padding: 1.1rem 1.2rem;
	border-radius: var(--w-radius); background: var(--cat-bg);
	color: var(--w-white); text-decoration: none; box-shadow: var(--w-shadow);
	background-size: cover; background-position: center;
	transition: transform .15s ease;
}
.wouly-cat:hover, .wouly-cat:focus { transform: translateY(-4px) rotate(-1deg); color: var(--w-white); }
.wouly-cat--img { background-image: linear-gradient(180deg, transparent 30%, rgba(43,33,64,.75)), var(--cat-img); }
.wouly-cat__name { font-family: var(--w-font-title); font-weight: 800; font-size: 1.4rem; line-height: 1.1; }
.wouly-cat__count { font-size: .875rem; opacity: .95; }
.wouly-cats li:nth-child(5n+1) .wouly-cat { --cat-bg: var(--w-coral-dark); }
.wouly-cats li:nth-child(5n+2) .wouly-cat { --cat-bg: #1f9c84; }
.wouly-cats li:nth-child(5n+3) .wouly-cat { --cat-bg: var(--w-grape); }
.wouly-cats li:nth-child(5n+4) .wouly-cat { --cat-bg: #2f6fd6; }
.wouly-cats li:nth-child(5n+5) .wouly-cat { --cat-bg: #b7791f; }

/* Engagements */
.wouly-promises {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.wouly-promise {
	background: var(--w-white); border-radius: var(--w-radius); padding: 1.25rem;
	border: 2px solid var(--w-line);
}
.wouly-promise__icon {
	width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
	background: var(--w-sun); margin-bottom: .75rem;
}
.wouly-promise:nth-child(2) .wouly-promise__icon { background: var(--w-mint); }
.wouly-promise:nth-child(3) .wouly-promise__icon { background: #c9d9ff; }
.wouly-promise:nth-child(4) .wouly-promise__icon { background: #ffd3cc; }
.wouly-promise__icon svg { width: 26px; height: 26px; }
.wouly-promise h3 { font-size: 1.2rem; margin: 0 0 .25rem; }
.wouly-promise p { margin: 0; color: var(--w-ink-soft); font-size: .95rem; }

/* Sélection de produits à onglets */
.wouly-tabs__list {
	display: flex; flex-wrap: wrap; gap: .5rem;
	margin-bottom: 1.25rem;
}
.wouly-tabs__tab {
	background: var(--w-white); color: var(--w-ink);
	border: 2px solid var(--w-line); box-shadow: none;
	padding: .5em 1.2em; font-size: .95rem;
}
.wouly-tabs__tab:hover { background: var(--w-cream); color: var(--w-ink); box-shadow: none; transform: none; }
.wouly-tabs__tab[aria-selected="true"] {
	background: var(--w-ink); color: var(--w-white); border-color: var(--w-ink);
}
.wouly-tabs.is-ready .wouly-tabs__fallback-title { display: none; }
.wouly-tabs__fallback-title { font-size: 1.3rem; margin: 0 0 1rem; }
.wouly-tabs__panel + .wouly-tabs__panel { margin-top: 2rem; }
.wouly-tabs.is-ready .wouly-tabs__panel + .wouly-tabs__panel { margin-top: 0; }

/* Journal */
.wouly-posts {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.wouly-post {
	background: var(--w-white); border-radius: var(--w-radius); overflow: hidden;
	box-shadow: var(--w-shadow); display: flex; flex-direction: column;
}
.wouly-post__img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.wouly-post__body { padding: 1.1rem 1.25rem 1.3rem; }
.wouly-post__date { font-size: .8rem; font-weight: 700; color: var(--w-ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.wouly-post__title { font-size: 1.25rem; margin: .3rem 0 .5rem; }
.wouly-post__title a { color: var(--w-ink); text-decoration: none; }
.wouly-post__title a:hover { color: var(--w-coral-dark); }
.wouly-post p { margin: 0; color: var(--w-ink-soft); font-size: .95rem; }

/* Avis clients */
.wouly-reviews {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.wouly-review {
	background: var(--w-white); border-radius: var(--w-radius); padding: 1.4rem;
	border: 2px solid var(--w-line); position: relative;
}
.wouly-review::before {
	content: "\201C"; position: absolute; top: -.1em; right: .4em;
	font-family: var(--w-font-title); font-size: 4.5rem; line-height: 1; color: var(--w-sun);
}
.wouly-review .star-rating { color: var(--w-sun); margin-bottom: .75rem; }
.wouly-review blockquote { margin: 0 0 1rem; padding: 0; border: 0; font-style: italic; color: var(--w-ink); }
.wouly-review__meta { margin: 0; font-size: .9rem; color: var(--w-ink-soft); }
.wouly-review__verified {
	display: inline-block; margin-left: .4em; padding: .05em .6em; border-radius: 999px;
	background: #dcf7ef; color: #135c4d; font-size: .75rem; font-weight: 700;
}

/* Instagram */
.wouly-insta {
	display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center;
	background: linear-gradient(120deg, #ffd3cc, #e5dcff);
	border-radius: var(--w-radius); padding: 1.5rem 1.75rem;
}
.wouly-insta__icon {
	width: 56px; height: 56px; border-radius: 16px; background: var(--w-white);
	display: grid; place-items: center; box-shadow: var(--w-shadow);
}
.wouly-insta__icon svg { width: 30px; height: 30px; }
.wouly-insta p { margin: .25rem 0 0; color: var(--w-ink-soft); }

/* Newsletter */
.wouly-newsletter {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center;
	background: var(--w-ink); color: #d9d2e6;
	border-radius: calc(var(--w-radius) * 1.5); padding: clamp(1.5rem, 4vw, 3rem);
}
.wouly-newsletter .wouly-section__title { color: var(--w-sun); }
.wouly-newsletter p { margin: .5rem 0 0; }
.wouly-newsletter .mc4wp-form-fields { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.wouly-newsletter .mc4wp-form-fields p { margin: 0; }
.wouly-newsletter input[type="email"] { min-width: min(100%, 260px); }
.wouly-newsletter a { color: var(--w-sun); }

.wouly-empty {
	background: var(--w-white); border: 2px dashed var(--w-line); border-radius: var(--w-radius);
	padding: 1.5rem; text-align: center; color: var(--w-ink-soft);
}

/* ==========================================================================
   Grilles produits / catalogue
   ========================================================================== */
ul.products li.product {
	background: var(--w-white);
	border-radius: var(--w-radius);
	padding: .75rem .75rem 1.25rem;
	box-shadow: var(--w-shadow);
	transition: transform .15s ease;
}
ul.products li.product:hover { transform: translateY(-4px); }
ul.products li.product img { border-radius: calc(var(--w-radius) - 6px); margin-bottom: .75rem; }
ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--w-font-body); font-weight: 700; font-size: 1rem; color: var(--w-ink);
}
ul.products li.product .button { padding: .6em 1.1em; font-size: .9rem; line-height: 1.3; }
ul.products li.product .price, .single-product div.product p.price { color: var(--w-coral-dark); font-weight: 800; }
ul.products li.product .price del, .single-product div.product p.price del { color: var(--w-ink-soft); opacity: .8; }
.onsale {
	background: var(--w-sun); color: var(--w-ink); border: 0; border-radius: 999px;
	font-weight: 800; padding: .2em .8em;
}
.woocommerce-breadcrumb { background: transparent; color: var(--w-ink-soft); }
.woocommerce-result-count, .woocommerce-ordering select { color: var(--w-ink-soft); }
.storefront-sorting { border-bottom: 2px solid var(--w-line); }

/* Filtres (barre latérale) */
.widget-area .widget {
	background: var(--w-white); border-radius: var(--w-radius); padding: 1.25rem;
	margin-bottom: 1.25rem; border: 2px solid var(--w-line);
}
.widget-area .widget .widget-title, .widget-area .widget .widgettitle {
	font-family: var(--w-font-title); font-weight: 800; border-bottom: 0; padding: 0; margin-bottom: .75rem;
}
.widget_price_filter .ui-slider .ui-slider-range, .widget_price_filter .ui-slider .ui-slider-handle { background: var(--w-grape); }
.widget_layered_nav li.chosen a::before, .widget_layered_nav_filters li a::before { color: var(--w-coral-dark); }

/* Fiche produit */
.single-product div.product .woocommerce-product-gallery img { border-radius: var(--w-radius); }
.single-product div.product .product_title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.single-product div.product form.cart { background: var(--w-white); border-radius: var(--w-radius); padding: 1.25rem; border: 2px solid var(--w-line); }
.single-product div.product .variations th, .single-product div.product .variations td { background: transparent; }
.woocommerce-tabs ul.tabs li a { font-weight: 700; }
.woocommerce-tabs ul.tabs li.active a { color: var(--w-coral-dark); }
.stock.in-stock { color: #1f7a67; font-weight: 700; }
.stock.out-of-stock { color: var(--w-coral-dark); font-weight: 700; }

/* Panier / paiement */
.woocommerce-info, .woocommerce-message, .woocommerce-noreviews, p.no-comments {
	background: var(--w-white); color: var(--w-ink); border-left: 6px solid var(--w-mint); border-radius: var(--w-radius-sm);
}
.woocommerce-error, .woocommerce-NoticeGroup .woocommerce-error { border-left: 6px solid var(--w-coral-dark); border-radius: var(--w-radius-sm); }

/* ==========================================================================
   Pages légales & marquage des informations manquantes
   ========================================================================== */
.wouly-todo {
	background: #fff1a8;
	color: #6b4e00;
	border: 1px dashed #c79a00;
	border-radius: 6px;
	padding: 0 .35em;
	font-weight: 700;
	font-size: .95em;
}
.wouly-legal h2 { margin-top: 2rem; font-size: 1.5rem; }
.wouly-legal table { background: var(--w-white); border-radius: var(--w-radius-sm); overflow: hidden; }
.wouly-legal table th { width: 35%; background: #fbf3e6; }
.wouly-note {
	background: #eef3ff; border-left: 6px solid var(--w-sky); padding: 1rem 1.25rem; border-radius: var(--w-radius-sm);
}

/* Formulaires contact / rétractation */
.wouly-form { background: var(--w-white); border-radius: var(--w-radius); padding: 1.5rem; border: 2px solid var(--w-line); }
.wouly-form p { margin-bottom: 1rem; }
.wouly-form label { display: block; font-weight: 700; margin-bottom: .3rem; }
.wouly-form input:not([type="checkbox"]), .wouly-form textarea, .wouly-form select { width: 100%; }
.wouly-form .wouly-hp { position: absolute !important; left: -9999px !important; }
.wouly-alert { padding: 1rem 1.25rem; border-radius: var(--w-radius-sm); margin-bottom: 1rem; font-weight: 700; }
.wouly-alert--ok { background: #dcf7ef; color: #135c4d; }
.wouly-alert--err { background: #ffe1dc; color: #8a2414; }

/* ==========================================================================
   Pied de page
   ========================================================================== */
.site-footer { background: var(--w-ink); color: #d9d2e6; }
.site-footer a:not(.button),
.site-footer .wouly-footer-legal a { color: var(--w-white) !important; }
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer .widget-title { color: var(--w-sun); }
.wouly-footer-legal { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.wouly-footer-legal a { text-decoration: none; font-weight: 700; }
.wouly-footer-legal a:hover { text-decoration: underline; }
.site-info { color: #b7aecb; font-size: .875rem; }
.storefront-handheld-footer-bar { background: var(--w-white); border-top: 3px solid var(--w-sun); }
.storefront-handheld-footer-bar ul li > a { color: var(--w-ink); }
.storefront-handheld-footer-bar ul li.cart .count { background: var(--w-coral-dark); border-color: var(--w-white); }

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 767px) {
	.wouly-hero { grid-template-columns: 1fr; text-align: left; }
	.wouly-hero__art { display: none; }
	.wouly-hero::before { width: 180px; height: 180px; right: -60px; top: -60px; }
	.wouly-hero::after { display: none; }
	.site-branding .site-title a { font-size: 1.8rem; }
	.wouly-insta { grid-template-columns: 1fr; text-align: left; }
	.wouly-insta__icon { display: none; }
	.wouly-newsletter { grid-template-columns: 1fr; }
	.wouly-tabs__list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; }
	.wouly-tabs__tab { white-space: nowrap; }
	ul.products li.product { padding: .5rem .5rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
