.checkbox-group {
    position: relative;
    margin: 1rem 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: background-color 0.2s ease;
}

.checkbox-wrapper:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
}

.checkbox-wrapper.required .checkbox-text::after {
    content: ' *';
    color: var(--danger);
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-mark {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 2px solid #c0c4cc;
    border-radius: 4px;
    transition: all 0.2s ease;
    background-color: white;
    flex-shrink: 0;
}

.checkbox-mark i {
    font-size: 12px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

/* État coché */
.checkbox-input:checked + .checkbox-label .checkbox-mark,
.checkbox-input:checked + .checkbox-mark {
    background-color: #6366F1;
    border-color: #6366F1;
}

.checkbox-input:checked + .checkbox-label .checkbox-mark i,
.checkbox-input:checked + .checkbox-mark i {
    opacity: 1;
    transform: scale(1);
}

/* État focus */
.checkbox-input:focus + .checkbox-label .checkbox-mark,
.checkbox-input:focus + .checkbox-mark {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    border-color: #6366F1;
}

/* État désactivé */
.checkbox-input:disabled + .checkbox-label .checkbox-mark,
.checkbox-input:disabled + .checkbox-mark {
    background-color: #e9ecef;
    border-color: #ced4da;
    cursor: not-allowed;
}

.checkbox-text {
    font-size: 14px;
    color: #4B5563;
    user-select: none;
    line-height: 1.4;
}

.checkbox-text a {
    color: #6366F1;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Animation de pulse pour la checkbox */
@keyframes checkPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.checkbox-input:checked + .checkbox-label .checkbox-mark,
.checkbox-input:checked + .checkbox-mark {
    animation: checkPulse 0.5s ease;
}