/* Headshot — Offre Posters · front · v1.0.12 */

:root {
	--hpo-accent: #d98b3a;
	--hpo-accent-dark: #b8722c;
	--hpo-ink: #2d2a26;
	--hpo-muted: #6f6a63;
	--hpo-line: #e4ded6;
	--hpo-bg: #fffdfa;
}

/* ---------- Bandeau d'incitation ---------- */

.hpo-nudge {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin: 0 0 24px;
	padding: 16px 20px;
	border-left: 3px solid var(--hpo-accent);
	background: #faf6f0;
	border-radius: 3px;
}

.hpo-nudge__text {
	flex: 1 1 260px;
	margin: 0;
	color: var(--hpo-ink);
	font-size: 15px;
	line-height: 1.5;
}

.hpo-nudge--info {
	border-left-color: var(--hpo-muted);
	background: #f6f5f3;
}

.hpo-nudge .button,
.hpo-nudge .hpo-open-modal {
	flex: 0 0 auto;
}

/* ---------- Encadré sur les fiches livres ---------- */

.hpo-offer-box {
	margin: 18px 0 24px;
	padding: 16px 18px;
	border: 1px solid var(--hpo-line);
	border-radius: 4px;
	background: var(--hpo-bg);
}

.hpo-offer-box__title {
	display: inline-block;
	margin-bottom: 6px;
	color: var(--hpo-accent-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hpo-offer-box p {
	margin: 0;
	color: var(--hpo-ink);
	font-size: 14px;
	line-height: 1.6;
}

/* ---------- Ligne de panier offerte ---------- */

.hpo-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--hpo-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: middle;
}

.hpo-qty-fixed {
	color: var(--hpo-muted);
}

/* ---------- Modale ---------- */

body.hpo-modal-open {
	overflow: hidden;
}

.hpo-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.hpo-modal[hidden] {
	display: none;
}

.hpo-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(28, 25, 22, 0.62);
}

.hpo-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 880px;
	max-height: 90vh;
	padding: 28px 28px 0;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.hpo-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: var(--hpo-muted);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.hpo-modal__close:hover {
	color: var(--hpo-ink);
}

.hpo-modal__title {
	margin: 0 0 6px;
	color: var(--hpo-ink);
	font-size: 24px;
	line-height: 1.2;
}

.hpo-modal__intro {
	margin: 0 0 20px;
	color: var(--hpo-muted);
	font-size: 15px;
	line-height: 1.5;
}

.hpo-modal__grid {
	display: grid;
	flex: 1 1 auto;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	overflow-y: auto;
	padding-bottom: 8px;
}

.hpo-modal__empty {
	color: var(--hpo-muted);
}

/* ---------- Vignettes ---------- */

.hpo-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	cursor: pointer;
}

.hpo-card__input {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--hpo-accent);
	cursor: pointer;
}

.hpo-card__frame {
	display: block;
	overflow: hidden;
	border: 2px solid var(--hpo-line);
	border-radius: 4px;
	background: #f7f5f2;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hpo-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.hpo-card.is-selected .hpo-card__frame {
	border-color: var(--hpo-accent);
	box-shadow: 0 0 0 3px rgba(217, 139, 58, 0.22);
}

.hpo-card__name {
	color: var(--hpo-ink);
	font-size: 13px;
	line-height: 1.35;
}

.hpo-card__input:disabled + .hpo-card__frame {
	opacity: 0.4;
}

.hpo-card__input:disabled ~ .hpo-card__name {
	opacity: 0.5;
}

/* ---------- Pied de modale ---------- */

.hpo-modal__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 -28px;
	padding: 16px 28px;
	border-top: 1px solid var(--hpo-line);
	background: #fff;
}

.hpo-modal__counter {
	color: var(--hpo-muted);
	font-size: 14px;
}

.hpo-modal__actions {
	display: flex;
	gap: 10px;
}

.hpo-btn {
	padding: 11px 22px;
	border: 1px solid transparent;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.hpo-btn--primary {
	background: var(--hpo-accent);
	color: #fff;
}

.hpo-btn--primary:hover:not(:disabled) {
	background: var(--hpo-accent-dark);
}

.hpo-btn--primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hpo-btn--ghost {
	border-color: var(--hpo-line);
	background: #fff;
	color: var(--hpo-muted);
}

.hpo-btn.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

@media (max-width: 600px) {
	.hpo-modal__panel {
		max-height: 94vh;
		padding: 22px 18px 0;
	}

	.hpo-modal__footer {
		margin: 0 -18px;
		padding: 14px 18px;
	}

	.hpo-modal__grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	}
}

/* ---------- Prix barré au panier ---------- */

.woocommerce-cart .product-price del,
.woocommerce-cart .product-subtotal del,
.widget_shopping_cart del {
	margin-right: 4px;
	color: var(--hpo-muted);
	font-weight: 400;
	opacity: 0.75;
}

.woocommerce-cart .product-price ins,
.woocommerce-cart .product-subtotal ins,
.widget_shopping_cart ins {
	background: none;
	color: var(--hpo-accent-dark);
	font-weight: 700;
	text-decoration: none;
}

/* ---------- Message bloquant, centré ---------- */

body.hpo-alert-open {
	overflow: hidden;
}

.hpo-alert {
	position: fixed;
	inset: 0;
	z-index: 100002;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.hpo-alert.is-in {
	opacity: 1;
}

.hpo-alert__overlay {
	position: absolute;
	inset: 0;
	background: rgba(28, 25, 22, 0.62);
}

.hpo-alert__panel {
	position: relative;
	width: 100%;
	max-width: 460px;
	padding: 30px 30px 26px;
	border-top: 4px solid var(--hpo-accent);
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	text-align: center;
	transform: translateY(10px);
	transition: transform 0.22s ease;
}

.hpo-alert.is-in .hpo-alert__panel {
	transform: translateY(0);
}

.hpo-alert__close {
	position: absolute;
	top: 8px;
	right: 12px;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: var(--hpo-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.hpo-alert__close:hover {
	color: var(--hpo-ink);
}

.hpo-alert__title {
	margin: 0 0 10px;
	color: var(--hpo-ink);
	font-size: 21px;
	line-height: 1.25;
}

.hpo-alert__text {
	margin: 0 0 22px;
	color: var(--hpo-ink);
	font-size: 15px;
	line-height: 1.55;
}

.hpo-alert__text a,
.hpo-nudge__text a {
	color: var(--hpo-accent-dark);
	font-weight: 600;
	text-decoration: underline;
}

.hpo-alert__text a:hover,
.hpo-nudge__text a:hover {
	color: var(--hpo-ink);
}

.hpo-alert__actions {
	display: flex;
	justify-content: center;
}

@media (max-width: 600px) {
	.hpo-alert__panel {
		padding: 26px 20px 22px;
	}
}

/* ---------- Petite modale d'encouragement ---------- */

.hpo-toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100001;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	max-width: 340px;
	padding: 16px 18px;
	border-left: 3px solid var(--hpo-accent);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.hpo-toast.is-in {
	opacity: 1;
	transform: translateY(0);
}

.hpo-toast__text {
	margin: 0;
	color: var(--hpo-ink);
	font-size: 14px;
	line-height: 1.5;
}

.hpo-toast__close {
	flex: 0 0 auto;
	padding: 0 2px;
	border: 0;
	background: none;
	color: var(--hpo-muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 600px) {
	.hpo-toast {
		right: 12px;
		left: 12px;
		bottom: 12px;
		max-width: none;
	}
}

/* ---------- Quota atteint ---------- */

.hpo-modal__full {
	display: none;
	color: var(--hpo-accent-dark);
	font-size: 13px;
	font-weight: 600;
}

.hpo-modal__full.is-visible {
	display: inline;
}

/* ---------- Tarif lot ---------- */

.hpo-nudge--pack {
	margin-top: -12px;
}

.hpo-badge--pack {
	background: #6f6a63;
}

/* ---------- Palier redescendu : choisir les posters conservés ---------- */

.hpo-nudge--warning {
	border-left-color: #c0392b;
	background: #fdf1ef;
}

.hpo-modal--keep .hpo-modal__title {
	color: var(--hpo-accent-dark);
}
