/**
 * COSY ET NOËL — v0.26
 * Bandeau de Noël, annonce « Cosy, bientôt », carte et bannière Cosy, ambiance univers-cosy.
 *
 * Palette Cosy PROVISOIRE (à ajuster avec le moodboard de Jessica) :
 *   chocolat #2B1B14 · brun #4A2E22 · caramel #B5754A · lait #EAD9C2 · or #C9A45C · crème #F4EDE4
 */

:root {
	--tdc-cosy-chocolat: #2B1B14;
	--tdc-cosy-brun: #4A2E22;
	--tdc-cosy-caramel: #B5754A;
	--tdc-cosy-lait: #EAD9C2;
}

/* ---------- 1. Bandeau de Noël ---------- */

.tdc-bandeau-noel {
	margin: 0 !important;
	padding: 7px 16px;
	background: linear-gradient(90deg, #3E1220, #5C1A2B 50%, #3E1220);
	color: var(--wp--preset--color--creme, #F4EDE4);
	font-size: 0.86rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.35;
	text-align: center;
}

.tdc-noel-encart {
	max-width: 1100px;
	margin: 0 auto 18px !important;
	padding: 12px 16px;
	border: 1px solid rgba(201, 164, 92, 0.6);
	border-radius: 12px;
	background: #FBF7F1;
	color: #2A1828;
	font-weight: 600;
	text-align: center;
}

/* ---------- 2. La tasse qui fume ---------- */

.tdc-tasse {
	width: 84px;
	height: 84px;
	fill: none;
	stroke: #C9A45C;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	overflow: visible;
}

.tdc-tasse__coeur {
	fill: #C9A45C;
	stroke: none;
}

.tdc-tasse__vapeur {
	opacity: 0;
	animation: tdc-vapeur 3.6s ease-in-out infinite;
}

.tdc-tasse__vapeur--2 { animation-delay: 1.2s; }
.tdc-tasse__vapeur--3 { animation-delay: 2.4s; }

@keyframes tdc-vapeur {
	0%   { opacity: 0; transform: translateY(8px); }
	35%  { opacity: 0.9; }
	100% { opacity: 0; transform: translateY(-10px); }
}

/* ---------- 3. Annonce « Cosy, bientôt » (accueil et boutique) ---------- */

.tdc-cosy-bientot {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: 1100px;
	margin: 20px auto 0;
	padding: 26px 20px;
	border: 1px dashed rgba(201, 164, 92, 0.7);
	border-radius: 18px;
	background:
		radial-gradient(circle at 15% 20%, rgba(181, 117, 74, 0.45), transparent 55%),
		linear-gradient(160deg, var(--tdc-cosy-chocolat) 0%, var(--tdc-cosy-brun) 60%, #6A4330 100%);
	color: var(--wp--preset--color--creme, #F4EDE4);
	text-align: center;
	box-shadow: 0 24px 40px -24px rgba(20, 16, 20, 0.7);
}

.tdc-cosy-bientot p {
	margin: 0;
}

.tdc-cosy-bientot__date {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #C9A45C;
}

.tdc-cosy-bientot__titre {
	margin-top: 4px !important;
	font-family: var(--wp--preset--font-family--titre, Georgia, serif);
	font-size: clamp(1.5rem, 5vw, 2.1rem);
	line-height: 1.15;
}

.tdc-cosy-bientot__titre em {
	color: #E2C47E;
}

.tdc-cosy-bientot__accroche {
	max-width: 560px;
	margin: 8px auto 0 !important;
	color: var(--tdc-cosy-lait);
}

.tdc-cosy-bientot__lien {
	display: inline-block;
	margin-top: 14px;
	padding: 10px 18px;
	border: 1px solid #C9A45C;
	border-radius: 999px;
	color: var(--wp--preset--color--creme, #F4EDE4) !important;
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color 0.3s ease;
}

.tdc-cosy-bientot__lien:hover,
.tdc-cosy-bientot__lien:focus-visible {
	background-color: rgba(201, 164, 92, 0.2);
}

.tdc-cosy-zone {
	padding: 0 16px;
}

.tdc-cosy-zone .tdc-cosy-bientot {
	margin: 24px auto;
}

@media (min-width: 782px) {
	.tdc-cosy-bientot {
		flex-direction: row;
		gap: 28px;
		padding: 28px 40px;
		text-align: left;
		margin-top: 28px;
	}

	.tdc-cosy-bientot .tdc-tasse {
		flex: 0 0 auto;
		width: 110px;
		height: 110px;
	}

	.tdc-cosy-bientot__accroche {
		margin-left: 0 !important;
	}
}

/* ---------- 4. Carte Cosy ouverte (accueil) ---------- */

.tdc-univers__carte--cosy {
	box-sizing: border-box;
	position: relative;
	max-width: 1100px;
	margin: 20px auto 0;
	min-height: 300px !important;
	background:
		radial-gradient(circle at 80% 20%, rgba(181, 117, 74, 0.6), transparent 55%),
		linear-gradient(160deg, var(--tdc-cosy-chocolat) 0%, var(--tdc-cosy-brun) 55%, #7A4E36 100%);
}

.tdc-univers__carte--cosy .tdc-tasse {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 2;
}

@media (min-width: 782px) {
	.tdc-univers__carte--cosy {
		margin-top: 28px;
	}
}

/* ---------- 5. Bannière de la catégorie Cosy ---------- */

.tdc-cat-hero--cosy {
	position: relative;
	overflow: hidden;
	min-height: 62svh;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--creme, #F4EDE4);
	background:
		radial-gradient(ellipse at 50% 120%, rgba(181, 117, 74, 0.55), transparent 60%),
		linear-gradient(180deg, #1C120D 0%, var(--tdc-cosy-chocolat) 45%, var(--tdc-cosy-brun) 100%);
}

.tdc-cat-hero--cosy .tdc-cat-hero__titre {
	color: var(--wp--preset--color--creme, #F4EDE4) !important;
}

.tdc-cosy-hero__tasse {
	position: absolute;
	top: 8%;
	right: 8%;
	z-index: 1;
	opacity: 0.9;
}

.tdc-cosy-attente__autres {
	margin-top: 18px !important;
	font-size: 0.92rem;
	color: var(--tdc-cosy-lait);
}

.tdc-cosy-attente__autres a {
	color: #E2C47E !important;
}

/* Flocons qui tombent doucement */
.tdc-cosy-flocons i {
	position: absolute;
	top: -10px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(244, 237, 228, 0.75);
	animation: tdc-flocon 12s linear infinite;
	pointer-events: none;
}

.tdc-cosy-flocons i:nth-child(1)  { left: 5%;  animation-delay: 0s; }
.tdc-cosy-flocons i:nth-child(2)  { left: 14%; animation-delay: 4s;  width: 4px; height: 4px; }
.tdc-cosy-flocons i:nth-child(3)  { left: 23%; animation-delay: 8s; }
.tdc-cosy-flocons i:nth-child(4)  { left: 32%; animation-delay: 2s;  width: 3px; height: 3px; }
.tdc-cosy-flocons i:nth-child(5)  { left: 41%; animation-delay: 6s; }
.tdc-cosy-flocons i:nth-child(6)  { left: 50%; animation-delay: 10s; width: 4px; height: 4px; }
.tdc-cosy-flocons i:nth-child(7)  { left: 59%; animation-delay: 1s; }
.tdc-cosy-flocons i:nth-child(8)  { left: 68%; animation-delay: 5s;  width: 3px; height: 3px; }
.tdc-cosy-flocons i:nth-child(9)  { left: 77%; animation-delay: 9s; }
.tdc-cosy-flocons i:nth-child(10) { left: 86%; animation-delay: 3s;  width: 4px; height: 4px; }
.tdc-cosy-flocons i:nth-child(11) { left: 93%; animation-delay: 7s; }
.tdc-cosy-flocons i:nth-child(12) { left: 98%; animation-delay: 11s; width: 3px; height: 3px; }

@keyframes tdc-flocon {
	0%   { transform: translate(0, 0); opacity: 0; }
	10%  { opacity: 1; }
	100% { transform: translate(-30px, 70svh); opacity: 0; }
}

/* ---------- 6. Ambiance univers-cosy (catégorie, fiches, Box) ---------- */

body.univers-cosy {
	--tdc-halo: rgba(181, 117, 74, 0.55);
	--tdc-halo-2: rgba(201, 164, 92, 0.3);
	--tdc-etoiles: #C9A45C, #EAD9C2, #F4EDE4, #B5754A;
	background: linear-gradient(170deg, #1C120D 0%, #2B1B14 50%, #4A2E22 100%) fixed;
	color: #F4EDE4;
}

body.univers-cosy :where(h1, h2, h3, h4, .wp-block-post-title),
body.univers-cosy .tdc-etape legend {
	color: #C9A45C;
}

body.univers-cosy a:where(:not(.wp-element-button)) {
	color: #F4EDE4;
}

body.univers-cosy .tdc-entete a {
	color: var(--wp--preset--color--prune);
}

body.univers-cosy :where(input, select, textarea) {
	background: #FBF7F1;
	color: #2A1828;
}

body.univers-cosy .wp-element-button,
body.univers-cosy .wp-block-button__link,
body.univers-cosy button.single_add_to_cart_button {
	background-color: #6A4330;
}

body.univers-cosy .wp-element-button:hover,
body.univers-cosy .wp-block-button__link:hover {
	background-color: #8A5A3E;
}

/* Carte « Cosy » dans le choix d'univers de la Box */
.tdc-carte-choix--cosy .tdc-carte-choix__visuel {
	background: radial-gradient(circle at 70% 25%, rgba(181, 117, 74, 0.7), transparent 60%), linear-gradient(160deg, #2B1B14, #6A4330);
}

@media (max-width: 781px) {
	body.univers-cosy {
		background-attachment: scroll;
	}

	.tdc-cosy-hero__tasse .tdc-tasse {
		width: 60px;
		height: 60px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdc-tasse__vapeur,
	.tdc-cosy-flocons i {
		animation: none;
	}

	.tdc-tasse__vapeur {
		opacity: 0.6;
	}

	.tdc-cosy-flocons {
		display: none;
	}
}
