/* TDG Parrainage — styles volontairement sobres : polices et boutons reprennent ceux du thème. */
.tdg-parrainage {
	--tdg-p-accent: #5b7a3a;
	--tdg-p-fond: #f6f8f2;
	--tdg-p-bord: #d9dfd0;
	margin: 0 0 2em;
}

.tdg-parrainage p {
	margin: 0 0 1em;
}

.tdg-p-card {
	background: var(--tdg-p-fond);
	border: 1px solid var(--tdg-p-bord);
	border-radius: 8px;
	padding: 1.25em 1.5em;
	margin: 0 0 1.5em;
}

.tdg-p-label {
	display: block;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.75;
	margin: 0 0 0.4em;
}

.tdg-p-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 1.1em;
}

.tdg-p-codevalue {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.6em;
	letter-spacing: 0.08em;
	color: var(--tdg-p-accent);
	padding: 0.2em 0.6em;
	border: 2px dashed var(--tdg-p-accent);
	border-radius: 6px;
	background: #fff;
}

.tdg-p-link {
	flex: 1 1 260px;
	min-width: 0;
	padding: 0.55em 0.7em;
	border: 1px solid var(--tdg-p-bord);
	border-radius: 4px;
	background: #fff;
	font-size: 0.95em;
}

.tdg-p-share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

/* Boutons propres à l'extension : ne dépendent pas du thème (Divi ajoute sinon ses flèches et ses tailles). */
.tdg-parrainage .tdg-p-btn,
.tdg-parrainage .tdg-p-btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	margin: 0;
	padding: 0.55em 1.1em;
	border: 1px solid var(--tdg-p-accent);
	border-radius: 999px;
	background: #fff;
	color: var(--tdg-p-accent);
	font: inherit;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tdg-parrainage .tdg-p-btn::after,
.tdg-parrainage .tdg-p-btn::before {
	content: none !important;
}

.tdg-parrainage .tdg-p-btn:hover,
.tdg-parrainage .tdg-p-btn:focus-visible {
	background: var(--tdg-p-accent);
	color: #fff;
}

.tdg-parrainage .tdg-p-btn--main,
.tdg-parrainage .tdg-p-btn--main:visited {
	background: var(--tdg-p-accent);
	color: #fff;
}

.tdg-parrainage .tdg-p-btn--main:hover,
.tdg-parrainage .tdg-p-btn--main:focus-visible {
	filter: brightness(0.9);
}

.tdg-parrainage .tdg-p-btn.is-copied {
	background: var(--tdg-p-accent);
	color: #fff;
}

.tdg-parrainage .tdg-p-btn--small {
	padding: 0.25em 0.7em;
	font-size: 0.8em;
	margin-left: 0.4em;
}

.tdg-parrainage .tdg-p-btn[hidden] {
	display: none;
}

.tdg-p-rules {
	margin: 0 0 1.5em 1.2em;
}

.tdg-p-rules li {
	margin: 0 0 0.35em;
}

.tdg-p-title {
	margin: 1.5em 0 0.6em;
}

.tdg-p-table {
	width: 100%;
}

.tdg-p-small {
	font-size: 0.9em;
	opacity: 0.85;
}

.tdg-p-notice {
	padding: 0.8em 1em;
	border-left: 4px solid var(--tdg-p-accent);
	background: var(--tdg-p-fond);
}

.tdg-p-admin {
	padding: 0.8em 1em;
	border-left: 4px solid #b26200;
	background: #fff6e5;
	font-size: 0.9em;
}

.tdg-parrainage--merci {
	margin-top: 2em;
}

/* Bandeau d'accueil du filleul */
.tdg-p-banner {
	position: fixed;
	left: 50%;
	bottom: 1.25em;
	transform: translateX(-50%);
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	gap: 0.8em;
	width: calc(100% - 2em);
	max-width: 640px;
	padding: 1em 1.2em;
	background: #5b7a3a;
	color: #fff;
	border-radius: 8px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
	font-size: 1rem;
	line-height: 1.45;
}

.tdg-p-banner p {
	margin: 0;
	flex: 1;
	color: inherit;
}

.tdg-p-banner__close {
	background: transparent;
	border: 0;
	color: inherit;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	padding: 0 0.2em;
}

/* Icône cadeau flottante */
.tdg-p-gift {
	--tdg-p-accent: #5b7a3a;
	position: fixed;
	bottom: 1.25rem;
	z-index: 99998;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.75rem;
	font-size: 1rem;
	line-height: 1.45;
	transition: bottom 0.25s ease;
}

.tdg-p-gift--right {
	right: 1.25rem;
}

.tdg-p-gift--left {
	left: 1.25rem;
	align-items: flex-start;
}

.tdg-p-banner-on .tdg-p-gift {
	bottom: 7.5rem;
}

.tdg-p-gift__button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--tdg-p-accent);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	animation: tdg-p-wiggle 1.2s ease 1.5s 2;
}

.tdg-p-gift__button:hover,
.tdg-p-gift__button:focus-visible {
	transform: scale(1.06);
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
	outline: none;
}

.tdg-p-gift__button:focus-visible {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tdg-p-accent);
}

.tdg-p-gift__dot {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 12px;
	height: 12px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #c0392b;
}

.tdg-p-gift.is-seen .tdg-p-gift__dot {
	display: none;
}

.tdg-p-gift__panel {
	position: relative;
	width: min(320px, calc(100vw - 2.5rem));
	padding: 1.1rem 1.2rem 1.2rem;
	border-radius: 12px;
	background: #fff;
	color: #222;
	box-shadow: 0 10px 34px rgba(0, 0, 0, 0.2);
	text-align: left;
}

.tdg-p-gift__panel[hidden] {
	display: none;
}

.tdg-p-gift__panel p {
	margin: 0 0 0.6rem;
	color: inherit;
}

.tdg-p-gift__title {
	padding-right: 1.5rem;
	font-size: 1.1rem;
	font-weight: 700;
}

.tdg-p-gift__date {
	font-size: 0.85rem;
	opacity: 0.75;
}

.tdg-p-gift__admin {
	padding: 0.4rem 0.6rem;
	border-left: 3px solid #b26200;
	background: #fff6e5;
	font-size: 0.8rem;
}

.tdg-p-gift__close {
	position: absolute;
	top: 0.4rem;
	right: 0.5rem;
	margin: 0;
	padding: 0.1rem 0.4rem;
	border: 0;
	background: transparent;
	color: #555;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.tdg-p-gift .tdg-p-gift__cta,
.tdg-p-gift .tdg-p-gift__cta:visited {
	display: block;
	margin-top: 0.4rem;
	padding: 0.65rem 1rem;
	border-radius: 999px;
	background: var(--tdg-p-accent);
	color: #fff;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

.tdg-p-gift .tdg-p-gift__cta:hover,
.tdg-p-gift .tdg-p-gift__cta:focus-visible {
	filter: brightness(0.9);
}

@keyframes tdg-p-wiggle {
	0%, 100% { transform: rotate(0); }
	20% { transform: rotate(-12deg); }
	40% { transform: rotate(10deg); }
	60% { transform: rotate(-6deg); }
	80% { transform: rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
	.tdg-p-gift__button {
		animation: none;
	}
}

@media (max-width: 600px) {
	.tdg-p-gift {
		bottom: 1rem;
	}
	.tdg-p-gift--right {
		right: 1rem;
	}
	.tdg-p-gift--left {
		left: 1rem;
	}
	.tdg-p-gift__button {
		width: 52px;
		height: 52px;
	}
	.tdg-p-banner-on .tdg-p-gift {
		bottom: 8.5rem;
	}
}

@media print {
	.tdg-p-gift,
	.tdg-p-banner {
		display: none !important;
	}
}
