/* ── Wrapper (positionnement relatif pour le dropdown) ── */
.color-palette-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

/* ── Swatch : le bouton qui affiche la couleur sélectionnée ── */
.color-palette-swatch {
    width: 100%;
    height: 36px;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease;
    padding: 0;
    box-sizing: border-box;
}

.color-palette-swatch:hover {
    border-color: #888;
}

/* ── Dropdown : masqué par défaut, positionné sous le swatch ── */
.color-palette-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-palette-dropdown--open {
    display: block;
}

/* ── Table ── */
.color-palette-table {
    border-collapse: collapse;
}

/* ── Cellules de couleur ── */
.color-palette-cell {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.color-palette-cell:hover {
    transform: scale(1.3);
    z-index: 1;
    border-color: rgba(0, 0, 0, 0.4);
}

.color-palette-cell--selected {
    border-color: #000;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
    transform: scale(1.2);
    z-index: 2;
}

.color-palette-cell:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.6);
}

/* ── Bouton "Aucune couleur" ── */
.color-palette-none {
    width: 100%;
    padding: 4px 0;
    margin-top: 4px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.color-palette-none:hover {
    background-color: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.3);
}

.color-palette-none--selected {
    border-color: #000;
    font-weight: 600;
    color: #000;
}

