/* Woo RGPD — bandeau de consentement & modale de préférences
   Z-index intentionnellement inférieur (999990) à celui de Woo Disclaimer (999999)
   afin que le popup d'âge reste prioritaire si les deux plugins sont actifs. */

.wrgpd-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999990;
	background: #ffffff;
	color: #111827;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	box-shadow: 0 -8px 30px -8px rgba(0, 0, 0, 0.18);
	padding: 22px 28px;
	animation: wrgpd-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wrgpd-banner[hidden] { display: none; }

.wrgpd-pos-bottom { bottom: 0; }
.wrgpd-pos-top    { top: 0; box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.18); animation-name: wrgpd-slide-down; }

.wrgpd-pos-center {
	top: 50%;
	bottom: auto;
	left: 50%;
	right: auto;
	transform: translate(-50%, -50%);
	max-width: 640px;
	width: calc(100% - 40px);
	border-radius: 14px;
	animation-name: wrgpd-pop-in;
}

@keyframes wrgpd-slide-up   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes wrgpd-slide-down { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes wrgpd-pop-in     { from { transform: translate(-50%, -50%) scale(0.96); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

.wrgpd-banner-inner {
	display: flex;
	align-items: center;
	gap: 32px;
	max-width: 1500px;
	margin: 0 auto;
	flex-wrap: wrap;
}

.wrgpd-pos-center .wrgpd-banner-inner { flex-direction: column; align-items: stretch; gap: 20px; }

.wrgpd-banner-content {
	flex: 1 1 480px;
	min-width: 0;
}

.wrgpd-banner-title {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wrgpd-primary, #111827);
	margin: 0 0 10px;
	line-height: 1.3;
}

.wrgpd-banner-desc {
	font-size: 0.9rem;
	line-height: 1.55;
	color: #374151;
}

.wrgpd-banner-desc p { margin: 0 0 0.6em; }
.wrgpd-banner-desc p:last-child { margin-bottom: 0; }

.wrgpd-policy-line { margin-top: 4px !important; }

.wrgpd-policy-link {
	color: var(--wrgpd-accent, #2563eb);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.wrgpd-policy-link:hover { text-decoration-thickness: 2px; }

.wrgpd-banner-actions {
	display: flex;
	gap: 10px;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
}

.wrgpd-pos-center .wrgpd-banner-actions { justify-content: stretch; }
.wrgpd-pos-center .wrgpd-banner-actions .wrgpd-btn { flex: 1 1 140px; }

.wrgpd-btn {
	padding: 12px 22px;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	border: 1.5px solid var(--wrgpd-primary, #111827);
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
	font-family: inherit;
	background: #ffffff;
	color: var(--wrgpd-primary, #111827);
	min-width: 130px;
	text-align: center;
	-webkit-appearance: none;
	appearance: none;
	line-height: 1.2;
}

.wrgpd-btn:hover  { background: #f3f4f6; }
.wrgpd-btn:active { transform: translateY(1px); }

.wrgpd-btn-primary {
	background: var(--wrgpd-primary, #111827);
	color: #ffffff;
	border-color: var(--wrgpd-primary, #111827);
}
.wrgpd-btn-primary:hover { background: #000; border-color: #000; }

.wrgpd-btn-ghost {
	background: #ffffff;
	color: var(--wrgpd-primary, #111827);
}

/* ---------------------------------------------------------------------
   Modale de préférences
--------------------------------------------------------------------- */
.wrgpd-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 999991;
	background: var(--wrgpd-overlay, rgba(15, 23, 42, 0.6));
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
	animation: wrgpd-fade 0.2s ease-out;
}
.wrgpd-modal-overlay[hidden] { display: none; }

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

.wrgpd-modal {
	background: #ffffff;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 40px);
	border-radius: 14px;
	box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.4);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #1f2937;
	animation: wrgpd-pop-in-modal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wrgpd-pop-in-modal { from { transform: translateY(20px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.wrgpd-modal-header {
	padding: 20px 26px;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.wrgpd-modal-header h2 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--wrgpd-primary, #111827);
	line-height: 1.3;
}

.wrgpd-modal-close {
	background: none;
	border: none;
	font-size: 1.8rem;
	line-height: 1;
	color: #9ca3af;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	transition: background 0.15s, color 0.15s;
}
.wrgpd-modal-close:hover { background: #f3f4f6; color: #111827; }

.wrgpd-modal-body {
	padding: 22px 26px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.wrgpd-modal-intro {
	font-size: 0.9rem;
	line-height: 1.55;
	color: #4b5563;
	margin-bottom: 20px;
}
.wrgpd-modal-intro p { margin: 0 0 0.6em; }

.wrgpd-categories {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wrgpd-category {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 16px 18px;
	background: #fafafa;
	transition: border-color 0.15s, background 0.15s;
}
.wrgpd-category:hover { background: #ffffff; border-color: #d1d5db; }

.wrgpd-category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.wrgpd-category-label {
	font-weight: 600;
	color: #111827;
	font-size: 0.95rem;
}

.wrgpd-category-required {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7280;
	font-weight: 600;
}

.wrgpd-category-desc {
	font-size: 0.85rem;
	color: #4b5563;
	line-height: 1.5;
	padding-left: 56px;
}
.wrgpd-category-desc p { margin: 0; }

/* Switch */
.wrgpd-switch {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}

.wrgpd-switch input { position: absolute; opacity: 0; pointer-events: none; }

.wrgpd-switch-track {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	background: #d1d5db;
	border-radius: 999px;
	transition: background 0.2s;
	flex-shrink: 0;
}

.wrgpd-switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s;
}

.wrgpd-switch input:checked + .wrgpd-switch-track { background: var(--wrgpd-primary, #111827); }
.wrgpd-switch input:checked + .wrgpd-switch-track .wrgpd-switch-thumb { transform: translateX(18px); }
.wrgpd-switch input:disabled + .wrgpd-switch-track { opacity: 0.65; cursor: not-allowed; }
.wrgpd-switch input:focus-visible + .wrgpd-switch-track { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }

.wrgpd-modal-footer {
	padding: 18px 26px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.wrgpd-modal-footer .wrgpd-btn { min-width: 0; }

/* ---------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------- */
html.wrgpd-locked, html.wrgpd-locked body { overflow: hidden !important; }

@media (max-width: 720px) {
	.wrgpd-banner { padding: 16px 18px; }
	.wrgpd-banner-inner { flex-direction: column; align-items: stretch; gap: 14px; }
	.wrgpd-banner-actions { width: 100%; }
	.wrgpd-banner-actions .wrgpd-btn { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 12px 14px; }
	.wrgpd-modal-footer { flex-direction: column; }
	.wrgpd-modal-footer .wrgpd-btn { width: 100%; }
	.wrgpd-category-desc { padding-left: 0; margin-top: 4px; }
}
