/**
 * Fiche produit.
 */

.fiche {
	display: grid;
	gap: 1.5rem;
	padding: 5rem var(--marge) 3rem;
}

.fiche__haut {
	display: grid;
	gap: 1.5rem;
}

/* Message (ex. « ajouté au panier ») au-dessus de la fiche */
main > .woocommerce-notices-wrapper:not(:empty) { padding: 5.5rem var(--marge) 0; }
main > .woocommerce-notices-wrapper:not(:empty) + .fiche { padding-top: 1rem; }

/* ---------- Le bijou qui flotte ---------- */

.fiche__scene {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 62svh;
}

/* Halo : prend la couleur de la pierre choisie (variable --halo) */
.fiche__scene::before {
	content: '';
	position: absolute;
	inset: 8% 4%;
	background-color: var(--halo);
	-webkit-mask: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
	mask: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
	opacity: .75;
	filter: blur(30px);
	transition: background-color .7s var(--ease-doux);
	animation: respirer calc(var(--duree-flottement) * 1.4) ease-in-out infinite;
}

.fiche__bijou {
	position: relative;
	width: min(82vw, 520px);
	display: grid;
	place-items: center;
}

.fiche__bijou .visuel--photo { width: 78%; }
.fiche__bijou .visuel--attente { width: 58%; }

/* ---------- Informations ---------- */

.fiche__fil {
	display: flex;
	gap: .5rem;
	font-size: .85rem;
	color: var(--brun-doux);
}

.fiche__fil a { text-decoration: none; }
.fiche__fil a:hover { text-decoration: underline; }

.fiche__titre {
	margin: .4rem 0 .6rem;
	font-family: var(--police-titre);
	font-weight: 700;
	font-size: clamp(2.6rem, 10vw, 5rem);
	line-height: .9;
	letter-spacing: -.035em;
	word-spacing: .1em;
}

.fiche__prix {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--brun-doux);
}

.fiche__resume p { margin: 0 0 1rem; font-size: 1.05rem; }

/* ---------- Formulaire d'achat ---------- */

.fiche form.cart { margin-top: 1.5rem; }

.fiche table.variations,
.fiche table.variations tbody,
.fiche table.variations tr,
.fiche table.variations th,
.fiche table.variations td {
	display: block;
	padding: 0;
	border: 0;
	text-align: left;
}

.fiche table.variations { margin: 0; }
.fiche table.variations tr { margin-bottom: 1.4rem; }

.fiche table.variations th {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: .7rem;
}

.fiche table.variations label {
	font-weight: 700;
	font-size: .95rem;
}

.fiche .reset_variations { display: none !important; }

/* Le métal en boutons : la liste d'origine reste, masquée, pour WooCommerce */
.fiche select.est-remplace {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.choix-boutons {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}

.choix-boutons__bouton {
	padding: .75rem 1.3rem;
	border: 1px solid color-mix(in srgb, var(--brun) 30%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--blanc) 60%, transparent);
	color: var(--brun);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--duree-rapide) var(--ease-doux), color var(--duree-rapide) var(--ease-doux), border-color var(--duree-rapide) var(--ease-doux);
}

.choix-boutons__bouton:hover { border-color: var(--brun); }

.choix-boutons__bouton[aria-pressed="true"] {
	background: var(--brun);
	border-color: var(--brun);
	color: var(--blanc);
}

/* Liste déroulante (taille) */
.fiche table.variations select {
	width: 100%;
	max-width: 16rem;
	padding: .85rem 2.8rem .85rem 1.2rem;
	border: 1px solid color-mix(in srgb, var(--brun) 30%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--blanc) 60%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%232E211C' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 1.2rem center;
	-webkit-appearance: none;
	appearance: none;
	color: var(--brun);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Le total de l'extension remplace le prix de la variation */
.fiche .woocommerce-variation-price { display: none; }
.fiche .woocommerce-variation-availability p { margin: 0 0 1rem; font-size: .9rem; }

.fiche .woocommerce-variation-add-to-cart,
.fiche form.cart:not(.variations_form) {
	display: flex;
	gap: .7rem;
	align-items: stretch;
}

.fiche .quantity input {
	width: 4.2rem;
	height: 100%;
	min-height: 3.3rem;
	border: 1px solid color-mix(in srgb, var(--brun) 30%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--blanc) 60%, transparent);
	color: var(--brun);
	font: inherit;
	font-weight: 600;
	text-align: center;
}

.fiche .single_add_to_cart_button {
	flex: 1;
	min-height: 3.3rem;
	padding: 1rem 1.6rem;
	border: 0;
	border-radius: 999px;
	background: var(--brun);
	color: var(--blanc);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background var(--duree-rapide) var(--ease-doux), color var(--duree-rapide) var(--ease-doux), transform var(--duree-rapide) var(--ease-doux);
}

.fiche .single_add_to_cart_button:hover {
	background: var(--peche-soutenu);
	color: var(--brun);
	transform: translateY(-2px);
}

.fiche .single_add_to_cart_button.disabled {
	opacity: .45;
	cursor: not-allowed;
	transform: none;
}

/* ---------- Liens secondaires et description ---------- */

.fiche__liens {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem 1.8rem;
	margin: 1.4rem 0 .5rem;
}

.fiche__infos .fiche__details { margin-top: 1.5rem; }

/* ---------- Photos portées : formats variés, déstructurés ---------- */

.fiche-galerie {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 1rem;
	padding: 3rem 0;
}

.fiche-galerie__photo {
	margin: 0;
	overflow: hidden;
	border-radius: 1.5rem;
	box-shadow: 0 30px 60px -30px rgba(46, 33, 28, .45);
	transform: translateY(var(--parallaxe, 0));
}

.fiche-galerie__photo img { width: 100%; height: 100%; object-fit: cover; }

.fiche-galerie__photo:nth-child(4n + 1) { grid-column: 1 / 10; aspect-ratio: 4 / 5; }
.fiche-galerie__photo:nth-child(4n + 2) { grid-column: 5 / 13; aspect-ratio: 1; margin-top: -30%; border-radius: 50vw 50vw 1.5rem 1.5rem; }
.fiche-galerie__photo:nth-child(4n + 3) { grid-column: 2 / 8; aspect-ratio: 3 / 4; }
.fiche-galerie__photo:nth-child(4n + 4) { grid-column: 7 / 13; aspect-ratio: 1; border-radius: 50%; margin-top: -20%; }

/* ---------- Tu aimeras aussi ---------- */

.fiche-autres { padding-left: 0; padding-right: 0; }

/* ---------- Guide des tailles ---------- */

.guide {
	width: min(36rem, calc(100% - 2rem));
	max-height: calc(100svh - 2rem);
	padding: 2rem;
	border: 0;
	border-radius: 1.5rem;
	background: var(--creme);
	color: var(--brun);
	box-shadow: 0 40px 80px -30px rgba(46, 33, 28, .5);
}

.guide::backdrop {
	background: rgba(46, 33, 28, .35);
	backdrop-filter: blur(6px);
}

.guide__fermer {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 2.6rem;
	height: 2.6rem;
	border: 0;
	border-radius: 50%;
	background: var(--peche-clair);
	color: var(--brun);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.guide__fermer:hover { background: var(--peach-fuzz); }

.guide__corps table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95rem;
}

.guide__corps th,
.guide__corps td {
	padding: .5rem .6rem;
	border-bottom: 1px solid color-mix(in srgb, var(--brun) 15%, transparent);
	text-align: left;
}

.guide__corps th { font-weight: 700; }
.guide__corps figure { margin: 1rem 0; }

/* ---------- Ordinateur : deux colonnes, le bijou reste visible ---------- */

@media (min-width: 900px) {
	.fiche { padding-top: 6rem; }

	.fiche__haut {
		grid-template-columns: 1.15fr .85fr;
		column-gap: 5vw;
		align-items: start;
	}

	.fiche__scene {
		position: sticky;
		top: 5rem;
		height: calc(100svh - 7rem);
		min-height: 0;
	}

	.fiche__infos { padding-top: 4vh; max-width: 32rem; }

	.fiche-galerie { gap: 2rem; padding: 5rem 0; }
	.fiche-galerie__photo:nth-child(4n + 1) { grid-column: 1 / 7; }
	.fiche-galerie__photo:nth-child(4n + 2) { grid-column: 7 / 12; margin-top: 18%; }
	.fiche-galerie__photo:nth-child(4n + 3) { grid-column: 2 / 6; margin-top: -10%; }
	.fiche-galerie__photo:nth-child(4n + 4) { grid-column: 8 / 12; margin-top: 4%; }
}
