.gc-wrap {
	--gc-blue: #1d4ed8;
	--gc-ink: #1e293b;
	--gc-muted: #64748b;
	--gc-border: #e5e9f0;
	--gc-bg-soft: #f4f7fc;
	--gc-green: #16a34a;
	--gc-red: #e11d48;
	max-width: 1100px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--gc-ink);
}

.gc-card {
	background: #fff;
	border: 1px solid var(--gc-border);
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
	padding: 28px;
}

.gc-title {
	margin: 0 0 20px;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--gc-blue);
}

.gc-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: 10px;
	padding: 14px 16px;
	margin: 0;
}

.gc-search-wrap {
	position: relative;
	margin-bottom: 20px;
}

.gc-search-icon {
	position: absolute;
	left: 14px;
	top: 50% !important;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	margin: 0 !important;
	color: var(--gc-muted);
	pointer-events: none;
	z-index: 1;
}

.gc-search {
	width: 100% !important;
	box-sizing: border-box !important;
	padding: 12px 14px 12px 42px !important;
	font-size: 0.95rem;
	border: 1px solid var(--gc-border) !important;
	border-radius: 10px !important;
	background: var(--gc-bg-soft);
	color: var(--gc-ink);
	outline: none;
	margin: 0 !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.gc-search:focus {
	background: #fff;
	border-color: var(--gc-blue);
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.gc-table-scroll {
	border: 1px solid var(--gc-border);
	border-radius: 12px;
}

.gc-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 0.92rem;
}

.gc-table col.gc-col-color {
	width: 180px;
}

.gc-table col.gc-col-badge {
	width: 90px;
}

.gc-table thead th {
	text-align: left;
	font-weight: 600;
	color: var(--gc-ink);
	background: var(--gc-bg-soft);
	padding: 12px 16px;
	border-bottom: 1px solid var(--gc-border);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/*
 * L'en-tête figé au scroll est géré en JS (assets/js/gestion-couleurs.js) via un clone
 * en position: fixed plutôt que position: sticky : certains thèmes (Avada notamment) posent
 * overflow-x: clip/auto sur un wrapper ancêtre, ce qui piège le sticky CSS dans un contexte
 * de défilement qui ne défile jamais.
 */
.gc-sticky-clone {
	position: fixed;
	z-index: 9999;
	display: none;
	pointer-events: none;
	box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.gc-sticky-clone.is-visible {
	display: block;
}

.gc-sticky-clone table {
	margin: 0;
}

.gc-table tbody td {
	padding: 10px 16px;
	border-bottom: 1px solid var(--gc-border);
	vertical-align: middle;
	white-space: nowrap;
}

.gc-name-cell {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
}

.gc-table tbody tr:last-child td {
	border-bottom: none;
}

.gc-table tbody tr:hover {
	background: var(--gc-bg-soft);
}

.gc-table tbody tr[hidden] {
	display: none;
}

.gc-col-badge {
	text-align: center;
	width: 90px;
}

.gc-value {
	font-weight: 600;
}

.gc-name {
	color: var(--gc-ink);
	margin-left: 6px;
}

.gc-swatch {
	display: inline-block;
	width: 140px;
	max-width: 100%;
	height: 28px;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	vertical-align: middle;
	margin-right: 10px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.gc-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
}

.gc-badge svg {
	width: 14px;
	height: 14px;
}

.gc-badge--yes {
	background: rgba(22, 163, 74, 0.12);
	color: var(--gc-green);
}

.gc-badge--no {
	background: rgba(225, 29, 72, 0.1);
	color: var(--gc-red);
}

.gc-empty,
.gc-empty-search {
	text-align: center;
	color: var(--gc-muted);
	padding: 24px 0;
}

.gc-count {
	margin: 14px 2px 0;
	font-size: 0.85rem;
	color: var(--gc-muted);
}

@media (max-width: 640px) {
	.gc-card {
		padding: 16px;
		border-radius: 12px;
	}

	.gc-title {
		font-size: 1.25rem;
	}

	.gc-table-scroll {
		border: none;
		border-radius: 0;
	}

	.gc-sticky-clone {
		display: none !important;
	}

	.gc-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.gc-table,
	.gc-table tbody,
	.gc-table tr,
	.gc-table td {
		display: block;
		width: 100%;
	}

	.gc-table tbody tr {
		background: #fff;
		border: 1px solid var(--gc-border);
		border-radius: 12px;
		margin-bottom: 10px;
		padding: 6px 14px;
	}

	.gc-table tbody tr:hover {
		background: #fff;
	}

	.gc-table tbody td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 8px 0;
		border-bottom: 1px solid var(--gc-border);
		white-space: normal;
		overflow: visible;
		text-align: right;
	}

	.gc-table tbody tr td:last-child {
		border-bottom: none;
	}

	.gc-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		font-size: 0.78rem;
		text-transform: uppercase;
		letter-spacing: 0.02em;
		color: var(--gc-muted);
		text-align: left;
		flex-shrink: 0;
	}

	.gc-name {
		margin-left: 0;
		display: block;
		font-size: 0.85rem;
	}
}
