/*
Theme Name:   Rubi R&C Shop Beauté
Description:  Thème enfant Kadence mobile-first pour Rubi R&C Shop Beauté (charte noir & or). Les couleurs suivent la palette globale Kadence (Apparence > Personnaliser > Couleurs).
Template:     kadence
Version:      0.2.0
Requires PHP: 8.1
Text Domain:  rcshopbeauty
License:      GPL-3.0-or-later
*/

/* Polices hébergées localement (licence OFL, voir assets/fonts) : aucun appel à Google Fonts. */
@font-face {
	font-family: "Jost";
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url("assets/fonts/jost-normal-latin.woff2") format("woff2");
}

@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("assets/fonts/cormorant-garamond-normal-latin.woff2") format("woff2");
}

@font-face {
	font-family: "Cormorant Garamond";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("assets/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
}

:root {
	--rcsb-bottom-nav-height: 64px;
	--rcsb-black: var(--global-palette3, #0d0b09);
	--rcsb-gold: var(--global-palette15, #c9a24a);
	--rcsb-ivory: var(--global-palette7, #e9e1d3);
	--rcsb-accent: var(--global-palette1, #8c6b2c);
	--rcsb-accent-contrast: var(--global-palette9, #ffffff);
	--rcsb-text: var(--global-palette3, #0d0b09);
	--rcsb-muted: var(--global-palette5, #5c534a);
	--rcsb-surface: var(--global-palette9, #ffffff);
	--rcsb-border: var(--global-palette7, #e9e1d3);
}

/* ---------- Charte : boutons, prix, pied de page ---------- */
.button,
button.button,
.wp-element-button,
.wp-block-button__link,
.single_add_to_cart_button,
.rcsb-sticky-cart__button {
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 500;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--rcsb-accent);
	font-weight: 600;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-category__title {
	font-family: var(--global-heading-fontfamily, "Cormorant Garamond", Georgia, serif);
	font-size: 1.2rem;
	font-weight: 600;
}

.site-bottom-footer-wrap,
.site-bottom-footer-wrap .footer-html {
	color: var(--rcsb-ivory);
}

.site-bottom-footer-wrap a {
	color: var(--rcsb-gold);
}

/* ---------- Page d'accueil ---------- */
.rcsb-hero {
	margin-bottom: 2.5rem;
	padding: 3rem 1.5rem;
	background: var(--rcsb-black);
	color: var(--rcsb-ivory);
	text-align: center;
}

.rcsb-hero h1 {
	color: #fff;
	margin: 0.25em 0 0.5em;
}

.rcsb-hero p {
	max-width: 36rem;
	margin-inline: auto;
}

.rcsb-hero .rcsb-eyebrow {
	color: var(--rcsb-gold);
	font-family: var(--global-heading-fontfamily, "Cormorant Garamond", Georgia, serif);
	font-size: 1.05rem;
	letter-spacing: 0.35em;
	text-transform: uppercase;
}

.rcsb-hero .wp-block-buttons {
	justify-content: center;
	margin-top: 1.5rem;
}

.rcsb-hero .wp-block-button__link {
	padding: 0.85em 1.6em;
	background: var(--rcsb-gold);
	color: var(--rcsb-black);
	font-size: 0.875rem;
	white-space: nowrap;
}

.home .entry-content > h2 {
	margin-top: 2.5rem;
	text-align: center;
}

.home .entry-content > h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 2px;
	margin: 0.5rem auto 0;
	background: var(--rcsb-gold);
}

.rcsb-reassurance {
	display: grid;
	gap: 1rem;
	margin-top: 3rem;
	padding: 1.5rem;
	background: var(--global-palette8, #f7f3ec);
	text-align: center;
}

.rcsb-reassurance p {
	margin: 0;
}

@media (min-width: 768px) {
	.rcsb-reassurance {
		grid-template-columns: repeat(3, 1fr);
	}
}

.rcsb-social {
	margin-top: 2.5rem;
	text-align: center;
}

.rcsb-credits li {
	margin-bottom: 0.6em;
}

/* Évite le zoom automatique d'iOS sur les champs de formulaire. */
@media (max-width: 767px) {
	input,
	select,
	textarea {
		font-size: 16px !important;
	}
}

/* ---------- Barre de navigation mobile ---------- */
.rcsb-bottom-nav {
	display: none;
}

@media (max-width: 1024px) {
	body {
		padding-bottom: calc(var(--rcsb-bottom-nav-height) + env(safe-area-inset-bottom));
	}

	.rcsb-bottom-nav {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 1000;
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		height: calc(var(--rcsb-bottom-nav-height) + env(safe-area-inset-bottom));
		padding-bottom: env(safe-area-inset-bottom);
		background: var(--rcsb-black);
		border-top: 1px solid rgb(201 162 74 / 35%);
		box-shadow: 0 -4px 16px rgb(0 0 0 / 18%);
	}

	.rcsb-bottom-nav__item {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		min-height: 48px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--rcsb-ivory);
		font: inherit;
		font-size: 11px;
		line-height: 1.2;
		text-decoration: none;
		cursor: pointer;
	}

	.rcsb-bottom-nav__item:hover,
	.rcsb-bottom-nav__item:focus-visible,
	.rcsb-bottom-nav__item.is-active {
		color: var(--rcsb-gold);
		background: none;
	}

	.rcsb-bottom-nav__item svg {
		width: 24px;
		height: 24px;
	}

	.rcsb-cart-count {
		position: absolute;
		top: 6px;
		left: calc(50% + 6px);
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		border-radius: 9px;
		background: var(--rcsb-gold);
		color: var(--rcsb-black);
		font-size: 11px;
		font-weight: 700;
		line-height: 18px;
		text-align: center;
	}

	.rcsb-cart-count[data-count="0"] {
		display: none;
	}

	.rcsb-search-panel {
		position: fixed;
		inset: auto 0 calc(var(--rcsb-bottom-nav-height) + env(safe-area-inset-bottom)) 0;
		z-index: 999;
		padding: 12px 16px;
		background: var(--rcsb-surface);
		border-top: 1px solid var(--rcsb-border);
		box-shadow: 0 -4px 16px rgb(0 0 0 / 8%);
	}

	.rcsb-search-panel[hidden] {
		display: none;
	}

	.rcsb-search-panel form {
		display: flex;
		gap: 8px;
	}

	.rcsb-search-panel input[type="search"] {
		flex: 1;
		min-height: 44px;
	}
}

/* ---------- Bouton d'achat fixe (fiche produit) ---------- */
.rcsb-sticky-cart {
	display: none;
}

@media (max-width: 1024px) {
	.rcsb-sticky-cart {
		position: fixed;
		inset: auto 0 calc(var(--rcsb-bottom-nav-height) + env(safe-area-inset-bottom)) 0;
		z-index: 998;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 16px;
		background: var(--rcsb-surface);
		border-top: 1px solid var(--rcsb-border);
		box-shadow: 0 -4px 16px rgb(0 0 0 / 6%);
		transform: translateY(150%);
		transition: transform 0.2s ease;
	}

	.rcsb-sticky-cart.is-visible {
		transform: translateY(0);
	}

	.rcsb-sticky-cart__info {
		flex: 1;
		min-width: 0;
	}

	.rcsb-sticky-cart__title {
		overflow: hidden;
		margin: 0;
		color: var(--rcsb-text);
		font-size: 14px;
		font-weight: 600;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.rcsb-sticky-cart__price {
		color: var(--rcsb-accent);
		font-size: 14px;
		font-weight: 700;
	}

	.rcsb-sticky-cart__button {
		flex-shrink: 0;
		min-height: 44px;
		padding: 0 18px;
		border: 0;
		border-radius: 999px;
		background: var(--rcsb-accent);
		color: var(--rcsb-accent-contrast);
		font-weight: 700;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rcsb-sticky-cart {
		transition: none;
	}
}

/* ---------- Onglet « Composition & conseils » ---------- */
.rcsb-product-info__item + .rcsb-product-info__item {
	margin-top: 1.25em;
	padding-top: 1.25em;
	border-top: 1px solid var(--rcsb-border);
}

.rcsb-product-info__item h3 {
	margin: 0 0 0.4em;
	font-size: 1rem;
}

.rcsb-product-info__item--rcsb_warnings {
	padding: 1em;
	border-top: 0;
	border-left: 4px solid var(--rcsb-accent);
	background: var(--global-palette8, #f7f3f0);
}
