/* Styles pour le sélecteur de couleur dans le layer tree */
.color-picker-container {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.color-picker-input {
    width: 40px;
    height: 24px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    padding: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}

.color-picker-input:hover {
    border-color: #999;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 3px;
    border: none;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Intégration dans le layer tree */
.leaflet-control-layers-list .color-picker-container {
    margin-left: 8px;
    margin-right: auto;
}

/* ====================================================
 * RADIO BUTTONS CUSTOM - Style inspiré des checkboxes
 * ==================================================== */

/* Masquer les radio buttons natifs */
.leaflet-control-layers-selector[type="radio"] {
    position: absolute;
    top: 12px;
    opacity: 0;
    width: 1.2em;
    height: 1.2em;
    margin: 0;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

/* Style du radio button custom */
.leaflet-control-layers-selector[type="radio"] + .custom-radio {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    border: 3px solid var(--primary-color);
    border-radius: 50%; /* Cercle pour les radio buttons */
    background: var(--dark-color-1);
    position: relative;
    margin: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

/* Hover effect */
.leaflet-control-layers-selector[type="radio"]:hover + .custom-radio,
.leaflet-control-layers-selector[type="radio"]:checked:hover + .custom-radio {
    border-color: var(--secondary-color);
    outline: 1px solid rgb(188, 225, 255);
    background: var(--accent-color-focus);
}

/* État sélectionné */
.leaflet-control-layers-selector[type="radio"]:checked + .custom-radio {
    outline: 1px solid var(--tertiary-color);
    outline-offset: 2px;
    border-color: var(--accent-color-focus);
}

/* Point central pour l'état sélectionné */
.leaflet-control-layers-selector[type="radio"]:checked + .custom-radio::after {
    content: '';
    width: 0.4em;
    height: 0.4em;
    background: var(--accent-color-clear);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

/* Focus pour l'accessibilité */
.leaflet-control-layers-selector[type="radio"]:focus + .custom-radio {
    box-shadow: 0 0 0 2px var(--accent-color-focus);
    border-color: var(--primary-color);
}

/* État désactivé */
.leaflet-control-layers-selector[type="radio"]:disabled + .custom-radio {
    background: #444;
    border-color: #888;
    cursor: not-allowed;
}

/* Animation de transition */
.custom-radio {
    transition: all 0.2s ease;
}

/* Intégration dans le layer tree */
.leaflet-control-layers-list .custom-radio {
    margin-right: 0.5em;
}
