/* Style pour l'en-tête de la section salaire */
.salary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

/* Style pour le titre */
.salary-header h3 {
    font-size: 1.3em;
    color: var(--button-bg);
    margin: 0;
}

/* Style pour le toggle switch */
.salary-period-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.period-label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.85em;
}


/* Conteneur du toggle switch */
.toggle-switch {
    position: relative;
    width: 140px;
    height: 30px;
    background-color: #d3e3fc; /* Fond cohérent avec votre thème */
    border: 1px solid var(--input-border); /* Bordure pour contraste */
    border-radius: 15px; /* Coins arrondis pour un look moderne */
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Cacher la checkbox native */
#salaryPeriodToggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider (conteneur des options Mensuel/Annuel) */
.slider {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between; /* Espace les options */
    align-items: center; /* Centre verticalement les textes */
    border-radius: 15px;
    padding: 0 5px; /* Léger padding pour le texte */
    box-sizing: border-box;
    position: relative; /* Pour le pseudo-élément ::before */
}

/* Style des options Mensuel/Annuel */
.slider .option {
    color: var(--text-color); /* Couleur de texte cohérente */
    font-size: 0.9em;
    z-index: 1; /* Place le texte au-dessus du curseur */
    width: 50%; /* Chaque option prend la moitié */
    text-align: center; /* Centre le texte dans chaque moitié */
}

/* Pseudo-élément pour le curseur */
.slider::before {
    content: '';
    position: absolute;
    width: 50%; /* Moitié de la largeur du toggle */
    height: 90%; /* Légèrement plus petit que le toggle */
    background-color: var(--button-bg); /* Bleu de votre thème */
    border-radius: 12px; /* Coins arrondis */
    top: 50%; /* Centre verticalement */
    left: 2px; /* Décalage léger */
    transform: translateY(-50%); /* Ajuste le centrage vertical */
    transition: transform 0.3s ease; /* Animation fluide */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* État coché : déplace le curseur à droite */
#salaryPeriodToggle:checked + .slider::before {
    transform: translateY(-50%) translateX(96%); /* Déplace à droite */
}

/* Changement de couleur au clic (optionnel) */
/*#salaryPeriodToggle:checked + .slider .mensuel {
    background-color: red; /* Fond plus clair quand coché 
}
#salaryPeriodToggle:checked + .slider .annuel {
    background-color: green; /* Fond plus clair quand coché 
}*/


/*.toggle-switch input {
    display: none;
}*/

/*.slider .mensuel {
    color: red;
}

.slider .annuel {
    color: #666;
}*/

/*.toggle-switch input:checked + .slider .mensuel {
    color: #666;
}

.toggle-switch input:checked + .slider .annuel {
    color: var(--button-bg);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(100%);
}*/

/* Style pour l'indicateur de période */
.period-indicator {
    margin-left: 5px;
    font-size: 0.9em;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 500px) {
    .salary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 0 5px;
    }
    .salary-period-toggle {
        justify-content: center;
        width: 100%;
    }
    .period-label {
        font-size: 0.8em;
    }
    .period-indicator {
        font-size: 0.8em;
    }
    #taxDetails {
        padding: 8px;
    }
    #taxDetails h3 {
        font-size: 1.1em;
    }
    #taxDetails ul {
        font-size: 0.85em;
    }
}

@media (min-width: 1000px) and (max-width: 1150px) {
    .salary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 0 5px;
    }
    .salary-period-toggle {
        justify-content: center;
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .toggle-switch {
        width: 120px; /* Plus petit sur mobile */
        height: 26px;
    }
    .slider .option {
        font-size: 0.8em;
    }
    .slider::before {
        height: 85%;
        border-radius: 10px;
    }
    #taxDetails {
        margin-top: 10px;
        padding: 8px;
    }
    #taxDetails h3 {
        font-size: 1.15em;
    }
    #taxDetails li {
        margin-bottom: 6px;
        font-size: 0.8em;
    }
}

/* Style pour le titre des détails des taxes */
#taxDetails h3 {
    font-size: 1.2em;
    color: var(--button-bg); /* Couleur cohérente avec autres titres */
    margin: 0 0 10px 0;
}

/* Style pour la liste des taxes */
#taxDetails ul {
    margin: 0;
    padding: 0;
    font-size: 0.95em;
    color: var(--text-color);
}

/* Style pour la section des détails des taxes */
#taxDetails {
    margin-top: 15px;
    padding: 10px;
    background-color: var(--background-light); /* Fond clair pour cohérence */
    border-radius: 5px; /* Coins arrondis */
    max-width: 500px;
}

/* Style pour les valeurs des taxes */
#taxDetails span {
    font-weight: 500;
}

/* Style pour chaque élément de la liste */
#taxDetails li {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Style pour le total des taxes (en gras) */
#taxDetails li strong {
    font-weight: 600;
}

/* Styles pour la section d'aide */
.help {
    margin: 10px 0;
    max-width: 600px; /* Limite la largeur pour une intégration discrète */
}
.help-toggle {
    background-color: #6b7280; /* Gris sobre pour rester discret */
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.8em;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease;
}
.help-toggle:hover {
    background-color: #4b5563; /* Légère variation au survol */
}
.help-content {
    margin-top: 8px;
    padding: 10px;
    background-color: #f9fafb; /* Fond clair et discret */
    border-left: 3px solid #d1d5db; /* Bordure subtile pour démarquer */
    font-style: italic; /* Texte en italique pour discrétion */
    font-size: 0.8em;
    color: #4b5563; /* Gris foncé pour une lecture douce */
    line-height: 1.5;
}
.chevron {
    transition: transform 0.2s ease;
}
.chevron.open {
    transform: rotate(180deg); /* Rotation de l'icône quand ouvert */
}