/*
 * Club Novalike – Instant Game.
 * Colours follow the "Point Noël" designs (assets/design).
 * Font: Baloo Paaji 2 (assets/Fonts), WOFF2 with the TTF as fallback.
 */

@font-face {
	font-family: "Baloo Paaji 2";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../Fonts/BalooPaaji2-Regular.woff2") format("woff2"), url("../Fonts/BalooPaaji2-Regular.ttf") format("truetype");
}

@font-face {
	font-family: "Baloo Paaji 2";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../Fonts/BalooPaaji2-Medium.woff2") format("woff2"), url("../Fonts/BalooPaaji2-Medium.ttf") format("truetype");
}

@font-face {
	font-family: "Baloo Paaji 2";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../Fonts/BalooPaaji2-SemiBold.woff2") format("woff2"), url("../Fonts/BalooPaaji2-SemiBold.ttf") format("truetype");
}

@font-face {
	font-family: "Baloo Paaji 2";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../Fonts/BalooPaaji2-Bold.woff2") format("woff2"), url("../Fonts/BalooPaaji2-Bold.ttf") format("truetype");
}

@font-face {
	font-family: "Baloo Paaji 2";
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url("../Fonts/BalooPaaji2-ExtraBold.woff2") format("woff2"), url("../Fonts/BalooPaaji2-ExtraBold.ttf") format("truetype");
}

:root {
	--cn-ig-font: "Baloo Paaji 2", Arial, Helvetica, sans-serif;
	--cn-ig-icon-z: 99991; /* gift icon, popup closed: keep it under the sticky header and the banner */
	--cn-ig-red: #e2193c;
	--cn-ig-red-dark: #c4122f;
	--cn-ig-red-pale: #fde3e8;
	--cn-ig-red-pale-text: #f4aebd;
	--cn-ig-navy: #0d4a8f;
	--cn-ig-text: #1a1a1a;
}

/* ---------- Banner ---------- */

.cn-ig-banner {
	position: relative;
	z-index: 50;
	width: 100%;
	background: var(--cn-ig-red);
	color: #fff;
	font-family: var(--cn-ig-font, inherit);
	/* --cn-ig-banner-bg: image picked in the settings (inline style on the banner). */
	background-image: var(--cn-ig-banner-bg, url(../imgs/banner-log-in.png));
	background-size: 100%;
}

/* Snowflakes on the left and right edges (same strip, mirrored on the right). */
.cn-ig-banner::before,
.cn-ig-banner::after {
	/* content: ""; */
	/* position: absolute; */
	/* top: 0; */
	/* bottom: 0; */
	/* width: 170px; */
	/* background: url("../imgs/starts-h.png.png") center center / 100% auto no-repeat; */
	/* pointer-events: none; */

	/* content: ""; */
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    height: 100%;
    background: url("../imgs/starts-v.png") center center;
    pointer-events: none;
    background-size: 1701px 224px;
    background-repeat: repeat;
}

.cn-ig-banner::before {
	left: 0;
	transform: rotate(-5deg);
}

.cn-ig-banner::after {
	right: 0;
	transform: rotate(5deg);
}

.cn-ig-banner__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	max-width: 1200px;
	min-height: 94px;
	margin: 0 auto;
	padding: 0px 24px;
}

/* Mascot in a white circle that overflows below the band. */
.cn-ig-banner__mascot {
	flex: none;
	align-self: flex-start;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 119px;
	height: 119px;
	margin-bottom: -4px;
	margin-top: -4px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
	overflow: hidden;
}

.cn-ig-banner__mascot img {
	display: block;
	width: 88%;
	height: 88%;
	max-width: none;
	margin: 0;
	object-fit: contain;
}

.cn-ig-banner__content {
	flex: 0 1 auto;
}

.cn-ig-banner__title {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.35;
	text-transform: uppercase;
	color: #fff;
}

.cn-ig-banner__text {
	margin: 4px 0 0;
	font-size: 14px;
	line-height: 1.35;
	color: #fff;
}

.cn-ig-banner__cta {
	flex: none;
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	background: #fff;
	color: var(--cn-ig-red);
	font-size: 17px;
	font-weight: 800;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

.cn-ig-banner__cta:hover,
.cn-ig-banner__cta:focus {
	background: #fff4f6;
	color: var(--cn-ig-red-dark);
}

/* Members: "Règlement du jeu" – red with a white border. */
.cn-ig-banner__cta--rules {
	padding: 8px 20px;
	border: 1px solid #fff;
	border-radius: 8px;
	background: var(--cn-ig-red-dark);
	color: #fff;
	box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.cn-ig-banner__cta--rules:hover,
.cn-ig-banner__cta--rules:focus {
	background: #fff;
	color: var(--cn-ig-red);
}

/*
 * Tablet / mobile (1024px and below): mascot on the left, text and button on the right.
 * Sizes follow the screen width so the text stays in the plain red middle of the background.
 */
@media (max-width: 1024px) {
	/* Shown once, never repeated (guests and members). --cn-ig-banner-bg-mobile: image picked in the settings. */
	.cn-ig-banner {
		background-color: var(--cn-ig-red);
		background-image: var(--cn-ig-banner-bg-mobile, url(../imgs/banner-mobile.png));
		background-position: center center;
		background-size: cover;
		background-repeat: no-repeat;
	}

	.cn-ig-banner__inner {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-rows: auto auto;
		column-gap: clamp(12px, 4vw, 36px);
		row-gap: clamp(10px, 3vw, 22px);
		align-items: center;
		max-width: 820px;
		min-height: 0;
		/* Right padding larger: keeps the text off the snowflakes on the right edge. */
		padding: clamp(18px, 5vw, 40px) clamp(16px, 11vw, 110px) clamp(18px, 5vw, 40px) clamp(14px, 5vw, 48px);
		text-align: left;
	}

	.cn-ig-banner__mascot {
		grid-row: 1 / span 2;
		align-self: center;
		width: clamp(84px, 25vw, 190px);
		height: clamp(84px, 25vw, 190px);
		margin: 0;
		box-shadow: clamp(3px, 1vw, 7px) clamp(3px, 1vw, 7px) 0 var(--cn-ig-red-dark);
	}

	.cn-ig-banner__content {
		grid-column: 2;
		align-self: end;
	}

	.cn-ig-banner__title {
		font-size: clamp(12px, 2.9vw, 22px);
		line-height: 1.3;
	}

	.cn-ig-banner__text {
		font-size: clamp(12px, 2.6vw, 18px);
	}

	.cn-ig-banner__cta {
		grid-column: 2;
		align-self: start;
		justify-self: start;
		padding: 0.6em 1.3em;
		border-radius: 10px;
		font-size: clamp(12px, 2.8vw, 19px);
	}

	/* No mascot: text and button use the full width. */
	.cn-ig-banner__content:first-child,
	.cn-ig-banner__content:first-child + .cn-ig-banner__cta {
		grid-column: 1 / -1;
	}
}

/* ---------- Gift icon ---------- */

/*
 * Stacking: the icon stays under the sticky header and the banner (z-index 1);
 * popup open: overlay 99990 < clicked icon 99995 < popup box 100000.
 */
.cn-ig-icon {
	position: absolute;
	z-index: var(--cn-ig-icon-z, 1);
	width: 100px;
	height: 100px;
	padding: 16px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--cn-ig-red);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	animation: cn-ig-wiggle 3s ease-in-out infinite;
}

.cn-ig-icon[hidden] {
	display: none;
}

.cn-ig-icon:hover,
.cn-ig-icon:focus-visible {
	transform: scale(1.1);
	/* outline: 2px solid var(--cn-ig-red); */
	outline-offset: 2px;
}

/* Uploaded image: no round badge. The "clicked" image is swapped in by front.js. */
.cn-ig-icon--image {
	padding: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.cn-ig-icon .cn-ig-icon__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: contain;
}

/* Clicked: stop wiggling and glow (as in the designs). */
.cn-ig-icon.is-clicked {
	width: 150px;
	height: 150px;
	animation: none;
	filter: drop-shadow(0 0 12px #fff) drop-shadow(0 0 24px rgba(255, 255, 255, 0.85));
}

/* Popup open: the clicked gift shows above the dark overlay, under the popup box. */
html.cn-ig-popup-open .cn-ig-icon.is-clicked {
	z-index: 99995;
}

@keyframes cn-ig-wiggle {
	0%, 90%, 100% { transform: rotate(0); }
	93% { transform: rotate(-12deg); }
	96% { transform: rotate(12deg); }
}

@media (prefers-reduced-motion: reduce) {
	.cn-ig-icon {
		animation: none;
	}
}

/* ---------- Popup ---------- */

.cn-ig-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: var(--cn-ig-font, inherit);
	pointer-events: none; /* clicks outside the box reach the overlay */
}

.cn-ig-popup[hidden],
.cn-ig-popup [hidden],
.cn-ig-popup__overlay[hidden] {
	display: none !important;
}

/* Moved to <body> by front.js so the clicked gift can sit between it and the box. */
.cn-ig-popup__overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(0, 0, 0, 0.65);
}

/* Red frame around a white box. */
.cn-ig-popup__frame {
	position: relative;
	pointer-events: auto;
	width: 100%;
	max-width: 384px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 14px;
	border-radius: 16px;
	background: var(--cn-ig-red);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    background-image: url(../imgs/starts-v.png);
    background-image: url(../imgs/pathstarts-v.png);
    background-size: 150px;
    background-position: center center;

}

.cn-ig-popup__inner {
	padding: 30px 24px 24px;
	border-radius: 10px;
	background: #fff;
	color: var(--cn-ig-text);
	text-align: center;
}

.cn-ig-popup__title {
	margin: 0;
	color: var(--cn-ig-red);
	font-size: 26px;
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
}

.cn-ig-popup__subtitle {
	margin: 2px 0 0;
	color: var(--cn-ig-red);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
}

.cn-ig-popup__body {
	margin: 26px 0 20px;
	font-size: 12px;
	line-height: 1.45;
}

.cn-ig-popup__intro,
.cn-ig-popup__text {
	display: block;
}

.cn-ig-popup__intro {
	font-weight: 700;
}

.cn-ig-popup__rules {
	margin: -6px 0 18px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #f6f6f8;
	font-size: 12px;
	line-height: 1.45;
	text-align: left;
}

.cn-ig-popup__rules p {
	margin: 0 0 4px;
}

.cn-ig-popup__rules p:last-child {
	margin-bottom: 0;
}

.cn-ig-popup__accept {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 30px;
	font-size: 12px;
	cursor: pointer;
}

.cn-ig-popup__accept input {
	flex: none;
	width: 15px;
	height: 15px;
	margin: 0;
}

.cn-ig-popup__accept a {
	color: inherit;
	text-decoration: underline;
}

.cn-ig-popup__cta {
	display: inline-block;
	min-width: 136px;
	padding: 9px 12px;
	border: 0;
	border-radius: 4px;
	background: var(--cn-ig-red);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}

.cn-ig-popup__cta:hover,
.cn-ig-popup__cta:focus {
	background: var(--cn-ig-red-dark);
	color: #fff;
}

.cn-ig-popup__cta:disabled,
.cn-ig-popup__cta:disabled:hover {
	background: var(--cn-ig-red-pale);
	color: var(--cn-ig-red-pale-text);
	cursor: not-allowed;
}

.cn-ig-popup__note {
	margin: 18px 0 0;
	font-size: 8px;
}

/* Win: round prize photo. */
.cn-ig-popup__prize {
	width: 135px;
	height: 135px;
	margin: 14px auto 0;
	/*border: 2px solid var(--cn-ig-red); */
	border-radius: 50%;
	/*background: #ccc;
	/* overflow: hidden; */
	display: grid;
	place-items: center;
	align-content: center;
}

.cn-ig-popup__prize img {
	display: block;
	width: 90%;
	height: 90%;
	max-width: none;
	object-fit: contain;
	transform: rotate(-14deg);
}

.cn-ig-popup[data-cn-ig-result="win"] .cn-ig-popup__body {
	margin-top: 16px;
}

.cn-ig-step--loading {
	padding: 24px 0;
}

.cn-ig-spinner {
	display: inline-block;
	width: 44px;
	height: 44px;
	border: 4px solid var(--cn-ig-red-pale);
	border-top-color: var(--cn-ig-red);
	border-radius: 50%;
	animation: cn-ig-spin 0.8s linear infinite;
}

@keyframes cn-ig-spin {
	to { transform: rotate(360deg); }
}

html.cn-ig-popup-open {
	overflow: hidden;
}

/* ---------- Win animation ---------- */

.cn-ig-celebrate {
	position: fixed;
	inset: 0;
	z-index: 100001;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ---------- [cn_ig_welcome] shortcode ---------- */

.cn-ig-welcome {
	margin: 0 auto 20px;
	color: var(--cn-ig-red);
	font-family: var(--cn-ig-font, inherit);
	font-size: 14px;
	line-height: 1.45;
	text-align: center;
}

.cn-ig-welcome::before {
	content: "";
	display: block;
	width: 40px;
	height: 1px;
	margin: 0 auto 16px;
	background: var(--cn-ig-red);
}

.cn-ig-welcome p {
	margin: 0;
}

.cn-ig-welcome strong {
	font-weight: 700;
}
