/* Police manuscrite embarquée (Dancing Script, licence SIL OFL) — aucun appel à Google Fonts. */
@font-face {
	font-family: "PV Script";
	src: url("fonts/dancing-script.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

/* ==== Base ============================================================ */

.pv-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
	box-sizing: border-box;
}
.pv-overlay *, .pv-overlay *::before, .pv-overlay *::after { box-sizing: border-box; }
.pv-overlay[hidden] { display: none; }
.pv-overlay.pv-open { opacity: 1; }

.pv-box {
	--pv-accent: #e2581c;
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #fff;
	color: #222;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.25s ease;
	text-align: center;
}
.pv-open .pv-box { transform: none; }

/* Le contenu passe au-dessus des décors. */
.pv-box > :not(.pv-decor) { position: relative; z-index: 1; }

.pv-image img {
	display: block;
	width: 100%;
	height: auto;
}
.pv-box > .pv-image:nth-child(2) img,
.pv-box > .pv-x + .pv-image img { border-radius: 12px 12px 0 0; }

.pv-content { padding: 18px 26px 6px; }
.pv-title { margin: 0 0 10px; padding: 0; font-size: 1.5em; line-height: 1.25; color: inherit; border: 0; }
.pv-message { font-size: 1em; line-height: 1.55; }
.pv-overlay .pv-message p,
.pv-overlay .pv-message li {
	/* Neutralise les tailles imposées par le thème du site ou l'admin WordPress. */
	font-size: inherit !important;
	line-height: inherit;
	font-family: inherit;
	color: inherit;
	margin: 0 0 0.5em;
}
.pv-overlay .pv-message p:last-child { margin-bottom: 0; }

.pv-actions { padding: 10px 26px 22px; }
.pv-button {
	cursor: pointer;
	border: 0;
	border-radius: 6px;
	padding: 10px 26px;
	font-size: 1em;
	font-family: inherit;
	background: var(--pv-accent);
	color: #fff;
}
.pv-button:hover, .pv-button:focus-visible { filter: brightness(0.92); }

.pv-x {
	position: absolute !important;
	top: 8px;
	right: 10px;
	z-index: 3 !important;
	width: 34px;
	height: 34px;
	padding: 0;
	cursor: pointer;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #333;
	font-size: 24px;
	line-height: 34px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.pv-x:hover, .pv-x:focus-visible { background: #fff; }

html.pv-lock { overflow: hidden; }

/* ==== Logo ============================================================ */

.pv-overlay .pv-logo { padding: 24px 26px 0; line-height: 0; --pv-logo: 90px; }
.pv-overlay .pv-logo--s { --pv-logo: 60px; }
.pv-overlay .pv-logo--l { --pv-logo: 130px; }
.pv-overlay .pv-logo-plate { display: inline-block; line-height: 0; overflow: hidden; }
.pv-overlay .pv-logo img {
	display: inline-block !important;
	width: auto !important;
	height: auto !important;
	max-height: var(--pv-logo) !important;
	max-width: calc(var(--pv-logo) * 2.4) !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0;
	box-shadow: none;
}

/* Sans fond : la forme s'applique à l'image elle-même. */
.pv-overlay .pv-logo--arrondi .pv-logo-plate { border-radius: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.pv-overlay .pv-logo--rond .pv-logo-plate { border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.pv-overlay .pv-logo--rond:not(.pv-logo--plaque) img {
	width: var(--pv-logo) !important;
	height: var(--pv-logo) !important;
	max-width: none !important;
	object-fit: cover;
}

/* Avec fond : le logo est posé sur une plaque de la couleur choisie. */
.pv-overlay .pv-logo--plaque .pv-logo-plate {
	background: var(--pv-logo-bg, #fff);
	padding: calc(var(--pv-logo) * 0.14);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.pv-overlay .pv-logo--plaque.pv-logo--arrondi .pv-logo-plate { border-radius: 16px; }
.pv-overlay .pv-logo--plaque.pv-logo--brut .pv-logo-plate { border-radius: 0; }
.pv-overlay .pv-logo--plaque.pv-logo--rond .pv-logo-plate {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--pv-logo) * 1.4);
	height: calc(var(--pv-logo) * 1.4);
	padding: 0;
}
.pv-overlay .pv-logo--plaque.pv-logo--rond img {
	max-width: calc(var(--pv-logo) * 1.05) !important;
	max-height: calc(var(--pv-logo) * 0.95) !important;
	object-fit: contain;
}
.pv-overlay .pv-logo--brut:not(.pv-logo--plaque) .pv-logo-plate { box-shadow: none; }

/* ==== Pastille, code promo, actions ================================== */

.pv-overlay .pv-badge {
	position: absolute !important;
	top: 14px;
	left: 14px;
	z-index: 3 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	padding: 6px;
	border-radius: 50%;
	background: var(--pv-accent);
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 19px;
	font-weight: 800;
	line-height: 1.05;
	text-align: center;
	transform: rotate(-12deg);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
	white-space: nowrap;
	letter-spacing: -0.01em;
}
.pv-overlay .pv-badge--court { font-size: 19px; }
.pv-overlay .pv-badge--moyen { font-size: 14px; }
.pv-overlay .pv-badge--long { font-size: 12px; white-space: normal; }
.pv-box:has(> .pv-badge) { padding-top: 34px; }

.pv-code-wrap { padding: 10px 26px 4px; }
.pv-code {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 7px 7px 14px;
	border: 2px dashed var(--pv-accent);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.6);
}
.pv-code-label { font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; }
.pv-code-value { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 1.3em; letter-spacing: 0.08em; }
.pv-code-copy {
	cursor: pointer;
	border: 0;
	border-radius: 6px;
	padding: 6px 12px;
	background: var(--pv-accent);
	color: #fff;
	font: inherit;
	font-size: 0.85em;
}
.pv-code-copy.pv-copied { filter: brightness(0.85); }

.pv-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pv-overlay a.pv-button,
.pv-overlay a.pv-button:hover,
.pv-overlay a.pv-button:focus { display: inline-block; color: #fff; text-decoration: none; }
.pv-link {
	cursor: pointer;
	border: 0;
	padding: 2px 6px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.9em;
	opacity: 0.7;
	text-decoration: underline;
}
.pv-link:hover { opacity: 1; }

.pv-spark { animation: pv-twinkle 2.8s ease-in-out infinite; }

/* ==== Décors (communs) =============================================== */

.pv-decor {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}
.pv-d { position: absolute; line-height: 0; }
.pv-d svg { width: 100%; height: auto; display: block; }
.pv-d-full, .pv-d-full svg { inset: 0; width: 100%; height: 100%; }
.pv-d-bl { left: -14px; bottom: -14px; width: 130px; }
.pv-d-br { right: -14px; bottom: -14px; width: 130px; transform: scaleX(-1); }
.pv-d-tr { right: 44px; top: 6px; width: 110px; }
.pv-d-tl { left: -8px; top: -8px; width: 110px; }
.pv-d-bottom { left: 0; right: 0; bottom: 0; height: 70px; }
.pv-d-bottom svg { height: 100%; }

/* ==== Thème Noël ====================================================== */

.pv-theme-noel .pv-box {
	--pv-accent: #b3261e;
	max-width: 620px;
	background: #fff;
	color: #1d1d1d;
}
.pv-theme-noel .pv-content { padding: 18px 90px 4px; }
.pv-theme-noel .pv-title,
.pv-theme-noel .pv-message {
	font-family: "PV Script", "Segoe Script", "Brush Script MT", cursive;
	font-weight: 500;
}
.pv-theme-noel .pv-title { font-size: 2.2em; margin-bottom: 4px; }
.pv-theme-noel .pv-message { font-size: 1.75em; line-height: 1.35; }
.pv-theme-noel .pv-actions { padding-bottom: 30px; }
.pv-theme-noel .pv-button { border-radius: 999px; }

/* ==== Thème Nouvel An ================================================= */

.pv-theme-nouvel-an .pv-box {
	--pv-accent: #d9a92b;
	max-width: 600px;
	background: radial-gradient(ellipse at top, #22305c 0%, #121a36 60%, #0b1024 100%);
	color: #fdf6e3;
}
.pv-theme-nouvel-an .pv-content { padding: 28px 60px 6px; }
.pv-theme-nouvel-an .pv-title {
	font-family: "PV Script", "Segoe Script", "Brush Script MT", cursive;
	font-size: 2.4em;
	font-weight: 600;
	color: #f2c94c;
}
.pv-theme-nouvel-an .pv-message { font-size: 1.1em; }
.pv-theme-nouvel-an .pv-button { color: #121a36; font-weight: 600; border-radius: 999px; }
.pv-theme-nouvel-an .pv-actions { padding-bottom: 30px; }
.pv-theme-nouvel-an .pv-d-tl { left: 4px; top: 4px; width: 100px; }
.pv-theme-nouvel-an .pv-d-tr { right: 48px; top: 2px; width: 80px; }
.pv-confetti { width: 10px; height: 4px; border-radius: 1px; opacity: .85; }
.pv-fw svg { animation: pv-twinkle 2.6s ease-in-out infinite; }
.pv-fw-2 svg { animation-delay: -1.3s; }
@keyframes pv-twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.92); } }
.pv-theme-nouvel-an .pv-x { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* ==== Thème Hiver ===================================================== */

.pv-theme-hiver .pv-box {
	--pv-accent: #2f6fa8;
	max-width: 580px;
	background: linear-gradient(180deg, #eaf4fc 0%, #ffffff 70%);
	color: #1c3550;
}
.pv-theme-hiver .pv-content { padding: 26px 60px 6px; }
.pv-theme-hiver .pv-title {
	font-family: "PV Script", "Segoe Script", "Brush Script MT", cursive;
	font-size: 2.2em;
	font-weight: 600;
}
.pv-theme-hiver .pv-message { font-size: 1.1em; }
.pv-theme-hiver .pv-button { border-radius: 999px; }
.pv-theme-hiver .pv-actions { padding-bottom: 30px; }

.pv-snow {
	position: absolute;
	top: -12px;
	border-radius: 50%;
	background: #b9d6f0;
	opacity: 0.8;
	animation-name: pv-snowfall;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}
@keyframes pv-snowfall {
	0%   { transform: translate(0, 0); }
	50%  { transform: translate(12px, 260px); }
	100% { transform: translate(-6px, 520px); }
}

/* ==== Thème Été ======================================================= */

.pv-theme-ete .pv-box {
	--pv-accent: #e0702b;
	max-width: 580px;
	background: linear-gradient(180deg, #fff6e0 0%, #fffdf7 60%);
	color: #3b2a14;
}
.pv-theme-ete .pv-content { padding: 26px 70px 6px; }
.pv-theme-ete .pv-title {
	font-family: "PV Script", "Segoe Script", "Brush Script MT", cursive;
	font-size: 2.3em;
	font-weight: 600;
	color: #c4561c;
}
.pv-theme-ete .pv-message { font-size: 1.1em; }
.pv-theme-ete .pv-button { border-radius: 999px; }
.pv-theme-ete .pv-actions { padding-bottom: 80px; }
.pv-theme-ete .pv-d-tr { right: 40px; top: 4px; width: 90px; }
.pv-sun svg { animation: pv-spin 40s linear infinite; }
@keyframes pv-spin { to { transform: rotate(360deg); } }

/* ==== Thème Promo (vif) ============================================== */

.pv-theme-promo .pv-box {
	--pv-accent: #e63b2e;
	max-width: 560px;
	background: radial-gradient(circle at 100% 100%, #fff0e6 0 28%, transparent 28.5%), radial-gradient(circle at 0 0, #fff5ec 0 18%, transparent 18.5%), #fff;
	color: #1d1d1d;
}
.pv-promo-band { left: 0; right: 0; top: 0; height: 8px; background: linear-gradient(90deg, #ff7a1a, #e63b2e); }
.pv-theme-promo .pv-content { padding: 20px 56px 6px; }
.pv-theme-promo .pv-title {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 2em;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #e63b2e;
}
.pv-theme-promo .pv-message { font-size: 1.1em; }
.pv-theme-promo .pv-actions { padding-bottom: 28px; }
.pv-theme-promo .pv-button {
	border-radius: 999px;
	padding: 12px 32px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: linear-gradient(90deg, #ff7a1a, #e63b2e);
	box-shadow: 0 6px 16px rgba(230, 59, 46, 0.35);
}
.pv-theme-promo .pv-badge { background: linear-gradient(135deg, #ff7a1a, #e63b2e); }

/* ==== Thème Promo chic (noir et or) =================================== */

.pv-theme-promo-chic .pv-box {
	--pv-accent: #d4ac45;
	max-width: 560px;
	background: radial-gradient(ellipse at top, #262626 0%, #111 70%);
	color: #f3ead7;
}
.pv-chic-frame { inset: 10px; z-index: 2; border: 1px solid rgba(212, 172, 69, 0.55); border-radius: 8px; }
.pv-theme-promo-chic .pv-content { padding: 22px 56px 6px; }
/* L'image reste à l'intérieur du cadre doré. */
.pv-theme-promo-chic .pv-image { padding: 22px 22px 0; }
.pv-theme-promo-chic .pv-logo + .pv-image { padding-top: 16px; }
.pv-theme-promo-chic .pv-image img { border-radius: 3px; }
.pv-theme-promo-chic .pv-badge { top: 18px; left: 18px; }
.pv-theme-promo-chic .pv-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.9em;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #d4ac45;
}
.pv-theme-promo-chic .pv-message { font-size: 1.05em; }
.pv-theme-promo-chic .pv-actions { padding-bottom: 32px; }
.pv-theme-promo-chic .pv-button,
.pv-theme-promo-chic a.pv-button,
.pv-theme-promo-chic a.pv-button:hover { color: #111; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 2px; padding: 12px 30px; }
.pv-theme-promo-chic .pv-badge { color: #111; }
.pv-theme-promo-chic .pv-code { background: rgba(255, 255, 255, 0.04); }
.pv-theme-promo-chic .pv-code-copy { color: #111; }
.pv-theme-promo-chic .pv-x { background: rgba(255, 255, 255, 0.12); color: #f3ead7; }
.pv-theme-promo-chic .pv-logo--arrondi .pv-logo-plate,
.pv-theme-promo-chic .pv-logo--rond .pv-logo-plate { box-shadow: 0 0 0 1px rgba(212, 172, 69, 0.6), 0 6px 18px rgba(0, 0, 0, 0.5); }

/* ==== Mobile ========================================================== */

@media (max-width: 520px) {
	.pv-theme-noel .pv-content,
	.pv-theme-nouvel-an .pv-content,
	.pv-theme-hiver .pv-content,
	.pv-theme-ete .pv-content,
	.pv-theme-promo .pv-content,
	.pv-theme-promo-chic .pv-content { padding-left: 24px; padding-right: 24px; }
	.pv-overlay .pv-badge { width: 66px; height: 66px; }
	.pv-overlay .pv-badge--court { font-size: 17px; }
	.pv-overlay .pv-badge--moyen { font-size: 12px; }
	.pv-overlay .pv-badge--long { font-size: 10px; }
	.pv-theme-noel .pv-title { font-size: 1.8em; }
	.pv-theme-noel .pv-message { font-size: 1.4em; }
	.pv-theme-noel .pv-actions { padding-bottom: 70px; }
	.pv-d-bl, .pv-d-br { width: 95px; }
	.pv-d-tr { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
	.pv-overlay, .pv-box { transition: none; }
	.pv-snow, .pv-sun svg, .pv-fw svg, .pv-spark { animation: none; }
	.pv-snow { display: none; }
}
