/* ----------------------------------------------------------------------------------------
* Magayaa — Habillage saisonnier
* File : season.css
*
* Chargé uniquement quand un mode est actif (Administration > Événements).
* Trois ambiances : Black Friday, Saint-Valentin et Noël. Chaque mode ne
* change que trois choses : une encre, un accent et un papier. Les composants
* (bandeau, décor, appel à l'action) sont identiques d'un mode à l'autre.
* -------------------------------------------------------------------------------------- */

/************************************/
/*** 	 01. Les trois palettes	  ***/
/************************************/

body[data-season]{
	--sx-bar-h: 54px;
	--sx-ink: #12100D;
	--sx-paper: #FAF7F0;
	--sx-surface: #F2EBDD;
	--sx-accent: #E1B45E;
	--sx-on-accent: #12100D;
	--sx-muted: #CFC6B6;

	--sx-cta-bg: var(--sx-ink);
	--sx-cta-fg: var(--sx-paper);
	--sx-cta-muted: var(--sx-muted);

	--sx-egg-bg: var(--sx-ink);
	--sx-egg-fg: var(--sx-paper);
	--sx-egg-muted: var(--sx-muted);
}

/* --- Black Friday : l'or de la maison sur une encre chaude ----------------- */

body[data-season="black_friday"]{
	--primary-color: #12100D;
	--secondary-color: #F2EBDD;
	--bg-color: #FAF7F0;
	--text-color: #5E564A;
	--accent-color: #E1B45E;
	--accent-text-color: #A97F34;

	--sx-ink: #12100D;
	--sx-paper: #FAF7F0;
	--sx-surface: #F2EBDD;
	--sx-accent: #E1B45E;
	--sx-on-accent: #12100D;
	--sx-muted: #CFC6B6;
}

/* --- Saint-Valentin : rose poudré et vin ---------------------------------- */

body[data-season="valentine"]{
	--primary-color: #4A1D29;
	--secondary-color: #F8E4E6;
	--bg-color: #FDF8F6;
	--text-color: #6A5257;
	--accent-color: #C99BA0;
	--accent-text-color: #A4656F;

	--sx-ink: #4A1D29;
	--sx-paper: #FDF8F6;
	--sx-surface: #F8E4E6;
	--sx-accent: #C99BA0;
	--sx-on-accent: #38141D;
	--sx-muted: #CBB3B7;

	--sx-cta-bg: var(--sx-surface);
	--sx-cta-fg: var(--sx-ink);
	--sx-cta-muted: #7A5E63;

	--sx-egg-bg: var(--sx-paper);
	--sx-egg-fg: var(--sx-ink);
	--sx-egg-muted: #7A5E63;
}

/* --- Noël : sapin et or --------------------------------------------------- */

body[data-season="christmas"]{
	--primary-color: #0F2C24;
	--secondary-color: #F1ECDF;
	--bg-color: #FAF7F0;
	--text-color: #5B6159;
	--accent-color: #D6B274;
	--accent-text-color: #9C7430;

	--sx-ink: #0F2C24;
	--sx-paper: #FAF7F0;
	--sx-surface: #F1ECDF;
	--sx-accent: #D6B274;
	--sx-on-accent: #0F2C24;
	--sx-muted: #C3CCC5;
}

/* L'en-tête est en position absolue à 30 px du haut : le bandeau le décale
   de sa propre hauteur pour qu'il reste juste en dessous. */
body[data-season] header.main-header{
	top: calc(30px + var(--sx-bar-h));
}

/************************************/
/*** 	 02. Bandeau saisonnier	  ***/
/************************************/

.sx-bar{
	position: relative;
	z-index: 101;
	height: var(--sx-bar-h);
	background-color: var(--sx-ink);
	color: var(--sx-paper);
	border-bottom: 1px solid color-mix(in srgb, var(--sx-accent) 45%, transparent);
}

.sx-bar .container{
	height: 100%;
}

.sx-bar-inner{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: 100%;
}

.sx-bar-claim{
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	margin: 0;
}

.sx-bar-label{
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--sx-accent);
	line-height: 1.2;
}

.sx-bar-rule{
	flex: 0 0 auto;
	width: 1px;
	height: 16px;
	background-color: color-mix(in srgb, var(--sx-paper) 24%, transparent);
}

.sx-bar-text{
	font-size: 13px;
	color: color-mix(in srgb, var(--sx-paper) 84%, transparent);
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sx-countdown{
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}

.sx-countdown-lead{
	font-size: 11px;
	color: var(--sx-muted);
	white-space: nowrap;
}

.sx-countdown-units{
	display: inline-flex;
	align-items: baseline;
	gap: 12px;
}

.sx-countdown-unit{
	display: inline-flex;
	align-items: baseline;
	gap: 3px;
	color: var(--sx-paper);
}

.sx-countdown-unit b{
	font-size: 14px;
	font-weight: 600;
}

.sx-countdown-unit small{
	font-size: 10px;
	font-weight: 500;
	color: var(--sx-muted);
}

.sx-countdown-mini{
	display: none;
	font-size: 12px;
	font-weight: 600;
	color: var(--sx-accent);
	font-variant-numeric: tabular-nums;
}

.sx-bar-cta{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	color: var(--sx-accent);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: color .25s ease;
}

.sx-bar-cta i{
	font-size: 9px;
	transition: transform .25s ease;
}

.sx-bar-cta:hover{
	color: var(--sx-paper);
}

.sx-bar-cta:hover i{
	transform: translateX(2px);
}

.sx-bar-progress{
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 300;
	height: 2px;
	background: rgba(0, 0, 0, .08);
	pointer-events: none;
}

.sx-bar-progress span{
	display: block;
	width: 0;
	height: 100%;
	background: var(--sx-accent);
}

/************************************/
/*** 	 03. Météo de saison	 	  ***/
/************************************/

.sx-sky{
	position: fixed;
	inset: 0;
	z-index: 90;
	overflow: hidden;
	pointer-events: none;
}

.sx-flake{
	position: absolute;
	top: -5vh;
	left: var(--x);
	width: var(--s);
	height: var(--s);
	opacity: var(--o);
	will-change: transform;
	animation: sx-fall var(--d) linear var(--delay) infinite;
}

body[data-season="black_friday"] .sx-flake{
	border-radius: 50%;
	background: var(--sx-accent);
}

body[data-season="valentine"] .sx-flake{
	border-radius: 62% 0 62% 0;
	background: #D7A5A8;
}

body[data-season="christmas"] .sx-flake{
	border-radius: 50%;
	background: #FFFFFF;
}

.sx-burst-layer{
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 95;
}

.sx-burst-bit{
	position: fixed;
	left: var(--bx);
	top: var(--by);
	width: var(--bs);
	height: var(--bs);
	border-radius: 50%;
	background: var(--sx-accent);
	will-change: transform, opacity;
	animation: sx-burst calc(900ms + var(--br) * 1ms) cubic-bezier(.16, .8, .3, 1) forwards;
}

/************************************/
/*** 	 04. Photos et sections	  ***/
/************************************/

/* Une seule teinte, un seul dégradé : la photo reste la vedette. */
body[data-season="black_friday"] .hero::before{
	background-image: linear-gradient(180deg, rgba(18, 16, 13, .22) 0%, rgba(18, 16, 13, 0) 34%, rgba(0, 0, 0, .55) 72%, rgba(0, 0, 0, .90) 100%);
}

body[data-season="valentine"] .hero::before{
	background-image: linear-gradient(180deg, rgba(74, 29, 41, .28) 0%, rgba(74, 29, 41, .04) 36%, rgba(30, 8, 14, .55) 72%, rgba(26, 7, 12, .90) 100%);
}

body[data-season="christmas"] .hero::before{
	background-image: linear-gradient(180deg, rgba(15, 44, 36, .24) 0%, rgba(15, 44, 36, .02) 36%, rgba(5, 22, 17, .55) 72%, rgba(4, 20, 16, .92) 100%);
}

body[data-season="black_friday"] .page-header::before{
	background-image: linear-gradient(180deg, rgba(18, 16, 13, .60) 0%, rgba(18, 16, 13, .90) 100%);
}

body[data-season="valentine"] .page-header::before{
	background-image: linear-gradient(180deg, rgba(74, 29, 41, .62) 0%, rgba(56, 18, 28, .91) 100%);
}

body[data-season="christmas"] .page-header::before{
	background-image: linear-gradient(180deg, rgba(15, 44, 36, .62) 0%, rgba(10, 33, 26, .92) 100%);
}

/************************************/
/*** 	 05. Appel à l'action	 	  ***/
/************************************/

.sx-cta{
	position: relative;
	padding: 96px 0 88px;
}

.sx-cta-card{
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
	align-items: center;
	gap: 48px;
	padding: 56px 60px;
	border-radius: 24px;
	background-color: var(--sx-cta-bg);
	color: var(--sx-cta-fg);
}

.sx-cta-copy h2{
	max-width: 18ch;
	margin: 0 0 16px;
	color: inherit;
	font-size: clamp(30px, 3.2vw, 45px);
	font-weight: 600;
	line-height: 1.08;
}

.sx-cta-copy p{
	max-width: 54ch;
	margin: 0 0 30px;
	color: var(--sx-cta-muted);
	font-size: 16.5px;
	line-height: 1.68;
}

.sx-cta-actions{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
}

.sx-cta-link{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--sx-accent) 65%, transparent);
	text-underline-offset: 5px;
	transition: color .25s ease;
}

.sx-cta-link i{
	font-size: 9px;
	transition: transform .25s ease;
}

.sx-cta-link:hover{
	color: var(--sx-accent);
}

.sx-cta-link:hover i{
	transform: translateX(2px);
}

.sx-cta-art{
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 290px;
}

.sx-art{
	width: 100%;
	max-width: 350px;
	height: auto;
	overflow: visible;
	color: currentColor;
}

.sx-a-line{
	fill: none;
	stroke: currentColor;
	stroke-width: 1.2;
	opacity: .38;
}

.sx-a-dash{
	fill: none;
	stroke: var(--sx-accent);
	stroke-width: 1.1;
	stroke-dasharray: 3 6;
	opacity: .7;
}

.sx-a-accent{
	fill: var(--sx-accent);
}

.sx-a-ring{
	fill: none;
	stroke: var(--sx-accent);
	stroke-width: 1.1;
	stroke-dasharray: 2 4;
	opacity: .8;
}

.sx-a-dot{
	fill: var(--sx-accent);
}

.sx-a-big{
	fill: currentColor;
	font-family: var(--default-font);
	font-size: 23px;
	font-weight: 600;
	letter-spacing: .04em;
}

.sx-a-small{
	fill: var(--sx-accent);
	font-family: var(--default-font);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .26em;
}

.sx-a-letter{
	fill: var(--sx-accent);
	font-family: var(--default-font);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
}

.sx-a-heart{
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	opacity: .55;
}

.sx-a-dash-ring{
	fill: none;
	stroke: var(--sx-accent);
	stroke-width: 1.1;
	stroke-dasharray: 2 5;
	opacity: .75;
}

/* --- Cachet de cire : le secret de saison -------------------------------- */

.sx-stamp{
	position: absolute;
	right: -2px;
	bottom: -6px;
	width: 84px;
	height: 84px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	transition: transform .25s ease;
}

.sx-stamp-wax{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 47% 53% 51% 49% / 52% 46% 54% 50%;
	background-color: var(--sx-accent);
	color: var(--sx-ink);
	font-size: 29px;
	font-weight: 700;
	line-height: 1;
	box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--sx-ink) 12%, transparent);
}

.sx-stamp:hover{
	transform: translateY(-2px);
}

/************************************/
/*** 	 06. Clin d'œil			  ***/
/************************************/

.sx-egg[hidden],
.sx-toast[hidden]{
	display: none;
}

.sx-egg{
	position: fixed;
	inset: 0;
	z-index: 220;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sx-egg-backdrop{
	position: absolute;
	inset: 0;
	background: rgba(10, 8, 6, .58);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: sx-fade .25s ease both;
}

.sx-egg-card{
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	padding: 44px 40px 38px;
	border-radius: 20px;
	background-color: var(--sx-egg-bg);
	color: var(--sx-egg-fg);
	box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .55);
	text-align: center;
	animation: sx-pop .3s ease both;
}

.sx-egg-close{
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, var(--sx-egg-fg) 20%, transparent);
	background: transparent;
	color: inherit;
	font-size: 13px;
	cursor: pointer;
	transition: background-color .2s ease;
}

.sx-egg-close:hover{
	background-color: color-mix(in srgb, var(--sx-egg-fg) 8%, transparent);
}

.sx-egg-seal{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 20px;
	border-radius: 47% 53% 51% 49% / 52% 46% 54% 50%;
	background-color: var(--sx-accent);
	color: var(--sx-ink);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
}

.sx-egg-card h2{
	margin: 0 0 14px;
	color: inherit;
	font-size: clamp(26px, 4vw, 34px);
	line-height: 1.1;
}

.sx-egg-card p{
	max-width: 40ch;
	margin: 0 auto 0;
	color: var(--sx-egg-muted);
	font-size: 15.5px;
	line-height: 1.68;
}

.sx-egg-hint{
	margin-top: 22px !important;
	font-size: 12.5px !important;
	opacity: .8;
}

.sx-egg-cta{
	margin-top: 26px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--sx-accent) 70%, transparent);
	text-underline-offset: 5px;
	cursor: pointer;
}

.sx-egg-cta:hover{
	color: var(--sx-accent);
}

/************************************/
/*** 	 07. Notification		  ***/
/************************************/

.sx-toast{
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 230;
	max-width: calc(100vw - 32px);
	padding: 11px 16px;
	border-radius: 8px;
	background-color: var(--sx-ink);
	color: var(--sx-paper);
	font-size: 13px;
	line-height: 1.4;
	box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .45);
	transform: translate(-50%, 12px);
	opacity: 0;
	pointer-events: none;
	transition: transform .25s ease, opacity .25s ease;
}

.sx-toast.is-visible{
	transform: translate(-50%, 0);
	opacity: 1;
}

/************************************/
/*** 	 08. Animations		 	  ***/
/************************************/

@keyframes sx-fall{
	0%{
		transform: translate3d(0, -8vh, 0) rotate(var(--r));
	}
	100%{
		transform: translate3d(var(--drift), 108vh, 0) rotate(calc(var(--r) + 240deg));
	}
}

@keyframes sx-burst{
	0%{
		transform: translate(-50%, -50%) scale(.5);
		opacity: 0;
	}
	15%{
		opacity: 1;
	}
	100%{
		transform: translate(-50%, -50%) translate(var(--bdx), var(--bdy)) scale(1) rotate(var(--brot));
		opacity: 0;
	}
}

@keyframes sx-fade{
	from{
		opacity: 0;
	}
	to{
		opacity: 1;
	}
}

@keyframes sx-pop{
	from{
		opacity: 0;
		transform: translateY(8px);
	}
	to{
		opacity: 1;
		transform: translateY(0);
	}
}

/* Tempête du code Konami : la météo s'accélère, sans flash ni néon. */
body.sx-storm .sx-flake{
	animation-duration: calc(var(--d) * .3);
}

/************************************/
/*** 	 09. Responsive		 	  ***/
/************************************/

@media only screen and (max-width: 1200px){
	.sx-countdown-lead{
		display: none;
	}
}

@media only screen and (max-width: 991px){
	body[data-season] header.main-header{
		top: var(--sx-bar-h);
	}

	.sx-countdown-units{
		display: none;
	}

	.sx-countdown-mini{
		display: inline;
	}

	.sx-cta-card{
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 44px 36px;
	}

	.sx-cta-copy h2{
		max-width: 22ch;
	}

	.sx-cta-art{
		min-height: 240px;
		order: -1;
	}

	.sx-art{
		max-width: 300px;
	}

	.sx-stamp{
		width: 74px;
		height: 74px;
		right: 0;
		bottom: -4px;
	}
}

@media only screen and (max-width: 767px){
	body[data-season]{
		--sx-bar-h: 48px;
	}

	.sx-bar-inner{
		gap: 12px;
	}

	.sx-bar-claim{
		gap: 10px;
	}

	.sx-bar-label{
		font-size: 12px;
	}

	.sx-bar-rule{
		display: none;
	}

	.sx-bar-text{
		display: none;
	}

	.sx-bar-cta{
		font-size: 12px;
	}

	.sx-bar-cta i{
		display: none;
	}

	.sx-cta{
		padding: 72px 0 64px;
	}

	.sx-cta-card{
		padding: 36px 24px 40px;
		border-radius: 20px;
	}

	.sx-cta-copy h2{
		font-size: 30px;
	}

	.sx-cta-copy p{
		font-size: 15.5px;
	}

	.sx-cta-art{
		min-height: 210px;
	}

	.sx-art{
		max-width: 250px;
	}

	.sx-stamp{
		width: 66px;
		height: 66px;
	}

	.sx-stamp-wax{
		font-size: 23px;
	}

	.sx-egg-card{
		padding: 38px 24px 32px;
	}

	.sx-flake:nth-child(n + 19){
		display: none;
	}
}

@media only screen and (max-width: 575px){
	.sx-cta-actions{
		align-items: stretch;
		flex-direction: column;
	}

	.sx-cta .btn-default{
		text-align: center;
	}

	.sx-cta-link{
		justify-content: center;
	}
}

/************************************/
/*** 	 10. Mouvement réduit	  ***/
/************************************/

@media (prefers-reduced-motion: reduce){
	.sx-sky,
	.sx-burst-layer{
		display: none;
	}

	.sx-flake,
	.sx-stamp,
	.sx-egg-card,
	.sx-egg-backdrop{
		animation: none !important;
		transition: none !important;
	}

	.sx-toast{
		transition: none;
	}
}
