/* Onboarding Modal */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.onboarding-modal {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.onboarding-header {
    text-align: center;
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f0ebe4;
}

.onboarding-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.onboarding-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #7c9885, #6a8a73);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.onboarding-logo .logo-icon svg {
    width: 18px;
    height: 18px;
}

.onboarding-logo .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #7c9885;
    letter-spacing: 1px;
}

.onboarding-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.onboarding-header p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* Steps indicator */
.onboarding-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 32px;
    gap: 0;
}

.onboarding-steps .step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e4de;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.onboarding-steps .step.active {
    background: #7c9885;
    color: white;
}

.onboarding-steps .step-line {
    width: 60px;
    height: 3px;
    background: #e8e4de;
    transition: all 0.3s ease;
}

.onboarding-steps .step-line.active {
    background: #7c9885;
}

/* Content */
.onboarding-content {
    padding: 24px 32px;
}

.onboarding-step-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.step-description {
    font-size: 14px;
    color: #888;
    margin: 0 0 24px;
}

/* Form elements */
.onboarding-content .form-group {
    margin-bottom: 20px;
}

.onboarding-content .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.onboarding-content .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e4de;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fafafa;
}

.onboarding-content .form-group input:focus {
    outline: none;
    border-color: #7c9885;
    background: white;
    box-shadow: 0 0 0 4px rgba(124, 152, 133, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Search sources */
.search-sources {
    background: #f8f6f3;
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
}

.search-sources p {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
}

.sources-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.source-badge {
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #7c9885;
    border: 1px solid #d4e4d8;
}

/* Search Results */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.result-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 2px solid #e8e4de;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-card:hover {
    border-color: #d4a574;
    background: #fffbf7;
}

.result-card.selected {
    border-color: #7c9885;
    background: #f5f9f6;
}

.result-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #d4a574;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.result-specialty {
    font-size: 13px;
    color: #7c9885;
    margin-bottom: 2px;
}

.result-address {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-sources {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.source-tag {
    font-size: 10px;
    padding: 2px 6px;
    background: #e8e4de;
    border-radius: 4px;
    color: #666;
}

.result-check {
    width: 24px;
    height: 24px;
    color: #7c9885;
}

.result-check svg {
    width: 24px;
    height: 24px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.no-results p {
    margin: 8px 0;
}

.btn-manual {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: transparent;
    border: 2px dashed #d4a574;
    border-radius: 10px;
    color: #d4a574;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-manual:hover {
    background: #fffbf7;
}

/* Footer */
.onboarding-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-top: 1px solid #f0ebe4;
    gap: 12px;
}

.btn-skip {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #888;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-skip:hover {
    color: #333;
}

.btn-back {
    padding: 12px 24px;
    background: #f0ebe4;
    border: none;
    border-radius: 10px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #e8e4de;
}

.btn-next {
    padding: 12px 32px;
    background: linear-gradient(135deg, #7c9885, #6a8a73);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.4);
}

.btn-next:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.onboarding-modal .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Profile form */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Formations list */
.formations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.formation-tag {
    background: #f0f7f2;
    color: #5a7d62;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #d4e4d8;
}

/* Checkbox label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7c9885;
}

/* Read-only inputs */
.profile-form input[readonly] {
    background: #f5f5f5;
    color: #666;
    cursor: default;
}

/* Legal section */
.legal-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e8e4de;
}

.legal-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #666;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-section h4::before {
    content: "⚖️";
}
