/* Calculette d'émoluments - Styles */

.emoluments-calculator {
    margin: 40px 0;
    padding: 0;
}

.emoluments-calculator h2 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-family: aileron;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calc-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.calc-form {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 35px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 0.5px solid rgba(0, 0, 0, 0.06);
}

.calc-form-group {
    margin-bottom: 25px;
}

.calc-form-group:last-child {
    margin-bottom: 0;
}

.calc-form-group label {
    display: block;
    font-weight: 700;
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: "Source Sans Pro", sans-serif;
}

.calc-form-group input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    letter-spacing: -0.3px;
}

.calc-form-group input[type="text"]:focus {
    outline: none;
    border-color: #6691c5;
    box-shadow: 0 0 0 4px rgba(102, 145, 197, 0.12),
                inset 0 2px 4px rgba(0, 0, 0, 0.02);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.calc-form-group input[type="text"]::placeholder {
    color: #999;
}

.calc-help {
    display: block;
    margin-top: 6px;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Boutons de sélection style iOS 26 */
.calc-radio-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 6px;
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.calc-radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 16px 24px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    position: relative;
    border: none;
    overflow: hidden;
}

.calc-radio-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6691c5 0%, #4a7ba8 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.calc-radio-label.checked::before {
    opacity: 1;
}

.calc-radio-label.checked {
    box-shadow: 0 4px 16px rgba(102, 145, 197, 0.3),
                0 2px 8px rgba(102, 145, 197, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.calc-radio-label:active {
    transform: scale(0.98);
}

.calc-radio-label:hover:not(.checked) {
    background: rgba(102, 145, 197, 0.08);
}

.calc-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.calc-radio-custom {
    display: none;
}

.calc-radio-text {
    font-size: 1.05em;
    color: #1d1d1f;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    font-weight: 500;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
    letter-spacing: -0.2px;
}

.calc-radio-label.checked .calc-radio-text {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Résultats */
.calc-results {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    overflow: visible;
    min-height: 200px;
}

.calc-results:not(.has-results) {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-style: italic;
}

.calc-results.has-results {
    padding: 0;
}

.calc-results-header {
    background: linear-gradient(135deg, rgba(102, 145, 197, 0.95) 0%, rgba(74, 123, 168, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 24px 30px;
    text-align: center;
    border-radius: 24px 24px 0 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.2);
}

.calc-results-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: aileron;
}

.calc-results-body {
    padding: 30px;
    padding-bottom: 60px;
    overflow: visible;
}

.calc-result-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e8e8e8;
}

.calc-result-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.calc-section-grand-total.calc-result-section {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.calc-result-section h4 {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    color: #555;
    font-weight: 600;
    font-family: "Source Sans Pro", sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.calc-percentage {
    font-size: 0.85em;
    font-weight: 500;
    color: #6691c5;
    font-style: italic;
    background: rgba(102, 145, 197, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
}

.calc-amount {
    font-size: 1.8em;
    font-weight: 700;
    color: #2c3e50;
    font-family: "Source Sans Pro", sans-serif;
}

.calc-amount-total {
    color: #6691c5;
    font-size: 2em;
}

.calc-amount-grand-total {
    color: #4aaa9e;
    font-size: 2.4em;
}

.calc-section-total {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.calc-section-grand-total {
    background: linear-gradient(135deg, rgba(240, 249, 247, 0.9) 0%, rgba(232, 245, 243, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 28px;
    padding-bottom: 38px;
    border-radius: 20px;
    margin-top: 20px;
    margin-bottom: 0;
    border: 0.5px solid rgba(74, 170, 158, 0.3);
    box-shadow: 0 8px 24px rgba(74, 170, 158, 0.15),
                0 4px 12px rgba(74, 170, 158, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.calc-section-emoluments {
    background: #fafbfc;
    padding: 20px;
    border-radius: 6px;
}

.calc-detail {
    margin: 15px 0;
}

.calc-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95em;
}

.calc-detail-row:last-child {
    border-bottom: none;
}

.calc-detail-row span:first-child {
    color: #666;
}

.calc-detail-row span:last-child {
    font-weight: 600;
    color: #2c3e50;
}

.calc-detail-total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    font-size: 1.1em;
}

.calc-detail-total span {
    font-weight: 700;
    color: #2c3e50;
}

.calc-repartition {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
}

.calc-repartition-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9em;
}

.calc-repartition-label {
    color: #666;
    font-style: italic;
}

.calc-repartition-amount {
    font-weight: 600;
    color: #6691c5;
}

.calc-error {
    padding: 30px;
    text-align: center;
    color: #d9534f;
}

.calc-error p {
    margin: 0;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 1199px) {
    .calc-wrapper {
        flex-direction: column;
    }

    .calc-form,
    .calc-results {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .emoluments-calculator h2 {
        font-size: 1.6em;
    }

    .calc-form {
        padding: 25px 20px;
    }

    .calc-results-body {
        padding: 20px;
    }

    .calc-amount {
        font-size: 1.5em;
    }

    .calc-amount-total {
        font-size: 1.7em;
    }

    .calc-amount-grand-total {
        font-size: 2em;
    }

    .calc-radio-group {
        gap: 10px;
    }

    .calc-radio-label {
        padding: 10px 12px;
    }
}

/* Animation pour l'apparition des résultats */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-results.has-results .calc-results-body {
    animation: fadeIn 0.4s ease-out;
}

