.ccx-colors{
  margin: 18px 0 0;
  padding: 14px 16px 16px;
  border-radius: 18px;
  background: rgba(23, 29, 38, 0.70);
  border: 1px solid rgba(255,255,255,.08);
}

.ccx-colors__title{
  display:block;
  margin:0 0 10px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: rgba(245,247,251,.92) !important;
  letter-spacing:.2px;
}

.ccx-colors__grid{
  /* Force pills layout even if a theme/plugin overrides display rules */
  display:flex !important;
  flex-wrap:wrap;
  gap: 10px 14px;
}

.ccx-colors__item{
  display:inline-flex !important;
  align-items:center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px; /* capsule Apple */
  text-decoration:none !important;
  width: auto !important;
  max-width: 100%;
  background: rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.10);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.ccx-colors__item:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(0,0,0,.20);
}

.ccx-colors__item.is-current{
  border-color: rgba(0,255,106,.55);
  box-shadow: 0 0 0 3px rgba(0,255,106,.10);
}

.ccx-swatch{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex: 0 0 auto;
}

/* Compat: le markup CCX utilise .ccx-colors__dot (pas .ccx-swatch) */
.ccx-colors__dot{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}

/* Couleurs par slug (robuste: on met une base et on override) */
.ccx-colors__dot{ background: rgba(255,255,255,.22); }
.ccx-colors__dot--noir{ background:#0b0f14; }
.ccx-colors__dot--bleu{ background:#2f6bff; }
.ccx-colors__dot--rose{ background:#ff5ea8; }
.ccx-colors__dot--jaune{ background:#ffcc2f; }
.ccx-colors__dot--vert{ background:#34d399; }
.ccx-colors__dot--blanc{ background:#f3f4f6; }
.ccx-colors__dot--gris{ background:#9ca3af; }
.ccx-colors__dot--argent{ background:#cbd5e1; }
.ccx-colors__dot--titane{ background:#b8b5ad; }
.ccx-colors__dot--violet{ background:#a78bfa; }
.ccx-colors__dot--rouge{ background:#ef4444; }

/* État sélectionné: petit anneau "premium" */
.ccx-colors__item[aria-current="page"] .ccx-colors__dot,
.ccx-colors__item.is-active .ccx-colors__dot{
  box-shadow:
    0 0 0 2px rgba(0,255,106,.35),
    inset 0 1px 0 rgba(255,255,255,.12);
  border-color: rgba(0,255,106,.55);
}

.ccx-swatch img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.ccx-colors__label{
  font-size: 13px;
  font-weight: 700;
  color: rgba(245,247,251,.92);
}

@media (max-width: 560px){
  .ccx-colors__grid{
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .ccx-colors__item{ flex: 0 0 auto; }
}
