/* ==========================================================================
   Rucher Dauphinois — habillage global (tous les gabarits)
   Ambiance : fond sable, cartes crème arrondies, accent miel, texte brun.
   Mobile-first : styles de base pour petit écran, min-width au-delà.
   ========================================================================== */

/* --- Jetons ------------------------------------------------------------- */
:root {
	--rd-sand:       #E4D9BC; /* fond de page */
	--rd-cream:      #F7F3E8; /* cartes */
	--rd-cream-deep: #EFE4C8; /* hexagones, zones teintées */
	--rd-honey:      #E8A317; /* accent principal (boutons) */
	--rd-honey-soft: #F6C445; /* badges promo */
	--rd-brown:      #6B4423; /* liens, titres secondaires */
	--rd-ink:        #2B1D10; /* texte */
	--rd-muted:      #6E5B45; /* texte secondaire */

	--rd-radius:     28px;
	--rd-radius-sm:  12px;
	--rd-shadow:     0 18px 40px -18px rgba(70, 45, 15, .35);

	--rd-font-title: "Outfit", system-ui, sans-serif;
	--rd-font-text:  "Nunito Sans", system-ui, sans-serif;
}

@media (min-width: 922px) {
	:root { --rd-radius: 40px; }
}

/* --- Base --------------------------------------------------------------- */
body,
body.ast-separate-container,
body.ast-plain-container {
	background: var(--rd-sand) !important; /* Astra peint son propre fond tardivement */
	color: var(--rd-ink);
	font-family: var(--rd-font-text);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.woocommerce-loop-product__title,
.product_title {
	font-family: var(--rd-font-title);
	color: var(--rd-ink);
	letter-spacing: -.01em;
}

a { color: var(--rd-brown); }
a:hover, a:focus { color: var(--rd-ink); }

:focus-visible {
	outline: 3px solid var(--rd-honey);
	outline-offset: 2px;
}

/* --- En-tête ------------------------------------------------------------ */
.site-header .main-header-bar,
.site-header .ast-primary-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar {
	background: var(--rd-cream);
	border-bottom: 0;
	box-shadow: 0 6px 24px -16px rgba(70, 45, 15, .4);
}

/* Logo texte provisoire : alvéole miel devant le titre du site.
   À retirer quand le vrai logo de Romaric sera posé dans le Customizer. */
.site-title a {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	color: var(--rd-ink) !important;
	font-weight: 700;
}
.site-title a::before {
	content: "";
	width: 1.1em;
	height: 1.25em;
	background: var(--rd-honey);
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	flex: none;
}

.main-header-menu .menu-link {
	font-family: var(--rd-font-title);
	font-weight: 500;
	color: var(--rd-ink);
}
.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .menu-link:hover {
	color: var(--rd-brown);
}

/* Sous-menus déroulants */
.main-header-menu .sub-menu {
	background: var(--rd-cream);
	border: 0 !important;
	border-radius: var(--rd-radius-sm);
	box-shadow: var(--rd-shadow);
	overflow: hidden;
}

/* --- Contenu en cartes crème ------------------------------------------- */
/* Hors accueil : la zone principale et la colonne latérale deviennent des cartes. */
body:not(.home) #primary,
body:not(.home) #secondary .widget {
	background: var(--rd-cream);
	border-radius: var(--rd-radius);
	box-shadow: var(--rd-shadow);
	padding: 1.5rem;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}
/* Astra « séparé » met déjà un fond blanc sur l'article : on le neutralise. */
body:not(.home).ast-separate-container .ast-article-single,
body:not(.home).ast-separate-container .ast-article-post,
body:not(.home).ast-separate-container .comments-area,
body:not(.home).ast-separate-container .ast-woocommerce-container {
	background: transparent;
	padding: 0;
}

@media (min-width: 922px) {
	body:not(.home) #primary { padding: 3rem; }
}

/* --- Boutons ------------------------------------------------------------ */
.ast-button,
.button,
button,
input[type="submit"],
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	background: var(--rd-honey) !important;
	color: var(--rd-ink) !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-family: var(--rd-font-title);
	font-weight: 600;
	padding: .8em 1.6em;
	transition: background-color .2s, transform .2s;
}
.ast-button:hover,
.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background: var(--rd-honey-soft) !important;
	transform: translateY(-1px);
}

/* --- Formulaires -------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="search"], textarea, select {
	background: #fff;
	border: 1px solid var(--rd-cream-deep);
	border-radius: var(--rd-radius-sm);
	color: var(--rd-ink);
}

/* --- WooCommerce : grille produits -------------------------------------- */
/* Chaque pot posé sur une alvéole hexagonale (cf. planche d'ambiance).
   Idéal : photos de pots détourées (PNG fond transparent). */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	text-align: center;
}
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
	position: relative;
	isolation: isolate;
	padding: 8% 12%;
}
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--rd-cream-deep);
	clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
	transition: background-color .25s;
}
.woocommerce ul.products li.product:hover .astra-shop-thumbnail-wrap::before {
	background: var(--rd-honey-soft);
}
.woocommerce ul.products li.product img {
	background: transparent;
	mix-blend-mode: multiply; /* adoucit les photos sur fond blanc non détourées */
	transition: transform .3s;
}
.woocommerce ul.products li.product:hover img {
	transform: translateY(-4px) scale(1.02);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	font-weight: 500;
}
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--rd-ink);
	font-weight: 700;
}
.woocommerce .price del {
	color: var(--rd-muted);
	opacity: .7;
}
.woocommerce .price ins { text-decoration: none; }

/* Badge promo : rectangle jaune, pas de pastille ronde */
.woocommerce span.onsale,
.woocommerce ul.products li.product .onsale,
.ast-onsale-card {
	background: var(--rd-honey-soft) !important;
	color: var(--rd-ink) !important;
	border-radius: 3px !important;
	min-width: 0;
	min-height: 0;
	line-height: 1;
	padding: .45em .6em;
	font-size: .8rem;
	font-weight: 700;
}

/* --- WooCommerce : fiche produit ---------------------------------------- */
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
	background: var(--rd-cream-deep);
	border-radius: var(--rd-radius);
	overflow: hidden;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--rd-brown);
}
.woocommerce .quantity .qty {
	border-radius: 999px;
}

/* --- Messages WooCommerce ----------------------------------------------- */
.woocommerce-message,
.woocommerce-info {
	background: var(--rd-cream-deep);
	border-top-color: var(--rd-honey);
	border-radius: var(--rd-radius-sm);
}
.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--rd-brown);
}

/* --- Pied de page ------------------------------------------------------- */
.site-footer,
.site-footer .site-below-footer-wrap,
.site-footer .site-primary-footer-wrap {
	background: var(--rd-ink);
	color: var(--rd-cream);
}
.site-footer .ast-footer-copyright.site-footer-focus-item { color: var(--rd-cream); }
.site-footer a { color: var(--rd-honey-soft); }
.site-footer a:hover, .site-footer a:focus { color: var(--rd-cream); }

/* --- Mouvement réduit --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition: none !important;
		animation: none !important;
	}
}

/* Pied de page : liens légaux (menu « Pied de page ») */
.rd-footer-menu { margin-top: .5rem; }
.site-footer .rd-footer-links, .site-footer .rd-footer-links li { list-style: none; }
.site-footer .rd-footer-links { margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; font-size: .9em; }
.rd-footer-links a { text-decoration: underline; text-underline-offset: 2px; }

/* En-tête : Panier (n) */
.rd-cart-link { display: inline-flex; align-items: center; gap: .4rem; color: inherit; }
.rd-cart-count { align-self: center; min-width: 1.5em; padding: .1em .35em; line-height: 1.4; background: var(--rd-honey); color: var(--rd-ink); font-size: .8em; font-weight: 700; text-align: center; }
/* Le menu a 9 entrées : on resserre pour tenir sur une ligne (>= 922px, point de rupture d'Astra) */
@media (min-width: 922px) {
	.ast-primary-header-bar .main-header-menu > .menu-item > .menu-link { padding-left: .6em; padding-right: .6em; font-size: 15px; }
	.ast-primary-header-bar .main-header-menu { flex-wrap: nowrap; }
}
