/**
 * CSS за Форма 3 - Ouverture de compte (Multi-step)
 * Бои: #C6B477 и #C5912F
 */

/* Progress bar */
.form-progress {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C6B477 0%, #C5912F 100%);
    transition: width 0.4s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    cursor: pointer;
}

.progress-steps .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e8e8e8;
    z-index: -1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #C5912F;
    color: #ffffff;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #46b450;
    color: #ffffff;
}

.step-label {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

.step.active .step-label {
    color: #C5912F;
    font-weight: 500;
}

/* Multi-step form */
.multi-step-form .form-step {
    display: none;
}

.multi-step-form .form-step.active {
    display: block;
    animation: fadeInSlide 0.4s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-title {
    font-size: 22px;
    color: #C5912F;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #C6B477;
    font-weight: 500;
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.radio-label:hover {
    border-color: #C6B477;
    background: #faf9f5;
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #C5912F;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 500;
    color: #C5912F;
}

.radio-label:has(input:checked) {
    border-color: #C6B477;
    background: #faf9f5;
}

/* Checkbox buttons */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.checkbox-label:hover {
    border-color: #C6B477;
    background: #faf9f5;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #C5912F;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 500;
    color: #C5912F;
}

.checkbox-label:has(input:checked) {
    border-color: #C6B477;
    background: #faf9f5;
}

/* File upload */
.form-field input[type="file"] {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
}

.form-field input[type="file"]:hover {
    border-color: #C6B477;
    background: #faf9f5;
}

.field-help {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Navigation buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
}

.btn-prev,
.btn-next {
    padding: 12px 30px;
    border: 1px solid #C6B477;
    background: #ffffff;
    color: #C5912F;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev:hover,
.btn-next:hover {
    background: #C5912F;
    color: #ffffff;
    border-color: #C5912F;
    transform: translateY(-2px);
}

.btn-prev:disabled,
.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-next {
    margin-left: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .progress-steps {
        gap: 10px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 10px;
    }
    
    .radio-label,
    .checkbox-label {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-prev,
    .btn-next {
        width: 100%;
    }
    
    .btn-next {
        margin-left: 0;
    }
}

/* Validation states */
.form-field.error input,
.form-field.error textarea,
.form-field.error select {
    border-color: #dc3232;
}

.form-field.error .radio-label,
.form-field.error .checkbox-label {
    border-color: #dc3232;
}

.error-message {
    color: #dc3232;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-field.error .error-message {
    display: block;
}

/* Specific styling for form-3 */
.form-3-container h2 {
    color: #C5912F;
}

.form-3-container .form-notice {
    background: #faf9f5;
    border-left-color: #C6B477;
}

/* Bilan styling */
.section-title {
    font-size: 18px;
    color: #C5912F;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
    font-weight: 500;
}

.bilan-row {
    display: grid;
    grid-template-columns: 1fr 1fr 150px;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.bilan-row label {
    font-weight: 400;
    color: #333;
}

.bilan-row select,
.bilan-row input[type="text"],
.bilan-row input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bilan-row select:focus,
.bilan-row input:focus {
    outline: none;
    border-color: #C6B477;
    box-shadow: 0 0 0 3px rgba(198, 180, 119, 0.1);
}

.bilan-row input[type="number"] {
    text-align: right;
    font-weight: 500;
}

.bilan-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #faf9f5;
    border: 2px solid #C6B477;
    border-radius: 4px;
    margin: 20px 0 30px;
}

.bilan-total strong {
    font-size: 16px;
    color: #C5912F;
}

.total-value {
    font-size: 18px;
    font-weight: bold;
    color: #C5912F;
}

.bilan-summary {
    background: #fafafa;
    padding: 25px;
    border-radius: 4px;
    margin-top: 40px;
    border: 2px solid #e8e8e8;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

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

.summary-row span {
    font-size: 15px;
    color: #555;
}

.summary-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.summary-net {
    margin-top: 15px;
    padding-top: 20px;
    border-top: 3px solid #C6B477 !important;
}

.summary-net span {
    font-size: 18px;
    font-weight: 500;
    color: #C5912F;
}

.summary-net .summary-value {
    font-size: 22px;
    color: #46b450;
}

/* Responsive pour Bilan */
@media (max-width: 768px) {
    .bilan-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .bilan-row label {
        margin-bottom: 5px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .bilan-total {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .summary-row {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}