/**
 * Win Tracking — bannière de consentement cookies.
 * Autonome : ne dépend d'aucune variable ou police du thème hôte.
 */
/*
 * Valeurs par défaut sur :root (jamais sur .wt-banner directement) : la
 * personnalisation par site s'injecte aussi via un bloc :root (voir
 * WT_Banner::inline_style()), chargé après cette feuille. Si les deux
 * déclarations vivaient sur .wt-banner lui-même, la déclaration explicite du
 * fichier gagnerait toujours face à l'héritage, quel que soit l'ordre de
 * chargement — les couleurs personnalisées n'auraient alors jamais d'effet.
 */
:root {
	--wt-bg: #ffffff;
	--wt-text: #1f2933;
	--wt-accent: #2563eb;
	--wt-accent-text: #ffffff;
	--wt-border: rgba(0, 0, 0, .12);
}

.wt-banner {
	position: fixed;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: var(--wt-bg);
	color: var(--wt-text);
	border: 1px solid var(--wt-border);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
	padding: 20px 22px;
	transform: translateY(24px);
	opacity: 0;
	pointer-events: none;
	transition: transform .3s ease, opacity .3s ease;
}
.wt-banner.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }

.wt-banner--bar { left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin: 0 auto; }
.wt-banner--box { right: 20px; bottom: 20px; left: auto; max-width: 380px; }

.wt-banner p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; }
.wt-banner p a { color: var(--wt-accent); text-decoration: underline; }

.wt-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wt-banner-actions button {
	font: inherit;
	font-weight: 600;
	font-size: 13px;
	padding: 10px 16px;
	border-radius: 8px;
	border: 1px solid var(--wt-border);
	cursor: pointer;
	background: transparent;
	color: var(--wt-text);
	transition: filter .15s ease, background .15s ease, box-shadow .15s ease;
}
.wt-banner-accept,
.wt-banner-save {
	background: var(--wt-accent);
	border-color: var(--wt-accent);
	color: var(--wt-accent-text);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wt-accent) 25%, transparent);
}
.wt-banner-accept:hover,
.wt-banner-save:hover { filter: brightness(1.08); }
.wt-banner-reject:hover,
.wt-banner-settings:hover { background: rgba(0, 0, 0, .05); }

.wt-banner-panel { display: none; margin: 4px 0 16px; padding-top: 14px; border-top: 1px solid var(--wt-border); }
.wt-banner-panel.is-open { display: block; }
.wt-banner-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 8px 0; }
.wt-banner-row + .wt-banner-row { border-top: 1px solid var(--wt-border); }
.wt-banner-row-text strong { display: block; font-size: 12.5px; }
.wt-banner-row-text span { font-size: 11.5px; opacity: .7; }

.wt-switch { position: relative; flex: 0 0 auto; width: 38px; height: 21px; }
.wt-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.wt-switch .wt-track { position: absolute; inset: 0; background: rgba(0, 0, 0, .18); border-radius: 999px; transition: background .15s ease; }
.wt-switch .wt-track::before { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s ease; }
.wt-switch input:checked + .wt-track { background: var(--wt-accent); }
.wt-switch input:checked + .wt-track::before { transform: translateX(17px); }
.wt-switch input:disabled + .wt-track { opacity: .5; cursor: not-allowed; }

@media (max-width: 480px) {
	.wt-banner { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
	.wt-banner--box { max-width: none; }
}

/* ---------- Bouton flottant de réouverture ---------- */
.wt-reopen-btn {
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: 999998;
	width: 62px;
	height: 62px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--wt-border);
	border-radius: 50%;
	background: var(--wt-bg);
	color: var(--wt-accent);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
	cursor: pointer;
	opacity: 0;
	transform: scale(.85);
	pointer-events: none;
	transition: transform .2s ease, opacity .2s ease, filter .15s ease;
}
.wt-reopen-btn.is-visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.wt-reopen-btn:hover { filter: brightness(1.1); }

@media (max-width: 480px) {
	.wt-reopen-btn { left: 16px; bottom: 16px; width: 54px; height: 54px; }
}
