.toggle-switch {
    background: #ccc;
    width: 80px;
    height: 30px;
    overflow: hidden;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 10px;
}

.toggle-switch:after {
    content: " ";
    display: block;
    width: 40px;
    height: 30px;
    background-color: #3498db;
    border: 3px solid #fff;
    border-top: 0;
    border-bottom: 0;
    margin-left: -3px;
    transition: 0.1s ease-in-out;
}

.active .toggle-switch:after {
    margin-left: 40px;
}

.toggle-label {
    display: inline-block;
    line-height: 30px;
}

.active .toggle-label-on,
.toggle-label-off {
    color: #3498db;
}

.active .toggle-label-off {
    color: #000;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-top: 10px;
    margin-left: 4px;
    margin-right: 4px;
}

.switch label {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Masquer la checkbox par défaut */
.switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Le slider (fond du switch) */
.switch label span {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

/* Le bouton rond qui se déplace */
.switch label span::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* État activé (checked) - VERT POMME */
.switch input:checked + span {
    background-color: #8DB600;
}

/* Déplacement du bouton quand activé */
.switch input:checked + span::before {
    transform: translateX(20px);
}

/* Effet focus pour l'accessibilité */
.switch input:focus + span {
    box-shadow: 0 0 1px #8DB600;
}

/* Version avec effet hover */
.switch label span:hover {
    opacity: 0.9;
}