/* reset / conteneur */
.js-bonattribute .bonattribute-container {
  margin-bottom: 12px;
}

.js-bonattribute .bonattribute-box {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

/* si un thème traine des floats */
.js-bonattribute .bonattribute-box > li,
.js-bonattribute .bonattribute-box .input-container {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* label = bloc propre */
.js-bonattribute .bonattribute-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;

  /* évite les décalages de baseline */
  line-height: 1;
}

/* cacher input */
.js-bonattribute .bonattribute-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* pastille */
.js-bonattribute .bonattribute-color .color {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #cfcfcf;
  display: inline-block;
  background-size: cover;
  background-position: center;
}

/* état checked */
.js-bonattribute .bonattribute-item input:checked + .color,
.js-bonattribute .bonattribute-item input:checked + .radio-label {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* nom couleur */
.js-bonattribute .color-name {
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
  max-width: 120px;
  word-break: break-word;
}

/* radio “bouton” */
.js-bonattribute .bonattribute-radio .radio-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  background: #fff;
  white-space: nowrap;
}

/* OPTIONNEL mais recommandé pour Montana : limiter la hauteur du bloc couleurs */
.js-bonattribute .bonattribute-color {
  max-height: 240px;
  overflow: auto;
  padding-right: 6px;
}
