/* Form 5 - Bien vous connaître */
/* Бои: #C6B477 и #C5912F */

.form-5-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-5-container h2 {
    color: #C5912F;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.form-5-container h3.section-title {
    color: #C5912F;
    font-size: 22px;
    margin: 35px 0 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #faf9f5 0%, #f5f2e8 100%);
    border-radius: 6px;
    border-left: 5px solid #C6B477;
}

.form-field {
    margin-bottom: 30px;
}

.form-field label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.required-mark {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 3px;
}

.form-field input[type="text"],
.form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

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

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: flex-start;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ffffff;
    line-height: 1.6;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: #C6B477;
    background-color: #faf9f5;
    transform: translateX(5px);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.radio-label input[type="radio"]:checked,
.checkbox-label input[type="checkbox"]:checked {
    accent-color: #C5912F;
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
    border-color: #C6B477;
    background-color: #faf9f5;
    box-shadow: 0 2px 8px rgba(198, 180, 119, 0.2);
}

.radio-label span,
.checkbox-label span {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

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

.conditional-field {
    margin-left: 30px;
    padding: 20px;
    border-left: 4px solid #C6B477;
    background-color: #faf9f5;
    border-radius: 6px;
    margin-top: 15px;
}

.field-error {
    border-color: #e74c3c !important;
    background-color: #fef5f5 !important;
}

.checkbox-group.field-error {
    padding: 15px;
    background-color: #fef5f5;
    border-radius: 6px;
    border: 2px solid #e74c3c;
}

.submit-button {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #C6B477 0%, #C5912F 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(197, 145, 47, 0.3);
}

.submit-button:hover {
    background: linear-gradient(135deg, #C5912F 0%, #b8821a 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(197, 145, 47, 0.4);
}

.submit-button:active {
    transform: translateY(-1px);
}

.submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-message {
    padding: 18px 22px;
    border-radius: 8px;
    margin-top: 25px;
    font-size: 15px;
    line-height: 1.6;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.success {
    background-color: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
}

.active-field {
    position: relative;
}

.active-field::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #C6B477 0%, #C5912F 100%);
    border-radius: 3px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Question numbering style */
.form-field label::first-line {
    color: #C5912F;
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-5-container {
        padding: 25px;
        margin: 20px;
    }
    
    .form-5-container h2 {
        font-size: 24px;
    }
    
    .form-5-container h3.section-title {
        font-size: 18px;
        padding: 12px 15px;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 10px;
    }
    
    .radio-label,
    .checkbox-label {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .conditional-field {
        margin-left: 0;
        padding: 15px;
    }
    
    .radio-label:hover,
    .checkbox-label:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .submit-button,
    .form-message {
        display: none;
    }
    
    .form-field {
        break-inside: avoid;
    }
    
    .section-title {
        break-after: avoid;
    }
}

/* Accessibility improvements */
.radio-label:focus-within,
.checkbox-label:focus-within {
    outline: 3px solid #C6B477;
    outline-offset: 2px;
}

input[type="radio"]:focus,
input[type="checkbox"]:focus {
    outline: 2px solid #C5912F;
    outline-offset: 2px;
}

/* Loading state */
.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}